Struct BlockExtractor¶
Defined in File block_extractor.hpp
Struct Documentation¶
-
struct
ripple
::
BlockExtractor
¶ This struct extracts the blocks from a tensor.
Public Types
Defines a valid enable if not a modifier, shared wrapper, or tensor.
- Template Parameters
T
: The type to base the enable on.
Public Static Functions
Extracts the blocks from a tensor.
- Note
This overload is for non tensor types and simply forward the given type.
- Return
An rvalue rerence to the object.
- Parameters
t
: The object to extract the blocks from.
- Template Parameters
T
: The type of the object.
-
template<typename
T
, tensor_enable_t<T> = 0>
autoextract_blocks_if_tensor
(T &t) noexcept -> std::remove_reference_t<decltype(t.blocks_)>&¶ Extracts the blocks from a tensor.
- Note
This overload is for tensor types and returns a reference to the blocks which define the tensor.
- Return
An reference to the tensor blocks.
- Parameters
t
: The tensor object to extract the blocks from.
- Template Parameters
T
: The type of the tensor object.
-
template<typename
T
, ModifierM
, tensor_enable_t<T> = 0>
autoextract_blocks_if_tensor
(const ModificationSpecifier<T, M> &specifier) noexcept¶ Extracts the blocks from a tensor.
- Note
This overload is for tensor types wrapped in a modification specifier and returns a reference to blocks, rewrapped in the specifier.
- Return
A new modification specifier which references the tensor blocks.
- Parameters
specifier
: The modification specifier to extract the blocks from.
- Template Parameters
T
: The type of the tensor object. \tparmam M The type of the modification.
Extracts the blocks from a tensor.
- Note
This overload is for tensor types wrapped in a shared wrapper and returns a reference to blocks, rewrapped in the wrapper. specifier.
- Return
A new shared wrapper which references the tensor blocks.
- Parameters
wrapper
: The shared wrapper to extract the blocks from.
- Template Parameters
T
: The type of the tensor object.
-
template<typename
T
, tensor_enable_t<T> = 0>
autoextract_blocks_if_tensor
(const ExpansionWrapper<T> &wrapper) noexcept¶ Extracts the blocks from a tensor.
- Note
This overload is for tensor types wrapped in a shared wrapper and returns a reference to blocks, rewrapped in the wrapper. specifier.
- Return
A new shared wrapper which references the tensor blocks.
- Parameters
wrapper
: The shared wrapper to extract the blocks from.
- Template Parameters
T
: The type of the tensor object.