TiledArray::detail::transform< T > Struct Template Reference

Documentation

template<typename T>
struct TiledArray::detail::transform< T >

customization point transform functionality to tensor class T, useful for nonintrusive extension of T to be usable as element type T in Tensor<T>

provides transform functionality to class T, useful for nonintrusive extension of a tensor type T to be usable as element type T in Tensor<T>

Template Parameters
Ta tensor type
Note
The default implementation constructs T, then computes it by coiterating over elements of the argument tensors and transforming with the transform Op . This should be specialized for classes like TiledArray::Tensor that already include the appropriate transform constructors already

Definition at line 117 of file kernels.h.

Public Member Functions

template<typename Op , typename Tensor , typename... Tensors>
operator() (Op &&op, Tensor &&tensor, Tensors &&... tensors) const
 
template<typename Op , typename Tensor , typename... Tensors>
void operator() (T &result, Op &&op, Tensor &&tensor, Tensors &&... tensors) const
 
template<typename Op , typename Tensor , typename... Tensors>
operator() (Op &&op, const Permutation &perm, Tensor &&tensor, Tensors &&... tensors) const
 
template<typename Op , typename Tensor , typename... Tensors>
void operator() (T &result, Op &&op, const Permutation &perm, Tensor &&tensor, Tensors &&... tensors) const
 

Member Function Documentation

◆ operator()() [1/4]

template<typename T >
template<typename Op , typename Tensor , typename... Tensors>
T TiledArray::detail::transform< T >::operator() ( Op &&  op,
const Permutation perm,
Tensor &&  tensor,
Tensors &&...  tensors 
) const
inline

Definition at line 148 of file kernels.h.

Here is the call graph for this function:

◆ operator()() [2/4]

template<typename T >
template<typename Op , typename Tensor , typename... Tensors>
T TiledArray::detail::transform< T >::operator() ( Op &&  op,
Tensor &&  tensor,
Tensors &&...  tensors 
) const
inline

creates a result tensor in which element i is obtained by op(tensor[i], tensors[i]...)

Definition at line 121 of file kernels.h.

Here is the call graph for this function:

◆ operator()() [3/4]

template<typename T >
template<typename Op , typename Tensor , typename... Tensors>
void TiledArray::detail::transform< T >::operator() ( T &  result,
Op &&  op,
const Permutation perm,
Tensor &&  tensor,
Tensors &&...  tensors 
) const
inline

Definition at line 164 of file kernels.h.

Here is the call graph for this function:

◆ operator()() [4/4]

template<typename T >
template<typename Op , typename Tensor , typename... Tensors>
void TiledArray::detail::transform< T >::operator() ( T &  result,
Op &&  op,
Tensor &&  tensor,
Tensors &&...  tensors 
) const
inline

an in-place version of above

Note
result must be already allocated

Definition at line 135 of file kernels.h.

Here is the call graph for this function:

The documentation for this struct was generated from the following file: