Skip to content

Commit

Permalink
test_mutable_cmdlist: add tests for kernel mutation (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
darmroz authored Nov 8, 2024
1 parent 87cf732 commit 34eb9d4
Show file tree
Hide file tree
Showing 3 changed files with 612 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,21 @@ kernel void addValue(global int *inOut, int val) {
inOut[gId] += val;
}

kernel void subValue(global int *inOut, int val) {
const int gId = get_global_id(0);
inOut[gId] -= val;
}

kernel void mulValue(global int *inOut, int val) {
const int gId = get_global_id(0);
inOut[gId] *= val;
}

kernel void divValue(global int *inOut, int val) {
const int gId = get_global_id(0);
inOut[gId] /= val;
}

kernel void testGlobalSizes(global int *inOut,
global int *globalSizes) {
int gIdX = get_global_id(0);
Expand Down
Binary file not shown.
Loading

0 comments on commit 34eb9d4

Please sign in to comment.