rename r to row

This commit is contained in:
2019-12-10 20:58:44 -05:00
parent 7297bc1cea
commit 2696b7b217

View File

@@ -47,31 +47,31 @@ struct Solver {
} }
__device__ __device__
void operator()(Row &r) { void operator()(Row &row) {
if (r.r - r.l <= 0) { if (row.r - row.l <= 0) {
return; return;
} }
while (r.r - r.l > 0) { while (row.r - row.l > 0) {
int gen = c_rels[r.rel].gens[r.l & 1]; int gen = c_rels[row.rel].gens[row.l & 1];
int next = cosets[r.from * *c_ngens + gen]; int next = cosets[row.from * c_ngens[0] + gen];
if (next < 0) break; if (next < 0) break;
r.l++; row.l++;
r.from = next; row.from = next;
} }
while (r.r - r.l > 0) { while (row.r - row.l > 0) {
int gen = c_rels[r.rel].gens[r.r & 1]; int gen = c_rels[row.rel].gens[row.r & 1];
int next = cosets[r.to * *c_ngens + gen]; int next = cosets[row.to * c_ngens[0] + gen];
if (next < 0) break; if (next < 0) break;
r.r--; row.r--;
r.to = next; row.to = next;
} }
if (r.r - r.l <= 0) { if (row.r - row.l <= 0) {
int gen = c_rels[r.rel].gens[r.l & 1]; int gen = c_rels[row.rel].gens[row.l & 1];
cosets[r.from * *c_ngens + gen] = r.to; cosets[row.from * c_ngens[0] + gen] = row.to;
cosets[r.to * *c_ngens + gen] = r.from; cosets[row.to * c_ngens[0] + gen] = row.from;
return; return;
} }
} }