54#include <blitz/array/slice.h>
55#include <blitz/array/map.h>
56#include <blitz/array/multi.h>
57#include <blitz/array/domain.h>
58#include <blitz/array/storage.h>
60#ifdef BZ_HAVE_BOOST_SERIALIZATION
61#include <boost/serialization/serialization.hpp>
62#include <boost/serialization/base_object.hpp>
72template<
typename T_numtype,
int N_rank>
75template<
typename T_numtype,
int N_rank>
78template<
typename T_numtype,
int N_rank>
81template<
typename P_expr>
84template<
typename T_array,
typename T_index>
87template <
typename P_numtype,
int N_rank>
90template <
typename P_numtype,
int N_rank>
105template<
typename P_numtype,
int N_rank>
107#ifdef BZ_NEW_EXPRESSION_TEMPLATES
108 ,
public ETBase<Array<P_numtype,N_rank> >
149#if defined(BZ_FORTRAN_ARRAY)
151#elif defined(BZ_COLUMN_MAJOR_ARRAY)
168 template<
typename T_expr>
198 BZPRECONDITION(N_rank >= 2);
199 TAU_TYPE_STRING(p1,
"Array<T,N>::Array() [T="
200 + CT(
T_numtype) +
",N=" + CT(N_rank) +
"]");
201 TAU_PROFILE(p1,
"void (int,int)", TAU_BLITZ);
208 Array(
int length0,
int length1,
int length2,
212 BZPRECONDITION(N_rank >= 3);
219 Array(
int length0,
int length1,
int length2,
int length3,
223 BZPRECONDITION(N_rank >= 4);
231 Array(
int length0,
int length1,
int length2,
int length3,
int length4,
235 BZPRECONDITION(N_rank >= 5);
244 Array(
int length0,
int length1,
int length2,
int length3,
int length4,
249 BZPRECONDITION(N_rank >= 6);
259 Array(
int length0,
int length1,
int length2,
int length3,
int length4,
260 int length5,
int length6,
264 BZPRECONDITION(N_rank >= 7);
275 Array(
int length0,
int length1,
int length2,
int length3,
int length4,
276 int length5,
int length6,
int length7,
280 BZPRECONDITION(N_rank >= 8);
292 Array(
int length0,
int length1,
int length2,
int length3,
int length4,
293 int length5,
int length6,
int length7,
int length8,
297 BZPRECONDITION(N_rank >= 9);
310 Array(
int length0,
int length1,
int length2,
int length3,
int length4,
311 int length5,
int length6,
int length7,
int length8,
int length9,
315 BZPRECONDITION(N_rank >= 10);
329 Array(
int length0,
int length1,
int length2,
int length3,
int length4,
330 int length5,
int length6,
int length7,
int length8,
int length9,
335 BZPRECONDITION(N_rank >= 11);
355 GeneralArrayStorage<N_rank> storage =
381 GeneralArrayStorage<N_rank> storage =
404 GeneralArrayStorage<N_rank> storage =
432 GeneralArrayStorage<N_rank> storage =
470 const GeneralArrayStorage<N_rank>& storage
758#ifdef BZ_NEW_EXPRESSION_TEMPLATES
774 int lastExtent,
const GeneralArrayStorage<N_rank>& storage);
841 constructSubarray(array, r0, r1, r2, r3, r4, r5, r6, r7, r8, r9);
848 constructSubarray(array, r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10);
859 const StridedDomain<N_rank>& subdomain)
869 template<
int N_rank2,
typename R0,
typename R1,
typename R2,
typename R3,
typename R4,
870 typename R5,
typename R6,
typename R7,
typename R8,
typename R9,
typename R10>
872 R3 r3, R4 r4, R5 r5, R6 r6, R7 r7, R8 r8, R9 r9, R10 r10)
874 constructSlice(array, r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10);
897 template<
typename P_numtype2>
899 int numComponents)
const
945 for (
int i=0; i < N_rank; ++i)
981 template<
typename P_numtype2>
983 int numComponents)
const;
1024 {
return storage_.ordering(storageRankIndex); }
1030 int r3=0,
int r4=0,
int r5=0,
int r6=0,
int r7=0,
int r8=0,
int
1033 int r3=0,
int r4=0,
int r5=0,
int r6=0,
int r7=0,
int r8=0,
int
1034 r9=0,
int r10=0)
const;
1052 int extent3,
int extent4);
1054 int extent3,
int extent4,
int extent5);
1056 int extent3,
int extent4,
int extent5,
1059 int extent3,
int extent4,
int extent5,
1060 int extent6,
int extent7);
1062 int extent3,
int extent4,
int extent5,
1063 int extent6,
int extent7,
int extent8);
1065 int extent3,
int extent4,
int extent5,
1066 int extent6,
int extent7,
int extent8,
1069 int extent3,
int extent4,
int extent5,
1070 int extent6,
int extent7,
int extent8,
1071 int extent9,
int extent10);
1073 int extent3,
int extent4,
int extent5,
1074 int extent6,
int extent7,
int extent8,
1075 int extent9,
int extent10,
1115 int extent2,
int extent3);
1117 int extent2,
int extent3,
int extent4);
1119 int extent2,
int extent3,
int extent4,
1122 int extent2,
int extent3,
int extent4,
1123 int extent5,
int extent6);
1125 int extent2,
int extent3,
int extent4,
1126 int extent5,
int extent6,
int extent7);
1128 int extent2,
int extent3,
int extent4,
1129 int extent5,
int extent6,
int extent7,
1132 int extent2,
int extent3,
int extent4,
1133 int extent5,
int extent6,
int extent7,
1134 int extent8,
int extent9);
1136 int extent2,
int extent3,
int extent4,
1137 int extent5,
int extent6,
int extent7,
1138 int extent8,
int extent9,
1141 int extent2,
int extent3,
int extent4,
1142 int extent5,
int extent6,
int extent7,
1143 int extent8,
int extent9,
int extent10,
1188 for (
int i=0; i < N_rank; ++i)
1231 bool isInRange(
int i0,
int i1,
int i2,
int i3,
int i4)
const {
1239 bool isInRange(
int i0,
int i1,
int i2,
int i3,
int i4,
int i5)
const {
1248 bool isInRange(
int i0,
int i1,
int i2,
int i3,
int i4,
int i5,
int i6)
const {
1259 int i5,
int i6,
int i7)
const {
1271 int i5,
int i6,
int i7,
int i8)
const {
1284 int i5,
int i6,
int i7,
int i8,
int i9)
const {
1298 int i5,
int i6,
int i7,
int i8,
int i9,
int i10)
const {
1313 for (
int i=0; i < N_rank; ++i)
1321 BZPRECHECK(
isInRange(index),
"Array index out of range: " << index
1322 << endl <<
"Lower bounds: " <<
storage_.base() << endl
1323 <<
"Length: " <<
length_ << endl);
1328 BZPRECHECK(
isInRange(i0),
"Array index out of range: " << i0
1329 << endl <<
"Lower bounds: " <<
storage_.base() << endl
1330 <<
"Length: " <<
length_ << endl);
1335 BZPRECHECK(
isInRange(i0,i1),
"Array index out of range: ("
1336 << i0 <<
", " << i1 <<
")"
1337 << endl <<
"Lower bounds: " <<
storage_.base() << endl
1338 <<
"Length: " <<
length_ << endl);
1343 int BZ_DEBUG_PARAM(i2))
const
1345 BZPRECHECK(
isInRange(i0,i1,i2),
"Array index out of range: ("
1346 << i0 <<
", " << i1 <<
", " << i2 <<
")"
1347 << endl <<
"Lower bounds: " <<
storage_.base() << endl
1348 <<
"Length: " <<
length_ << endl);
1353 int BZ_DEBUG_PARAM(i2),
int BZ_DEBUG_PARAM(i3))
const
1355 BZPRECHECK(
isInRange(i0,i1,i2,i3),
"Array index out of range: ("
1356 << i0 <<
", " << i1 <<
", " << i2 <<
", " << i3 <<
")"
1357 << endl <<
"Lower bounds: " <<
storage_.base() << endl
1358 <<
"Length: " <<
length_ << endl);
1363 int BZ_DEBUG_PARAM(i2),
int BZ_DEBUG_PARAM(i3),
1364 int BZ_DEBUG_PARAM(i4))
const
1366 BZPRECHECK(
isInRange(i0,i1,i2,i3,i4),
"Array index out of range: ("
1367 << i0 <<
", " << i1 <<
", " << i2 <<
", " << i3
1368 <<
", " << i4 <<
")"
1369 << endl <<
"Lower bounds: " <<
storage_.base() << endl
1370 <<
"Length: " <<
length_ << endl);
1375 int BZ_DEBUG_PARAM(i2),
int BZ_DEBUG_PARAM(i3),
int BZ_DEBUG_PARAM(i4),
1376 int BZ_DEBUG_PARAM(i5))
const
1378 BZPRECHECK(
isInRange(i0,i1,i2,i3,i4,i5),
"Array index out of range: ("
1379 << i0 <<
", " << i1 <<
", " << i2 <<
", " << i3
1380 <<
", " << i4 <<
", " << i5 <<
")"
1381 << endl <<
"Lower bounds: " <<
storage_.base() << endl
1382 <<
"Length: " <<
length_ << endl);
1387 int BZ_DEBUG_PARAM(i2),
int BZ_DEBUG_PARAM(i3),
int BZ_DEBUG_PARAM(i4),
1388 int BZ_DEBUG_PARAM(i5),
int BZ_DEBUG_PARAM(i6))
const
1390 BZPRECHECK(
isInRange(i0,i1,i2,i3,i4,i5,i6),
1391 "Array index out of range: ("
1392 << i0 <<
", " << i1 <<
", " << i2 <<
", " << i3
1393 <<
", " << i4 <<
", " << i5 <<
", " << i6 <<
")"
1394 << endl <<
"Lower bounds: " <<
storage_.base() << endl
1395 <<
"Length: " <<
length_ << endl);
1400 int BZ_DEBUG_PARAM(i2),
int BZ_DEBUG_PARAM(i3),
int BZ_DEBUG_PARAM(i4),
1401 int BZ_DEBUG_PARAM(i5),
int BZ_DEBUG_PARAM(i6),
1402 int BZ_DEBUG_PARAM(i7))
const
1404 BZPRECHECK(
isInRange(i0,i1,i2,i3,i4,i5,i6,i7),
1405 "Array index out of range: ("
1406 << i0 <<
", " << i1 <<
", " << i2 <<
", " << i3
1407 <<
", " << i4 <<
", " << i5 <<
", " << i6 <<
", " << i7 <<
")"
1408 << endl <<
"Lower bounds: " <<
storage_.base() << endl
1409 <<
"Length: " <<
length_ << endl);
1414 int BZ_DEBUG_PARAM(i2),
int BZ_DEBUG_PARAM(i3),
int BZ_DEBUG_PARAM(i4),
1415 int BZ_DEBUG_PARAM(i5),
int BZ_DEBUG_PARAM(i6),
int BZ_DEBUG_PARAM(i7),
1416 int BZ_DEBUG_PARAM(i8))
const
1418 BZPRECHECK(
isInRange(i0,i1,i2,i3,i4,i5,i6,i7,i8),
1419 "Array index out of range: ("
1420 << i0 <<
", " << i1 <<
", " << i2 <<
", " << i3
1421 <<
", " << i4 <<
", " << i5 <<
", " << i6 <<
", " << i7
1422 <<
", " << i8 <<
")"
1423 << endl <<
"Lower bounds: " <<
storage_.base() << endl
1424 <<
"Length: " <<
length_ << endl);
1429 int BZ_DEBUG_PARAM(i2),
int BZ_DEBUG_PARAM(i3),
int BZ_DEBUG_PARAM(i4),
1430 int BZ_DEBUG_PARAM(i5),
int BZ_DEBUG_PARAM(i6),
int BZ_DEBUG_PARAM(i7),
1431 int BZ_DEBUG_PARAM(i8),
int BZ_DEBUG_PARAM(i9))
const
1433 BZPRECHECK(
isInRange(i0,i1,i2,i3,i4,i5,i6,i7,i8,i9),
1434 "Array index out of range: ("
1435 << i0 <<
", " << i1 <<
", " << i2 <<
", " << i3
1436 <<
", " << i4 <<
", " << i5 <<
", " << i6 <<
", " << i7
1437 <<
", " << i8 <<
", " << i9 <<
")"
1438 << endl <<
"Lower bounds: " <<
storage_.base() << endl
1439 <<
"Length: " <<
length_ << endl);
1444 int BZ_DEBUG_PARAM(i2),
int BZ_DEBUG_PARAM(i3),
int BZ_DEBUG_PARAM(i4),
1445 int BZ_DEBUG_PARAM(i5),
int BZ_DEBUG_PARAM(i6),
int BZ_DEBUG_PARAM(i7),
1446 int BZ_DEBUG_PARAM(i8),
int BZ_DEBUG_PARAM(i9),
1447 int BZ_DEBUG_PARAM(i10))
const
1449 BZPRECHECK(
isInRange(i0,i1,i2,i3,i4,i5,i6,i7,i8,i9,i10),
1450 "Array index out of range: ("
1451 << i0 <<
", " << i1 <<
", " << i2 <<
", " << i3
1452 <<
", " << i4 <<
", " << i5 <<
", " << i6 <<
", " << i7
1453 <<
", " << i8 <<
", " << i9 <<
", " << i10 <<
")"
1454 << endl <<
"Lower bounds: " <<
storage_.base() << endl
1455 <<
"Length: " <<
length_ << endl);
1463 template<
int N_rank2>
1470 template<
int N_rank2>
1558 index[4], index[5]);
1568 index[4], index[5]);
1578 index[4], index[5], index[6]);
1589 index[4], index[5], index[6]);
1600 index[4], index[5], index[6], index[7]);
1611 index[4], index[5], index[6], index[7]);
1622 index[4], index[5], index[6], index[7], index[8]);
1634 index[4], index[5], index[6], index[7], index[8]);
1646 index[4], index[5], index[6], index[7], index[8], index[9]);
1658 index[4], index[5], index[6], index[7], index[8], index[9]);
1670 index[4], index[5], index[6], index[7], index[8], index[9],
1684 index[4], index[5], index[6], index[7], index[8], index[9],
1764 int i4,
int i5)
const
1782 int i4,
int i5,
int i6)
const
1791 int i4,
int i5,
int i6)
1800 int i4,
int i5,
int i6,
int i7)
const
1809 int i4,
int i5,
int i6,
int i7)
1818 int i4,
int i5,
int i6,
int i7,
int i8)
const
1828 int i4,
int i5,
int i6,
int i7,
int i8)
1838 int i4,
int i5,
int i6,
int i7,
int i8,
int i9)
const
1848 int i4,
int i5,
int i6,
int i7,
int i8,
int i9)
1858 int i4,
int i5,
int i6,
int i7,
int i8,
int i9,
int i10)
const
1869 int i4,
int i5,
int i6,
int i7,
int i8,
int i9,
int i10)
1885 {
return const_cast<T_array&
>(*this); }
1950 return T_array(
noConst(), r0, r1, r2, r3, r4, r5, r6, r7, r8, r9);
1956 return T_array(
noConst(), r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10);
1982#ifdef BZ_HAVE_PARTIAL_ORDERING
1984 template<
typename T1,
typename T2>
1985 typename SliceInfo<T_numtype,T1,T2>::T_slice
1988 typedef typename SliceInfo<T_numtype,T1,T2>::T_slice
slice;
1989 return slice(
noConst(), r1, r2, nilArraySection(), nilArraySection(), nilArraySection(),
1990 nilArraySection(), nilArraySection(), nilArraySection(),
1991 nilArraySection(), nilArraySection(), nilArraySection());
1994 template<
typename T1,
typename T2,
typename T3>
1995 typename SliceInfo<T_numtype,T1,T2,T3>::T_slice
1998 typedef typename SliceInfo<T_numtype,T1,T2,T3>::T_slice
slice;
1999 return slice(
noConst(), r1, r2, r3, nilArraySection(), nilArraySection(), nilArraySection(),
2000 nilArraySection(), nilArraySection(), nilArraySection(),
2001 nilArraySection(), nilArraySection());
2004 template<
typename T1,
typename T2,
typename T3,
typename T4>
2005 typename SliceInfo<T_numtype,T1,T2,T3,T4>::T_slice
2008 typedef typename SliceInfo<T_numtype,T1,T2,T3,T4>::T_slice
slice;
2009 return slice(
noConst(), r1, r2, r3, r4, nilArraySection(), nilArraySection(),
2010 nilArraySection(), nilArraySection(), nilArraySection(),
2011 nilArraySection(), nilArraySection());
2014 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
2015 typename SliceInfo<T_numtype,T1,T2,T3,T4,T5>::T_slice
2016 operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5)
const
2018 typedef typename SliceInfo<T_numtype,T1,T2,T3,T4,T5>::T_slice
slice;
2019 return slice(
noConst(), r1, r2, r3, r4, r5, nilArraySection(),
2020 nilArraySection(), nilArraySection(), nilArraySection(),
2021 nilArraySection(), nilArraySection());
2024 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
2025 typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6>::T_slice
2026 operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6)
const
2028 typedef typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6>::T_slice
slice;
2029 return slice(
noConst(), r1, r2, r3, r4, r5, r6, nilArraySection(), nilArraySection(), nilArraySection(),
2030 nilArraySection(), nilArraySection());
2033 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
2035 typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7>::T_slice
2036 operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7)
const
2038 typedef typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7>::T_slice
slice;
2039 return slice(
noConst(), r1, r2, r3, r4, r5, r6, r7, nilArraySection(), nilArraySection(),
2040 nilArraySection(), nilArraySection());
2043 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
2044 typename T7,
typename T8>
2045 typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8>::T_slice
2046 operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7, T8 r8)
const
2048 typedef typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8>::T_slice
slice;
2049 return slice(
noConst(), r1, r2, r3, r4, r5, r6, r7, r8,
2050 nilArraySection(), nilArraySection(), nilArraySection());
2053 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
2054 typename T7,
typename T8,
typename T9>
2055 typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9>::T_slice
2056 operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7, T8 r8, T9 r9)
const
2058 typedef typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9>::T_slice
slice;
2059 return slice(
noConst(), r1, r2, r3, r4, r5, r6, r7, r8, r9, nilArraySection(), nilArraySection());
2062 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
2063 typename T7,
typename T8,
typename T9,
typename T10>
2064 typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>::T_slice
2065 operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7, T8 r8, T9 r9, T10 r10)
const
2067 typedef typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>::T_slice
slice;
2068 return slice(
noConst(), r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, nilArraySection());
2071 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
2072 typename T7,
typename T8,
typename T9,
typename T10,
typename T11>
2073 typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>::T_slice
2074 operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7, T8 r8, T9 r9, T10 r10, T11 r11)
const
2076 typedef typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>::T_slice
slice;
2077 return slice(
noConst(), r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11);
2094 _bz_ArrayExpr<ArrayIndexMapping<typename asExpr<T_array >::T_expr, N0> >
2101 template<
int N0,
int N1>
2109 template<
int N0,
int N1,
int N2>
2118 template<
int N0,
int N1,
int N2,
int N3>
2127 template<
int N0,
int N1,
int N2,
int N3,
int N4>
2137 template<
int N0,
int N1,
int N2,
int N3,
int N4,
int N5>
2145 N1, N2, N3, N4, N5> >(
noConst());
2148 template<
int N0,
int N1,
int N2,
int N3,
int N4,
int N5,
int N6>
2156 N1, N2, N3, N4, N5, N6> >(
noConst());
2159 template<
int N0,
int N1,
int N2,
int N3,
int N4,
int N5,
int N6,
2169 N1, N2, N3, N4, N5, N6, N7> >(
noConst());
2172 template<
int N0,
int N1,
int N2,
int N3,
int N4,
int N5,
int N6,
2175 N4, N5, N6, N7, N8> >
2182 N1, N2, N3, N4, N5, N6, N7, N8> >(
noConst());
2185 template<
int N0,
int N1,
int N2,
int N3,
int N4,
int N5,
int N6,
2186 int N7,
int N8,
int N9>
2188 N4, N5, N6, N7, N8, N9> >
2195 N1, N2, N3, N4, N5, N6, N7, N8, N9> >(
noConst());
2198 template<
int N0,
int N1,
int N2,
int N3,
int N4,
int N5,
int N6,
2199 int N7,
int N8,
int N9,
int N10>
2201 N4, N5, N6, N7, N8, N9, N10> >
2209 N1, N2, N3, N4, N5, N6, N7, N8, N9, N10> >(
noConst());
2223 typedef typename multicomponent_traits<T_numtype>::T_element T_compType;
2226 multicomponent_traits<T_numtype>::numComponents);
2231 typedef typename multicomponent_traits<T_numtype>::T_element T_compType;
2234 multicomponent_traits<T_numtype>::numComponents);
2239 return operator[](
static_cast<unsigned>(component));
2244 return operator[](
static_cast<unsigned>(component));
2251 template<
typename T_indexContainer>
2256 const_cast<T_indexContainer&
>(index));
2281#ifdef BZ_NEW_EXPRESSION_TEMPLATES
2342 template<
typename P_numtype2>
2344 template<
typename P_numtype2>
2346 template<
typename P_numtype2>
2348 template<
typename P_numtype2>
2350 template<
typename P_numtype2>
2352 template<
typename P_numtype2>
2354 template<
typename P_numtype2>
2356 template<
typename P_numtype2>
2358 template<
typename P_numtype2>
2360 template<
typename P_numtype2>
2362 template<
typename P_numtype2>
2366 template<
typename T_expr>
2368 template<
typename T_expr>
2370 template<
typename T_expr>
2372 template<
typename T_expr>
2374 template<
typename T_expr>
2376 template<
typename T_expr>
2378 template<
typename T_expr>
2380 template<
typename T_expr>
2382 template<
typename T_expr>
2384 template<
typename T_expr>
2386 template<
typename T_expr>
2399#ifdef BZ_DEBUG_TRAVERSE
2400 BZ_DEBUG_MESSAGE(
"stride(" << innerRank <<
")=" <<
stride(innerRank)
2401 <<
", extent()=" <<
extent(innerRank) <<
", stride(outerRank)="
2417 const StridedDomain<N_rank>&);
2445 template<
int N_rank2,
typename R0,
typename R1,
typename R2,
typename R3,
typename R4,
2446 typename R5,
typename R6,
typename R7,
typename R8,
typename R9,
typename R10>
2448 R3 r3, R4 r4, R5 r5, R6 r6, R7 r7, R8 r8, R9 r9, R10 r10);
2450 template<
int N_rank2>
2454 template<
int N_rank2>
2458 template<
int N_rank2>
2467#ifdef BZ_HAVE_BOOST_SERIALIZATION
2468 friend class boost::serialization::access;
2470 template<
class T_arch>
2471 void serialize(T_arch& ar,
const unsigned int version) {
2472 ar & boost::serialization::base_object<MemoryBlockReference<P_numtype> >(*this);
2513template<
typename T_numtype>
2516template<
typename T_numtype,
int N_rank>
2519template<
typename T_numtype,
int N_rank>
2522template <
typename P_numtype,
int N_rank>
2529template <
typename P_expr>
2536template <
typename P_numtype,
int N_rank>
2539 indices.resize(exprVals.
size());
2542 for (it = exprVals.
begin(); it != end; ++it)
2544 indices(j++) = it.position();
2546 indices.resizeAndPreserve(j);
2559#include <blitz/array.cc>
2560#include <blitz/tinyvec2.cc>
Definition array-impl.h:73
Declaration of class Array, the "Swiss army knife" of Blitz expression template classes.
Definition et-forward.h:13
int isInRange(int i0, int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10) const
Definition array-impl.h:1297
void resize(int extent1, int extent2, int extent3, int extent4, int extent5, int extent6, int extent7, int extent8, int extent9, int extent10)
void constructSubarray(Array< T_numtype, N_rank > &array, Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r7)
Scalar operand assignment.
const T_numtype & operator()(int i0, int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10) const
Definition array-impl.h:1857
int cols() const
Definition array-impl.h:902
sizeType storageSize() const
Returns the length of the array storage.
Definition array-impl.h:1170
void transposeSelf(int r0, int r1, int r2=0, int r3=0, int r4=0, int r5=0, int r6=0, int r7=0, int r8=0, int r9=0, int r10=0)
const T_numtype & operator()(int i0, int i1, int i2, int i3, int i4, int i5, int i6) const
Definition array-impl.h:1781
void resize(Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r7, Range r8)
void resizeAndPreserve(int extent1, int extent2, int extent3, int extent4, int extent5, int extent6)
int base(int rank) const
Definition array-impl.h:884
const T_numtype & operator()(const TinyVector< int, 4 > &index) const
Definition array-impl.h:1519
void computeStrides()
Scalar operand assignment.
Array< P_numtype2, N_rank > chopComponent(P_numtype2 a, int compNum, int numComponents) const
Definition array-impl.h:898
int depth() const
Definition array-impl.h:958
T_numtype & operator()(TinyVector< int, 1 > index)
Definition array-impl.h:1483
int ubound(int rank) const
Definition array-impl.h:1182
Array< P_numtype2, N_rank > extractComponent(P_numtype2, int compNum, int numComponents) const
T_array & operator^=(const T_numtype &)
Scalar operand assignment.
void slice(int &, nilArraySection, Array< T_numtype, N_rank2 > &, TinyVector< int, N_rank2 > &, int)
Scalar operand assignment.
Definition array-impl.h:2459
const T_numtype & operator()(const TinyVector< int, N_rank2 > &index) const
Definition array-impl.h:1464
T_array & operator<<=(const T_array &)
Scalar operand assignment.
Array(const TinyVector< int, N_rank-1 > &shape, int lastExtent, const GeneralArrayStorage< N_rank > &storage)
int assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1), int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3), int BZ_DEBUG_PARAM(i4), int BZ_DEBUG_PARAM(i5), int BZ_DEBUG_PARAM(i6), int BZ_DEBUG_PARAM(i7), int BZ_DEBUG_PARAM(i8), int BZ_DEBUG_PARAM(i9)) const
Definition array-impl.h:1428
Array(int length0, int length1, int length2, int length3, int length4, GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:231
T_array & operator^=(const ETBase< T_expr > &)
Scalar operand assignment.
T_array & initialize(T_numtype)
Scalar operand assignment.
T_numtype & operator()(const TinyVector< int, 7 > &index)
Definition array-impl.h:1586
int assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1), int BZ_DEBUG_PARAM(i2)) const
Definition array-impl.h:1342
T_numtype & operator()(const TinyVector< int, 9 > &index)
Definition array-impl.h:1631
T_array & operator*=(const T_array &)
Scalar operand assignment.
void resize(int extent1, int extent2, int extent3, int extent4, int extent5, int extent6, int extent7, int extent8)
void resize(int extent1, int extent2, int extent3, int extent4, int extent5)
Array(const TinyVector< int, N_rank > &extent, GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:455
void calculateZeroOffset()
Scalar operand assignment.
Array(int length0, int length1, int length2, GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:208
_bz_ArrayExpr< ArrayIndexMapping< typename asExpr< T_array >::T_expr, N0, N1, N2, N3, N4, N5, N6, N7, N8 > > operator()(IndexPlaceholder< N0 >, IndexPlaceholder< N1 >, IndexPlaceholder< N2 >, IndexPlaceholder< N3 >, IndexPlaceholder< N4 >, IndexPlaceholder< N5 >, IndexPlaceholder< N6 >, IndexPlaceholder< N7 >, IndexPlaceholder< N8 >) const
Definition array-impl.h:2176
const T_numtype & operator()(int i0, int i1, int i2, int i3, int i4, int i5) const
Definition array-impl.h:1763
int assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1), int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3), int BZ_DEBUG_PARAM(i4), int BZ_DEBUG_PARAM(i5), int BZ_DEBUG_PARAM(i6)) const
Definition array-impl.h:1386
Array(T_numtype *dataFirst, TinyVector< int, N_rank > shape, TinyVector< diffType, N_rank > stride, GeneralArrayStorage< N_rank > storage=T_default_storage(contiguousData))
Construct an array from an existing block of memory, with a given set of strides.
Definition array-impl.h:379
void resize(int extent1, int extent2, int extent3, int extent4)
Array(int length0, int length1, int length2, int length3, int length4, int length5, int length6, int length7, int length8, int length9, int length10, GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:329
TinyVector< int, N_rank > T_index
Definition array-impl.h:134
TinyVector< int, N_rank > length_
Scalar operand assignment.
Definition array-impl.h:2503
int isInRange(int i0, int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8) const
Definition array-impl.h:1270
T_numtype & operator()(const TinyVector< int, 5 > &index)
Definition array-impl.h:1545
Array(int length0, int length1, int length2, int length3, int length4, int length5, int length6, GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:259
T_array reindex(const TinyVector< int, N_rank > &)
const T_numtype & operator()(int i0, int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9) const
Definition array-impl.h:1837
const T_numtype & operator()(int i0) const
Definition array-impl.h:1695
TinyVector< diffType, N_rank > stride_
Scalar operand assignment.
Definition array-impl.h:2504
void resizeAndPreserve(int extent)
_bz_ArrayExpr< ArrayIndexMapping< typename asExpr< T_array >::T_expr, N0, N1, N2 > > operator()(IndexPlaceholder< N0 >, IndexPlaceholder< N1 >, IndexPlaceholder< N2 >) const
Definition array-impl.h:2111
const T_numtype & operator()(const TinyVector< int, 11 > &index) const
Definition array-impl.h:1667
void resize(Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r7, Range r8, Range r9, Range r10)
int isMinorRank(int rank) const
Definition array-impl.h:993
const_iterator begin() const
Definition array-impl.h:890
int assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1), int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3), int BZ_DEBUG_PARAM(i4)) const
Definition array-impl.h:1362
Array(Range r0, Range r1, Range r2, Range r3, Range r4, GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:541
T_numtype & operator()(int i0, int i1, int i2, int i3, int i4)
Definition array-impl.h:1755
T_numtype & operator()(int i0)
Definition array-impl.h:1701
Array(GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:178
T_iterator beginFast() const
Definition array-impl.h:893
int isMajorRank(int rank) const
Definition array-impl.h:991
void constructSubarray(Array< T_numtype, N_rank > &array, Range r0)
Scalar operand assignment.
Array(const TinyVector< int, N_rank > &lbounds, const TinyVector< int, N_rank > &extent, const GeneralArrayStorage< N_rank > &storage=T_default_storage())
T_numtype & operator()(int i0, int i1, int i2, int i3, int i4, int i5)
Definition array-impl.h:1772
Array(Array< T_numtype, N_rank > &array, Range r0, Range r1, Range r2, Range r3, Range r4, Range r5)
Definition array-impl.h:814
T_array & operator-=(const ETBase< T_expr > &)
Scalar operand assignment.
int zeroOffset() const
Definition array-impl.h:1194
int isInRange(int i0, int i1, int i2) const
Definition array-impl.h:1218
diffType dataFirstOffset() const
Definition array-impl.h:937
const T_numtype * dataFirst() const
Definition array-impl.h:952
const_iterator end() const
Definition array-impl.h:972
const T_numtype & operator()(int i0, int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8) const
Definition array-impl.h:1817
Array(Array< T_numtype, N_rank > &array, Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r7)
Definition array-impl.h:826
int assertInRange(int BZ_DEBUG_PARAM(i0)) const
Definition array-impl.h:1327
MemoryBlockReference< P_numtype > T_base
Definition array-impl.h:113
int canCollapse(int outerRank, int innerRank) const
Scalar operand assignment.
Definition array-impl.h:2398
void resizeAndPreserve(int extent1, int extent2, int extent3, int extent4)
void resize(int extent1, int extent2, int extent3, int extent4, int extent5, int extent6, int extent7, int extent8, int extent9, int extent10, int extent11)
void constructSlice(Array< T_numtype, N_rank2 > &array, R0 r0, R1 r1, R2 r2, R3 r3, R4 r4, R5 r5, R6 r6, R7 r7, R8 r8, R9 r9, R10 r10)
Scalar operand assignment.
Array(Range r0, Range r1, Range r2, Range r3, GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:521
Array(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r7, Range r8, GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:647
void weakReference(const T_array &)
T_array transpose(int r0, int r1, int r2=0, int r3=0, int r4=0, int r5=0, int r6=0, int r7=0, int r8=0, int r9=0, int r10=0) const
void slice(int &setRank, int i, Array< T_numtype, N_rank2 > &array, TinyVector< int, N_rank2 > &rankMap, int sourceRank)
Scalar operand assignment.
int isStorageContiguous() const
T_array operator()(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r7, Range r8, Range r9) const
Definition array-impl.h:1947
T_array & operator<<=(const ETBase< T_expr > &)
Scalar operand assignment.
Array(Array< T_numtype, N_rank > &array, Range r0)
Definition array-impl.h:787
const T_numtype & operator()(TinyVector< int, 2 > index) const
Definition array-impl.h:1489
void constructSubarray(Array< T_numtype, N_rank > &array, Range r0, Range r1, Range r2)
Scalar operand assignment.
GeneralArrayStorage< N_rank > T_default_storage
Set default storage order.
Definition array-impl.h:154
T_array & operator+=(const T_array &)
Scalar operand assignment.
_bz_ArrayExpr< ArrayIndexMapping< typename asExpr< T_array >::T_expr, N0, N1, N2, N3, N4, N5, N6, N7, N8, N9, N10 > > operator()(IndexPlaceholder< N0 >, IndexPlaceholder< N1 >, IndexPlaceholder< N2 >, IndexPlaceholder< N3 >, IndexPlaceholder< N4 >, IndexPlaceholder< N5 >, IndexPlaceholder< N6 >, IndexPlaceholder< N7 >, IndexPlaceholder< N8 >, IndexPlaceholder< N9 >, IndexPlaceholder< N10 >) const
Definition array-impl.h:2202
T_array & operator%=(const ETBase< T_expr > &)
Scalar operand assignment.
Array(Array< T_numtype, N_rank2 > &array, R0 r0, R1 r1, R2 r2, R3 r3, R4 r4, R5 r5, R6 r6, R7 r7, R8 r8, R9 r9, R10 r10)
Definition array-impl.h:871
Array(Array< T_numtype, N_rank > &array, Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r7, Range r8)
Definition array-impl.h:832
T_array & operator=(const Array< T_numtype, N_rank > &)
Scalar operand assignment.
T_numtype & operator()(const TinyVector< int, 8 > &index)
Definition array-impl.h:1608
T_numtype & operator()(int i0, int i1, int i2, int i3, int i4, int i5, int i6, int i7)
Definition array-impl.h:1808
T_array operator()(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r7) const
Definition array-impl.h:1935
void resizeAndPreserve(int extent1, int extent2, int extent3, int extent4, int extent5, int extent6, int extent7, int extent8, int extent9, int extent10, int extent11)
T_array reverse(int rank)
Array(T_numtype *dataFirst, TinyVector< int, N_rank > shape, GeneralArrayStorage< N_rank > storage=T_default_storage(contiguousData))
Definition array-impl.h:354
const T_numtype & operator()(int i0, int i1, int i2) const
Definition array-impl.h:1719
_bz_ArrayExpr< ArrayIndexMapping< typename asExpr< T_array >::T_expr, N0, N1, N2, N3, N4, N5, N6, N7, N8, N9 > > operator()(IndexPlaceholder< N0 >, IndexPlaceholder< N1 >, IndexPlaceholder< N2 >, IndexPlaceholder< N3 >, IndexPlaceholder< N4 >, IndexPlaceholder< N5 >, IndexPlaceholder< N6 >, IndexPlaceholder< N7 >, IndexPlaceholder< N8 >, IndexPlaceholder< N9 >) const
Definition array-impl.h:2189
void resize(Range r1, Range r2, Range r3, Range r4)
const Array< typename multicomponent_traits< T_numtype >::T_element, N_rank > operator[](const unsigned component) const
Definition array-impl.h:2230
T_array & operator+=(const T_numtype &)
Scalar operand assignment.
Array< T_numtype, N_rank > T_array
Definition array-impl.h:135
void resizeAndPreserve(int extent1, int extent2, int extent3, int extent4, int extent5, int extent6, int extent7, int extent8)
void constructSubarray(Array< T_numtype, N_rank > &array, Range r0, Range r1, Range r2, Range r3, Range r4)
Scalar operand assignment.
Array(Range r0, GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:478
T_numtype & operator()(const TinyVector< int, 10 > &index)
Definition array-impl.h:1655
T_numtype & operator()(TinyVector< int, 3 > index)
Definition array-impl.h:1511
int assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1), int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3), int BZ_DEBUG_PARAM(i4), int BZ_DEBUG_PARAM(i5)) const
Definition array-impl.h:1374
T_array & operator&=(const T_numtype &)
Scalar operand assignment.
T_numtype & operator()(int i0, int i1, int i2, int i3, int i4, int i5, int i6)
Definition array-impl.h:1790
T_array operator()(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5) const
Definition array-impl.h:1923
TinyVector< int, N_rank > lbound() const
Definition array-impl.h:1002
int assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1), int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3)) const
Definition array-impl.h:1352
int isVectorAligned(diffType offset) const
Returns true if the array is aligned on a simd vector width.
Definition array-impl.h:1198
Array(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:563
Array(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r7, Range r8, Range r9, Range r10, GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:716
int isInRange(int i0, int i1, int i2, int i3, int i4, int i5) const
Definition array-impl.h:1239
void constructSubarray(Array< T_numtype, N_rank > &array, Range r0, Range r1, Range r2, Range r3, Range r4, Range r5)
Scalar operand assignment.
Array(T_numtype *dataFirst, TinyVector< int, N_rank > shape, TinyVector< diffType, N_rank > stride, preexistingMemoryPolicy deletionPolicy, GeneralArrayStorage< N_rank > storage=T_default_storage(contiguousData))
Construct an array from an existing block of memory, with a given set of strides.
Definition array-impl.h:429
const TinyVector< int, N_rank > & shape() const
Definition array-impl.h:1159
T_array & operator|=(const T_numtype &)
Scalar operand assignment.
T_numtype * dataZero()
Definition array-impl.h:931
void resize(int extent1, int extent2, int extent3, int extent4, int extent5, int extent6, int extent7)
int isInRange(int i0, int i1) const
Definition array-impl.h:1213
const TinyVector< diffType, N_rank > & stride() const
Definition array-impl.h:1173
IndirectArray< T_array, T_indexContainer > operator[](const T_indexContainer &index)
Definition array-impl.h:2253
const T_numtype & operator()(TinyVector< int, 3 > index) const
Definition array-impl.h:1503
T_array operator()(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r7, Range r8) const
Definition array-impl.h:1941
void resize(int extent1, int extent2, int extent3)
static const int rank_
Definition array-impl.h:157
FastArrayIterator< T_numtype, N_rank > T_iterator
Definition array-impl.h:136
ConstArrayIterator< T_numtype, N_rank > const_iterator
Definition array-impl.h:139
Array(int length0, GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:186
T_array & noConst() const
Definition array-impl.h:1884
int assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1)) const
Definition array-impl.h:1334
Array(int length0, int length1, GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:194
int isInRangeForDim(int i, int d) const
Definition array-impl.h:1205
Array< typename multicomponent_traits< T_numtype >::T_element, N_rank > operator[](const int component)
Definition array-impl.h:2238
_bz_ArrayExpr< ArrayIndexMapping< typename asExpr< T_array >::T_expr, N0 > > operator()(IndexPlaceholder< N0 >) const
Definition array-impl.h:2095
const T_numtype & operator()(const TinyVector< int, 9 > &index) const
Definition array-impl.h:1619
int length(int rank) const
Definition array-impl.h:1005
int isInRange(int i0) const
Definition array-impl.h:1209
void resize(const TinyVector< int, N_rank > &)
T_array & operator%=(const T_numtype &)
Scalar operand assignment.
_bz_ArrayExpr< ArrayIndexMapping< typename asExpr< T_array >::T_expr, N0, N1, N2, N3, N4 > > operator()(IndexPlaceholder< N0 >, IndexPlaceholder< N1 >, IndexPlaceholder< N2 >, IndexPlaceholder< N3 >, IndexPlaceholder< N4 >) const
Definition array-impl.h:2129
_bz_ArrayExpr< ArrayIndexMapping< typename asExpr< T_array >::T_expr, N0, N1, N2, N3, N4, N5 > > operator()(IndexPlaceholder< N0 >, IndexPlaceholder< N1 >, IndexPlaceholder< N2 >, IndexPlaceholder< N3 >, IndexPlaceholder< N4 >, IndexPlaceholder< N5 >) const
Definition array-impl.h:2140
int assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1), int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3), int BZ_DEBUG_PARAM(i4), int BZ_DEBUG_PARAM(i5), int BZ_DEBUG_PARAM(i6), int BZ_DEBUG_PARAM(i7), int BZ_DEBUG_PARAM(i8)) const
Definition array-impl.h:1413
TinyVector< int, N_rank > ubound() const
Definition array-impl.h:1185
Array(_bz_ArrayExpr< T_expr > expr)
Construct an array from an expression.
void constructSubarray(Array< T_numtype, N_rank > &array, Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r7, Range r8, Range r9)
Scalar operand assignment.
void resize(Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r7, Range r8, Range r9, Range r10, Range r11)
T_array & operator/=(const T_array &)
Scalar operand assignment.
const T_numtype & operator()(const TinyVector< int, 7 > &index) const
Definition array-impl.h:1575
void resize(Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r7)
T_array & operator&=(const T_array &)
Scalar operand assignment.
static int rank()
Definition array-impl.h:1036
T_array & operator/=(const T_numtype &)
Scalar operand assignment.
T_array & operator-=(const T_array &)
Scalar operand assignment.
_bz_ArrayExpr< ArrayIndexMapping< typename asExpr< T_array >::T_expr, N0, N1 > > operator()(IndexPlaceholder< N0 >, IndexPlaceholder< N1 >) const
Definition array-impl.h:2103
T_numtype & operator()(int i0, int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8)
Definition array-impl.h:1827
int isInRange(int i0, int i1, int i2, int i3) const
Definition array-impl.h:1224
int ordering(int storageRankIndex) const
Definition array-impl.h:1023
T_array & operator*=(const T_numtype &)
Scalar operand assignment.
Array(Array< T_numtype, N_rank > &array, Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r7, Range r8, Range r9, Range r10)
Definition array-impl.h:844
T_array & operator/=(const ETBase< T_expr > &)
Scalar operand assignment.
T_array & operator^=(const T_array &)
Scalar operand assignment.
T_array operator()(Range r0, Range r1, Range r2) const
Definition array-impl.h:1908
int extent(int rank) const
Definition array-impl.h:975
const TinyVector< int, N_rank > & extent() const
Definition array-impl.h:978
Array(Array< T_numtype, N_rank > &array, const StridedDomain< N_rank > &subdomain)
Definition array-impl.h:858
T_array operator()(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r7, Range r8, Range r9, Range r10) const
Definition array-impl.h:1953
const T_numtype & operator()(const TinyVector< int, 10 > &index) const
Definition array-impl.h:1643
Array(Array< T_numtype, N_rank > &array, Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r7, Range r8, Range r9)
Definition array-impl.h:838
void reverseSelf(int rank)
T_numtype & operator()(int i0, int i1)
Definition array-impl.h:1713
Array(int length0, int length1, int length2, int length3, int length4, int length5, int length6, int length7, int length8, GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:292
Array(int length0, int length1, int length2, int length3, int length4, int length5, int length6, int length7, int length8, int length9, GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:310
diffType stride(int rank) const
Definition array-impl.h:1176
Array(Array< T_numtype, N_rank > &array, Range r0, Range r1, Range r2, Range r3, Range r4)
Definition array-impl.h:808
void resizeAndPreserve(int extent1, int extent2, int extent3, int extent4, int extent5, int extent6, int extent7, int extent8, int extent9, int extent10)
T_array & operator+=(const ETBase< T_expr > &)
Scalar operand assignment.
void constructSubarray(Array< T_numtype, N_rank > &array, const RectDomain< N_rank > &)
Scalar operand assignment.
Array(int length0, int length1, int length2, int length3, GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:219
const T_numtype & operator()(const TinyVector< int, 5 > &index) const
Definition array-impl.h:1535
int isInRange(int i0, int i1, int i2, int i3, int i4) const
Definition array-impl.h:1231
void resize(Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r7, Range r8, Range r9)
Array(int length0, int length1, int length2, int length3, int length4, int length5, GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:244
const T_numtype & operator()(const TinyVector< int, 6 > &index) const
Definition array-impl.h:1555
T_numtype & operator()(int i0, int i1, int i2, int i3)
Definition array-impl.h:1740
Array(Array< T_numtype, N_rank > &array, Range r0, Range r1, Range r2, Range r3)
Definition array-impl.h:802
P_numtype T_numtype
Definition array-impl.h:133
T_numtype & operator()(int i0, int i1, int i2)
Definition array-impl.h:1726
T_numtype * data()
Definition array-impl.h:922
ListInitializationSwitch< T_array > operator=(T_numtype x)
Scalar operand assignment.
Definition array-impl.h:2271
T_numtype & operator()(const TinyVector< int, 11 > &index)
Definition array-impl.h:1681
void resize(int extent1, int extent2)
T_array & operator>>=(const T_array &)
Scalar operand assignment.
Array< typename multicomponent_traits< T_numtype >::T_element, N_rank > operator[](const unsigned component)
Definition array-impl.h:2222
iterator begin()
Definition array-impl.h:887
void resizeAndPreserve(int extent1, int extent2, int extent3)
sizeType size() const
Definition array-impl.h:1162
T_array & operator<<=(const T_numtype &)
Scalar operand assignment.
void slice(int rank, Range r)
const T_numtype & operator()(int i0, int i1, int i2, int i3) const
Definition array-impl.h:1733
Array(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r7, Range r8, Range r9, GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:680
int threadLocal(int disableLock=1) const
Definition array-impl.h:1179
int assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1), int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3), int BZ_DEBUG_PARAM(i4), int BZ_DEBUG_PARAM(i5), int BZ_DEBUG_PARAM(i6), int BZ_DEBUG_PARAM(i7)) const
Definition array-impl.h:1399
T_array & operator>>=(const ETBase< T_expr > &)
Scalar operand assignment.
_bz_ArrayExpr< ArrayIndexMapping< typename asExpr< T_array >::T_expr, N0, N1, N2, N3 > > operator()(IndexPlaceholder< N0 >, IndexPlaceholder< N1 >, IndexPlaceholder< N2 >, IndexPlaceholder< N3 >) const
Definition array-impl.h:2120
T_array operator()(Range r0, Range r1) const
Definition array-impl.h:1903
void resize(int extent1, int extent2, int extent3, int extent4, int extent5, int extent6, int extent7, int extent8, int extent9)
int isInRange(int i0, int i1, int i2, int i3, int i4, int i5, int i6, int i7) const
Definition array-impl.h:1258
T_numtype & operator()(const TinyVector< int, 4 > &index)
Definition array-impl.h:1527
const TinyVector< int, N_rank > & ordering() const
Definition array-impl.h:1026
T_array operator()(Range r0, Range r1, Range r2, Range r3) const
Definition array-impl.h:1913
int lbound(int rank) const
Definition array-impl.h:1000
Array(Array< T_numtype, N_rank > &array, Range r0, Range r1, Range r2)
Definition array-impl.h:797
T_array operator()(const RectDomain< N_rank > &subdomain) const
Definition array-impl.h:1887
GeneralArrayStorage< N_rank > storage_
Scalar operand assignment.
Definition array-impl.h:2502
const T_numtype & operator()(int i0, int i1, int i2, int i3, int i4, int i5, int i6, int i7) const
Definition array-impl.h:1799
T_array operator()(const StridedDomain< N_rank > &subdomain) const
Definition array-impl.h:1893
Array(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:588
ArrayIterator< T_numtype, N_rank > iterator
Definition array-impl.h:138
const T_numtype & operator()(int i0, int i1, int i2, int i3, int i4) const
Definition array-impl.h:1747
int dimensions() const
Definition array-impl.h:961
T_array operator()(Range r0, Range r1, Range r2, Range r3, Range r4) const
Definition array-impl.h:1918
const T_numtype * data() const
Definition array-impl.h:919
T_numtype & operator()(TinyVector< int, 2 > index)
Definition array-impl.h:1496
int isRankStoredAscending(int rank) const
Definition array-impl.h:995
void resizeAndPreserve(int extent1, int extent2, int extent3, int extent4, int extent5, int extent6, int extent7)
void free()
Definition array-impl.h:985
diffType dataOffset() const
Definition array-impl.h:916
void constructSubarray(Array< T_numtype, N_rank > &array, Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r7, Range r8)
Scalar operand assignment.
T_array & operator=(const ETBase< T_expr > &)
Scalar operand assignment.
int rows() const
Definition array-impl.h:1152
T_numtype & operator()(int i0, int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9)
Definition array-impl.h:1847
void setStorage(GeneralArrayStorage< N_rank >)
const T_numtype & operator()(TinyVector< int, 1 > index) const
Definition array-impl.h:1477
int isInRange(const T_index &index) const
Definition array-impl.h:1312
void resizeAndPreserve(int extent1, int extent2)
T_array & operator-=(const T_numtype &)
Scalar operand assignment.
T_array & operator&=(const ETBase< T_expr > &)
Scalar operand assignment.
void constructSubarray(Array< T_numtype, N_rank > &array, Range r0, Range r1)
Scalar operand assignment.
void resize(int extent1, int extent2, int extent3, int extent4, int extent5, int extent6)
void setupStorage(int rank)
Scalar operand assignment.
const T_numtype & operator()(int i0, int i1) const
Definition array-impl.h:1707
Array(Array< T_numtype, N_rank > &array, Range r0, Range r1)
Definition array-impl.h:792
Array(T_numtype *dataFirst, TinyVector< int, N_rank > shape, preexistingMemoryPolicy deletionPolicy, GeneralArrayStorage< N_rank > storage=T_default_storage(contiguousData))
Construct an array from an existing block of memory.
Definition array-impl.h:402
sizeType numElements() const
Definition array-impl.h:1012
Array(Range r0, Range r1, Range r2, GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:504
T_numtype & operator()(const TinyVector< int, 6 > &index)
Definition array-impl.h:1565
void resizeAndPreserve(int extent1, int extent2, int extent3, int extent4, int extent5)
diffType zeroOffset_
Scalar operand assignment.
Definition array-impl.h:2505
_bz_ArrayExpr< ArrayIndexMapping< typename asExpr< T_array >::T_expr, N0, N1, N2, N3, N4, N5, N6, N7 > > operator()(IndexPlaceholder< N0 >, IndexPlaceholder< N1 >, IndexPlaceholder< N2 >, IndexPlaceholder< N3 >, IndexPlaceholder< N4 >, IndexPlaceholder< N5 >, IndexPlaceholder< N6 >, IndexPlaceholder< N7 >) const
Definition array-impl.h:2163
T_array operator()(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6) const
Definition array-impl.h:1929
int isInRange(int i0, int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9) const
Definition array-impl.h:1283
int isInRange(int i0, int i1, int i2, int i3, int i4, int i5, int i6) const
Definition array-impl.h:1248
void resizeAndPreserve(const TinyVector< int, N_rank > &)
RectDomain< N_rank > domain() const
Definition array-impl.h:964
const Array< typename multicomponent_traits< T_numtype >::T_element, N_rank > operator[](const int component) const
Definition array-impl.h:2243
void resize(Range r1, Range r2, Range r3, Range r4, Range r5, Range r6)
int columns() const
Definition array-impl.h:905
Array(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r7, GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:616
T_array operator()(Range r0) const
Definition array-impl.h:1898
int assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1), int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3), int BZ_DEBUG_PARAM(i4), int BZ_DEBUG_PARAM(i5), int BZ_DEBUG_PARAM(i6), int BZ_DEBUG_PARAM(i7), int BZ_DEBUG_PARAM(i8), int BZ_DEBUG_PARAM(i9), int BZ_DEBUG_PARAM(i10)) const
Definition array-impl.h:1443
int assertInRange(const T_index &BZ_DEBUG_PARAM(index)) const
Definition array-impl.h:1320
void resize(Range r1, Range r2, Range r3, Range r4, Range r5)
T_numtype * dataFirst()
Definition array-impl.h:955
void resizeAndPreserve(int extent1, int extent2, int extent3, int extent4, int extent5, int extent6, int extent7, int extent8, int extent9)
Array(Range r0, Range r1, GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:489
Array(Array< T_numtype, N_rank > &array, Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6)
Definition array-impl.h:820
T_array & operator|=(const ETBase< T_expr > &)
Scalar operand assignment.
const T_numtype * dataZero() const
Definition array-impl.h:928
void constructSubarray(Array< T_numtype, N_rank > &array, const StridedDomain< N_rank > &)
Scalar operand assignment.
Array(const Array< T_numtype, N_rank > &array)
Definition array-impl.h:757
Array(Array< T_numtype, N_rank > &array, const RectDomain< N_rank > &subdomain)
Definition array-impl.h:851
iterator end()
Definition array-impl.h:969
T_array & operator>>=(const T_numtype &)
Scalar operand assignment.
void doTranspose(int destRank, int sourceRank, T_array &array)
Scalar operand assignment.
void resize(Range r1, Range r2)
T_array & operator%=(const T_array &)
Scalar operand assignment.
void constructSubarray(Array< T_numtype, N_rank > &array, Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6, Range r7, Range r8, Range r9, Range r10)
Scalar operand assignment.
T_array & operator*=(const ETBase< T_expr > &)
Scalar operand assignment.
void reindexSelf(const TinyVector< int, N_rank > &)
const TinyVector< int, N_rank > & length() const
Definition array-impl.h:1007
const T_numtype & operator()(const TinyVector< int, 8 > &index) const
Definition array-impl.h:1597
void reference(const T_array &)
T_array & operator|=(const T_array &)
Scalar operand assignment.
T_numtype & operator()(int i0, int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10)
Definition array-impl.h:1868
void constructSubarray(Array< T_numtype, N_rank > &array, Range r0, Range r1, Range r2, Range r3, Range r4, Range r5, Range r6)
Scalar operand assignment.
T_numtype & operator()(const TinyVector< int, N_rank2 > &index)
Definition array-impl.h:1471
_bz_ArrayExpr< ArrayIndexMapping< typename asExpr< T_array >::T_expr, N0, N1, N2, N3, N4, N5, N6 > > operator()(IndexPlaceholder< N0 >, IndexPlaceholder< N1 >, IndexPlaceholder< N2 >, IndexPlaceholder< N3 >, IndexPlaceholder< N4 >, IndexPlaceholder< N5 >, IndexPlaceholder< N6 >) const
Definition array-impl.h:2151
Array(int length0, int length1, int length2, int length3, int length4, int length5, int length6, int length7, GeneralArrayStorage< N_rank > storage=T_default_storage())
Definition array-impl.h:275
const TinyVector< int, N_rank > & base() const
Definition array-impl.h:881
void dumpStructureInformation(ostream &os=cout) const
T_numtype * getInitializationIterator()
Scalar operand assignment.
Definition array-impl.h:2395
void constructSubarray(Array< T_numtype, N_rank > &array, Range r0, Range r1, Range r2, Range r3)
Scalar operand assignment.
void slice(int &setRank, Range r, Array< T_numtype, N_rank2 > &array, TinyVector< int, N_rank2 > &rankMap, int sourceRank)
Scalar operand assignment.
void resize(Range r1, Range r2, Range r3)
Definition array-impl.h:76
Definition et-forward.h:18
Definition array-impl.h:85
Definition memblock.h:307
MemoryBlockReference()
Definition memblock.h:367
void changeToNullBlock()
Definition memblock.h:462
bool lockReferenceCount(bool lockingPolicy) const
Definition memblock.h:451
T_type *restrict data_
Definition memblock.h:313
sizeType blockLength() const
Definition memblock.h:435
T_numtype first(T_numtype lowRange=0) const
Definition range.h:228
bool isAscendingContiguous() const
Definition range.h:253
int length(int=0) const
Definition range.h:242
The TinyVector class is a one-dimensional, fixed length vector that implements the blitz expression t...
Definition tinyvec2.h:73
static int base()
Definition tinyvec2.h:240
static int ordering(int storageRankIndex)
Definition tinyvec2.h:286
Definition tvecglobs.h:70
static T_ret product(const TinyVector< T_numtype1, N_length > &a)
Definition tvecglobs.h:83
static bool isVectorAligned(const T *restrict pointer)
Test if a pointer to T is simd aligned.
Definition simdtypes.h:46
#define restrict
Definition compiler.h:95
Definition array-impl.h:66
ostream & operator<<(ostream &, const Array< T_numtype, 1 > &)
ptrdiff_t diffType
Definition blitz.h:111
N_length const TinyVector< T_numtype2, N_length > & b
Definition tvecglobs.h:49
istream & operator>>(istream &is, Array< T_numtype, N_rank > &x)
void find(Array< TinyVector< int, N_rank >, 1 > &, const Array< P_numtype, N_rank > &)
Definition array-impl.h:2537
void swap(Array< P_numtype, N_rank > &, Array< P_numtype, N_rank > &)
Definition array-impl.h:2523
size_t sizeType
Definition blitz.h:110
preexistingMemoryPolicy
Definition memblock.h:49
@ deleteDataWhenDone
Definition memblock.h:51
@ duplicateData
Definition memblock.h:50
@ neverDeleteData
Definition memblock.h:52
N_length & a
Definition tvecglobs.h:47
#define _bz_inline2
Definition tuning.h:126
#define BZ_ETPARM(X)
Definition tuning.h:138