Skip to content

Commit

Permalink
Attribute does not seem to work inside a lambda for clang
Browse files Browse the repository at this point in the history
  • Loading branch information
tpadioleau committed Nov 21, 2023
1 parent 9768774 commit 218f019
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 4 additions & 4 deletions include/ddc/kernels/splines/spline_builder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ void SplineBuilder<
auto const& nbasis_proxy = ddc::discrete_space<bsplines_type>().nbasis();
Kokkos::parallel_for(
Kokkos::RangePolicy<exec_space>(0, 1),
KOKKOS_LAMBDA([[maybe_unused]] const int unused_index) {
KOKKOS_LAMBDA(int) {
for (std::size_t i = 0; i < nbasis_proxy; ++i) {
spline(ddc::DiscreteElement<bsplines_type>(i))
= vals(ddc::DiscreteElement<interpolation_mesh_type>(i));
Expand All @@ -246,7 +246,7 @@ void SplineBuilder<
if constexpr (bsplines_type::is_periodic()) {
Kokkos::parallel_for(
Kokkos::RangePolicy<exec_space>(0, 1),
KOKKOS_LAMBDA([[maybe_unused]] const int unused_index) {
KOKKOS_LAMBDA(int) {
spline(ddc::DiscreteElement<bsplines_type>(nbasis_proxy))
= spline(ddc::DiscreteElement<bsplines_type>(0));
});
Expand Down Expand Up @@ -305,7 +305,7 @@ operator()(
auto const& nbasis_proxy = ddc::discrete_space<bsplines_type>().nbasis();
Kokkos::parallel_for(
Kokkos::RangePolicy<exec_space>(0, 1),
KOKKOS_LAMBDA([[maybe_unused]] const int unused_index) {
KOKKOS_LAMBDA(int) {
for (int i = s_nbc_xmin; i < s_nbc_xmin + offset_proxy; ++i) {
spline(ddc::DiscreteElement<bsplines_type>(i)) = 0.0;
}
Expand Down Expand Up @@ -335,7 +335,7 @@ operator()(
if constexpr (bsplines_type::is_periodic()) {
Kokkos::parallel_for(
Kokkos::RangePolicy<exec_space>(0, 1),
KOKKOS_LAMBDA([[maybe_unused]] const int unused_index) {
KOKKOS_LAMBDA(int) {
if (offset_proxy != 0) {
for (int i = 0; i < offset_proxy; ++i) {
spline(ddc::DiscreteElement<bsplines_type>(i))
Expand Down
4 changes: 1 addition & 3 deletions include/ddc/kernels/splines/spline_evaluator_batched.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,7 @@ class SplineEvaluatorBatched
ddc::ChunkSpan values = values_alloc.span_view();
Kokkos::parallel_for(
Kokkos::RangePolicy<exec_space>(0, 1),
KOKKOS_LAMBDA([[maybe_unused]] const int unused_index) {
ddc::discrete_space<bsplines_type>().integrals(values);
});
KOKKOS_LAMBDA(int) { ddc::discrete_space<bsplines_type>().integrals(values); });

ddc::for_each(
ddc::policies::policy(exec_space()),
Expand Down

0 comments on commit 218f019

Please sign in to comment.