43 #ifndef Intrepid2_DataTools_h
44 #define Intrepid2_DataTools_h
63 template<
class Scalar,
class DeviceType>
66 const ordinal_type rank = scalarDataIn.
rank();
70 extents[rank+1] = matrixDataIn.
extent_int(rank+1);
71 variationTypes[rank] = CONSTANT;
72 variationTypes[rank+1] = CONSTANT;
74 auto scalarDataInExtended = scalarDataIn.
shallowCopy(rank + 2, extents, variationTypes);
83 template<
class Scalar,
class DeviceType>
86 const ordinal_type rank = scalarDataIn.
rank();
90 extents[rank+1] = matrixDataIn.
extent_int(rank+1);
91 variationTypes[rank] = CONSTANT;
92 variationTypes[rank+1] = CONSTANT;
94 auto scalarDataInExtended = scalarDataIn.
shallowCopy(rank + 2, extents, variationTypes);
98 result.storeInPlaceProduct(matrixDataIn,scalarDataInExtended);
static Data< DataScalar, DeviceType > allocateInPlaceCombinationResult(const Data< DataScalar, DeviceType > &A, const Data< DataScalar, DeviceType > &B)
Defines the Data class, a wrapper around a Kokkos::View that allows data that is constant or repeatin...
KOKKOS_INLINE_FUNCTION Kokkos::Array< int, 7 > getExtents() const
Returns an array containing the logical extents in each dimension.
KOKKOS_INLINE_FUNCTION const Kokkos::Array< DataVariationType, 7 > & getVariationTypes() const
Returns an array with the variation types in each logical dimension.
Data shallowCopy(const int rank, const Kokkos::Array< int, 7 > &extents, const Kokkos::Array< DataVariationType, 7 > &variationTypes) const
Creates a new Data object with the same underlying view, but with the specified logical rank...
void storeInPlaceProduct(const Data< DataScalar, DeviceType > &A, const Data< DataScalar, DeviceType > &B)
stores the in-place (entrywise) product, A .* B, into this container.
KOKKOS_INLINE_FUNCTION unsigned rank() const
Returns the logical rank of the Data container.
KOKKOS_INLINE_FUNCTION int extent_int(const int &r) const
Returns the logical extent in the specified dimension.