Files
WFR-UnitTests/iwir/coderepo/sparselu/atomic2.code
T
2017-04-11 15:49:55 +02:00

17 lines
602 B
Plaintext
Executable File

float** BENCH = sin->BENCH.getValue();
int bots_arg_size = sin->bots_arg_size.getValue();
int kk = sin->kk.getValue();
int tmax = sin->tmax.getValue();
int t = sin->tindex.getValue();
int itercount = bots_arg_size - (kk+1);
int iterslice = itercount / (tmax+1);
int start = kk+1 + iterslice*t;
int stop = kk+1 + iterslice*(t+1);
if (t == tmax-1 && stop != bots_arg_size) {
stop = bots_arg_size;
}
for (int jj=start; jj<stop; jj++)
if (BENCH[kk*bots_arg_size+jj] != NULL) {
fwd(BENCH[kk*bots_arg_size+kk], BENCH[kk*bots_arg_size+jj]);
}
sout->BENCHout.setValue(BENCH);