Last active
August 29, 2015 14:17
-
-
Save fenrig/40c8d383572d208d4cb2 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
__kernel void parse_bin(__const unsigned int stap_teller, __const unsigned int num_bins, __global int *result){ | |
unsigned int teller = 0; | |
unsigned int work_index = (unsigned int) get_global_id(0); | |
unsigned int index = (work_index << stap_teller) * num_bins; | |
unsigned int indexwith = index + (stap_teller * num_bins); | |
for(teller = 0; teller < num_bins; teller++, index++, indexwith++){ | |
result[index] = result[index] + result[indexwith]; | |
result[indexwith] = (int) stap_teller; | |
} | |
return; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment