Changeset d1abc63c for libcfa/src/containers
- Timestamp:
- Oct 19, 2022, 4:33:34 PM (2 years ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- 135143ba
- Parents:
- 72b5805e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/containers/array.hfa
r72b5805e rd1abc63c 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 41 46 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 ) { 42 52 assert( i < N ); 43 53 return (Timmed &) a.strides[i]; … … 49 59 } 50 60 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 51 66 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 ) { 52 72 assert( i < N ); 53 73 return (Timmed &) a.strides[i]; … … 83 103 // Make a FOREACH macro 84 104 #define FE_0(WHAT) 85 #define FE_1(WHAT, X) WHAT(X) 105 #define FE_1(WHAT, X) WHAT(X) 86 106 #define FE_2(WHAT, X, ...) WHAT(X)FE_1(WHAT, __VA_ARGS__) 87 107 #define FE_3(WHAT, X, ...) WHAT(X)FE_2(WHAT, __VA_ARGS__) … … 90 110 //... repeat as needed 91 111 92 #define GET_MACRO(_0,_1,_2,_3,_4,_5,NAME,...) NAME 112 #define GET_MACRO(_0,_1,_2,_3,_4,_5,NAME,...) NAME 93 113 #define FOR_EACH(action,...) \ 94 114 GET_MACRO(_0,__VA_ARGS__,FE_5,FE_4,FE_3,FE_2,FE_1,FE_0)(action,__VA_ARGS__) … … 115 135 } 116 136 117 #else 137 #else 118 138 119 139 // Workaround form. Listing all possibilities up to 4 dims.
Note: See TracChangeset
for help on using the changeset viewer.