Created
February 21, 2020 15:05
-
-
Save sschaetz/5b8e7cfff96cb515334f6d2575db1f1d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AURA_KERNEL void add( | |
AURA_DEVMEM float *a, | |
AURA_DEVMEM float *b, | |
AURA_DEVMEM float *c | |
#if defined AURA_BASE_OPENCL | |
) | |
{ | |
const uint tid = get_global_id(0); | |
#else | |
, | |
uint3 gid [[ thread_position_in_grid ]] | |
{ | |
const uint tid = gid.x; | |
#endif | |
c[tid] = a[tid] + b[tid]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment