Skip to content

Commit

Permalink
Improve splines tests (#798)
Browse files Browse the repository at this point in the history
* Move solver type ifdef

* Reuse tags for interpolation dimensions

* Remove 4D, 3D should be enough
  • Loading branch information
tpadioleau authored Mar 8, 2025
1 parent 446b2a5 commit 75e8831
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 225 deletions.
42 changes: 16 additions & 26 deletions tests/splines/batched_2d_spline_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ struct DimY
{
static constexpr bool PERIODIC = true;
};

struct DimZ
{
static constexpr bool PERIODIC = true;
};
#else

struct DimX
Expand All @@ -55,11 +50,6 @@ struct DimY
{
static constexpr bool PERIODIC = false;
};

struct DimZ
{
static constexpr bool PERIODIC = false;
};
#endif

struct DDimBatch
Expand Down Expand Up @@ -631,7 +621,7 @@ TEST(SUFFIX(Batched2dSplineDevice), 2DXY)
DDimGPS<DimY>>();
}

TEST(SUFFIX(Batched2dSplineHost), 3DXY)
TEST(SUFFIX(Batched2dSplineHost), 3DXYB)
{
Batched2dSplineTest<
Kokkos::DefaultHostExecutionSpace,
Expand All @@ -643,31 +633,31 @@ TEST(SUFFIX(Batched2dSplineHost), 3DXY)
DDimBatch>();
}

TEST(SUFFIX(Batched2dSplineHost), 3DXZ)
TEST(SUFFIX(Batched2dSplineHost), 3DXBY)
{
Batched2dSplineTest<
Kokkos::DefaultHostExecutionSpace,
Kokkos::DefaultHostExecutionSpace::memory_space,
DDimGPS<DimX>,
DDimGPS<DimZ>,
DDimGPS<DimY>,
DDimGPS<DimX>,
DDimBatch,
DDimGPS<DimZ>>();
DDimGPS<DimY>>();
}

TEST(SUFFIX(Batched2dSplineHost), 3DYZ)
TEST(SUFFIX(Batched2dSplineHost), 3DBXY)
{
Batched2dSplineTest<
Kokkos::DefaultHostExecutionSpace,
Kokkos::DefaultHostExecutionSpace::memory_space,
DDimGPS<DimX>,
DDimGPS<DimY>,
DDimGPS<DimZ>,
DDimBatch,
DDimGPS<DimY>,
DDimGPS<DimZ>>();
DDimGPS<DimX>,
DDimGPS<DimY>>();
}

TEST(SUFFIX(Batched2dSplineDevice), 3DXY)
TEST(SUFFIX(Batched2dSplineDevice), 3DXYB)
{
Batched2dSplineTest<
Kokkos::DefaultExecutionSpace,
Expand All @@ -679,26 +669,26 @@ TEST(SUFFIX(Batched2dSplineDevice), 3DXY)
DDimBatch>();
}

TEST(SUFFIX(Batched2dSplineDevice), 3DXZ)
TEST(SUFFIX(Batched2dSplineDevice), 3DXBY)
{
Batched2dSplineTest<
Kokkos::DefaultExecutionSpace,
Kokkos::DefaultExecutionSpace::memory_space,
DDimGPS<DimX>,
DDimGPS<DimZ>,
DDimGPS<DimY>,
DDimGPS<DimX>,
DDimBatch,
DDimGPS<DimZ>>();
DDimGPS<DimY>>();
}

TEST(SUFFIX(Batched2dSplineDevice), 3DYZ)
TEST(SUFFIX(Batched2dSplineDevice), 3DBXY)
{
Batched2dSplineTest<
Kokkos::DefaultExecutionSpace,
Kokkos::DefaultExecutionSpace::memory_space,
DDimGPS<DimX>,
DDimGPS<DimY>,
DDimGPS<DimZ>,
DDimBatch,
DDimGPS<DimY>,
DDimGPS<DimZ>>();
DDimGPS<DimX>,
DDimGPS<DimY>>();
}
Loading

0 comments on commit 75e8831

Please sign in to comment.