COSC-3P93-Project/Step 3/resources/opencl/arrays.cl

12 lines
239 B
Common Lisp
Raw Permalink Normal View History

2022-11-23 11:55:40 -05:00
__kernel void vector_add(__global const int *A, __global const int *B, __global int *C) {
// Get the index of the current element to be processed
int i = get_global_id(0);
// Do the operation
C[i] = A[i] + B[i];
}