33
44#include < Cabana_Core.hpp>
55
6- template < class SliceType >
6+ template < class SliceType , class T >
77struct 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
2525using 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>
2828class 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