Skip to content

Commit a20557d

Browse files
committed
Fix a copy-paste error in the 1d builder tests
1 parent bf4a322 commit a20557d

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

tests/splines/batched_spline_builder.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) The DDC development team, see COPYRIGHT.md file
1+
// Copyright (C) The DDC development team, see COPYRIGHT.md filebatched
22
//
33
// SPDX-License-Identifier: MIT
44

@@ -204,8 +204,9 @@ void BatchedSplineTest()
204204
ddc::Chunk derivs_alloc(whole_derivs_domain, ddc::KokkosAllocator<double, MemorySpace>());
205205
ddc::ChunkSpan const derivs = derivs_alloc.span_view();
206206

207-
ddc::ChunkSpan const derivs_lhs_view = derivs[interpolation_domain.front()];
208207
if (s_bcl == ddc::BoundCond::HERMITE) {
208+
ddc::ChunkSpan const derivs_lhs_view = derivs[interpolation_domain.front()];
209+
209210
ddc::Chunk derivs_lhs_host_alloc(derivs_domain, ddc::HostAllocator<double>());
210211
ddc::ChunkSpan const derivs_lhs_host = derivs_lhs_host_alloc.span_view();
211212
for (int ii = 1; ii < derivs_lhs_host.domain().template extent<ddc::Deriv<I>>() + 1; ++ii) {
@@ -222,8 +223,9 @@ void BatchedSplineTest()
222223
e) { derivs_lhs_view(e) = derivs_lhs(DElem<ddc::Deriv<I>>(e)); });
223224
}
224225

225-
ddc::ChunkSpan const derivs_rhs_view = derivs[interpolation_domain.front()];
226226
if (s_bcr == ddc::BoundCond::HERMITE) {
227+
ddc::ChunkSpan const derivs_rhs_view = derivs[interpolation_domain.back()];
228+
227229
ddc::Chunk derivs_rhs_host_alloc(derivs_domain, ddc::HostAllocator<double>());
228230
ddc::ChunkSpan const derivs_rhs_host = derivs_rhs_host_alloc.span_view();
229231
for (int ii = 1; ii < derivs_rhs_host.domain().template extent<ddc::Deriv<I>>() + 1; ++ii) {

tests/splines/multiple_batch_domain_spline_builder.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,9 @@ std::tuple<double, double, double> ComputeEvaluationError(
190190
ddc::Chunk derivs_alloc(whole_derivs_domain, ddc::KokkosAllocator<double, MemorySpace>());
191191
ddc::ChunkSpan const derivs = derivs_alloc.span_view();
192192

193-
ddc::ChunkSpan const derivs_lhs_view = derivs[dom_interpolation.front()];
194193
if (s_bcl == ddc::BoundCond::HERMITE) {
194+
ddc::ChunkSpan const derivs_lhs_view = derivs[dom_interpolation.front()];
195+
195196
ddc::Chunk derivs_lhs_host_alloc(derivs_domain, ddc::HostAllocator<double>());
196197
ddc::ChunkSpan const derivs_lhs_host = derivs_lhs_host_alloc.span_view();
197198
for (int ii = 1; ii < derivs_lhs_host.domain().template extent<ddc::Deriv<I>>() + 1; ++ii) {
@@ -208,8 +209,9 @@ std::tuple<double, double, double> ComputeEvaluationError(
208209
e) { derivs_lhs_view(e) = derivs_lhs(DElem<ddc::Deriv<I>>(e)); });
209210
}
210211

211-
ddc::ChunkSpan const derivs_rhs_view = derivs[dom_interpolation.front()];
212212
if (s_bcr == ddc::BoundCond::HERMITE) {
213+
ddc::ChunkSpan const derivs_rhs_view = derivs[dom_interpolation.back()];
214+
213215
ddc::Chunk derivs_rhs_host_alloc(derivs_domain, ddc::HostAllocator<double>());
214216
ddc::ChunkSpan const derivs_rhs_host = derivs_rhs_host_alloc.span_view();
215217
for (int ii = 1; ii < derivs_rhs_host.domain().template extent<ddc::Deriv<I>>() + 1; ++ii) {

0 commit comments

Comments
 (0)