Skip to content

Commit 03081e8

Browse files
committed
fixed build errors, swapped ExecutionSpace and MemorySpace
1 parent 95c25bd commit 03081e8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/SliceWrapper.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33

44
#include <Cabana_Core.hpp>
55

6-
template< class SliceType >
6+
template< class SliceType, class T >
77
struct SliceWrapper {
88

99
SliceType st_; //store the underlying instance
1010

1111
SliceWrapper(SliceType st) : st_(st) {}
1212

1313
KOKKOS_INLINE_FUNCTION
14-
member_type& access(const int s, const int a, int i) const {
14+
T& access(const int s, const int a, int i) const {
1515
return st_.access(s,a,i);
1616
}
1717
int arraySize(int s) {
@@ -24,15 +24,15 @@ struct SliceWrapper {
2424

2525
using namespace Cabana;
2626

27-
template <class MemorySpace, class ExecutionSpace, class T, int width, int vecLen>
27+
template <class ExecutionSpace, class MemorySpace, class T, int width, int vecLen>
2828
class CabSliceFactory {
2929
using DeviceType = Kokkos::Device<ExecutionSpace, MemorySpace>;
3030
using DataTypes = Cabana::MemberTypes<T[width]>;
3131
using member_slice_t =
3232
Cabana::Slice<T[width], DeviceType,
3333
Cabana::DefaultAccessMemory,
3434
vecLen, width*vecLen>;
35-
using wrapper_slice_t = SliceWrapper<member_slice_t>;
35+
using wrapper_slice_t = SliceWrapper<member_slice_t, T>;
3636

3737
Cabana::AoSoA<DataTypes, DeviceType, vecLen> aosoa;
3838

0 commit comments

Comments
 (0)