Update Kokkos library in LAMMPS to v3.2
This commit is contained in:
@ -54,12 +54,11 @@
|
||||
|
||||
namespace Test {
|
||||
|
||||
#ifndef KOKKOS_ENABLE_DEPRECATED_CODE
|
||||
namespace {
|
||||
|
||||
template <typename ExecSpace>
|
||||
struct TestViewLayoutTiled {
|
||||
typedef double Scalar;
|
||||
using Scalar = double;
|
||||
|
||||
static constexpr int T0 = 2;
|
||||
static constexpr int T1 = 4;
|
||||
@ -71,46 +70,46 @@ struct TestViewLayoutTiled {
|
||||
static constexpr int T7 = 2;
|
||||
|
||||
// Rank 2
|
||||
typedef Kokkos::Experimental::LayoutTiled<Kokkos::Iterate::Left,
|
||||
Kokkos::Iterate::Left, T0, T1>
|
||||
LayoutLL_2D_2x4;
|
||||
typedef Kokkos::Experimental::LayoutTiled<Kokkos::Iterate::Right,
|
||||
Kokkos::Iterate::Left, T0, T1>
|
||||
LayoutRL_2D_2x4;
|
||||
typedef Kokkos::Experimental::LayoutTiled<Kokkos::Iterate::Left,
|
||||
Kokkos::Iterate::Right, T0, T1>
|
||||
LayoutLR_2D_2x4;
|
||||
typedef Kokkos::Experimental::LayoutTiled<Kokkos::Iterate::Right,
|
||||
Kokkos::Iterate::Right, T0, T1>
|
||||
LayoutRR_2D_2x4;
|
||||
using LayoutLL_2D_2x4 =
|
||||
Kokkos::Experimental::LayoutTiled<Kokkos::Iterate::Left,
|
||||
Kokkos::Iterate::Left, T0, T1>;
|
||||
using LayoutRL_2D_2x4 =
|
||||
Kokkos::Experimental::LayoutTiled<Kokkos::Iterate::Right,
|
||||
Kokkos::Iterate::Left, T0, T1>;
|
||||
using LayoutLR_2D_2x4 =
|
||||
Kokkos::Experimental::LayoutTiled<Kokkos::Iterate::Left,
|
||||
Kokkos::Iterate::Right, T0, T1>;
|
||||
using LayoutRR_2D_2x4 =
|
||||
Kokkos::Experimental::LayoutTiled<Kokkos::Iterate::Right,
|
||||
Kokkos::Iterate::Right, T0, T1>;
|
||||
|
||||
// Rank 3
|
||||
typedef Kokkos::Experimental::LayoutTiled<Kokkos::Iterate::Left,
|
||||
Kokkos::Iterate::Left, T0, T1, T2>
|
||||
LayoutLL_3D_2x4x4;
|
||||
typedef Kokkos::Experimental::LayoutTiled<Kokkos::Iterate::Right,
|
||||
Kokkos::Iterate::Left, T0, T1, T2>
|
||||
LayoutRL_3D_2x4x4;
|
||||
typedef Kokkos::Experimental::LayoutTiled<Kokkos::Iterate::Left,
|
||||
Kokkos::Iterate::Right, T0, T1, T2>
|
||||
LayoutLR_3D_2x4x4;
|
||||
typedef Kokkos::Experimental::LayoutTiled<Kokkos::Iterate::Right,
|
||||
Kokkos::Iterate::Right, T0, T1, T2>
|
||||
LayoutRR_3D_2x4x4;
|
||||
using LayoutLL_3D_2x4x4 =
|
||||
Kokkos::Experimental::LayoutTiled<Kokkos::Iterate::Left,
|
||||
Kokkos::Iterate::Left, T0, T1, T2>;
|
||||
using LayoutRL_3D_2x4x4 =
|
||||
Kokkos::Experimental::LayoutTiled<Kokkos::Iterate::Right,
|
||||
Kokkos::Iterate::Left, T0, T1, T2>;
|
||||
using LayoutLR_3D_2x4x4 =
|
||||
Kokkos::Experimental::LayoutTiled<Kokkos::Iterate::Left,
|
||||
Kokkos::Iterate::Right, T0, T1, T2>;
|
||||
using LayoutRR_3D_2x4x4 =
|
||||
Kokkos::Experimental::LayoutTiled<Kokkos::Iterate::Right,
|
||||
Kokkos::Iterate::Right, T0, T1, T2>;
|
||||
|
||||
// Rank 4
|
||||
typedef Kokkos::Experimental::LayoutTiled<
|
||||
Kokkos::Iterate::Left, Kokkos::Iterate::Left, T0, T1, T2, T3>
|
||||
LayoutLL_4D_2x4x4x2;
|
||||
typedef Kokkos::Experimental::LayoutTiled<
|
||||
Kokkos::Iterate::Right, Kokkos::Iterate::Left, T0, T1, T2, T3>
|
||||
LayoutRL_4D_2x4x4x2;
|
||||
typedef Kokkos::Experimental::LayoutTiled<
|
||||
Kokkos::Iterate::Left, Kokkos::Iterate::Right, T0, T1, T2, T3>
|
||||
LayoutLR_4D_2x4x4x2;
|
||||
typedef Kokkos::Experimental::LayoutTiled<
|
||||
Kokkos::Iterate::Right, Kokkos::Iterate::Right, T0, T1, T2, T3>
|
||||
LayoutRR_4D_2x4x4x2;
|
||||
using LayoutLL_4D_2x4x4x2 =
|
||||
Kokkos::Experimental::LayoutTiled<Kokkos::Iterate::Left,
|
||||
Kokkos::Iterate::Left, T0, T1, T2, T3>;
|
||||
using LayoutRL_4D_2x4x4x2 =
|
||||
Kokkos::Experimental::LayoutTiled<Kokkos::Iterate::Right,
|
||||
Kokkos::Iterate::Left, T0, T1, T2, T3>;
|
||||
using LayoutLR_4D_2x4x4x2 =
|
||||
Kokkos::Experimental::LayoutTiled<Kokkos::Iterate::Left,
|
||||
Kokkos::Iterate::Right, T0, T1, T2, T3>;
|
||||
using LayoutRR_4D_2x4x4x2 =
|
||||
Kokkos::Experimental::LayoutTiled<Kokkos::Iterate::Right,
|
||||
Kokkos::Iterate::Right, T0, T1, T2, T3>;
|
||||
|
||||
#if !defined(KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA)
|
||||
static void test_view_layout_tiled_2d(const int, const int) {
|
||||
@ -123,8 +122,8 @@ struct TestViewLayoutTiled {
|
||||
// Test create_mirror_view, deep_copy
|
||||
// Create LL View
|
||||
{
|
||||
typedef typename Kokkos::View<Scalar**, LayoutLL_2D_2x4, ExecSpace>
|
||||
ViewType;
|
||||
using ViewType =
|
||||
typename Kokkos::View<Scalar**, LayoutLL_2D_2x4, ExecSpace>;
|
||||
ViewType v("v", N0, N1);
|
||||
|
||||
typename ViewType::HostMirror hv = Kokkos::create_mirror_view(v);
|
||||
@ -188,8 +187,8 @@ struct TestViewLayoutTiled {
|
||||
|
||||
// Create RL View
|
||||
{
|
||||
typedef typename Kokkos::View<Scalar**, LayoutRL_2D_2x4, ExecSpace>
|
||||
ViewType;
|
||||
using ViewType =
|
||||
typename Kokkos::View<Scalar**, LayoutRL_2D_2x4, ExecSpace>;
|
||||
Kokkos::View<Scalar**, LayoutRL_2D_2x4, ExecSpace> v("v", N0, N1);
|
||||
|
||||
typename ViewType::HostMirror hv = Kokkos::create_mirror_view(v);
|
||||
@ -254,8 +253,8 @@ struct TestViewLayoutTiled {
|
||||
|
||||
// Create LR View
|
||||
{
|
||||
typedef typename Kokkos::View<Scalar**, LayoutLR_2D_2x4, ExecSpace>
|
||||
ViewType;
|
||||
using ViewType =
|
||||
typename Kokkos::View<Scalar**, LayoutLR_2D_2x4, ExecSpace>;
|
||||
Kokkos::View<Scalar**, LayoutLR_2D_2x4, ExecSpace> v("v", N0, N1);
|
||||
|
||||
typename ViewType::HostMirror hv = Kokkos::create_mirror_view(v);
|
||||
@ -320,8 +319,8 @@ struct TestViewLayoutTiled {
|
||||
|
||||
// Create RR View
|
||||
{
|
||||
typedef typename Kokkos::View<Scalar**, LayoutRR_2D_2x4, ExecSpace>
|
||||
ViewType;
|
||||
using ViewType =
|
||||
typename Kokkos::View<Scalar**, LayoutRR_2D_2x4, ExecSpace>;
|
||||
Kokkos::View<Scalar**, LayoutRR_2D_2x4, ExecSpace> v("v", N0, N1);
|
||||
|
||||
typename ViewType::HostMirror hv = Kokkos::create_mirror_view(v);
|
||||
@ -399,7 +398,7 @@ struct TestViewLayoutTiled {
|
||||
|
||||
// Create LL View
|
||||
{
|
||||
typedef Kokkos::View<Scalar***, LayoutLL_3D_2x4x4, ExecSpace> ViewType;
|
||||
using ViewType = Kokkos::View<Scalar***, LayoutLL_3D_2x4x4, ExecSpace>;
|
||||
Kokkos::View<Scalar***, LayoutLL_3D_2x4x4, ExecSpace> dv("dv", N0, N1,
|
||||
N2);
|
||||
|
||||
@ -470,7 +469,7 @@ struct TestViewLayoutTiled {
|
||||
|
||||
// Create RL View
|
||||
{
|
||||
typedef Kokkos::View<Scalar***, LayoutRL_3D_2x4x4, ExecSpace> ViewType;
|
||||
using ViewType = Kokkos::View<Scalar***, LayoutRL_3D_2x4x4, ExecSpace>;
|
||||
Kokkos::View<Scalar***, LayoutRL_3D_2x4x4, ExecSpace> dv("dv", N0, N1,
|
||||
N2);
|
||||
|
||||
@ -541,7 +540,7 @@ struct TestViewLayoutTiled {
|
||||
|
||||
// Create LR View
|
||||
{
|
||||
typedef Kokkos::View<Scalar***, LayoutLR_3D_2x4x4, ExecSpace> ViewType;
|
||||
using ViewType = Kokkos::View<Scalar***, LayoutLR_3D_2x4x4, ExecSpace>;
|
||||
Kokkos::View<Scalar***, LayoutLR_3D_2x4x4, ExecSpace> dv("dv", N0, N1,
|
||||
N2);
|
||||
|
||||
@ -612,7 +611,7 @@ struct TestViewLayoutTiled {
|
||||
|
||||
// Create RR View
|
||||
{
|
||||
typedef Kokkos::View<Scalar***, LayoutRR_3D_2x4x4, ExecSpace> ViewType;
|
||||
using ViewType = Kokkos::View<Scalar***, LayoutRR_3D_2x4x4, ExecSpace>;
|
||||
Kokkos::View<Scalar***, LayoutRR_3D_2x4x4, ExecSpace> dv("dv", N0, N1,
|
||||
N2);
|
||||
|
||||
@ -698,7 +697,7 @@ struct TestViewLayoutTiled {
|
||||
|
||||
// Create LL View
|
||||
{
|
||||
typedef Kokkos::View<Scalar****, LayoutLL_4D_2x4x4x2, ExecSpace> ViewType;
|
||||
using ViewType = Kokkos::View<Scalar****, LayoutLL_4D_2x4x4x2, ExecSpace>;
|
||||
Kokkos::View<Scalar****, LayoutLL_4D_2x4x4x2, ExecSpace> dv("dv", N0, N1,
|
||||
N2, N3);
|
||||
|
||||
@ -780,7 +779,7 @@ struct TestViewLayoutTiled {
|
||||
|
||||
// Create RL View
|
||||
{
|
||||
typedef Kokkos::View<Scalar****, LayoutRL_4D_2x4x4x2, ExecSpace> ViewType;
|
||||
using ViewType = Kokkos::View<Scalar****, LayoutRL_4D_2x4x4x2, ExecSpace>;
|
||||
Kokkos::View<Scalar****, LayoutRL_4D_2x4x4x2, ExecSpace> dv("dv", N0, N1,
|
||||
N2, N3);
|
||||
|
||||
@ -863,7 +862,7 @@ struct TestViewLayoutTiled {
|
||||
|
||||
// Create LR View
|
||||
{
|
||||
typedef Kokkos::View<Scalar****, LayoutLR_4D_2x4x4x2, ExecSpace> ViewType;
|
||||
using ViewType = Kokkos::View<Scalar****, LayoutLR_4D_2x4x4x2, ExecSpace>;
|
||||
Kokkos::View<Scalar****, LayoutLR_4D_2x4x4x2, ExecSpace> dv("dv", N0, N1,
|
||||
N2, N3);
|
||||
|
||||
@ -947,7 +946,7 @@ struct TestViewLayoutTiled {
|
||||
|
||||
// Create RR View
|
||||
{
|
||||
typedef Kokkos::View<Scalar****, LayoutRR_4D_2x4x4x2, ExecSpace> ViewType;
|
||||
using ViewType = Kokkos::View<Scalar****, LayoutRR_4D_2x4x4x2, ExecSpace>;
|
||||
Kokkos::View<Scalar****, LayoutRR_4D_2x4x4x2, ExecSpace> dv("dv", N0, N1,
|
||||
N2, N3);
|
||||
|
||||
@ -1776,5 +1775,4 @@ TEST(TEST_CATEGORY, view_layouttiled_subtile) {
|
||||
TestViewLayoutTiled<TEST_EXECSPACE>::test_view_layout_tiled_subtile_4d(
|
||||
4, 12, 16, 12);
|
||||
}
|
||||
#endif
|
||||
} // namespace Test
|
||||
|
||||
Reference in New Issue
Block a user