32 #error <blitz/veciter.h> should be included via <blitz/vector.h>
38 template<typename P_numtype>
50 VectorIter(P_numtype*
restrict data,
int stride,
int length)
51 : data_(data), stride_(stride), length_(length)
54 #ifdef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR
63 P_numtype operator[](
int i)
const
65 BZPRECONDITION(i < length_);
66 return data_[i*stride_];
71 BZPRECONDITION(i < length_);
72 return data_[i*stride_];
75 P_numtype operator()(
int i)
const
77 BZPRECONDITION(i < length_);
78 return data_[i*stride_];
83 BZPRECONDITION(i < length_);
84 return data_[i*stride_];
87 P_numtype operator*()
const
90 P_numtype& operator*()
102 bool isUnitStride()
const
103 {
return (stride_ == 1); }
112 _bz_staticLengthCount = 0,
113 _bz_dynamicLengthCount = 1,
114 _bz_staticLength = 0;
116 bool _bz_hasFastAccess()
const
117 {
return isUnitStride(); }
119 P_numtype _bz_fastAccess(
int i)
const
125 int _bz_suggestLength()
const
136 template<
typename P_numtype>
148 #ifdef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR
205 #endif // BZ_VECITER_H