Skip to content

Commit 255035c

Browse files
authored
Merge pull request #38 from E3SM-Project/develop
Develop
2 parents a6946c1 + 267bf0b commit 255035c

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

cedr/cedr_caas.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,28 @@
66
#include "cedr_test_randomized.hpp"
77

88
namespace Kokkos {
9-
struct Real2 {
9+
struct ComposeReal2 {
1010
cedr::Real v[2];
11-
KOKKOS_INLINE_FUNCTION Real2 () { v[0] = v[1] = 0; }
11+
KOKKOS_INLINE_FUNCTION ComposeReal2 () { v[0] = v[1] = 0; }
1212

13-
KOKKOS_INLINE_FUNCTION void operator= (const Real2& s) {
13+
KOKKOS_INLINE_FUNCTION void operator= (const ComposeReal2& s) {
1414
v[0] = s.v[0];
1515
v[1] = s.v[1];
1616
}
17-
KOKKOS_INLINE_FUNCTION void operator= (const volatile Real2& s) volatile {
17+
KOKKOS_INLINE_FUNCTION void operator= (const volatile ComposeReal2& s) volatile {
1818
v[0] = s.v[0];
1919
v[1] = s.v[1];
2020
}
2121

22-
KOKKOS_INLINE_FUNCTION Real2& operator+= (const Real2& o) {
22+
KOKKOS_INLINE_FUNCTION ComposeReal2& operator+= (const ComposeReal2& o) {
2323
v[0] += o.v[0];
2424
v[1] += o.v[1];
2525
return *this;
2626
}
2727
};
2828

29-
template<> struct reduction_identity<Real2> {
30-
KOKKOS_INLINE_FUNCTION static Real2 sum() { return Real2(); }
29+
template<> struct reduction_identity<ComposeReal2> {
30+
KOKKOS_INLINE_FUNCTION static ComposeReal2 sum() { return ComposeReal2(); }
3131
};
3232
} // namespace Kokkos
3333

@@ -171,16 +171,16 @@ void CAAS<ES>::reduce_locally () {
171171
const auto calc_Qm_clip = KOKKOS_LAMBDA (const typename ESU::Member& t) {
172172
const auto k = t.league_rank();
173173
const auto os = (k+1)*nlclcells;
174-
const auto reduce = [&] (const Int& i, Kokkos::Real2& accum) {
174+
const auto reduce = [&] (const Int& i, Kokkos::ComposeReal2& accum) {
175175
Real Qm_clip, Qm_term;
176176
calc_Qm_scalars(d, probs, nt, nlclcells, k, os, i, Qm_clip, Qm_term);
177177
d(os+i) = Qm_clip;
178178
accum.v[0] += Qm_clip;
179179
accum.v[1] += Qm_term;
180180
};
181-
Kokkos::Real2 accum;
181+
Kokkos::ComposeReal2 accum;
182182
Kokkos::parallel_reduce(Kokkos::TeamThreadRange(t, nlclcells),
183-
reduce, Kokkos::Sum<Kokkos::Real2>(accum));
183+
reduce, Kokkos::Sum<Kokkos::ComposeReal2>(accum));
184184
send( k) = accum.v[0];
185185
send(nt + k) = accum.v[1];
186186
};
@@ -253,7 +253,7 @@ void CAAS<ES>::finish_locally () {
253253
}
254254

255255
template <typename ES>
256-
const CAAS<ES>::DeviceOp& CAAS<ES>::get_device_op() { return o; }
256+
const typename CAAS<ES>::DeviceOp& CAAS<ES>::get_device_op() { return o; }
257257

258258
template <typename ES>
259259
void CAAS<ES>::run () {

cedr/cedr_qlt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ ::r2l_send_to_kids (const tree::NodeSets::Level& lvl, const Int& r2lndps) const
613613
}
614614

615615
template <typename ES>
616-
const QLT<ES>::DeviceOp& QLT<ES>::get_device_op() { return o; }
616+
const typename QLT<ES>::DeviceOp& QLT<ES>::get_device_op() { return o; }
617617

618618
template <typename ES>
619619
void QLT<ES>::run () {

0 commit comments

Comments
 (0)