Skip to content

Commit a0491d1

Browse files
authored
Merge pull request #282 from abergeron/fix_take1_sched
Fix for scheduling in some corner cases.
2 parents b4a5b84 + 3c50483 commit a0491d1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/gpuarray_array.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,11 @@ int GpuArray_take1(GpuArray *a, const GpuArray *v, const GpuArray *i,
499499
pl = ls[0];
500500
ls[0] = ls[1];
501501
ls[1] = pl;
502+
gs[0] = 1;
503+
} else {
504+
gs[0] = gs[1];
505+
gs[1] = 1;
502506
}
503-
gs[0] = 1;
504507

505508
argp = 0;
506509
GpuKernel_setarg(&k, argp++, a->data);

0 commit comments

Comments
 (0)