Skip to content

Instantly share code, notes, and snippets.

@DavidPoliakoff
Created November 2, 2021 15:54
Show Gist options
  • Save DavidPoliakoff/8e3e130a59505d578b62daf18c5255a0 to your computer and use it in GitHub Desktop.
Save DavidPoliakoff/8e3e130a59505d578b62daf18c5255a0 to your computer and use it in GitHub Desktop.
But why Kokkos Models?
#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
}
}
Kokkos::parallel_for("do_psychics",lots,
KOKKOS_LAMBDA(int i){
// insert psychics here
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment