mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 16:24:03 -05:00
8 lines
208 B
Plaintext
8 lines
208 B
Plaintext
template<typename T>
|
|
T add(T a, T b) {
|
|
return a + b;
|
|
}
|
|
kernel void k(global int* in1, global int* in2, global int* out) {
|
|
auto index = get_global_id(0);
|
|
out[index] = add(in1[index], in2[index]);
|
|
} |