32 #ifndef BZ_INDEXEXPR_H
33 #define BZ_INDEXEXPR_H
38 #include <blitz/array/domain.h>
39 #include <blitz/array/slice.h>
44 class IndexPlaceholder
46 :
public ETBase<IndexPlaceholder<N> >
53 #ifdef BZ_NEW_EXPRESSION_TEMPLATES
73 typedef typename opType<T_numtype>::T_optype
T_optype;
75 typedef typename unwrapET<T_typeprop>::T_unwrapped
T_result;
104 #ifdef BZ_ARRAY_EXPR_PASS_INDEX_BY_VALUE
114 int lbound(
int)
const {
return INT_MIN; }
115 int ubound(
int)
const {
return INT_MAX; }
125 void push(
int) { BZPRECONDITION(0); }
126 void pop(
int) { BZPRECONDITION(0); }
182 T_result
shift(
int offset,
int dim)
const
183 { BZPRECHECK(0,
"Stencils of index expressions are not implemented");
185 T_result
shift(
int offset1,
int dim1,
int offset2,
int dim2)
const {
186 BZPRECHECK(0,
"Stencils of index expressions are not implemented");
192 { BZPRECHECK(0,
"Stencils of index expressions are not implemented");
197 str +=
"index-expr[NEEDS_WORK]";
200 template<
typename T_shape>
204 template<
typename T1,
typename T2 = nilArraySection,
205 class T3 = nilArraySection,
typename T4 = nilArraySection,
206 class T5 = nilArraySection,
typename T6 = nilArraySection,
207 class T7 = nilArraySection,
typename T8 = nilArraySection,
208 class T9 = nilArraySection,
typename T10 = nilArraySection,
209 class T11 = nilArraySection>
213 ((N>0) ? ArraySectionInfo<T1>::rank : 0)
214 + ((N>1) ? ArraySectionInfo<T2>::rank : 0)
215 + ((N>2) ? ArraySectionInfo<T3>::rank : 0)
216 + ((N>3) ? ArraySectionInfo<T4>::rank : 0)
217 + ((N>4) ? ArraySectionInfo<T5>::rank : 0)
218 + ((N>5) ? ArraySectionInfo<T6>::rank : 0)
219 + ((N>6) ? ArraySectionInfo<T7>::rank : 0)
220 + ((N>7) ? ArraySectionInfo<T8>::rank : 0)
221 + ((N>8) ? ArraySectionInfo<T9>::rank : 0)
222 + ((N>9) ? ArraySectionInfo<T10>::rank : 0)
223 + ((N>10) ? ArraySectionInfo<T11>::rank : 0);
227 template<
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
228 typename T7,
typename T8,
typename T9,
typename T10,
typename T11>
229 typename SliceInfo<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>::T_slice
230 operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7, T8 r8, T9 r9, T10 r10, T11 r11)
const
253 #ifndef BZ_NO_TENSOR_INDEX_OBJECTS
274 #endif // BZ_INDEXEXPR_H
_bz_global blitz::IndexPlaceholder< 9 > r
Definition: indexexpr.h:265
IndexPlaceholder< 3 > fourthIndex
Definition: indexexpr.h:244
bool isVectorAligned(diffType offset) const
There are no alignment issues here, so just return true.
Definition: indexexpr.h:167
_bz_global blitz::IndexPlaceholder< 11 > t
Definition: indexexpr.h:267
IndexPlaceholder< 10 > eleventhIndex
Definition: indexexpr.h:251
IndexPlaceholder< 4 > fifthIndex
Definition: indexexpr.h:245
static const int numTMOperands
Definition: indexexpr.h:80
T_result shift(int offset, int dim) const
Definition: indexexpr.h:182
static const int minWidth
Definition: indexexpr.h:82
_bz_global blitz::IndexPlaceholder< 6 > o
Definition: indexexpr.h:262
_bz_global blitz::IndexPlaceholder< 0 > i
Definition: indexexpr.h:256
_bz_global blitz::IndexPlaceholder< 4 > m
Definition: indexexpr.h:260
Helper class that defines the width of the simd instructions for a given type.
Definition: simdtypes.h:31
IndexPlaceholder< 1 > secondIndex
Definition: indexexpr.h:242
diffType suggestStride(int) const
Definition: indexexpr.h:170
_bz_global blitz::IndexPlaceholder< 1 > j
Definition: indexexpr.h:257
_bz_global blitz::IndexPlaceholder< 8 > q
Definition: indexexpr.h:264
void advance(int)
Definition: indexexpr.h:128
~IndexPlaceholder()
Definition: indexexpr.h:62
T_result operator()(const TinyVector< int, N_rank > &i) const
Definition: indexexpr.h:109
T_result fastRead(diffType) const
Definition: indexexpr.h:155
int ascending(int) const
Definition: indexexpr.h:112
SliceInfo< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::T_slice operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7, T8 r8, T9 r9, T10 r10, T11 r11) const
Definition: indexexpr.h:230
IndexPlaceholder(const IndexPlaceholder< N > &)
Definition: indexexpr.h:58
static const int rank_
Definition: indexexpr.h:84
bool canCollapse(int, int) const
Definition: indexexpr.h:145
Definition: et-forward.h:10
bool isStride(int, diffType) const
Definition: indexexpr.h:175
IndexPlaceholder< 7 > eighthIndex
Definition: indexexpr.h:248
bool shapeCheck(const T_shape &) const
Definition: indexexpr.h:201
T_result operator[](int) const
Definition: indexexpr.h:150
void operator=(const IndexPlaceholder< N > &)
Definition: indexexpr.h:65
tvresult< M >::Type fastRead_tv(diffType) const
Definition: indexexpr.h:161
opType< T_numtype >::T_optype T_optype
Definition: indexexpr.h:73
#define _bz_global
Definition: blitz.h:93
RectDomain< rank_ > domain() const
Definition: indexexpr.h:117
void advanceUnitStride()
Definition: indexexpr.h:143
Definition: et-forward.h:20
IndexPlaceholder< new_rank > T_slice
Definition: indexexpr.h:224
static const int numIndexPlaceholders
Definition: indexexpr.h:81
Definition: array-impl.h:66
Definition: et-forward.h:48
ptrdiff_t diffType
Definition: blitz.h:111
void push(int)
Definition: indexexpr.h:125
IndexPlaceholder()
Definition: indexexpr.h:50
void advance()
Definition: indexexpr.h:127
IndexPlaceholder< 8 > ninthIndex
Definition: indexexpr.h:249
IndexPlaceholder< 0 > firstIndex
Definition: indexexpr.h:241
static const int new_rank
Definition: indexexpr.h:212
unwrapET< T_typeprop >::T_unwrapped T_result
Definition: indexexpr.h:75
int T_numtype
Definition: indexexpr.h:68
int ubound(int) const
Definition: indexexpr.h:115
int lbound(int) const
Definition: indexexpr.h:114
int T_ctorArg1
Definition: indexexpr.h:69
#define BZ_NEW_EXPRESSION_TEMPLATES
Definition: tuning.h:70
size_t sizeType
Definition: blitz.h:110
static const int maxWidth
Definition: indexexpr.h:83
_bz_global blitz::IndexPlaceholder< 2 > k
Definition: indexexpr.h:258
void prettyPrint(std::string &str, prettyPrintFormat &) const
Definition: indexexpr.h:195
void loadStride(int)
Definition: indexexpr.h:129
static const int numTVOperands
Definition: indexexpr.h:79
bool isUnitStride() const
Definition: indexexpr.h:138
int T_range_result
Definition: indexexpr.h:71
_bz_global blitz::IndexPlaceholder< 3 > l
Definition: indexexpr.h:259
IndexPlaceholder< 6 > seventhIndex
Definition: indexexpr.h:247
asET< T_numtype >::T_wrapped T_typeprop
Definition: indexexpr.h:74
IndexPlaceholder< 5 > sixthIndex
Definition: indexexpr.h:246
T_result shift(int offset1, int dim1, int offset2, int dim2) const
Definition: indexexpr.h:185
T_range_result operator()(RectDomain< rank_ > d) const
Definition: indexexpr.h:191
Definition: indexexpr.h:210
FastTV2Iterator< T_numtype, M > Type
Definition: indexexpr.h:92
int ordering(int) const
Definition: indexexpr.h:113
int T_ctorArg2
Definition: indexexpr.h:70
IndexPlaceholder< 2 > thirdIndex
Definition: indexexpr.h:243
IndexPlaceholder< 9 > tenthIndex
Definition: indexexpr.h:250
_bz_global blitz::IndexPlaceholder< 10 > s
Definition: indexexpr.h:266
bool isUnitStride(int) const
Definition: indexexpr.h:133
_bz_global blitz::IndexPlaceholder< 5 > n
Definition: indexexpr.h:261
_bz_global blitz::IndexPlaceholder< 7 > p
Definition: indexexpr.h:263
int operator*() const
Definition: indexexpr.h:99
void _bz_offsetData(sizeType i)
Definition: indexexpr.h:188
void pop(int)
Definition: indexexpr.h:126
void moveTo(const TinyVector< int, N_rank > &i)
Definition: indexexpr.h:131
static const int numArrayOperands
Definition: indexexpr.h:78
The vectorized return type for an IndexPlaceholder should be some form of range, but that's not usefu...
Definition: indexexpr.h:91