diff options
author | Janga Rahul Kumar <janga.rahul.kumar@intel.com> | 2024-01-17 02:57:53 +0530 |
---|---|---|
committer | Janga Rahul Kumar <janga.rahul.kumar@intel.com> | 2024-01-17 15:38:54 +0530 |
commit | 4ac860ea4ab4366e19a58f68aaf013a085e41d5b (patch) | |
tree | 913026c191fdd039c319a209272ead8d70328a5f /opencl | |
parent | c52afa044291743c37c0a064812b86e2d5cac2a4 (diff) |
opencl/compute_increment_kernel: Add opencl increment kernel
Compute opencl increment kernel provided here is used in
xe_compute_preempt test.
Cc: Nirmoy Das <nirmoy.das@intel.com>
Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Diffstat (limited to 'opencl')
-rw-r--r-- | opencl/compute_increment_kernel.cl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/opencl/compute_increment_kernel.cl b/opencl/compute_increment_kernel.cl new file mode 100644 index 000000000..0274b0883 --- /dev/null +++ b/opencl/compute_increment_kernel.cl @@ -0,0 +1,6 @@ +__kernel void square(__global float* output, const unsigned int count) { + int i = get_global_id(0); + for (int j = 0; j < count ; j++) { + output[i] = output[i] + 1; + } +} |