28 #ifndef BZ_TINYVECITER_H
29 #define BZ_TINYVECITER_H
35 #ifndef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR
36 #error "Debug in tinyveciter.h (this line shouldn't be here)"
42 template<typename P_numtype,
int N_length,
int N_stride>
51 #ifdef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR
58 T_numtype operator[](
int i)
const
60 BZPRECONDITION(i >= 0 && i < N_length);
61 return data_[i * N_stride];
66 BZPRECONDITION(i >= 0 && i < N_length);
67 return data_[i * N_stride];
70 T_numtype operator()(
int i)
const
72 BZPRECONDITION(i >= 0 && i < N_length);
73 return data_[i * N_stride];
78 BZPRECONDITION(i >= 0 && i < N_length);
79 return data_[i * N_stride];
85 static const int _bz_staticLengthCount = 1,
86 _bz_dynamicLengthCount = 0,
89 bool _bz_hasFastAccess()
const
92 T_numtype _bz_fastAccess(
int i)
const
93 {
return data_[i * N_stride]; }
95 T_numtype& _bz_fastAccess(
int i)
96 {
return data_[i * N_stride]; }
98 int _bz_suggestLength()
const
106 template<
typename P_numtype,
int N_length,
int N_str
ide>
115 #ifdef BZ_MANUAL_VECEXPR_COPY_CONSTRUCTOR
131 BZPRECONDITION(i >= 0 && i < N_length);
132 return data_[i * N_stride];
137 BZPRECONDITION(i >= 0 && i < N_length);
138 return data_[i * N_stride];
152 {
return data_[i * N_stride]; }
163 #endif // BZ_TINYVECITER_H