Skip to content

Commit 45aba1b

Browse files
committed
fix/update for building with kokkos 3.1, remove deprecated use of old Kokkos API
1 parent 7bb7258 commit 45aba1b

22 files changed

+132
-122
lines changed

src/mood/MoodBaseFunctor.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ class MoodBaseFunctor : public PolynomialEvaluator<dim,degree>
8080
*/
8181
template<int dim_ = dim>
8282
KOKKOS_INLINE_FUNCTION
83-
void computePrimitives(const typename Kokkos::Impl::enable_if<dim_==2, HydroState>::type& u,
83+
void computePrimitives(const typename std::enable_if<dim_==2, HydroState>::type& u,
8484
real_t* c,
85-
typename Kokkos::Impl::enable_if<dim_==2, HydroState>::type& q) const
85+
typename std::enable_if<dim_==2, HydroState>::type& q) const
8686
{
8787
real_t gamma0 = params.settings.gamma0;
8888
real_t smallr = params.settings.smallr;
@@ -117,9 +117,9 @@ class MoodBaseFunctor : public PolynomialEvaluator<dim,degree>
117117
*/
118118
template<int dim_ = dim>
119119
KOKKOS_INLINE_FUNCTION
120-
void computePrimitives(const typename Kokkos::Impl::enable_if<dim_==3, HydroState>::type& u,
120+
void computePrimitives(const typename std::enable_if<dim_==3, HydroState>::type& u,
121121
real_t* c,
122-
typename Kokkos::Impl::enable_if<dim_==3, HydroState>::type& q) const
122+
typename std::enable_if<dim_==3, HydroState>::type& q) const
123123
{
124124
real_t gamma0 = params.settings.gamma0;
125125
real_t smallr = params.settings.smallr;
@@ -157,7 +157,7 @@ class MoodBaseFunctor : public PolynomialEvaluator<dim,degree>
157157
*/
158158
template<int dim_ = dim>
159159
KOKKOS_INLINE_FUNCTION
160-
int isValid(const typename Kokkos::Impl::enable_if<dim_==2, HydroState>::type& u) const
160+
int isValid(const typename std::enable_if<dim_==2, HydroState>::type& u) const
161161
{
162162

163163
int isValid_ = 1;
@@ -189,7 +189,7 @@ class MoodBaseFunctor : public PolynomialEvaluator<dim,degree>
189189
*/
190190
template<int dim_ = dim>
191191
KOKKOS_INLINE_FUNCTION
192-
int isValid(const typename Kokkos::Impl::enable_if<dim_==3, HydroState>::type& u) const
192+
int isValid(const typename std::enable_if<dim_==3, HydroState>::type& u) const
193193
{
194194

195195
int isValid_ = 1;

src/mood/MoodDtFunctor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ namespace mood {
5555
// template<int dim_ = dim>
5656
// KOKKOS_INLINE_FUNCTION
5757
// void operator()(const typename
58-
// Kokkos::Impl::enable_if<dim_==2, int>::type& index,
58+
// std::enable_if<dim_==2, int>::type& index,
5959
// real_t &invDt) const
6060
// {
6161
// const int isize = this->params.isize;
@@ -97,7 +97,7 @@ namespace mood {
9797
// template<int dim_ = dim>
9898
// KOKKOS_INLINE_FUNCTION
9999
// void operator()(const typename
100-
// Kokkos::Impl::enable_if<dim_==3, int>::type& index,
100+
// std::enable_if<dim_==3, int>::type& index,
101101
// real_t &invDt) const
102102
// {
103103
// const int isize = this->params.isize;

src/mood/MoodFluxesFunctors.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class ComputeFluxesFunctor : public MoodBaseFunctor<dim,degree>
7676
//! functor for 2d
7777
template<int dim_ = dim>
7878
KOKKOS_INLINE_FUNCTION
79-
void operator()(const typename Kokkos::Impl::enable_if<dim_==2, int>::type& index) const
79+
void operator()(const typename std::enable_if<dim_==2, int>::type& index) const
8080
{
8181

8282
const int isize = this->params.isize;
@@ -343,7 +343,7 @@ class ComputeFluxesFunctor : public MoodBaseFunctor<dim,degree>
343343
/************* UNFINISHED - TODO ***************/
344344
template<int dim_ = dim>
345345
KOKKOS_INLINE_FUNCTION
346-
void operator()(const typename Kokkos::Impl::enable_if<dim_==3, int>::type& index) const
346+
void operator()(const typename std::enable_if<dim_==3, int>::type& index) const
347347
{
348348
const int isize = this->params.isize;
349349
const int jsize = this->params.jsize;
@@ -789,7 +789,7 @@ class RecomputeFluxesFunctor : public MoodBaseFunctor<dim,degree>
789789
//! functor for 2d
790790
template<int dim_ = dim>
791791
KOKKOS_INLINE_FUNCTION
792-
void operator()(const typename Kokkos::Impl::enable_if<dim_==2, int>::type& index) const
792+
void operator()(const typename std::enable_if<dim_==2, int>::type& index) const
793793
{
794794

795795
const int isize = this->params.isize;
@@ -914,7 +914,7 @@ class RecomputeFluxesFunctor : public MoodBaseFunctor<dim,degree>
914914
//! functor for 3d
915915
template<int dim_ = dim>
916916
KOKKOS_INLINE_FUNCTION
917-
void operator()(const typename Kokkos::Impl::enable_if<dim_==3, int>::type& index) const
917+
void operator()(const typename std::enable_if<dim_==3, int>::type& index) const
918918
{
919919

920920
const int isize = this->params.isize;

src/mood/MoodInitFunctors.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class InitImplodeFunctor : public MoodBaseFunctor<dim,degree>
5050
//! functor for 2d
5151
template<int dim_ = dim>
5252
KOKKOS_INLINE_FUNCTION
53-
void operator()(const typename Kokkos::Impl::enable_if<dim_==2, int>::type& index) const
53+
void operator()(const typename std::enable_if<dim_==2, int>::type& index) const
5454
{
5555

5656
const int isize = this->params.isize;
@@ -92,7 +92,7 @@ class InitImplodeFunctor : public MoodBaseFunctor<dim,degree>
9292
//! functor for 3d
9393
template<int dim_ = dim>
9494
KOKKOS_INLINE_FUNCTION
95-
void operator()(const typename Kokkos::Impl::enable_if<dim_==3, int>::type& index) const
95+
void operator()(const typename std::enable_if<dim_==3, int>::type& index) const
9696
{
9797

9898
const int isize = this->params.isize;
@@ -167,7 +167,7 @@ class InitBlastFunctor : public MoodBaseFunctor<dim,degree>
167167
//! functor for 2d
168168
template<int dim_ = dim>
169169
KOKKOS_INLINE_FUNCTION
170-
void operator()(const typename Kokkos::Impl::enable_if<dim_==2, int>::type& index) const
170+
void operator()(const typename std::enable_if<dim_==2, int>::type& index) const
171171
{
172172

173173
const int isize = this->params.isize;
@@ -221,7 +221,7 @@ class InitBlastFunctor : public MoodBaseFunctor<dim,degree>
221221
//! functor for 3d
222222
template<int dim_ = dim>
223223
KOKKOS_INLINE_FUNCTION
224-
void operator()(const typename Kokkos::Impl::enable_if<dim_==3, int>::type& index) const
224+
void operator()(const typename std::enable_if<dim_==3, int>::type& index) const
225225
{
226226

227227
const int isize = this->params.isize;
@@ -320,7 +320,7 @@ class InitFourQuadrantFunctor : public MoodBaseFunctor<dim,degree>
320320
//! functor for 2d
321321
template<int dim_ = dim>
322322
KOKKOS_INLINE_FUNCTION
323-
void operator()(const typename Kokkos::Impl::enable_if<dim_==2, int>::type& index) const
323+
void operator()(const typename std::enable_if<dim_==2, int>::type& index) const
324324
{
325325

326326
const int isize = this->params.isize;
@@ -376,7 +376,7 @@ class InitFourQuadrantFunctor : public MoodBaseFunctor<dim,degree>
376376
//! functor for 3d
377377
template<int dim_ = dim>
378378
KOKKOS_INLINE_FUNCTION
379-
void operator()(const typename Kokkos::Impl::enable_if<dim_==3, int>::type& index) const
379+
void operator()(const typename std::enable_if<dim_==3, int>::type& index) const
380380
{
381381

382382
const int isize = this->params.isize;
@@ -476,7 +476,7 @@ class InitKelvinHelmholtzFunctor : public MoodBaseFunctor<dim,degree>
476476
//! functor for 2d
477477
template<int dim_ = dim>
478478
KOKKOS_INLINE_FUNCTION
479-
void operator()(const typename Kokkos::Impl::enable_if<dim_==2, int>::type& index) const
479+
void operator()(const typename std::enable_if<dim_==2, int>::type& index) const
480480
{
481481

482482
// get random number state
@@ -572,7 +572,7 @@ class InitKelvinHelmholtzFunctor : public MoodBaseFunctor<dim,degree>
572572
//! functor for 3d
573573
template<int dim_ = dim>
574574
KOKKOS_INLINE_FUNCTION
575-
void operator()(const typename Kokkos::Impl::enable_if<dim_==3, int>::type& index) const
575+
void operator()(const typename std::enable_if<dim_==3, int>::type& index) const
576576
{
577577

578578
// get random number generator state
@@ -720,7 +720,7 @@ class InitWedgeFunctor : public MoodBaseFunctor<dim,degree>
720720
//! functor for 2d
721721
template<int dim_ = dim>
722722
KOKKOS_INLINE_FUNCTION
723-
void operator()(const typename Kokkos::Impl::enable_if<dim_==2, int>::type& index) const
723+
void operator()(const typename std::enable_if<dim_==2, int>::type& index) const
724724
{
725725

726726
const int isize = this->params.isize;
@@ -767,7 +767,7 @@ class InitWedgeFunctor : public MoodBaseFunctor<dim,degree>
767767
//! functor for 3d
768768
template<int dim_ = dim>
769769
KOKKOS_INLINE_FUNCTION
770-
void operator()(const typename Kokkos::Impl::enable_if<dim_==3, int>::type& index) const
770+
void operator()(const typename std::enable_if<dim_==3, int>::type& index) const
771771
{
772772

773773
const int isize = this->params.isize;
@@ -1057,7 +1057,7 @@ class InitIsentropicVortexFunctor : public MoodBaseFunctor<dim,degree>
10571057
//! functor for 2d
10581058
template<int dim_ = dim>
10591059
KOKKOS_INLINE_FUNCTION
1060-
void operator()(const typename Kokkos::Impl::enable_if<dim_==2, int>::type& index) const
1060+
void operator()(const typename std::enable_if<dim_==2, int>::type& index) const
10611061
{
10621062

10631063
const int isize = this->params.isize;
@@ -1094,7 +1094,7 @@ class InitIsentropicVortexFunctor : public MoodBaseFunctor<dim,degree>
10941094
//! functor for 3d
10951095
template<int dim_ = dim>
10961096
KOKKOS_INLINE_FUNCTION
1097-
void operator()(const typename Kokkos::Impl::enable_if<dim_==3, int>::type& index) const
1097+
void operator()(const typename std::enable_if<dim_==3, int>::type& index) const
10981098
{
10991099

11001100
const int isize = this->params.isize;

src/mood/MoodPolynomialReconstructionFunctors.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class ComputeReconstructionPolynomialFunctor : public MoodBaseFunctor<dim,degree
8181
//! functor for 2d
8282
template<int dim_ = dim>
8383
KOKKOS_INLINE_FUNCTION
84-
void operator()(const typename Kokkos::Impl::enable_if<dim_==2, int>::type& index) const
84+
void operator()(const typename std::enable_if<dim_==2, int>::type& index) const
8585
{
8686

8787
const int isize = this->params.isize;
@@ -118,9 +118,9 @@ class ComputeReconstructionPolynomialFunctor : public MoodBaseFunctor<dim,degree
118118
// retrieve reconstruction polynomial coefficients in current cell
119119
coefs_t coefs_c;
120120
coefs_c[0] = Udata(i,j,ivar);
121-
for (int icoef=0; icoef<mat_pi.dimension_0(); ++icoef) {
121+
for (int icoef=0; icoef<mat_pi.extent(0); ++icoef) {
122122
real_t tmp = 0;
123-
for (int ik=0; ik<mat_pi.dimension_1(); ++ik) {
123+
for (int ik=0; ik<mat_pi.extent(1); ++ik) {
124124
tmp += mat_pi(icoef,ik) * rhs[ik];
125125
}
126126
coefs_c[icoef+1] = tmp;
@@ -139,7 +139,7 @@ class ComputeReconstructionPolynomialFunctor : public MoodBaseFunctor<dim,degree
139139
//! functor for 3d
140140
template<int dim_ = dim>
141141
KOKKOS_INLINE_FUNCTION
142-
void operator()(const typename Kokkos::Impl::enable_if<dim_==3, int>::type& index) const
142+
void operator()(const typename std::enable_if<dim_==3, int>::type& index) const
143143
{
144144
const int isize = this->params.isize;
145145
const int jsize = this->params.jsize;
@@ -179,9 +179,9 @@ class ComputeReconstructionPolynomialFunctor : public MoodBaseFunctor<dim,degree
179179
// retrieve reconstruction polynomial coefficients in current cell
180180
coefs_t coefs_c;
181181
coefs_c[0] = Udata(i,j,k,ivar);
182-
for (int icoef=0; icoef<mat_pi.dimension_0(); ++icoef) {
182+
for (int icoef=0; icoef<mat_pi.extent(0); ++icoef) {
183183
real_t tmp = 0;
184-
for (int ik=0; ik<mat_pi.dimension_1(); ++ik) {
184+
for (int ik=0; ik<mat_pi.extent(1); ++ik) {
185185
tmp += mat_pi(icoef,ik) * rhs[ik];
186186
}
187187
coefs_c[icoef+1] = tmp;

src/mood/MoodTestReconstruction.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class TestReconstructionFunctor : public MoodBaseFunctor<dim,degree>
6666
//! functor for 2d
6767
template<int dim_ = dim>
6868
KOKKOS_INLINE_FUNCTION
69-
void operator()(const typename Kokkos::Impl::enable_if<dim_==2, int>::type& index) const
69+
void operator()(const typename std::enable_if<dim_==2, int>::type& index) const
7070
{
7171

7272
const int isize = this->params.isize;
@@ -209,7 +209,7 @@ class TestReconstructionFunctor : public MoodBaseFunctor<dim,degree>
209209
/************* UNFINISHED - TODO ***************/
210210
template<int dim_ = dim>
211211
KOKKOS_INLINE_FUNCTION
212-
void operator()(const typename Kokkos::Impl::enable_if<dim_==3, int>::type& index) const
212+
void operator()(const typename std::enable_if<dim_==3, int>::type& index) const
213213
{
214214

215215
} // end functor 3d

src/mood/MoodUpdateFunctors.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class UpdateFunctor
4545
//! functor for 2d
4646
template<int dim_ = dim>
4747
KOKKOS_INLINE_FUNCTION
48-
void operator()(const typename Kokkos::Impl::enable_if<dim_==2, int>::type& index) const
48+
void operator()(const typename std::enable_if<dim_==2, int>::type& index) const
4949
{
5050
const int isize = params.isize;
5151
const int jsize = params.jsize;
@@ -96,7 +96,7 @@ class UpdateFunctor
9696
//! functor for 3d
9797
template<int dim_ = dim>
9898
KOKKOS_INLINE_FUNCTION
99-
void operator()(const typename Kokkos::Impl::enable_if<dim_==3, int>::type& index) const
99+
void operator()(const typename std::enable_if<dim_==3, int>::type& index) const
100100
{
101101
const int isize = params.isize;
102102
const int jsize = params.jsize;
@@ -211,7 +211,7 @@ class UpdateFunctor_ssprk2
211211
//! functor for 2d
212212
template<int dim_ = dim>
213213
KOKKOS_INLINE_FUNCTION
214-
void operator()(const typename Kokkos::Impl::enable_if<dim_==2, int>::type& index) const
214+
void operator()(const typename std::enable_if<dim_==2, int>::type& index) const
215215
{
216216
const int isize = params.isize;
217217
const int jsize = params.jsize;
@@ -262,7 +262,7 @@ class UpdateFunctor_ssprk2
262262
//! functor for 3d
263263
template<int dim_ = dim>
264264
KOKKOS_INLINE_FUNCTION
265-
void operator()(const typename Kokkos::Impl::enable_if<dim_==3, int>::type& index) const
265+
void operator()(const typename std::enable_if<dim_==3, int>::type& index) const
266266
{
267267
const int isize = params.isize;
268268
const int jsize = params.jsize;
@@ -384,7 +384,7 @@ class UpdateFunctor_weight
384384
//! functor for 2d
385385
template<int dim_ = dim>
386386
KOKKOS_INLINE_FUNCTION
387-
void operator()(const typename Kokkos::Impl::enable_if<dim_==2, int>::type& index) const
387+
void operator()(const typename std::enable_if<dim_==2, int>::type& index) const
388388
{
389389
const int isize = params.isize;
390390
const int jsize = params.jsize;
@@ -436,7 +436,7 @@ class UpdateFunctor_weight
436436
//! functor for 3d
437437
template<int dim_ = dim>
438438
KOKKOS_INLINE_FUNCTION
439-
void operator()(const typename Kokkos::Impl::enable_if<dim_==3, int>::type& index) const
439+
void operator()(const typename std::enable_if<dim_==3, int>::type& index) const
440440
{
441441
const int isize = params.isize;
442442
const int jsize = params.jsize;
@@ -555,7 +555,7 @@ class ComputeMoodFlagsUpdateFunctor : public MoodBaseFunctor<dim,degree>
555555
//! functor for 2d
556556
template<int dim_ = dim>
557557
KOKKOS_INLINE_FUNCTION
558-
void operator()(const typename Kokkos::Impl::enable_if<dim_==2, int>::type& index) const
558+
void operator()(const typename std::enable_if<dim_==2, int>::type& index) const
559559
{
560560
const int isize = this->params.isize;
561561
const int jsize = this->params.jsize;
@@ -626,7 +626,7 @@ class ComputeMoodFlagsUpdateFunctor : public MoodBaseFunctor<dim,degree>
626626
//! functor for 3d
627627
template<int dim_ = dim>
628628
KOKKOS_INLINE_FUNCTION
629-
void operator()(const typename Kokkos::Impl::enable_if<dim_==3, int>::type& index) const
629+
void operator()(const typename std::enable_if<dim_==3, int>::type& index) const
630630
{
631631

632632
const int isize = this->params.isize;

0 commit comments

Comments
 (0)