Changeset 4d689e2
- Timestamp:
- Jan 10, 2024, 2:46:46 PM (15 months ago)
- Branches:
- master
- Children:
- 8655363
- Parents:
- f0c9c9b (diff), cfbc56ec (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 6 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified libcfa/src/Makefile.am ¶
rf0c9c9b r4d689e2 48 48 math.trait.hfa \ 49 49 math.hfa \ 50 raii.hfa \ 50 51 time_t.hfa \ 51 52 virtual_dtor.hfa \ -
TabularUnified libcfa/src/collections/array.hfa ¶
rf0c9c9b r4d689e2 131 131 132 132 static inline void __taglen( tag(arpk(N, S, Timmed, Tbase)), tag(N) ) {} 133 134 // workaround #226 (and array relevance thereof demonstrated in mike102/otype-slow-ndims.cfa) 135 static inline void ?{}( arpk(N, S, Timmed, Tbase) & this ) { 136 void ?{}( S (&inner)[N] ) {} 137 ?{}(this.strides); 138 } 139 static inline void ^?{}( arpk(N, S, Timmed, Tbase) & this ) { 140 void ^?{}( S (&inner)[N] ) {} 141 ^?{}(this.strides); 133 } 134 135 // RAII pattern has workarounds for 136 // - Trac 226: Simplest handling would be, require immediate element to be otype, let autogen 137 // raii happen. Performance on even a couple dimensions is unacceptable because of exponential 138 // thunk creation: ?{}() needs all four otype funcs from next level, so does ^?{}(), so do the 139 // other two. This solution offers ?{}() that needs only ?{}(), and similar for ^?{}. 140 141 forall( [N], S & | sized(S), Timmed &, Tbase & | { void ?{}( Timmed & ); } ) 142 static inline void ?{}( arpk(N, S, Timmed, Tbase) & this ) { 143 void ?{}( S (&)[N] ) {} 144 ?{}(this.strides); 145 146 for (i; N) ?{}( (Timmed &) this.strides[i] ); 147 } 148 149 forall( [N], S & | sized(S), Timmed &, Tbase & | { void ^?{}( Timmed & ); } ) 150 static inline void ^?{}( arpk(N, S, Timmed, Tbase) & this ) { 151 void ^?{}( S (&)[N] ) {} 152 ^?{}(this.strides); 153 154 for (i; N ) { 155 ^?{}( (Timmed &) this.strides[N-i-1] ); 142 156 } 143 157 } … … 147 161 // 148 162 149 forall( Te )163 forall( Te * ) 150 164 static inline Te mkar_( tag(Te) ) {} 151 165
Note: See TracChangeset
for help on using the changeset viewer.