Files
y_project/yopenCL/vector_add_kernel.cl
2024-01-05 20:40:37 +01:00

9 lines
255 B
Common Lisp

__kernel void vector_add(float alpha, __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] = alpha * A[i] + B[i];
}