1
1
// ========================================================================================
2
2
// Parthenon performance portable AMR framework
3
- // Copyright(C) 2020-2022 The Parthenon collaboration
3
+ // Copyright(C) 2020-2023 The Parthenon collaboration
4
4
// Licensed under the 3-clause BSD License, see LICENSE file for details
5
5
// ========================================================================================
6
- // (C) (or copyright) 2020-2022 . Triad National Security, LLC. All rights reserved.
6
+ // (C) (or copyright) 2020-2023 . Triad National Security, LLC. All rights reserved.
7
7
//
8
8
// This program was produced under U.S. Government contract 89233218CNA000001
9
9
// for Los Alamos National Laboratory (LANL), which is operated by Triad
@@ -707,7 +707,7 @@ inline void par_for_outer(OuterLoopPatternTeams, const std::string &name,
707
707
708
708
// Inner parallel loop using TeamThreadRange
709
709
template <typename Function>
710
- KOKKOS_INLINE_FUNCTION void
710
+ KOKKOS_FORCEINLINE_FUNCTION void
711
711
par_for_inner (InnerLoopPatternTTR, team_mbr_t team_member, const int ll, const int lu,
712
712
const int ml, const int mu, const int nl, const int nu, const int kl,
713
713
const int ku, const int jl, const int ju, const int il, const int iu,
@@ -741,7 +741,7 @@ par_for_inner(InnerLoopPatternTTR, team_mbr_t team_member, const int ll, const i
741
741
});
742
742
}
743
743
template <typename Function>
744
- KOKKOS_INLINE_FUNCTION void
744
+ KOKKOS_FORCEINLINE_FUNCTION void
745
745
par_for_inner (InnerLoopPatternTTR, team_mbr_t team_member, const int ml, const int mu,
746
746
const int nl, const int nu, const int kl, const int ku, const int jl,
747
747
const int ju, const int il, const int iu, const Function &function) {
@@ -770,7 +770,7 @@ par_for_inner(InnerLoopPatternTTR, team_mbr_t team_member, const int ml, const i
770
770
});
771
771
}
772
772
template <typename Function>
773
- KOKKOS_INLINE_FUNCTION void
773
+ KOKKOS_FORCEINLINE_FUNCTION void
774
774
par_for_inner (InnerLoopPatternTTR, team_mbr_t team_member, const int nl, const int nu,
775
775
const int kl, const int ku, const int jl, const int ju, const int il,
776
776
const int iu, const Function &function) {
@@ -795,10 +795,10 @@ par_for_inner(InnerLoopPatternTTR, team_mbr_t team_member, const int nl, const i
795
795
});
796
796
}
797
797
template <typename Function>
798
- KOKKOS_INLINE_FUNCTION void par_for_inner (InnerLoopPatternTTR, team_mbr_t team_member,
799
- const int kl, const int ku, const int jl ,
800
- const int ju, const int il, const int iu,
801
- const Function &function) {
798
+ KOKKOS_FORCEINLINE_FUNCTION void
799
+ par_for_inner (InnerLoopPatternTTR, team_mbr_t team_member, const int kl, const int ku,
800
+ const int jl, const int ju, const int il, const int iu,
801
+ const Function &function) {
802
802
const int Nk = ku - kl + 1 ;
803
803
const int Nj = ju - jl + 1 ;
804
804
const int Ni = iu - il + 1 ;
@@ -815,9 +815,9 @@ KOKKOS_INLINE_FUNCTION void par_for_inner(InnerLoopPatternTTR, team_mbr_t team_m
815
815
});
816
816
}
817
817
template <typename Function>
818
- KOKKOS_INLINE_FUNCTION void par_for_inner (InnerLoopPatternTTR, team_mbr_t team_member,
819
- const int jl, const int ju, const int il ,
820
- const int iu, const Function &function) {
818
+ KOKKOS_FORCEINLINE_FUNCTION void
819
+ par_for_inner (InnerLoopPatternTTR, team_mbr_t team_member, const int jl, const int ju,
820
+ const int il, const int iu, const Function &function) {
821
821
const int Nj = ju - jl + 1 ;
822
822
const int Ni = iu - il + 1 ;
823
823
const int NjNi = Nj * Ni;
@@ -828,22 +828,22 @@ KOKKOS_INLINE_FUNCTION void par_for_inner(InnerLoopPatternTTR, team_mbr_t team_m
828
828
});
829
829
}
830
830
template <typename Function>
831
- KOKKOS_INLINE_FUNCTION void par_for_inner (InnerLoopPatternTTR, team_mbr_t team_member ,
832
- const int il , const int iu ,
833
- const Function &function) {
831
+ KOKKOS_FORCEINLINE_FUNCTION void par_for_inner (InnerLoopPatternTTR,
832
+ team_mbr_t team_member , const int il ,
833
+ const int iu, const Function &function) {
834
834
Kokkos::parallel_for (Kokkos::TeamThreadRange (team_member, il, iu + 1 ), function);
835
835
}
836
836
// Inner parallel loop using TeamVectorRange
837
837
template <typename Function>
838
- KOKKOS_INLINE_FUNCTION void par_for_inner (InnerLoopPatternTVR, team_mbr_t team_member ,
839
- const int il , const int iu ,
840
- const Function &function) {
838
+ KOKKOS_FORCEINLINE_FUNCTION void par_for_inner (InnerLoopPatternTVR,
839
+ team_mbr_t team_member , const int il ,
840
+ const int iu, const Function &function) {
841
841
Kokkos::parallel_for (Kokkos::TeamVectorRange (team_member, il, iu + 1 ), function);
842
842
}
843
843
844
844
// Inner parallel loop using FOR SIMD
845
845
template <typename Function>
846
- KOKKOS_INLINE_FUNCTION void
846
+ KOKKOS_FORCEINLINE_FUNCTION void
847
847
par_for_inner (InnerLoopPatternSimdFor, team_mbr_t team_member, const int nl, const int nu,
848
848
const int kl, const int ku, const int jl, const int ju, const int il,
849
849
const int iu, const Function &function) {
@@ -859,10 +859,10 @@ par_for_inner(InnerLoopPatternSimdFor, team_mbr_t team_member, const int nl, con
859
859
}
860
860
}
861
861
template <typename Function>
862
- KOKKOS_INLINE_FUNCTION void par_for_inner (InnerLoopPatternSimdFor, team_mbr_t team_member,
863
- const int kl, const int ku, const int jl ,
864
- const int ju, const int il, const int iu,
865
- const Function &function) {
862
+ KOKKOS_FORCEINLINE_FUNCTION void
863
+ par_for_inner (InnerLoopPatternSimdFor, team_mbr_t team_member, const int kl, const int ku,
864
+ const int jl, const int ju, const int il, const int iu,
865
+ const Function &function) {
866
866
for (int k = kl; k <= ku; ++k) {
867
867
for (int j = jl; j <= ju; ++j) {
868
868
#pragma omp simd
@@ -873,9 +873,9 @@ KOKKOS_INLINE_FUNCTION void par_for_inner(InnerLoopPatternSimdFor, team_mbr_t te
873
873
}
874
874
}
875
875
template <typename Function>
876
- KOKKOS_INLINE_FUNCTION void par_for_inner (InnerLoopPatternSimdFor, team_mbr_t team_member,
877
- const int jl, const int ju, const int il ,
878
- const int iu, const Function &function) {
876
+ KOKKOS_FORCEINLINE_FUNCTION void
877
+ par_for_inner (InnerLoopPatternSimdFor, team_mbr_t team_member, const int jl, const int ju,
878
+ const int il, const int iu, const Function &function) {
879
879
for (int j = jl; j <= ju; ++j) {
880
880
#pragma omp simd
881
881
for (int i = il; i <= iu; i++) {
@@ -884,9 +884,9 @@ KOKKOS_INLINE_FUNCTION void par_for_inner(InnerLoopPatternSimdFor, team_mbr_t te
884
884
}
885
885
}
886
886
template <typename Function>
887
- KOKKOS_INLINE_FUNCTION void par_for_inner (InnerLoopPatternSimdFor, team_mbr_t team_member ,
888
- const int il , const int iu ,
889
- const Function &function) {
887
+ KOKKOS_FORCEINLINE_FUNCTION void par_for_inner (InnerLoopPatternSimdFor,
888
+ team_mbr_t team_member , const int il ,
889
+ const int iu, const Function &function) {
890
890
#pragma omp simd
891
891
for (int i = il; i <= iu; i++) {
892
892
function (i);
0 commit comments