chundoong-lab-ta/APWS23/vec-add-opencl-skeleton/kernel.cl

5 lines
161 B
Common Lisp
Raw Normal View History

2023-02-03 12:41:54 +09:00
__kernel void vec_add(__global float *A, __global float *B, __global float *C, int N) {
int i = get_global_id(0);
if (i >= N) return;
C[i] = A[i] + B[i];
}