Update Kokkos library in LAMMPS to v3.2
This commit is contained in:
@ -57,12 +57,12 @@
|
||||
// league_size) is not limited by physical constraints. Its a pure logical
|
||||
// number.
|
||||
|
||||
typedef Kokkos::TeamPolicy<> team_policy;
|
||||
typedef team_policy::member_type team_member;
|
||||
using team_policy = Kokkos::TeamPolicy<>;
|
||||
using team_member = team_policy::member_type;
|
||||
|
||||
// Define a functor which can be launched using the TeamPolicy
|
||||
struct hello_world {
|
||||
typedef int value_type; // Specify value type for reduction target, sum
|
||||
using value_type = int; // Specify value type for reduction target, sum
|
||||
|
||||
// This is a reduction operator which now takes as first argument the
|
||||
// TeamPolicy member_type. Every member of the team contributes to the
|
||||
|
||||
@ -56,8 +56,8 @@
|
||||
|
||||
int main(int narg, char* args[]) {
|
||||
using Kokkos::parallel_reduce;
|
||||
typedef Kokkos::TeamPolicy<> team_policy;
|
||||
typedef typename team_policy::member_type team_member;
|
||||
using team_policy = Kokkos::TeamPolicy<>;
|
||||
using team_member = typename team_policy::member_type;
|
||||
|
||||
Kokkos::initialize(narg, args);
|
||||
|
||||
|
||||
@ -46,11 +46,11 @@
|
||||
#include <cstdio>
|
||||
|
||||
// See 01_thread_teams for an explanation of a basic TeamPolicy
|
||||
typedef Kokkos::TeamPolicy<> team_policy;
|
||||
typedef typename team_policy::member_type team_member;
|
||||
using team_policy = Kokkos::TeamPolicy<>;
|
||||
using team_member = typename team_policy::member_type;
|
||||
|
||||
struct hello_world {
|
||||
typedef int value_type; // Specify value type for reduction target, sum
|
||||
using value_type = int; // Specify value type for reduction target, sum
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void operator()(const team_member& thread, int& sum) const {
|
||||
sum += 1;
|
||||
|
||||
@ -60,13 +60,13 @@
|
||||
// a thread execute every line of the operator as long as there are no
|
||||
// restricitons on them. Code lines can be restricted using Kokkos::single to
|
||||
// either execute once PerThread or execute once PerTeam.
|
||||
typedef typename Kokkos::TeamPolicy<>::member_type team_member;
|
||||
using team_member = typename Kokkos::TeamPolicy<>::member_type;
|
||||
|
||||
struct SomeCorrelation {
|
||||
typedef int value_type; // Specify value type for reduction target, sum
|
||||
typedef Kokkos::DefaultExecutionSpace::scratch_memory_space shared_space;
|
||||
typedef Kokkos::View<int*, shared_space, Kokkos::MemoryUnmanaged>
|
||||
shared_1d_int;
|
||||
using value_type = int; // Specify value type for reduction target, sum
|
||||
using shared_space = Kokkos::DefaultExecutionSpace::scratch_memory_space;
|
||||
using shared_1d_int =
|
||||
Kokkos::View<int*, shared_space, Kokkos::MemoryUnmanaged>;
|
||||
|
||||
Kokkos::View<const int***, Kokkos::LayoutRight> data;
|
||||
Kokkos::View<int> gsum;
|
||||
@ -136,7 +136,7 @@ struct SomeCorrelation {
|
||||
|
||||
// The functor needs to define how much shared memory it requests given a
|
||||
// team_size.
|
||||
size_t team_shmem_size(int team_size) const {
|
||||
size_t team_shmem_size(int /*team_size*/) const {
|
||||
return shared_1d_int::shmem_size(data.extent(1));
|
||||
}
|
||||
};
|
||||
|
||||
@ -48,11 +48,11 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
typedef Kokkos::DefaultExecutionSpace Device;
|
||||
typedef Kokkos::HostSpace::execution_space Host;
|
||||
using Device = Kokkos::DefaultExecutionSpace;
|
||||
using Host = Kokkos::HostSpace::execution_space;
|
||||
|
||||
typedef Kokkos::TeamPolicy<Device> team_policy;
|
||||
typedef team_policy::member_type team_member;
|
||||
using team_policy = Kokkos::TeamPolicy<Device>;
|
||||
using team_member = team_policy::member_type;
|
||||
|
||||
static const int TEAM_SIZE = 16;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user