From 2696b7b217d4e5cce56a15b028ae5ed5afa04692 Mon Sep 17 00:00:00 2001 From: allem Date: Tue, 10 Dec 2019 20:58:44 -0500 Subject: [PATCH] rename r to row --- gpu-opt/main.cu | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/gpu-opt/main.cu b/gpu-opt/main.cu index a610989..88ce520 100644 --- a/gpu-opt/main.cu +++ b/gpu-opt/main.cu @@ -47,31 +47,31 @@ struct Solver { } __device__ - void operator()(Row &r) { - if (r.r - r.l <= 0) { + void operator()(Row &row) { + if (row.r - row.l <= 0) { return; } - while (r.r - r.l > 0) { - int gen = c_rels[r.rel].gens[r.l & 1]; - int next = cosets[r.from * *c_ngens + gen]; + while (row.r - row.l > 0) { + int gen = c_rels[row.rel].gens[row.l & 1]; + int next = cosets[row.from * c_ngens[0] + gen]; if (next < 0) break; - r.l++; - r.from = next; + row.l++; + row.from = next; } - while (r.r - r.l > 0) { - int gen = c_rels[r.rel].gens[r.r & 1]; - int next = cosets[r.to * *c_ngens + gen]; + while (row.r - row.l > 0) { + int gen = c_rels[row.rel].gens[row.r & 1]; + int next = cosets[row.to * c_ngens[0] + gen]; if (next < 0) break; - r.r--; - r.to = next; + row.r--; + row.to = next; } - if (r.r - r.l <= 0) { - int gen = c_rels[r.rel].gens[r.l & 1]; - cosets[r.from * *c_ngens + gen] = r.to; - cosets[r.to * *c_ngens + gen] = r.from; + if (row.r - row.l <= 0) { + int gen = c_rels[row.rel].gens[row.l & 1]; + cosets[row.from * c_ngens[0] + gen] = row.to; + cosets[row.to * c_ngens[0] + gen] = row.from; return; } }