Changes in libcfa/src/containers/array.hfa [058ece2:8d76f2b]
- File:
-
- 1 edited
-
libcfa/src/containers/array.hfa (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/containers/array.hfa
r058ece2 r8d76f2b 27 27 // - Given bug of Trac #247, CFA gives sizeof expressions type unsigned long int, when it 28 28 // should give them type size_t. 29 // 29 // 30 30 // gcc -m32 cfa -m32 given bug gcc -m64 31 31 // ptrdiff_t int int long int … … 39 39 } 40 40 41 static inline const Timmed & ?[?]( const arpk(N, S, Timmed, Tbase) & a, int i ) {42 assert( i < N );43 return (Timmed &) a.strides[i];44 }45 46 41 static inline Timmed & ?[?]( arpk(N, S, Timmed, Tbase) & a, unsigned int i ) { 47 assert( i < N );48 return (Timmed &) a.strides[i];49 }50 51 static inline const Timmed & ?[?]( const arpk(N, S, Timmed, Tbase) & a, unsigned int i ) {52 42 assert( i < N ); 53 43 return (Timmed &) a.strides[i]; … … 59 49 } 60 50 61 static inline const Timmed & ?[?]( const arpk(N, S, Timmed, Tbase) & a, long int i ) {62 assert( i < N );63 return (Timmed &) a.strides[i];64 }65 66 51 static inline Timmed & ?[?]( arpk(N, S, Timmed, Tbase) & a, unsigned long int i ) { 67 assert( i < N );68 return (Timmed &) a.strides[i];69 }70 71 static inline const Timmed & ?[?]( const arpk(N, S, Timmed, Tbase) & a, unsigned long int i ) {72 52 assert( i < N ); 73 53 return (Timmed &) a.strides[i]; … … 103 83 // Make a FOREACH macro 104 84 #define FE_0(WHAT) 105 #define FE_1(WHAT, X) WHAT(X) 85 #define FE_1(WHAT, X) WHAT(X) 106 86 #define FE_2(WHAT, X, ...) WHAT(X)FE_1(WHAT, __VA_ARGS__) 107 87 #define FE_3(WHAT, X, ...) WHAT(X)FE_2(WHAT, __VA_ARGS__) … … 110 90 //... repeat as needed 111 91 112 #define GET_MACRO(_0,_1,_2,_3,_4,_5,NAME,...) NAME 92 #define GET_MACRO(_0,_1,_2,_3,_4,_5,NAME,...) NAME 113 93 #define FOR_EACH(action,...) \ 114 94 GET_MACRO(_0,__VA_ARGS__,FE_5,FE_4,FE_3,FE_2,FE_1,FE_0)(action,__VA_ARGS__) … … 135 115 } 136 116 137 #else 117 #else 138 118 139 119 // Workaround form. Listing all possibilities up to 4 dims. … … 175 155 176 156 // Wrapper 177 externstruct all_t {} all;157 struct all_t {} all; 178 158 forall( [N], S & | sized(S), Te &, result &, Tbase & | { tag(result) enq_( tag(Tbase), tag(N), tag(S), tag(Te) ); } ) 179 159 static inline result & ?[?]( arpk(N, S, Te, Tbase) & this, all_t ) {
Note:
See TracChangeset
for help on using the changeset viewer.