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
| function_pointer_that_takes_a_string begin_parallel_for_ptr; | |
| function_pointer_that_takes_a_string end_parallel_for_ptr; | |
| void initialize(std::string toolLibrary) { | |
| void* handle = dlopen(toolLibrary); | |
| begin_parallel_for_ptr = dlsym(handle, "kokkosp_begin_parallel_for"); | |
| end_parallel_for_ptr = dlsym(handle, "kokkosp_end_parallel_for"); | |
| } | |
| void parallel_for(std::string label, boring_parallelism_stuff stuff) { | |
| if(begin_parallel_for_ptr){ | |
| fence_kokkos(); // this is a _small_ lie |
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
| #pragma omp parallel for | |
| for(int i=0;i<lots;++i){ | |
| // insert psychics here | |
| } | |
| __global__ void cuda(){ | |
| int thread = threadIdx.x + | |
| blockdim.x * blockIdx.x; | |
| if(thread < lots){ | |
| // insert psychics here |
OlderNewer