@@ -16,21 +16,21 @@ namespace internal {
1616template <typename Value_, typename Group_, typename Output_>
1717struct AucWorkspace {
1818 AucWorkspace (const std::size_t ngroups, Output_* const buffer) :
19- less_than (sanisizer::cast<decltype (I( less_than.size())) >(ngroups)
19+ less_than (sanisizer::cast<I< decltype (less_than.size())> >(ngroups)
2020#ifdef SCRAN_MARKERS_TEST_INIT
2121 , SCRAN_MARKERS_TEST_INIT
2222#endif
2323 ),
24- equal (sanisizer::cast<decltype (I( equal.size())) >(ngroups)
24+ equal (sanisizer::cast<I< decltype (equal.size())> >(ngroups)
2525#ifdef SCRAN_MARKERS_TEST_INIT
2626 , SCRAN_MARKERS_TEST_INIT
2727#endif
2828 ),
29- outputs (sanisizer::cast<decltype (I( outputs.size())) >(ngroups)),
29+ outputs (sanisizer::cast<I< decltype (outputs.size())> >(ngroups)),
3030 output_start (buffer),
3131 output_end (buffer)
3232 {
33- for (decltype (I ( ngroups)) i = 0 ; i < ngroups; ++i) {
33+ for (I< decltype (ngroups)> i = 0 ; i < ngroups; ++i) {
3434 outputs[i] = output_end;
3535 output_end += ngroups;
3636 }
@@ -66,7 +66,7 @@ void compute_pairwise_auc(AucWorkspace<Value_, Group_, Output_>& work, const std
6666 const auto ngroups = num_zeros.size ();
6767
6868 const auto num_input = input.size ();
69- typedef decltype (I ( num_input)) Position;
69+ typedef I< decltype (num_input)> Position;
7070
7171 auto inner_loop = [&](Position& pos) -> void {
7272 const auto & current = input[pos];
@@ -82,17 +82,17 @@ void compute_pairwise_auc(AucWorkspace<Value_, Group_, Output_>& work, const std
8282 if (tied) {
8383 ++equal[current.second ]; // contribution of the current (tied) observation.
8484
85- for (decltype (I ( ngroups)) l = 1 ; l < ngroups; ++l) { // starting from 1 as zero has no work for the g < l condition anyway.
85+ for (I< decltype (ngroups)> l = 1 ; l < ngroups; ++l) { // starting from 1 as zero has no work for the g < l condition anyway.
8686 const auto num_eq = equal[l];
8787 if (num_eq) {
8888 const auto outptr = outputs[l];
89- for (decltype (I (l)) g = 0 ; g < l; ++g) {
89+ for (I< decltype (l)> g = 0 ; g < l; ++g) {
9090 outptr[g] += num_eq * (less_than[g] + 0.5 * equal[g]);
9191 }
9292 }
9393 }
9494
95- for (decltype (I ( ngroups)) l = 0 ; l < ngroups; ++l) {
95+ for (I< decltype (ngroups)> l = 0 ; l < ngroups; ++l) {
9696 less_than[l] += equal[l];
9797 equal[l] = 0 ;
9898 }
@@ -113,17 +113,17 @@ void compute_pairwise_auc(AucWorkspace<Value_, Group_, Output_>& work, const std
113113 }
114114
115115 // Values == 0.
116- for (decltype (I ( ngroups)) l = 1 ; l < ngroups; ++l) { // starting from 1, see above.
116+ for (I< decltype (ngroups)> l = 1 ; l < ngroups; ++l) { // starting from 1, see above.
117117 const auto num_z = num_zeros[l];
118118 if (num_z) {
119119 const auto outptr = outputs[l];
120- for (decltype (I (l)) g = 0 ; g < l; ++g) {
120+ for (I< decltype (l)> g = 0 ; g < l; ++g) {
121121 outptr[g] += num_z * (less_than[g] + 0.5 * num_zeros[g]);
122122 }
123123 }
124124 }
125125
126- for (decltype (I ( ngroups)) l = 0 ; l < ngroups; ++l) {
126+ for (I< decltype (ngroups)> l = 0 ; l < ngroups; ++l) {
127127 less_than[l] += num_zeros[l];
128128 }
129129
@@ -134,8 +134,8 @@ void compute_pairwise_auc(AucWorkspace<Value_, Group_, Output_>& work, const std
134134 }
135135
136136 // Filling in the other side.
137- for (decltype (I ( ngroups)) l = 1 ; l < ngroups; ++l) { // starting from 1, see above.
138- for (decltype (I (l)) g = 0 ; g < l; ++g) {
137+ for (I< decltype (ngroups)> l = 1 ; l < ngroups; ++l) { // starting from 1, see above.
138+ for (I< decltype (l)> g = 0 ; g < l; ++g) {
139139 const Output_ prod = static_cast <Output_>(totals[l]) * static_cast <Output_>(totals[g]);
140140 outputs[g][l] = prod - outputs[l][g];
141141
@@ -163,7 +163,7 @@ void compute_pairwise_auc(AucWorkspace<Value_, Group_, Output_>& work, const std
163163 const auto ngroups = num_zeros.size ();
164164
165165 const auto num_input = input.size ();
166- typedef decltype (I ( num_input)) Position;
166+ typedef I< decltype (num_input)> Position;
167167
168168 auto inner_loop = [&](Position& pos, Position& comp) -> void {
169169 const auto & current = input[pos];
@@ -186,20 +186,20 @@ void compute_pairwise_auc(AucWorkspace<Value_, Group_, Output_>& work, const std
186186 if (tied) {
187187 do {
188188 const auto outptr = outputs[input[pos].second ];
189- for (decltype (I ( ngroups)) g = 0 ; g < ngroups; ++g) {
189+ for (I< decltype (ngroups)> g = 0 ; g < ngroups; ++g) {
190190 outptr[g] += less_than[g] + 0.5 * equal[g];
191191 }
192192 ++pos;
193193 } while (pos != num_input && input[pos].first == current.first );
194194
195- for (decltype (I ( ngroups)) l = 0 ; l < ngroups; ++l) {
195+ for (I< decltype (ngroups)> l = 0 ; l < ngroups; ++l) {
196196 less_than[l] += equal[l];
197197 equal[l] = 0 ;
198198 }
199199 } else {
200200 do {
201201 const auto outptr = outputs[input[pos].second ];
202- for (decltype (I ( ngroups)) g = 0 ; g < ngroups; ++g) {
202+ for (I< decltype (ngroups)> g = 0 ; g < ngroups; ++g) {
203203 outptr[g] += less_than[g];
204204 }
205205 ++pos;
@@ -244,11 +244,11 @@ void compute_pairwise_auc(AucWorkspace<Value_, Group_, Output_>& work, const std
244244 ++comp;
245245 }
246246
247- for (decltype (I ( ngroups)) l = 0 ; l < ngroups; ++l) {
247+ for (I< decltype (ngroups)> l = 0 ; l < ngroups; ++l) {
248248 const auto num_z = num_zeros[l];
249249 if (num_z) {
250250 const auto outptr = outputs[l];
251- for (decltype (I ( ngroups)) g = 0 ; g < ngroups; ++g) {
251+ for (I< decltype (ngroups)> g = 0 ; g < ngroups; ++g) {
252252 outptr[g] += less_than[g] * num_z;
253253 }
254254 }
@@ -263,29 +263,29 @@ void compute_pairwise_auc(AucWorkspace<Value_, Group_, Output_>& work, const std
263263 }
264264
265265 if (tied) {
266- for (decltype (I ( ngroups)) l = 0 ; l < ngroups; ++l) {
266+ for (I< decltype (ngroups)> l = 0 ; l < ngroups; ++l) {
267267 const auto num_z = num_zeros[l];
268268 if (num_z) {
269269 const auto outptr = outputs[l];
270- for (decltype (I ( ngroups)) g = 0 ; g < ngroups; ++g) {
270+ for (I< decltype (ngroups)> g = 0 ; g < ngroups; ++g) {
271271 outptr[g] += 0.5 * equal[g] * num_z;
272272 }
273273 }
274274 }
275275
276- for (decltype (I ( ngroups)) l = 0 ; l < ngroups; ++l) {
276+ for (I< decltype (ngroups)> l = 0 ; l < ngroups; ++l) {
277277 less_than[l] += equal[l];
278278 equal[l] = 0 ;
279279 }
280280 }
281281
282282 // Or to each other, if the threshold is zero.
283283 if (threshold == 0 ) {
284- for (decltype (I ( ngroups)) l = 0 ; l < ngroups; ++l) {
284+ for (I< decltype (ngroups)> l = 0 ; l < ngroups; ++l) {
285285 const auto num_z = num_zeros[l];
286286 if (num_z) {
287287 const auto outptr = outputs[l];
288- for (decltype (I ( ngroups)) g = 0 ; g < ngroups; ++g) {
288+ for (I< decltype (ngroups)> g = 0 ; g < ngroups; ++g) {
289289 outptr[g] += num_z * 0.5 * num_zeros[g];
290290 }
291291 }
@@ -300,13 +300,13 @@ void compute_pairwise_auc(AucWorkspace<Value_, Group_, Output_>& work, const std
300300 // Adding the contribution of zeros (in terms of the limit _being_ at zero + threshold)
301301 while (pos != num_input && static_cast <Threshold_>(input[pos].first ) == threshold) {
302302 const auto outptr = outputs[input[pos].second ];
303- for (decltype (I ( ngroups)) g = 0 ; g < ngroups; ++g) {
303+ for (I< decltype (ngroups)> g = 0 ; g < ngroups; ++g) {
304304 outptr[g] += less_than[g] + 0.5 * num_zeros[g];
305305 }
306306 ++pos;
307307 }
308308
309- for (decltype (I ( ngroups)) l = 0 ; l < ngroups; ++l) {
309+ for (I< decltype (ngroups)> l = 0 ; l < ngroups; ++l) {
310310 less_than[l] += num_zeros[l];
311311 }
312312
@@ -316,8 +316,8 @@ void compute_pairwise_auc(AucWorkspace<Value_, Group_, Output_>& work, const std
316316
317317 // Dividing by the product of sizes.
318318 if (normalize) {
319- for (decltype (I ( ngroups)) l = 0 ; l < ngroups; ++l) {
320- for (decltype (I ( ngroups)) g = 0 ; g < ngroups; ++g) {
319+ for (I< decltype (ngroups)> l = 0 ; l < ngroups; ++l) {
320+ for (I< decltype (ngroups)> g = 0 ; g < ngroups; ++g) {
321321 const Output_ prod = static_cast <Output_>(totals[l]) * static_cast <Output_>(totals[g]);
322322 if (prod) {
323323 outputs[l][g] /= prod;
0 commit comments