Skip to content

Commit 76c006c

Browse files
authored
Merge branch 'DrTimothyAldenDavis:dev2' into dev2
2 parents 4a03d25 + 7286b86 commit 76c006c

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

CUDA/template/GB_jit_kernel_cuda_apply_unop.cu

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,15 @@ __global__ void GB_cuda_apply_unop_kernel
3939

4040
#define A_iso GB_A_ISO
4141

42-
int tid = blockDim.x * blockIdx.x + threadIdx.x ;
43-
int nthreads = blockDim.x * gridDim.x ;
44-
4542
#if ( GB_DEPENDS_ON_Y )
4643
// get thunk value (of type GB_Y_TYPE)
4744
GB_Y_TYPE thunk_value = * ((GB_Y_TYPE *) thunk) ;
4845
#endif
4946

5047
#if ( GB_A_IS_BITMAP || GB_A_IS_FULL )
5148
// bitmap/full case
49+
int tid = blockDim.x * blockIdx.x + threadIdx.x ;
50+
int nthreads = blockDim.x * gridDim.x ;
5251
for (int64_t p = tid ; p < anz ; p += nthreads)
5352
{
5453
if (!GBb_A (Ab, p)) { continue ; }
@@ -92,8 +91,10 @@ __global__ void GB_cuda_apply_unop_kernel
9291
}
9392
}
9493
#else
95-
const int64_t avlen = A->vlen ;
9694
// can do normal method
95+
const int64_t avlen = A->vlen ;
96+
int tid = blockDim.x * blockIdx.x + threadIdx.x ;
97+
int nthreads = blockDim.x * gridDim.x ;
9798
for (int64_t p = tid ; p < anz ; p += nthreads)
9899
{
99100
#if ( GB_DEPENDS_ON_I )

Source/jitifyer/GB_macrofy_binop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void GB_macrofy_binop
113113
ASSERT (!is_monoid_or_build) ;
114114
if (is_kron)
115115
{
116-
fprintf (fp, " %s (&(z), &(x),ix,jx, &(y),iy,jy, theta)\n",
116+
fprintf (fp, " %s (&(z), ) &(x),ix,jx, &(y),iy,jy, theta)\n",
117117
op->name) ;
118118
}
119119
else

Source/jitifyer/GB_macrofy_unop.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ void GB_macrofy_unop
4343

4444
ASSERT (op != NULL) ;
4545
GB_macrofy_defn (fp, 3, op->name, op->defn) ;
46-
fprintf (fp, "#define %s(z,x,%s,y) %s (&(z), &(x))\n", macro_name,
47-
ij, op->name) ;
46+
fprintf (fp, "#define %s(z,x,%s,y) %s (&(z), &(x))\n",
47+
macro_name, ij, op->name) ;
4848

4949
}
5050
else if (ecode == 254)

0 commit comments

Comments
 (0)