|
Intrepid2
|
Wrapper around a Kokkos::View that allows data that is constant or repeating in various logical dimensions to be stored just once, while providing a similar interface to that of View. More...
#include <Intrepid2_Data.hpp>
Classes | |
| struct | bool_pack |
| struct | FullArgExtractorWritableData |
| For use with Data object into which a value will be stored. More... | |
| struct | InPlaceCombinationFunctor |
Public Types | |
| using | value_type = DataScalar |
| using | execution_space = typename DeviceType::execution_space |
| template<bool... v> | |
| using | all_true = std::is_same< bool_pack< true, v... >, bool_pack< v..., true > > |
| template<class ... IntArgs> | |
| using | valid_args = all_true< std::is_integral< IntArgs >{}... > |
Public Member Functions | |
| template<class BinaryOperator , class PolicyType , class ThisUnderlyingViewType , class AUnderlyingViewType , class BUnderlyingViewType , class ArgExtractorThis , class ArgExtractorA , class ArgExtractorB > | |
| void | storeInPlaceCombination (PolicyType &policy, ThisUnderlyingViewType &this_underlying, AUnderlyingViewType &A_underlying, BUnderlyingViewType &B_underlying, BinaryOperator &binaryOperator, ArgExtractorThis argThis, ArgExtractorA argA, ArgExtractorB argB) |
| storeInPlaceCombination implementation for rank < 7, with compile-time underlying views and argument interpretation. Intended for internal and expert use. More... | |
| template<class BinaryOperator , int rank> | |
| enable_if_t< rank !=7, void > | storeInPlaceCombination (const Data< DataScalar, DeviceType > &A, const Data< DataScalar, DeviceType > &B, BinaryOperator binaryOperator) |
| storeInPlaceCombination with compile-time rank – implementation for rank < 7. More... | |
| template<class BinaryOperator , int rank> | |
| enable_if_t< rank==7, void > | storeInPlaceCombination (const Data< DataScalar, DeviceType > &A, const Data< DataScalar, DeviceType > &B, BinaryOperator binaryOperator) |
| storeInPlaceCombination with compile-time rank – implementation for rank of 7. (Not optimized; expectation is this case will be rarely used.) More... | |
| template<class UnaryOperator > | |
| void | applyOperator (UnaryOperator unaryOperator) |
| applies the specified unary operator to each entry More... | |
| template<class ... IntArgs> | |
| KOKKOS_INLINE_FUNCTION reference_type | getWritableEntry (const IntArgs... intArgs) const |
| Returns an l-value reference to the specified logical entry in the underlying view. Note that for variation types other than GENERAL, multiple valid argument sets will refer to the same memory location. Intended for Intrepid2 developers and expert users only. More... | |
| void | allocateAndCopyFromDynRankView (ScalarView< DataScalar, DeviceType > data) |
| allocate an underlying View that matches the provided DynRankView in dimensions, and copy. Called by constructors that accept a DynRankView as argument. More... | |
| Data (std::vector< DimensionInfo > dimInfoVector) | |
| Constructor in terms of DimensionInfo for each logical dimension; does not require a View to be specified. Will allocate a View of appropriate rank, zero-filled. More... | |
| Data (const ScalarView< DataScalar, DeviceType > &data, int rank, Kokkos::Array< int, 7 > extents, Kokkos::Array< DataVariationType, 7 > variationType, const int blockPlusDiagonalLastNonDiagonal=-1) | |
| DynRankView constructor. Will copy to a View of appropriate rank. More... | |
| template<typename OtherDeviceType , class = typename std::enable_if< std::is_same<typename DeviceType::memory_space, typename OtherDeviceType::memory_space>::value>::type, class = typename std::enable_if<!std::is_same<DeviceType,OtherDeviceType>::value>::type> | |
| Data (const Data< DataScalar, OtherDeviceType > &data) | |
| copy-like constructor for differing device type, but same memory space. This does a shallow copy of the underlying view. More... | |
| template<typename OtherDeviceType , class = typename std::enable_if<!std::is_same<typename DeviceType::memory_space, typename OtherDeviceType::memory_space>::value>::type> | |
| Data (const Data< DataScalar, OtherDeviceType > &data) | |
| copy-like constructor for differing execution spaces. This does a deep_copy of the underlying view. More... | |
| Data (ScalarView< DataScalar, DeviceType > data) | |
| copy constructor modeled after the copy-like constructor above. Not as efficient as the implicit copy constructor, so this should only be uncommented to emulate the copy-like constructor above in situations where host and device space are the same, and the copy-like constructor does not exist, or to provide a debugging breakpoint to assess when copies are being constructed. More... | |
| template<size_t rank, class ... DynRankViewProperties> | |
| Data (const Kokkos::DynRankView< DataScalar, DeviceType, DynRankViewProperties... > &data, Kokkos::Array< int, rank > extents, Kokkos::Array< DataVariationType, rank > variationType, const int blockPlusDiagonalLastNonDiagonal=-1) | |
| Constructor that accepts a DynRankView as an argument. The data belonging to the DynRankView will be copied into a new View of matching dimensions. More... | |
| template<size_t rank, class ... ViewProperties> | |
| Data (Kokkos::View< DataScalar *, DeviceType, ViewProperties... > data, Kokkos::Array< int, rank > extents, Kokkos::Array< DataVariationType, rank > variationType, const int blockPlusDiagonalLastNonDiagonal=-1) | |
| template<size_t rank, class ... ViewProperties> | |
| Data (Kokkos::View< DataScalar **, DeviceType, ViewProperties... > data, Kokkos::Array< int, rank > extents, Kokkos::Array< DataVariationType, rank > variationType, const int blockPlusDiagonalLastNonDiagonal=-1) | |
| template<size_t rank, class ... ViewProperties> | |
| Data (Kokkos::View< DataScalar ***, DeviceType, ViewProperties... > data, Kokkos::Array< int, rank > extents, Kokkos::Array< DataVariationType, rank > variationType, const int blockPlusDiagonalLastNonDiagonal=-1) | |
| template<size_t rank, class ... ViewProperties> | |
| Data (Kokkos::View< DataScalar ****, DeviceType, ViewProperties... > data, Kokkos::Array< int, rank > extents, Kokkos::Array< DataVariationType, rank > variationType, const int blockPlusDiagonalLastNonDiagonal=-1) | |
| template<size_t rank, class ... ViewProperties> | |
| Data (Kokkos::View< DataScalar *****, DeviceType, ViewProperties... > data, Kokkos::Array< int, rank > extents, Kokkos::Array< DataVariationType, rank > variationType, const int blockPlusDiagonalLastNonDiagonal=-1) | |
| template<size_t rank, class ... ViewProperties> | |
| Data (Kokkos::View< DataScalar ******, DeviceType, ViewProperties... > data, Kokkos::Array< int, rank > extents, Kokkos::Array< DataVariationType, rank > variationType, const int blockPlusDiagonalLastNonDiagonal=-1) | |
| template<size_t rank, class ... ViewProperties> | |
| Data (Kokkos::View< DataScalar *******, DeviceType, ViewProperties... > data, Kokkos::Array< int, rank > extents, Kokkos::Array< DataVariationType, rank > variationType, const int blockPlusDiagonalLastNonDiagonal=-1) | |
| template<size_t rank> | |
| Data (DataScalar constantValue, Kokkos::Array< int, rank > extents) | |
| constructor for everywhere-constant data More... | |
| Data () | |
| default constructor (empty data) More... | |
| KOKKOS_INLINE_FUNCTION const int & | blockPlusDiagonalLastNonDiagonal () const |
| For a Data object containing data with variation type BLOCK_PLUS_DIAGONAL, returns the row and column (which must match) of the last non-diagonal entry. For fully diagonal matrices, this is -1. More... | |
| KOKKOS_INLINE_FUNCTION Kokkos::Array< int, 7 > | getExtents () const |
| Returns an array containing the logical extents in each dimension. More... | |
| KOKKOS_INLINE_FUNCTION DimensionInfo | getDimensionInfo (const int &dim) const |
| Returns an object fully specifying the indicated dimension. This is used in determining appropriate sizing of Data objects that depend on other Data objects (e.g., when two matrix Data objects are multiplied together). More... | |
| KOKKOS_INLINE_FUNCTION DimensionInfo | combinedDataDimensionInfo (const Data &otherData, const int &dim) const |
| Returns (DataVariationType, data extent) in the specified dimension for a Data container that combines (through multiplication, say, or addition) this container with otherData. More... | |
| template<int rank> | |
| KOKKOS_INLINE_FUNCTION enable_if_t< rank==1, const Kokkos::View< typename RankExpander< DataScalar, rank >::value_type, DeviceType > & > | getUnderlyingView () const |
| Returns the underlying view. Throws an exception if the underlying view is not rank 1. More... | |
| template<int rank> | |
| KOKKOS_INLINE_FUNCTION enable_if_t< rank==2, const Kokkos::View< typename RankExpander< DataScalar, rank >::value_type, DeviceType > & > | getUnderlyingView () const |
| Returns the underlying view. Throws an exception if the underlying view is not rank 2. More... | |
| template<int rank> | |
| KOKKOS_INLINE_FUNCTION enable_if_t< rank==3, const Kokkos::View< typename RankExpander< DataScalar, rank >::value_type, DeviceType > & > | getUnderlyingView () const |
| Returns the underlying view. Throws an exception if the underlying view is not rank 3. More... | |
| template<int rank> | |
| KOKKOS_INLINE_FUNCTION enable_if_t< rank==4, const Kokkos::View< typename RankExpander< DataScalar, rank >::value_type, DeviceType > & > | getUnderlyingView () const |
| Returns the underlying view. Throws an exception if the underlying view is not rank 4. More... | |
| template<int rank> | |
| KOKKOS_INLINE_FUNCTION enable_if_t< rank==5, const Kokkos::View< typename RankExpander< DataScalar, rank >::value_type, DeviceType > & > | getUnderlyingView () const |
| Returns the underlying view. Throws an exception if the underlying view is not rank 5. More... | |
| template<int rank> | |
| KOKKOS_INLINE_FUNCTION enable_if_t< rank==6, const Kokkos::View< typename RankExpander< DataScalar, rank >::value_type, DeviceType > & > | getUnderlyingView () const |
| Returns the underlying view. Throws an exception if the underlying view is not rank 6. More... | |
| template<int rank> | |
| KOKKOS_INLINE_FUNCTION enable_if_t< rank==7, const Kokkos::View< typename RankExpander< DataScalar, rank >::value_type, DeviceType > & > | getUnderlyingView () const |
| Returns the underlying view. Throws an exception if the underlying view is not rank 7. More... | |
| KOKKOS_INLINE_FUNCTION const Kokkos::View< DataScalar *, DeviceType > & | getUnderlyingView1 () const |
| returns the View that stores the unique data. For rank-1 underlying containers. More... | |
| KOKKOS_INLINE_FUNCTION const Kokkos::View< DataScalar **, DeviceType > & | getUnderlyingView2 () const |
| returns the View that stores the unique data. For rank-2 underlying containers. More... | |
| KOKKOS_INLINE_FUNCTION const Kokkos::View< DataScalar ***, DeviceType > & | getUnderlyingView3 () const |
| returns the View that stores the unique data. For rank-3 underlying containers. More... | |
| KOKKOS_INLINE_FUNCTION const Kokkos::View< DataScalar ****, DeviceType > & | getUnderlyingView4 () const |
| returns the View that stores the unique data. For rank-4 underlying containers. More... | |
| KOKKOS_INLINE_FUNCTION const Kokkos::View< DataScalar *****, DeviceType > & | getUnderlyingView5 () const |
| returns the View that stores the unique data. For rank-5 underlying containers. More... | |
| KOKKOS_INLINE_FUNCTION const Kokkos::View< DataScalar ******, DeviceType > & | getUnderlyingView6 () const |
| returns the View that stores the unique data. For rank-6 underlying containers. More... | |
| KOKKOS_INLINE_FUNCTION const Kokkos::View< DataScalar *******, DeviceType > & | getUnderlyingView7 () const |
| returns the View that stores the unique data. For rank-7 underlying containers. More... | |
| KOKKOS_INLINE_FUNCTION void | setUnderlyingView1 (Kokkos::View< DataScalar *, DeviceType > &view) const |
| sets the View that stores the unique data. For rank-1 underlying containers. More... | |
| KOKKOS_INLINE_FUNCTION void | setUnderlyingView2 (Kokkos::View< DataScalar **, DeviceType > &view) const |
| sets the View that stores the unique data. For rank-2 underlying containers. More... | |
| KOKKOS_INLINE_FUNCTION void | setUnderlyingView3 (Kokkos::View< DataScalar ***, DeviceType > &view) const |
| sets the View that stores the unique data. For rank-3 underlying containers. More... | |
| KOKKOS_INLINE_FUNCTION void | setUnderlyingView4 (Kokkos::View< DataScalar ****, DeviceType > &view) const |
| sets the View that stores the unique data. For rank-4 underlying containers. More... | |
| KOKKOS_INLINE_FUNCTION void | setUnderlyingView5 (Kokkos::View< DataScalar *****, DeviceType > &view) const |
| sets the View that stores the unique data. For rank-5 underlying containers. More... | |
| KOKKOS_INLINE_FUNCTION void | setUnderlyingView6 (Kokkos::View< DataScalar ******, DeviceType > &view) const |
| sets the View that stores the unique data. For rank-6 underlying containers. More... | |
| KOKKOS_INLINE_FUNCTION void | setUnderlyingView7 (Kokkos::View< DataScalar *******, DeviceType > &view) const |
| sets the View that stores the unique data. For rank-7 underlying containers. More... | |
| ScalarView< DataScalar, DeviceType > | getUnderlyingView () const |
| Returns a DynRankView constructed atop the same underlying data as the fixed-rank Kokkos::View used internally. More... | |
| KOKKOS_INLINE_FUNCTION ordinal_type | getUnderlyingViewRank () const |
| returns the rank of the View that stores the unique data More... | |
| KOKKOS_INLINE_FUNCTION ordinal_type | getUnderlyingViewSize () const |
| returns the number of entries in the View that stores the unique data More... | |
| ScalarView< DataScalar, DeviceType > | allocateDynRankViewMatchingUnderlying () const |
| Returns a DynRankView that matches the underlying Kokkos::View object in value_type, layout, and dimension. More... | |
| template<class ... DimArgs> | |
| ScalarView< DataScalar, DeviceType > | allocateDynRankViewMatchingUnderlying (DimArgs... dims) const |
| Returns a DynRankView that matches the underlying Kokkos::View object value_type and layout, but with the specified dimensions. More... | |
| void | clear () const |
| Copies 0.0 to the underlying View. More... | |
| void | copyDataFromDynRankViewMatchingUnderlying (const ScalarView< DataScalar, DeviceType > &dynRankView) const |
| Copies from the provided DynRankView into the underlying Kokkos::View container storing the unique data. More... | |
| KOKKOS_INLINE_FUNCTION int | getDataExtent (const ordinal_type &d) const |
| returns the true extent of the data corresponding to the logical dimension provided; if the data does not vary in that dimension, returns 1 More... | |
| KOKKOS_INLINE_FUNCTION int | getVariationModulus (const int &d) const |
| Variation modulus accessor. More... | |
| KOKKOS_INLINE_FUNCTION const Kokkos::Array< DataVariationType, 7 > & | getVariationTypes () const |
| Returns an array with the variation types in each logical dimension. More... | |
| template<class ... IntArgs> | |
| KOKKOS_INLINE_FUNCTION return_type | getEntry (const IntArgs &... intArgs) const |
| Returns a (read-only) value corresponding to the specified logical data location. More... | |
| template<class ... IntArgs> | |
| KOKKOS_INLINE_FUNCTION enable_if_t< valid_args< IntArgs... >::value &&(sizeof...(IntArgs)<=7), return_type > | operator() (const IntArgs &... intArgs) const |
| Returns a value corresponding to the specified logical data location. More... | |
| KOKKOS_INLINE_FUNCTION int | extent_int (const int &r) const |
| Returns the logical extent in the specified dimension. More... | |
| template<typename iType > | |
| KOKKOS_INLINE_FUNCTION constexpr std::enable_if< std::is_integral< iType >::value, size_t >::type | extent (const iType &r) const |
| KOKKOS_INLINE_FUNCTION bool | isDiagonal () const |
| returns true for containers that have two dimensions marked as BLOCK_PLUS_DIAGONAL for which the non-diagonal block is empty or size 1. More... | |
| template<int rank> | |
| enable_if_t<(rank!=1) &&(rank!=7), Kokkos::MDRangePolicy< typename DeviceType::execution_space, Kokkos::Rank< rank > > > | dataExtentRangePolicy () |
| returns an MDRangePolicy over the underlying data extents (but with the logical shape). More... | |
| template<int rank> | |
| enable_if_t< rank==7, Kokkos::MDRangePolicy< typename DeviceType::execution_space, Kokkos::Rank< 6 > > > | dataExtentRangePolicy () |
| returns an MDRangePolicy over the first six underlying data extents (but with the logical shape). More... | |
| template<int rank> | |
| enable_if_t< rank==1, Kokkos::RangePolicy< typename DeviceType::execution_space > > | dataExtentRangePolicy () |
| template<class BinaryOperator > | |
| void | storeInPlaceCombination (const Data< DataScalar, DeviceType > &A, const Data< DataScalar, DeviceType > &B, BinaryOperator binaryOperator) |
| Places the result of an in-place combination (e.g., entrywise sum) into this data container. More... | |
| void | storeInPlaceSum (const Data< DataScalar, DeviceType > &A, const Data< DataScalar, DeviceType > &B) |
| stores the in-place (entrywise) sum, A .+ B, into this container. More... | |
| void | storeInPlaceProduct (const Data< DataScalar, DeviceType > &A, const Data< DataScalar, DeviceType > &B) |
| stores the in-place (entrywise) product, A .* B, into this container. More... | |
| void | storeInPlaceDifference (const Data< DataScalar, DeviceType > &A, const Data< DataScalar, DeviceType > &B) |
| stores the in-place (entrywise) difference, A .- B, into this container. More... | |
| void | storeInPlaceQuotient (const Data< DataScalar, DeviceType > &A, const Data< DataScalar, DeviceType > &B) |
| stores the in-place (entrywise) quotient, A ./ B, into this container. More... | |
| void | storeMatVec (const Data< DataScalar, DeviceType > &matData, const Data< DataScalar, DeviceType > &vecData) |
| Places the result of a matrix-vector multiply corresponding to the two provided containers into this Data container. This Data container should have been constructed by a call to allocateMatVecResult(), or should match such a container in underlying data extent and variation types. More... | |
| void | storeMatMat (const bool transposeA, const Data< DataScalar, DeviceType > &A_MatData, const bool transposeB, const Data< DataScalar, DeviceType > &B_MatData) |
| KOKKOS_INLINE_FUNCTION constexpr bool | isValid () const |
| returns true for containers that have data; false for those that don't (namely, those that have been constructed by the default constructor). More... | |
| KOKKOS_INLINE_FUNCTION unsigned | rank () const |
| Returns the logical rank of the Data container. More... | |
| void | setExtent (const ordinal_type &d, const ordinal_type &newExtent) |
| sets the logical extent in the specified dimension. If needed, the underlying data container is resized. More... | |
| KOKKOS_INLINE_FUNCTION bool | underlyingMatchesLogical () const |
| Returns true if the underlying container has exactly the same rank and extents as the logical container. More... | |
Static Public Member Functions | |
| template<class ToContainer , class FromContainer > | |
| static void | copyContainer (ToContainer to, FromContainer from) |
| Generic data copying method to allow construction of Data object from DynRankViews for which deep_copy() to the underlying view would be disallowed. This method made public to allow CUDA compilation (because it contains a Kokkos lambda). More... | |
| static Data< DataScalar, DeviceType > | allocateInPlaceCombinationResult (const Data< DataScalar, DeviceType > &A, const Data< DataScalar, DeviceType > &B) |
| static Data< DataScalar, DeviceType > | allocateMatMatResult (const bool transposeA, const Data< DataScalar, DeviceType > &A_MatData, const bool transposeB, const Data< DataScalar, DeviceType > &B_MatData) |
| static Data< DataScalar, DeviceType > | allocateMatVecResult (const Data< DataScalar, DeviceType > &matData, const Data< DataScalar, DeviceType > &vecData) |
Private Types | |
| using | reference_type = typename ScalarView< DataScalar, DeviceType >::reference_type |
| using | const_reference_type = typename ScalarView< const DataScalar, DeviceType >::reference_type |
| using | return_type = const_reference_type |
Private Member Functions | |
| KOKKOS_INLINE_FUNCTION int | getUnderlyingViewExtent (const int &dim) const |
| Returns the extent of the underlying view in the specified dimension. More... | |
| void | setActiveDims () |
| class initialization method. Called by constructors. More... | |
Static Private Member Functions | |
| static KOKKOS_INLINE_FUNCTION int | blockPlusDiagonalNumNondiagonalEntries (const int &lastNondiagonal) |
| Returns the number of non-diagonal entries based on the last non-diagonal. Only applicable for BLOCK_PLUS_DIAGONAL DataVariationType. More... | |
| static KOKKOS_INLINE_FUNCTION int | blockPlusDiagonalBlockEntryIndex (const int &lastNondiagonal, const int &numNondiagonalEntries, const int &i, const int &j) |
| //! Returns flattened index of the specified (i,j) matrix entry, assuming that i,j ≤ lastNondiagonal. Only applicable for BLOCK_PLUS_DIAGONAL DataVariationType. More... | |
| static KOKKOS_INLINE_FUNCTION int | blockPlusDiagonalDiagonalEntryIndex (const int &lastNondiagonal, const int &numNondiagonalEntries, const int &i) |
| Returns flattened index of the specified (i,i) matrix entry, assuming that i > lastNondiagonal. Only applicable for BLOCK_PLUS_DIAGONAL DataVariationType. More... | |
Private Attributes | |
| ordinal_type | dataRank_ |
| Kokkos::View< DataScalar *, DeviceType > | data1_ |
| Kokkos::View< DataScalar **, DeviceType > | data2_ |
| Kokkos::View< DataScalar ***, DeviceType > | data3_ |
| Kokkos::View< DataScalar ****, DeviceType > | data4_ |
| Kokkos::View< DataScalar *****, DeviceType > | data5_ |
| Kokkos::View< DataScalar ******, DeviceType > | data6_ |
| Kokkos::View< DataScalar *******, DeviceType > | data7_ |
| Kokkos::Array< int, 7 > | extents_ |
| Kokkos::Array< DataVariationType, 7 > | variationType_ |
| Kokkos::Array< int, 7 > | variationModulus_ |
| int | blockPlusDiagonalLastNonDiagonal_ = -1 |
| bool | hasNontrivialModulusUNUSED_ |
| bool | underlyingMatchesLogical_ |
| Kokkos::Array< ordinal_type, 7 > | activeDims_ |
| int | numActiveDims_ |
| ordinal_type | rank_ |
| ScalarView< DataScalar, DeviceType > | zeroView_ |
Wrapper around a Kokkos::View that allows data that is constant or repeating in various logical dimensions to be stored just once, while providing a similar interface to that of View.
The Data class distinguishes between the logical extent and the data extent. For example, one could construct a data container corresponding to constant (cell, point) data with 100 cells and 25 points per cell as follows: auto cpData = Data(value, Kokkos::Array<int>{100,25}); The data extent of the container is 1 in every dimension, while the logical extent is 100 in the first dimension, and 25 in the second. Similarly, the logical rank of the container is 2, but the rank of the underlying View is 1.
There are four possible variation types in a logical dimension:
Definition at line 199 of file Intrepid2_Data.hpp.
| using Intrepid2::Data< DataScalar, DeviceType >::all_true = std::is_same<bool_pack<true, v...>, bool_pack<v..., true> > |
Definition at line 1740 of file Intrepid2_Data.hpp.
|
private |
Definition at line 225 of file Intrepid2_Data.hpp.
| using Intrepid2::Data< DataScalar, DeviceType >::execution_space = typename DeviceType::execution_space |
Definition at line 202 of file Intrepid2_Data.hpp.
|
private |
Definition at line 224 of file Intrepid2_Data.hpp.
|
private |
Definition at line 227 of file Intrepid2_Data.hpp.
| using Intrepid2::Data< DataScalar, DeviceType >::valid_args = all_true<std::is_integral<IntArgs>{}...> |
Definition at line 1743 of file Intrepid2_Data.hpp.
| using Intrepid2::Data< DataScalar, DeviceType >::value_type = DataScalar |
Definition at line 201 of file Intrepid2_Data.hpp.
|
inline |
Constructor in terms of DimensionInfo for each logical dimension; does not require a View to be specified. Will allocate a View of appropriate rank, zero-filled.
Definition at line 1050 of file Intrepid2_Data.hpp.
|
inline |
DynRankView constructor. Will copy to a View of appropriate rank.
Definition at line 1101 of file Intrepid2_Data.hpp.
References Intrepid2::Data< DataScalar, DeviceType >::allocateAndCopyFromDynRankView(), and Intrepid2::Data< DataScalar, DeviceType >::setActiveDims().
|
inline |
copy-like constructor for differing device type, but same memory space. This does a shallow copy of the underlying view.
Definition at line 1112 of file Intrepid2_Data.hpp.
References Intrepid2::Data< DataScalar, DeviceType >::getUnderlyingView().
|
inline |
copy-like constructor for differing execution spaces. This does a deep_copy of the underlying view.
Definition at line 1137 of file Intrepid2_Data.hpp.
References Intrepid2::Data< DataScalar, DeviceType >::getUnderlyingView().
|
inline |
copy constructor modeled after the copy-like constructor above. Not as efficient as the implicit copy constructor, so this should only be uncommented to emulate the copy-like constructor above in situations where host and device space are the same, and the copy-like constructor does not exist, or to provide a debugging breakpoint to assess when copies are being constructed.
constructor for fully varying data container, no expressed redundancy/repetition. Copies the data to a new Kokkos::View of matching rank.
Definition at line 1218 of file Intrepid2_Data.hpp.
|
inline |
Constructor that accepts a DynRankView as an argument. The data belonging to the DynRankView will be copied into a new View of matching dimensions.
Definition at line 1228 of file Intrepid2_Data.hpp.
|
inline |
Definition at line 1243 of file Intrepid2_Data.hpp.
|
inline |
Definition at line 1257 of file Intrepid2_Data.hpp.
|
inline |
Definition at line 1271 of file Intrepid2_Data.hpp.
|
inline |
Definition at line 1285 of file Intrepid2_Data.hpp.
|
inline |
Definition at line 1299 of file Intrepid2_Data.hpp.
|
inline |
Definition at line 1313 of file Intrepid2_Data.hpp.
|
inline |
Definition at line 1327 of file Intrepid2_Data.hpp.
|
inline |
constructor for everywhere-constant data
Definition at line 1342 of file Intrepid2_Data.hpp.
|
inline |
default constructor (empty data)
Definition at line 1356 of file Intrepid2_Data.hpp.
|
inline |
allocate an underlying View that matches the provided DynRankView in dimensions, and copy. Called by constructors that accept a DynRankView as argument.
Definition at line 1021 of file Intrepid2_Data.hpp.
Referenced by Intrepid2::Data< DataScalar, DeviceType >::Data().
|
inline |
Returns a DynRankView that matches the underlying Kokkos::View object in value_type, layout, and dimension.
Definition at line 1623 of file Intrepid2_Data.hpp.
References Intrepid2::getMatchingViewWithLabel().
|
inline |
Returns a DynRankView that matches the underlying Kokkos::View object value_type and layout, but with the specified dimensions.
Definition at line 1640 of file Intrepid2_Data.hpp.
References Intrepid2::getMatchingViewWithLabel().
|
inlinestatic |
Constructs a container suitable for storing the result of an in-place combination of the two provided data containers. The two containers must have the same logical shape.
| A | [in] - the first data container. |
| B | [in] - the second data container. Must have the same logical shape as A. |
Definition at line 1798 of file Intrepid2_Data.hpp.
|
inlinestatic |
Constructs a container suitable for storing the result of a matrix-vector multiply corresponding to the two provided containers.
| A_MatData | [in] - logically (...,D1,D2)-dimensioned container, where D1,D2 correspond to matrix dimensions. |
| transposeA | [in] - if true, A will be transposed prior to being multiplied by B (or B's transpose). |
| B_MatData | [in] - logically (...,D3,D4)-dimensioned container, where D3,D4 correspond to matrix dimensions. |
| transposeB | [in] - if true, B will be transposed prior to the multiplication by A (or A's transpose). |
Definition at line 1818 of file Intrepid2_Data.hpp.
|
inlinestatic |
Constructs a container suitable for storing the result of a matrix-vector multiply corresponding to the two provided containers.
Definition at line 2000 of file Intrepid2_Data.hpp.
|
inline |
applies the specified unary operator to each entry
Definition at line 799 of file Intrepid2_Data.hpp.
References Intrepid2::Data< DataScalar, DeviceType >::getDataExtent().
|
inlinestaticprivate |
//! Returns flattened index of the specified (i,j) matrix entry, assuming that i,j ≤ lastNondiagonal. Only applicable for BLOCK_PLUS_DIAGONAL DataVariationType.
Definition at line 240 of file Intrepid2_Data.hpp.
|
inlinestaticprivate |
Returns flattened index of the specified (i,i) matrix entry, assuming that i > lastNondiagonal. Only applicable for BLOCK_PLUS_DIAGONAL DataVariationType.
Definition at line 247 of file Intrepid2_Data.hpp.
|
inline |
For a Data object containing data with variation type BLOCK_PLUS_DIAGONAL, returns the row and column (which must match) of the last non-diagonal entry. For fully diagonal matrices, this is -1.
Definition at line 1365 of file Intrepid2_Data.hpp.
Referenced by Intrepid2::CellTools< DeviceType >::setJacobianDet(), and Intrepid2::CellTools< DeviceType >::setJacobianInv().
|
inlinestaticprivate |
Returns the number of non-diagonal entries based on the last non-diagonal. Only applicable for BLOCK_PLUS_DIAGONAL DataVariationType.
Definition at line 233 of file Intrepid2_Data.hpp.
|
inline |
Copies 0.0 to the underlying View.
Definition at line 1656 of file Intrepid2_Data.hpp.
Referenced by Intrepid2::IntegrationTools< DeviceType >::integrate().
|
inline |
Returns (DataVariationType, data extent) in the specified dimension for a Data container that combines (through multiplication, say, or addition) this container with otherData.
Definition at line 1397 of file Intrepid2_Data.hpp.
References Intrepid2::combinedDimensionInfo(), and Intrepid2::Data< DataScalar, DeviceType >::getDimensionInfo().
|
inlinestatic |
Generic data copying method to allow construction of Data object from DynRankViews for which deep_copy() to the underlying view would be disallowed. This method made public to allow CUDA compilation (because it contains a Kokkos lambda).
Definition at line 1006 of file Intrepid2_Data.hpp.
Referenced by Intrepid2::Data< DataScalar, DeviceType >::copyDataFromDynRankViewMatchingUnderlying().
|
inline |
Copies from the provided DynRankView into the underlying Kokkos::View container storing the unique data.
Definition at line 1672 of file Intrepid2_Data.hpp.
References Intrepid2::Data< DataScalar, DeviceType >::copyContainer().
|
inline |
returns an MDRangePolicy over the underlying data extents (but with the logical shape).
Definition at line 2127 of file Intrepid2_Data.hpp.
References Intrepid2::Data< DataScalar, DeviceType >::getDataExtent(), and Intrepid2::Data< DataScalar, DeviceType >::rank().
|
inline |
returns an MDRangePolicy over the first six underlying data extents (but with the logical shape).
Definition at line 2145 of file Intrepid2_Data.hpp.
References Intrepid2::Data< DataScalar, DeviceType >::getDataExtent().
|
inline |
Definition at line 2163 of file Intrepid2_Data.hpp.
|
inlineconstexpr |
Definition at line 1772 of file Intrepid2_Data.hpp.
|
inline |
Returns the logical extent in the specified dimension.
Definition at line 1764 of file Intrepid2_Data.hpp.
Referenced by Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::approximateFlopCountPerCell(), Intrepid2::Impl::F_IntegratePointValueCache< Scalar, DeviceType, integralViewRank >::approximateFlopCountPerCell(), Intrepid2::Data< DataScalar, DeviceType >::getDimensionInfo(), Intrepid2::TransformedVectorData< Scalar, DeviceType >::numCells(), Intrepid2::TransformedVectorData< Scalar, DeviceType >::operator()(), Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::runSpecialized3(), Intrepid2::Impl::F_IntegratePointValueCache< Scalar, DeviceType, integralViewRank >::runSpecialized3(), Intrepid2::Data< DataScalar, DeviceType >::storeMatVec(), Intrepid2::Impl::F_IntegratePointValueCache< Scalar, DeviceType, integralViewRank >::team_shmem_size(), Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::team_shmem_size(), and Intrepid2::TensorArgumentIterator::TensorArgumentIterator().
|
inline |
returns the true extent of the data corresponding to the logical dimension provided; if the data does not vary in that dimension, returns 1
Definition at line 1689 of file Intrepid2_Data.hpp.
References Intrepid2::Data< DataScalar, DeviceType >::getUnderlyingViewExtent().
Referenced by Intrepid2::Data< DataScalar, DeviceType >::applyOperator(), Intrepid2::TransformedVectorData< Scalar, DeviceType >::cellDataExtent(), Intrepid2::Data< DataScalar, DeviceType >::dataExtentRangePolicy(), Intrepid2::Data< DataScalar, DeviceType >::getDimensionInfo(), Intrepid2::IntegrationTools< DeviceType >::integrate(), Intrepid2::Data< DataScalar, DeviceType >::storeInPlaceCombination(), and Intrepid2::Data< DataScalar, DeviceType >::storeMatVec().
|
inline |
Returns an object fully specifying the indicated dimension. This is used in determining appropriate sizing of Data objects that depend on other Data objects (e.g., when two matrix Data objects are multiplied together).
Definition at line 1379 of file Intrepid2_Data.hpp.
References Intrepid2::BLOCK_PLUS_DIAGONAL, Intrepid2::Data< DataScalar, DeviceType >::extent_int(), and Intrepid2::Data< DataScalar, DeviceType >::getDataExtent().
Referenced by Intrepid2::IntegrationTools< DeviceType >::allocateIntegralData(), and Intrepid2::Data< DataScalar, DeviceType >::combinedDataDimensionInfo().
|
inline |
Returns a (read-only) value corresponding to the specified logical data location.
Definition at line 1732 of file Intrepid2_Data.hpp.
References Intrepid2::Data< DataScalar, DeviceType >::getWritableEntry().
Referenced by Intrepid2::Data< DataScalar, DeviceType >::operator()().
|
inline |
Returns an array containing the logical extents in each dimension.
Definition at line 1372 of file Intrepid2_Data.hpp.
Referenced by Intrepid2::CellTools< DeviceType >::allocateJacobianDet(), and Intrepid2::CellTools< DeviceType >::allocateJacobianInv().
|
inline |
Returns the underlying view. Throws an exception if the underlying view is not rank 1.
Definition at line 1409 of file Intrepid2_Data.hpp.
Referenced by Intrepid2::Data< DataScalar, DeviceType >::Data(), and Intrepid2::Data< DataScalar, DeviceType >::storeInPlaceCombination().
|
inline |
Returns the underlying view. Throws an exception if the underlying view is not rank 2.
Definition at line 1421 of file Intrepid2_Data.hpp.
|
inline |
Returns the underlying view. Throws an exception if the underlying view is not rank 3.
Definition at line 1433 of file Intrepid2_Data.hpp.
|
inline |
Returns the underlying view. Throws an exception if the underlying view is not rank 4.
Definition at line 1445 of file Intrepid2_Data.hpp.
|
inline |
Returns the underlying view. Throws an exception if the underlying view is not rank 5.
Definition at line 1457 of file Intrepid2_Data.hpp.
|
inline |
Returns the underlying view. Throws an exception if the underlying view is not rank 6.
Definition at line 1469 of file Intrepid2_Data.hpp.
|
inline |
Returns the underlying view. Throws an exception if the underlying view is not rank 7.
Definition at line 1481 of file Intrepid2_Data.hpp.
|
inline |
Returns a DynRankView constructed atop the same underlying data as the fixed-rank Kokkos::View used internally.
Definition at line 1588 of file Intrepid2_Data.hpp.
|
inline |
returns the View that stores the unique data. For rank-1 underlying containers.
Definition at line 1491 of file Intrepid2_Data.hpp.
Referenced by Intrepid2::CellTools< DeviceType >::allocateJacobianDet(), Intrepid2::CellTools< DeviceType >::allocateJacobianInv(), and Intrepid2::CellGeometry< PointScalar, spaceDim, DeviceType >::setJacobianDataPrivate().
|
inline |
returns the View that stores the unique data. For rank-2 underlying containers.
Definition at line 1498 of file Intrepid2_Data.hpp.
Referenced by Intrepid2::CellTools< DeviceType >::allocateJacobianInv(), and Intrepid2::CellTools< DeviceType >::setJacobianDet().
|
inline |
returns the View that stores the unique data. For rank-3 underlying containers.
Definition at line 1505 of file Intrepid2_Data.hpp.
Referenced by Intrepid2::CellTools< DeviceType >::allocateJacobianDet(), Intrepid2::CellTools< DeviceType >::allocateJacobianInv(), Intrepid2::CellGeometry< PointScalar, spaceDim, DeviceType >::setJacobianDataPrivate(), Intrepid2::CellTools< DeviceType >::setJacobianDet(), and Intrepid2::CellTools< DeviceType >::setJacobianInv().
|
inline |
returns the View that stores the unique data. For rank-4 underlying containers.
Definition at line 1512 of file Intrepid2_Data.hpp.
Referenced by Intrepid2::CellTools< DeviceType >::allocateJacobianDet(), Intrepid2::CellTools< DeviceType >::allocateJacobianInv(), and Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::runSpecialized3().
|
inline |
returns the View that stores the unique data. For rank-5 underlying containers.
Definition at line 1519 of file Intrepid2_Data.hpp.
|
inline |
returns the View that stores the unique data. For rank-6 underlying containers.
Definition at line 1526 of file Intrepid2_Data.hpp.
|
inline |
returns the View that stores the unique data. For rank-7 underlying containers.
Definition at line 1533 of file Intrepid2_Data.hpp.
|
inlineprivate |
Returns the extent of the underlying view in the specified dimension.
Definition at line 254 of file Intrepid2_Data.hpp.
Referenced by Intrepid2::Data< DataScalar, DeviceType >::getDataExtent(), and Intrepid2::Data< DataScalar, DeviceType >::getUnderlyingViewSize().
|
inline |
returns the rank of the View that stores the unique data
Definition at line 1605 of file Intrepid2_Data.hpp.
Referenced by Intrepid2::CellTools< DeviceType >::allocateJacobianInv(), Intrepid2::IntegrationTools< DeviceType >::integrate(), and Intrepid2::Data< DataScalar, DeviceType >::storeInPlaceCombination().
|
inline |
returns the number of entries in the View that stores the unique data
Definition at line 1612 of file Intrepid2_Data.hpp.
References Intrepid2::Data< DataScalar, DeviceType >::getUnderlyingViewExtent().
Referenced by Intrepid2::Data< DataScalar, DeviceType >::storeInPlaceCombination().
|
inline |
Variation modulus accessor.
| [in] | d | - the logical dimension whose variation modulus is requested. |
The variation modulus is defined as the number of unique entries in the specified dimension. This is defined as follows:
Definition at line 1717 of file Intrepid2_Data.hpp.
|
inline |
Returns an array with the variation types in each logical dimension.
Definition at line 1724 of file Intrepid2_Data.hpp.
Referenced by Intrepid2::CellTools< DeviceType >::allocateJacobianDet(), Intrepid2::CellTools< DeviceType >::allocateJacobianInv(), Intrepid2::TransformedVectorData< Scalar, DeviceType >::cellVariationType(), Intrepid2::CellTools< DeviceType >::setJacobianDet(), and Intrepid2::CellTools< DeviceType >::setJacobianInv().
|
inline |
Returns an l-value reference to the specified logical entry in the underlying view. Note that for variation types other than GENERAL, multiple valid argument sets will refer to the same memory location. Intended for Intrepid2 developers and expert users only.
Definition at line 904 of file Intrepid2_Data.hpp.
Referenced by Intrepid2::Data< DataScalar, DeviceType >::getEntry(), and Intrepid2::Data< DataScalar, DeviceType >::storeMatVec().
|
inline |
returns true for containers that have two dimensions marked as BLOCK_PLUS_DIAGONAL for which the non-diagonal block is empty or size 1.
Definition at line 1777 of file Intrepid2_Data.hpp.
References Intrepid2::BLOCK_PLUS_DIAGONAL.
Referenced by Intrepid2::TransformedVectorData< Scalar, DeviceType >::axisAligned(), and Intrepid2::TransformedVectorData< Scalar, DeviceType >::operator()().
|
inlineconstexpr |
returns true for containers that have data; false for those that don't (namely, those that have been constructed by the default constructor).
Definition at line 2452 of file Intrepid2_Data.hpp.
Referenced by Intrepid2::TransformedVectorData< Scalar, DeviceType >::axisAligned(), Intrepid2::TransformedVectorData< Scalar, DeviceType >::operator()(), and Intrepid2::TransformedVectorData< Scalar, DeviceType >::transformWeight().
|
inline |
Returns a value corresponding to the specified logical data location.
Definition at line 1758 of file Intrepid2_Data.hpp.
References Intrepid2::Data< DataScalar, DeviceType >::getEntry().
|
inline |
Returns the logical rank of the Data container.
Definition at line 2459 of file Intrepid2_Data.hpp.
Referenced by Intrepid2::Data< DataScalar, DeviceType >::dataExtentRangePolicy(), Intrepid2::Data< DataScalar, DeviceType >::storeInPlaceCombination(), and Intrepid2::Data< DataScalar, DeviceType >::storeMatVec().
|
inlineprivate |
class initialization method. Called by constructors.
Definition at line 270 of file Intrepid2_Data.hpp.
Referenced by Intrepid2::Data< DataScalar, DeviceType >::Data().
|
inline |
sets the logical extent in the specified dimension. If needed, the underlying data container is resized.
| [in] | d | - the logical dimension in which the extent is to be changed |
| [in] | newExtent | - the new extent |
Definition at line 2470 of file Intrepid2_Data.hpp.
|
inline |
sets the View that stores the unique data. For rank-1 underlying containers.
Definition at line 1540 of file Intrepid2_Data.hpp.
|
inline |
sets the View that stores the unique data. For rank-2 underlying containers.
Definition at line 1547 of file Intrepid2_Data.hpp.
|
inline |
sets the View that stores the unique data. For rank-3 underlying containers.
Definition at line 1554 of file Intrepid2_Data.hpp.
|
inline |
sets the View that stores the unique data. For rank-4 underlying containers.
Definition at line 1561 of file Intrepid2_Data.hpp.
|
inline |
sets the View that stores the unique data. For rank-5 underlying containers.
Definition at line 1568 of file Intrepid2_Data.hpp.
|
inline |
sets the View that stores the unique data. For rank-6 underlying containers.
Definition at line 1575 of file Intrepid2_Data.hpp.
|
inline |
sets the View that stores the unique data. For rank-7 underlying containers.
Definition at line 1582 of file Intrepid2_Data.hpp.
|
inline |
storeInPlaceCombination with compile-time rank – implementation for rank < 7.
Definition at line 458 of file Intrepid2_Data.hpp.
References Intrepid2::GENERAL, Intrepid2::Data< DataScalar, DeviceType >::getUnderlyingView(), Intrepid2::Data< DataScalar, DeviceType >::getUnderlyingViewRank(), Intrepid2::Data< DataScalar, DeviceType >::getUnderlyingViewSize(), Intrepid2::Data< DataScalar, DeviceType >::rank(), Intrepid2::Data< DataScalar, DeviceType >::storeInPlaceCombination(), and Intrepid2::Data< DataScalar, DeviceType >::underlyingMatchesLogical().
|
inline |
storeInPlaceCombination with compile-time rank – implementation for rank of 7. (Not optimized; expectation is this case will be rarely used.)
Definition at line 781 of file Intrepid2_Data.hpp.
References Intrepid2::Data< DataScalar, DeviceType >::getDataExtent().
|
inline |
Places the result of an in-place combination (e.g., entrywise sum) into this data container.
Definition at line 2172 of file Intrepid2_Data.hpp.
|
inline |
storeInPlaceCombination implementation for rank < 7, with compile-time underlying views and argument interpretation. Intended for internal and expert use.
Definition at line 446 of file Intrepid2_Data.hpp.
Referenced by Intrepid2::Data< DataScalar, DeviceType >::storeInPlaceCombination(), Intrepid2::Data< DataScalar, DeviceType >::storeInPlaceDifference(), Intrepid2::Data< DataScalar, DeviceType >::storeInPlaceProduct(), Intrepid2::Data< DataScalar, DeviceType >::storeInPlaceQuotient(), and Intrepid2::Data< DataScalar, DeviceType >::storeInPlaceSum().
|
inline |
stores the in-place (entrywise) difference, A .- B, into this container.
Definition at line 2243 of file Intrepid2_Data.hpp.
References Intrepid2::Data< DataScalar, DeviceType >::storeInPlaceCombination().
|
inline |
stores the in-place (entrywise) product, A .* B, into this container.
Definition at line 2233 of file Intrepid2_Data.hpp.
References Intrepid2::Data< DataScalar, DeviceType >::storeInPlaceCombination().
|
inline |
stores the in-place (entrywise) quotient, A ./ B, into this container.
Definition at line 2253 of file Intrepid2_Data.hpp.
References Intrepid2::Data< DataScalar, DeviceType >::storeInPlaceCombination().
|
inline |
stores the in-place (entrywise) sum, A .+ B, into this container.
Definition at line 2223 of file Intrepid2_Data.hpp.
References Intrepid2::Data< DataScalar, DeviceType >::storeInPlaceCombination().
|
inline |
Places the result of a matrix-matrix multiply corresponding to the two provided containers into this Data container. This Data container should have been constructed by a call to allocateMatMatResult(), or should match such a container in underlying data extent and variation types.
| A_MatData | [in] - logically (...,D1,D2)-dimensioned container, where D1,D2 correspond to matrix dimensions. |
| transposeA | [in] - if true, A will be transposed prior to being multiplied by B (or B's transpose). |
| B_MatData | [in] - logically (...,D3,D4)-dimensioned container, where D3,D4 correspond to matrix dimensions. |
| transposeB | [in] - if true, B will be transposed prior to the multiplication by A (or A's transpose). |
Definition at line 2331 of file Intrepid2_Data.hpp.
|
inline |
Places the result of a matrix-vector multiply corresponding to the two provided containers into this Data container. This Data container should have been constructed by a call to allocateMatVecResult(), or should match such a container in underlying data extent and variation types.
Definition at line 2263 of file Intrepid2_Data.hpp.
References Intrepid2::Data< DataScalar, DeviceType >::extent_int(), Intrepid2::Data< DataScalar, DeviceType >::getDataExtent(), Intrepid2::Data< DataScalar, DeviceType >::getWritableEntry(), and Intrepid2::Data< DataScalar, DeviceType >::rank().
|
inline |
Returns true if the underlying container has exactly the same rank and extents as the logical container.
Definition at line 2523 of file Intrepid2_Data.hpp.
Referenced by Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::runSpecialized3(), and Intrepid2::Data< DataScalar, DeviceType >::storeInPlaceCombination().
|
private |
Definition at line 219 of file Intrepid2_Data.hpp.
|
private |
Definition at line 215 of file Intrepid2_Data.hpp.
|
private |
Definition at line 205 of file Intrepid2_Data.hpp.
|
private |
Definition at line 206 of file Intrepid2_Data.hpp.
|
private |
Definition at line 207 of file Intrepid2_Data.hpp.
|
private |
Definition at line 208 of file Intrepid2_Data.hpp.
|
private |
Definition at line 209 of file Intrepid2_Data.hpp.
|
private |
Definition at line 210 of file Intrepid2_Data.hpp.
|
private |
Definition at line 211 of file Intrepid2_Data.hpp.
|
private |
Definition at line 204 of file Intrepid2_Data.hpp.
|
private |
Definition at line 212 of file Intrepid2_Data.hpp.
|
private |
Definition at line 217 of file Intrepid2_Data.hpp.
|
private |
Definition at line 220 of file Intrepid2_Data.hpp.
|
private |
Definition at line 222 of file Intrepid2_Data.hpp.
|
private |
Definition at line 218 of file Intrepid2_Data.hpp.
|
private |
Definition at line 214 of file Intrepid2_Data.hpp.
|
private |
Definition at line 213 of file Intrepid2_Data.hpp.
|
private |
Definition at line 229 of file Intrepid2_Data.hpp.