Skip to content

Commit 5df557f

Browse files
authored
Fix for debug build: Fix ill-formed KOKKOS macro function decoration. (#1317)
1 parent 92223d2 commit 5df557f

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

include/ScratchViews.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -776,10 +776,11 @@ MasterElementViews<T, TEAMHANDLETYPE, SHMEM>::fill_master_element_views_new_me(
776776
break;
777777
case SCS_SHIFTED_GRAD_OP:
778778
STK_NGP_ThrowRequireMsg(
779-
meSCS != nullptr,
780-
"ERROR, meSCS needs to be non-null if SCS_GRAD_OP is requested.");
779+
meSCS != nullptr, "ERROR, meSCS needs to be non-null if "
780+
"SCS_SHIFTED_GRAD_OP is requested.");
781781
STK_NGP_ThrowRequireMsg(
782-
coordsView != nullptr, "ERROR, coords null but SCS_GRAD_OP requested.");
782+
coordsView != nullptr,
783+
"ERROR, coords null but SCS_SHIFTED_GRAD_OP requested.");
783784
meSCS->shifted_grad_op(*coordsView, dndx_shifted, deriv);
784785
break;
785786
case SCS_GIJ:

include/master_element/MasterElementFunctions.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ template <
6262
typename GradViewType,
6363
typename CoordViewType,
6464
typename OutputViewType>
65-
KOKKOS_FUNCTION KOKKOS_FUNCTION void
65+
KOKKOS_INLINE_FUNCTION void
6666
generic_grad_op(
6767
const GradViewType& referenceGradWeights,
6868
const CoordViewType& coords,
@@ -82,11 +82,11 @@ generic_grad_op(
8282
CoordViewType::rank == 2, "Coordinate view assumed to be rank 2");
8383
static_assert(OutputViewType::rank == 3, "Weight view assumed to be rank 3");
8484

85-
STK_ThrowAssert(
85+
STK_NGP_ThrowAssert(
8686
AlgTraits::nodesPerElement_ == referenceGradWeights.extent(1));
87-
STK_ThrowAssert(AlgTraits::nDim_ == referenceGradWeights.extent(2));
87+
STK_NGP_ThrowAssert(AlgTraits::nDim_ == referenceGradWeights.extent(2));
8888
for (int i = 0; i < dim; ++i)
89-
STK_ThrowAssert(weights.extent(i) == referenceGradWeights.extent(i));
89+
STK_NGP_ThrowAssert(weights.extent(i) == referenceGradWeights.extent(i));
9090

9191
for (unsigned ip = 0; ip < referenceGradWeights.extent(0); ++ip) {
9292
NALU_ALIGNED ftype jact[dim][dim];
@@ -112,7 +112,7 @@ generic_grad_op(
112112
NALU_ALIGNED ftype det = ftype(0.0);
113113
for (int i = 0; i < dim; ++i)
114114
det += jact[i][0] * adjJac[i][0];
115-
STK_ThrowAssertMsg(
115+
STK_NGP_ThrowAssertMsg(
116116
stk::simd::are_any(det > tiny_positive_value()),
117117
"Problem with Jacobian determinant");
118118

@@ -135,7 +135,7 @@ template <
135135
typename GradViewType,
136136
typename CoordViewType,
137137
typename OutputViewType>
138-
KOKKOS_FUNCTION void
138+
KOKKOS_INLINE_FUNCTION void
139139
generic_gij_3d(
140140
const GradViewType& referenceGradWeights,
141141
const CoordViewType& coords,
@@ -222,7 +222,7 @@ generic_gij_3d(
222222
}
223223

224224
template <typename AlgTraits>
225-
KOKKOS_FUNCTION void
225+
KOKKOS_INLINE_FUNCTION void
226226
generic_Mij_2d(
227227
const int numIntPoints,
228228
const double* deriv,
@@ -319,7 +319,7 @@ template <
319319
typename GradViewType,
320320
typename CoordViewType,
321321
typename OutputViewType>
322-
KOKKOS_FUNCTION void
322+
KOKKOS_INLINE_FUNCTION void
323323
generic_Mij_2d(
324324
const GradViewType& referenceGradWeights,
325325
const CoordViewType& coords,
@@ -502,7 +502,7 @@ template <
502502
typename GradViewType,
503503
typename CoordViewType,
504504
typename OutputViewType>
505-
KOKKOS_FUNCTION void
505+
KOKKOS_INLINE_FUNCTION void
506506
generic_Mij_3d(
507507
const GradViewType& referenceGradWeights,
508508
const CoordViewType& coords,
@@ -583,7 +583,7 @@ template <
583583
typename GradViewType,
584584
typename CoordViewType,
585585
typename OutputViewType>
586-
KOKKOS_FUNCTION void
586+
KOKKOS_INLINE_FUNCTION void
587587
generic_determinant_3d(
588588
GradViewType referenceGradWeights, CoordViewType coords, OutputViewType detj)
589589
{
@@ -599,11 +599,11 @@ generic_determinant_3d(
599599
static_assert(OutputViewType::rank == 1, "Weight view assumed to be 1D");
600600
static_assert(AlgTraits::nDim_ == 3, "3D method");
601601

602-
STK_ThrowAssert(
602+
STK_NGP_ThrowAssert(
603603
AlgTraits::nodesPerElement_ == referenceGradWeights.extent(1));
604-
STK_ThrowAssert(AlgTraits::nDim_ == referenceGradWeights.extent(2));
604+
STK_NGP_ThrowAssert(AlgTraits::nDim_ == referenceGradWeights.extent(2));
605605

606-
STK_ThrowAssert(detj.extent(0) == referenceGradWeights.extent(0));
606+
STK_NGP_ThrowAssert(detj.extent(0) == referenceGradWeights.extent(0));
607607

608608
for (unsigned ip = 0; ip < referenceGradWeights.extent(0); ++ip) {
609609
NALU_ALIGNED ftype jac[3][3] = {

0 commit comments

Comments
 (0)