Merge to upstream r225300.

Change-Id: I2b23715db9ac129ff80aa78ad5824db0a4d6fbb3
This commit is contained in:
Dan Albert
2015-01-06 15:06:45 -08:00
parent 4385cd8d93
commit 06086258d3
4853 changed files with 3744 additions and 971 deletions

View File

@@ -0,0 +1,12 @@
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
int main()
{
}

View File

@@ -0,0 +1,25 @@
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// <valarray>
// class glice;
// gslice();
#include <valarray>
#include <cassert>
int main()
{
std::gslice gs;
assert(gs.start() == 0);
assert(gs.size().size() == 0);
assert(gs.stride().size() == 0);
}

View File

@@ -0,0 +1,38 @@
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// <valarray>
// class glice;
// gslice(size_t start, const valarray<size_t>& size,
// const valarray<size_t>& stride);
#include <valarray>
#include <cassert>
int main()
{
std::size_t a1[] = {1, 2, 3};
std::size_t a2[] = {4, 5, 6};
std::valarray<std::size_t> size(a1, sizeof(a1)/sizeof(a1[0]));
std::valarray<std::size_t> stride(a2, sizeof(a2)/sizeof(a2[0]));
std::gslice gs(7, size, stride);
assert(gs.start() == 7);
std::valarray<std::size_t> r = gs.size();
assert(r.size() == 3);
assert(r[0] == 1);
assert(r[1] == 2);
assert(r[2] == 3);
r = gs.stride();
assert(r.size() == 3);
assert(r[0] == 4);
assert(r[1] == 5);
assert(r[2] == 6);
}

View File

@@ -0,0 +1,12 @@
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
int main()
{
}