1 //===------------------------ valarray.cpp --------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 _LIBCPP_BEGIN_NAMESPACE_STD
14 template valarray
<size_t>::valarray(size_t);
15 template valarray
<size_t>::~valarray();
16 template void valarray
<size_t>::resize(size_t, size_t);
19 gslice::__init(size_t __start
)
21 valarray
<size_t> __indices(__size_
.size());
22 size_t __k
= __size_
.size() != 0;
23 for (size_t __i
= 0; __i
< __size_
.size(); ++__i
)
32 size_t __i
= __indices
.size() - 1;
35 if (++__indices
[__i
] < __size_
[__i
])
38 __1d_
[__k
] = __1d_
[__k
-1] + __stride_
[__i
];
39 for (size_t __j
= __i
+ 1; __j
!= __indices
.size(); ++__j
)
40 __1d_
[__k
] -= __stride_
[__j
] * (__size_
[__j
] - 1);
54 _LIBCPP_END_NAMESPACE_STD