Update Kokkos library in LAMMPS to v3.4.0
This commit is contained in:
@ -75,8 +75,13 @@ struct hello_world {
|
||||
// The TeamPolicy<>::member_type provides functions to query the multi
|
||||
// dimensional index of a thread as well as the number of thread-teams and
|
||||
// the size of each team.
|
||||
#ifndef __SYCL_DEVICE_ONLY__
|
||||
// FIXME_SYCL needs printf workaround
|
||||
printf("Hello World: %i %i // %i %i\n", thread.league_rank(),
|
||||
thread.team_rank(), thread.league_size(), thread.team_size());
|
||||
#else
|
||||
(void)thread;
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -85,11 +85,16 @@ int main(int narg, char* args[]) {
|
||||
policy,
|
||||
KOKKOS_LAMBDA(const team_member& thread, int& lsum) {
|
||||
lsum += 1;
|
||||
// TeamPolicy<>::member_type provides functions to query the
|
||||
// multidimensional index of a thread, as well as the number of
|
||||
// thread teams and the size of each team.
|
||||
// TeamPolicy<>::member_type provides functions to query the
|
||||
// multidimensional index of a thread, as well as the number of
|
||||
// thread teams and the size of each team.
|
||||
#ifndef __SYCL_DEVICE_ONLY__
|
||||
// FIXME_SYCL needs workaround for printf
|
||||
printf("Hello World: %i %i // %i %i\n", thread.league_rank(),
|
||||
thread.team_rank(), thread.league_size(), thread.team_size());
|
||||
#else
|
||||
(void)thread;
|
||||
#endif
|
||||
},
|
||||
sum);
|
||||
#endif
|
||||
|
||||
@ -73,8 +73,13 @@ struct hello_world {
|
||||
// also executed by all threads of the team.
|
||||
Kokkos::parallel_for(Kokkos::TeamThreadRange(thread, 31),
|
||||
[&](const int& i) {
|
||||
#ifndef __SYCL_DEVICE_ONLY__
|
||||
// FIXME_SYCL needs printf workaround
|
||||
printf("Hello World: (%i , %i) executed loop %i \n",
|
||||
thread.league_rank(), thread.team_rank(), i);
|
||||
#else
|
||||
(void) i;
|
||||
#endif
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user