43 static constexpr Int64 LastExtent = J;
45 static ARCCORE_HOST_DEVICE
constexpr Int64
46 offset(ArrayIndex<2> idx,Int64 extent1)
48 return (extent1 * idx[I]) + Int64(idx[J]);
51 static constexpr std::array<Int32,2> layoutInfo() {
return { I, J }; }
52 static constexpr ARCCORE_HOST_DEVICE Int32 layout0() {
return I; }
53 static constexpr ARCCORE_HOST_DEVICE Int32 layout1() {
return J; }
64 static constexpr Int64 LastExtent = K;
66 static ARCCORE_HOST_DEVICE
constexpr Int64
67 offset(ArrayIndex<3> idx,Int64 extent1,Int64 extent2)
69 return (extent2 * idx[I]) + (extent1*idx[J]) + idx.asInt64(K);
72 template<
typename ExtentType>
static ARCCORE_HOST_DEVICE
constexpr Int64
73 computeOffsetIndexes(
const ExtentType& extents)
75 return extents.template constLargeExtent<J>() * extents.template constLargeExtent<K>();
78 static constexpr std::array<Int32,3> layoutInfo() {
return { I, J, K }; }
80 static constexpr ARCCORE_HOST_DEVICE Int32 layout0() {
return I; }
81 static constexpr ARCCORE_HOST_DEVICE Int32 layout1() {
return J; }
82 static constexpr ARCCORE_HOST_DEVICE Int32 layout2() {
return K; }