Last active
July 6, 2016 10:36
-
-
Save jszuppe/3a2de75acb662d197aca745f24205e2b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#define boost_pair_type(t1, t2) _pair_ ## t1 ## _ ## t2 ## _t | |
#define boost_pair_get(x, n) (n == 0 ? x.first ## x.second) | |
#define boost_make_pair(t1, x, t2, y) (boost_pair_type(t1, t2)) { x, y } | |
#define boost_tuple_get(x, n) (x.v ## n) | |
inline int ret42(){ return 42; } | |
__kernel void copy(__global int* _buf0, const uint count) | |
{ | |
uint index = get_local_id(0) + (512 * get_group_id(0)); | |
for(uint i = 0; i < 4; i++){ | |
if(index < count){ | |
_buf0[index]=ret42(); | |
index += 128; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment