Skip to content

Commit

Permalink
Simplify the allocator
Browse files Browse the repository at this point in the history
  • Loading branch information
tpadioleau committed Jan 1, 2025
1 parent 9743d94 commit e7d8c71
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
4 changes: 1 addition & 3 deletions tests/splines/batched_2d_spline_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,7 @@ void Batched2dSplineTest()
auto const dom_spline = spline_builder.batched_spline_domain();

// Allocate and fill a chunk containing values to be passed as input to spline_builder. Those are values of cosine along interest dimension duplicated along batch dimensions
ddc::Chunk vals_1d_host_alloc(
dom_interpolation,
ddc::KokkosAllocator<double, Kokkos::DefaultHostExecutionSpace::memory_space>());
ddc::Chunk vals_1d_host_alloc(dom_interpolation, ddc::HostAllocator<double>());
ddc::ChunkSpan const vals_1d_host = vals_1d_host_alloc.span_view();
evaluator_type<DDim<I1, I1, I2>, DDim<I2, I1, I2>> const evaluator(dom_interpolation);
evaluator(vals_1d_host);
Expand Down
4 changes: 1 addition & 3 deletions tests/splines/batched_spline_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,7 @@ void BatchedSplineTest()
auto const dom_spline = spline_builder.batched_spline_domain();

// Allocate and fill a chunk containing values to be passed as input to spline_builder. Those are values of cosine along interest dimension duplicated along batch dimensions
ddc::Chunk vals_1d_host_alloc(
dom_interpolation,
ddc::KokkosAllocator<double, Kokkos::DefaultHostExecutionSpace::memory_space>());
ddc::Chunk vals_1d_host_alloc(dom_interpolation, ddc::HostAllocator<double>());
ddc::ChunkSpan const vals_1d_host = vals_1d_host_alloc.span_view();
evaluator_type<DDim<I, I>> const evaluator(dom_interpolation);
evaluator(vals_1d_host);
Expand Down
4 changes: 1 addition & 3 deletions tests/splines/extrapolation_rule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,7 @@ void ExtrapolationRuleSplineTest()
auto const dom_spline = spline_builder.batched_spline_domain();

// Allocate and fill a chunk containing values to be passed as input to spline_builder. Those are values of cosine along interest dimension duplicated along batch dimensions
ddc::Chunk vals_1d_host_alloc(
dom_interpolation,
ddc::KokkosAllocator<double, Kokkos::DefaultHostExecutionSpace::memory_space>());
ddc::Chunk vals_1d_host_alloc(dom_interpolation, ddc::HostAllocator<double>());
ddc::ChunkSpan const vals_1d_host = vals_1d_host_alloc.span_view();
evaluator_type<DDim<I1, I1, I2>, DDim<I2, I1, I2>> const evaluator(dom_interpolation);
evaluator(vals_1d_host);
Expand Down
4 changes: 1 addition & 3 deletions tests/splines/periodicity_spline_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,7 @@ void PeriodicitySplineBuilderTest()
ddc::DiscreteDomain<BSplines<X>> const dom_bsplines = spline_builder.spline_domain();

// Allocate and fill a chunk containing values to be passed as input to spline_builder. Those are values of cosine along interest dimension duplicated along batch dimensions
ddc::Chunk vals_host_alloc(
dom_vals,
ddc::KokkosAllocator<double, Kokkos::DefaultHostExecutionSpace::memory_space>());
ddc::Chunk vals_host_alloc(dom_vals, ddc::HostAllocator<double>());
ddc::ChunkSpan const vals_host = vals_host_alloc.span_view();
evaluator_type<DDim<X>> const evaluator(dom_vals);
evaluator(vals_host);
Expand Down

0 comments on commit e7d8c71

Please sign in to comment.