TiledArray  0.7.0
TiledArray::detail::TensorInterface< T, R > Class Template Reference

Tensor interface for external data. More...

#include <tensor_interface.h>

Public Types

typedef TensorInterface< T, R > TensorInterface_
 This class type. More...
 
typedef R range_type
 Tensor range type. More...
 
typedef range_type::size_type size_type
 size type More...
 
typedef std::remove_const< T >::type value_type
 Array element type. More...
 
typedef std::add_lvalue_reference< T >::type reference
 Element reference type. More...
 
typedef std::add_lvalue_reference< typename std::add_const< T >::type >::type const_reference
 Element reference type. More...
 
typedef std::add_pointer< T >::type pointer
 Element pointer type. More...
 
typedef std::add_pointer< typename std::add_const< T >::type >::type const_pointer
 Element pointer type. More...
 
typedef std::ptrdiff_t difference_type
 Difference type. More...
 
typedef detail::numeric_type< value_type >::type numeric_type
 the numeric type that supports T More...
 
typedef detail::scalar_type< value_type >::type scalar_type
 the scalar type that supports T More...
 
typedef Tensor< T, Eigen::aligned_allocator< T > > result_tensor
 Tensor type used as the return type from arithmetic operations. More...
 

Public Member Functions

 TensorInterface ()=delete
 Compiler generated functions. More...
 
 ~TensorInterface ()=default
 
 TensorInterface (const TensorInterface_ &)=default
 
 TensorInterface (TensorInterface_ &&)=default
 
TensorInterface_operator= (const TensorInterface_ &)=delete
 
TensorInterface_operator= (TensorInterface_ &&)=delete
 
template<typename U , typename std::enable_if< std::is_convertible< typename TensorInterface< U, R >::pointer, pointer >::value >::type * = nullptr>
 TensorInterface (const TensorInterface< U, R > &other)
 Type conversion copy constructor. More...
 
template<typename U , typename std::enable_if< std::is_convertible< typename TensorInterface< U, R >::pointer, pointer >::value >::type * = nullptr>
 TensorInterface (TensorInterface< U, R > &&other)
 Type conversion move constructor. More...
 
 TensorInterface (const range_type &range, pointer data)
 Construct a new view of tensor. More...
 
 TensorInterface (range_type &&range, pointer data)
 Construct a new view of tensor. More...
 
template<typename T1 , typename std::enable_if< detail::is_tensor< T1 >::value >::type * = nullptr>
TensorInterface_operator= (const T1 &other)
 
const range_typerange () const
 Tensor range object accessor. More...
 
size_type size () const
 Tensor dimension size accessor. More...
 
pointer data () const
 Data pointer accessor. More...
 
const_reference operator[] (const size_type index) const
 Element subscript accessor. More...
 
reference operator[] (const size_type index)
 Element subscript accessor. More...
 
template<typename... Index>
reference operator() (const Index &... idx)
 Element accessor. More...
 
template<typename... Index>
const_reference operator() (const Index &... idx) const
 Element accessor. More...
 
constexpr bool empty () const
 Check for empty view. More...
 
void swap (TensorInterface_ &other)
 Swap tensor views. More...
 
template<typename Index >
TensorInterface_shift_to (const Index &bound_shift)
 Shift the lower and upper bound of this tensor. More...
 
template<typename Index >
result_tensor shift (const Index &bound_shift) const
 Shift the lower and upper bound of this range. More...
 
template<typename Right , typename Op , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
result_tensor binary (const Right &right, Op &&op) const
 Use a binary, element wise operation to construct a new tensor. More...
 
template<typename Right , typename Op , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
result_tensor binary (const Right &right, Op &&op, const Permutation &perm) const
 Use a binary, element wise operation to construct a new, permuted tensor. More...
 
template<typename Right , typename Op , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
TensorInterface_inplace_binary (const Right &right, Op &&op)
 Use a binary, element wise operation to modify this tensor. More...
 
template<typename Op >
result_tensor unary (Op &&op) const
 Use a unary, element wise operation to construct a new tensor. More...
 
template<typename Op >
result_tensor unary (Op &&op, const Permutation &perm) const
 Use a unary, element wise operation to construct a new, permuted tensor. More...
 
template<typename Op >
TensorInterface_inplace_unary (Op &&op)
 Use a unary, element wise operation to modify this tensor. More...
 
template<typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
result_tensor scale (const Scalar factor) const
 Construct a scaled copy of this tensor. More...
 
template<typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
result_tensor scale (const Scalar factor, const Permutation &perm) const
 Construct a scaled and permuted copy of this tensor. More...
 
template<typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
TensorInterface_scale_to (const Scalar factor)
 Scale this tensor. More...
 
template<typename Right , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
result_tensor add (const Right &right) const
 Add this and other to construct a new tensors. More...
 
template<typename Right , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
result_tensor add (const Right &right, const Permutation &perm) const
 Add this and other to construct a new, permuted tensor. More...
 
template<typename Right , typename Scalar , typename std::enable_if< is_tensor< Right >::value &&detail::is_numeric< Scalar >::value >::type * = nullptr>
result_tensor add (const Right &right, const Scalar factor) const
 Scale and add this and other to construct a new tensor. More...
 
template<typename Right , typename Scalar , typename std::enable_if< is_tensor< Right >::value &&detail::is_numeric< Scalar >::value >::type * = nullptr>
result_tensor add (const Right &right, const Scalar factor, const Permutation &perm) const
 Scale and add this and other to construct a new, permuted tensor. More...
 
result_tensor add (const numeric_type value) const
 Add a constant to a copy of this tensor. More...
 
result_tensor add (const numeric_type value, const Permutation &perm) const
 Add a constant to a permuted copy of this tensor. More...
 
template<typename Right , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
TensorInterface_add_to (const Right &right)
 Add other to this tensor. More...
 
template<typename Right , typename Scalar , typename std::enable_if< is_tensor< Right >::value &&detail::is_numeric< Scalar >::value >::type * = nullptr>
TensorInterface_add_to (const Right &right, const Scalar factor)
 Add other to this tensor, and scale the result. More...
 
TensorInterface_add_to (const numeric_type value)
 Add a constant to this tensor. More...
 
template<typename Right , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
result_tensor subt (const Right &right) const
 Subtract this and right to construct a new tensor. More...
 
template<typename Right , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
result_tensor subt (const Right &right, const Permutation &perm) const
 Subtract this and right to construct a new, permuted tensor. More...
 
template<typename Right , typename Scalar , typename std::enable_if< is_tensor< Right >::value &&detail::is_numeric< Scalar >::value >::type * = nullptr>
result_tensor subt (const Right &right, const numeric_type factor) const
 Scale and subtract this and right to construct a new tensor. More...
 
template<typename Right , typename Scalar , typename std::enable_if< is_tensor< Right >::value &&detail::is_numeric< Scalar >::value >::type * = nullptr>
result_tensor subt (const Right &right, const Scalar factor, const Permutation &perm) const
 Scale and subtract this and right to construct a new, permuted tensor. More...
 
result_tensor subt (const numeric_type value) const
 Subtract a constant from a copy of this tensor. More...
 
result_tensor subt (const numeric_type value, const Permutation &perm) const
 Subtract a constant from a permuted copy of this tensor. More...
 
template<typename Right , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
TensorInterface_subt_to (const Right &right)
 Subtract right from this tensor. More...
 
template<typename Right , typename Scalar , typename std::enable_if< is_tensor< Right >::value &&detail::is_numeric< Scalar >::value >::type * = nullptr>
TensorInterface_subt_to (const Right &right, const Scalar factor)
 Subtract right from and scale this tensor. More...
 
TensorInterface_subt_to (const numeric_type value)
 Subtract a constant from this tensor. More...
 
template<typename Right , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
result_tensor mult (const Right &right) const
 Multiply this by right to create a new tensor. More...
 
template<typename Right , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
result_tensor mult (const Right &right, const Permutation &perm) const
 Multiply this by right to create a new, permuted tensor. More...
 
template<typename Right , typename Scalar , typename std::enable_if< is_tensor< Right >::value &&detail::is_numeric< Scalar >::value >::type * = nullptr>
result_tensor mult (const Right &right, const Scalar factor) const
 Scale and multiply this by right to create a new tensor. More...
 
template<typename Right , typename Scalar , typename std::enable_if< is_tensor< Right >::value &&detail::is_numeric< Scalar >::value >::type * = nullptr>
result_tensor mult (const Right &right, const Scalar factor, const Permutation &perm) const
 Scale and multiply this by right to create a new, permuted tensor. More...
 
template<typename Right , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
TensorInterface_mult_to (const Right &right)
 Multiply this tensor by right. More...
 
template<typename Right , typename Scalar , typename std::enable_if< is_tensor< Right >::value &&detail::is_numeric< Scalar >::value >::type * = nullptr>
TensorInterface_mult_to (const Right &right, const Scalar factor)
 Scale and multiply this tensor by right. More...
 
result_tensor neg () const
 Create a negated copy of this tensor. More...
 
result_tensor neg (const Permutation &perm) const
 Create a negated and permuted copy of this tensor. More...
 
TensorInterface_neg_to ()
 Negate elements of this tensor. More...
 
result_tensor conj () const
 Create a complex conjugated copy of this tensor. More...
 
template<typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
result_tensor conj (const Scalar factor) const
 Create a complex conjugated and scaled copy of this tensor. More...
 
result_tensor conj (const Permutation &perm) const
 Create a complex conjugated and permuted copy of this tensor. More...
 
template<typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
result_tensor conj (const Scalar factor, const Permutation &perm) const
 Create a complex conjugated, scaled, and permuted copy of this tensor. More...
 
TensorInterface_conj_to ()
 Complex conjugate this tensor. More...
 
template<typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
TensorInterface_conj_to (const Scalar factor)
 Complex conjugate and scale this tensor. More...
 
template<typename ReduceOp , typename JoinOp >
numeric_type reduce (ReduceOp &&reduce_op, JoinOp &&join_op, const numeric_type identity) const
 Unary reduction operation. More...
 
template<typename Right , typename ReduceOp , typename JoinOp , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
numeric_type reduce (const Right &other, ReduceOp &&reduce_op, JoinOp &&join_op, const numeric_type identity) const
 Binary reduction operation. More...
 
numeric_type sum () const
 Sum of elements. More...
 
numeric_type product () const
 Product of elements. More...
 
scalar_type squared_norm () const
 Square of vector 2-norm. More...
 
numeric_type norm () const
 Vector 2-norm. More...
 
numeric_type min () const
 Minimum element. More...
 
numeric_type max () const
 Maximum element. More...
 
numeric_type abs_min () const
 Absolute minimum element. More...
 
numeric_type abs_max () const
 Absolute maximum element. More...
 
template<typename Right , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
numeric_type dot (const Right &other) const
 Vector dot product. More...
 

Friends

template<typename , typename >
class TensorInterface
 
template<typename U , typename Index >
void TiledArray::remap (detail::TensorInterface< U, Range > &, U *const, const Index &, const Index &)
 
template<typename U , typename Index >
void TiledArray::remap (detail::TensorInterface< const U, Range > &, U *const, const Index &, const Index &)
 
template<typename U >
void TiledArray::remap (detail::TensorInterface< U, Range > &, U *const, const std::initializer_list< std::size_t > &, const std::initializer_list< std::size_t > &)
 
template<typename U >
void TiledArray::remap (detail::TensorInterface< const U, Range > &, U *const, const std::initializer_list< std::size_t > &, const std::initializer_list< std::size_t > &)
 

Detailed Description

template<typename T, typename R>
class TiledArray::detail::TensorInterface< T, R >

Tensor interface for external data.

This class allows users to construct a tensor object using data from an external source. TensorInterface objects can be used with each other and Tensor objects in any of the arithmetic operations.

Warning
No ownership of the data pointer used to construct TensorInterface objects. Therefore, it is the user's responsibility to manage the lifetime of the data.
This is not appropriate for use as a tile object as it does not own the data it references. Use Tensor for that purpose.
Template Parameters
TThe tensor value type
RThe range type

Definition at line 47 of file tensor_interface.h.

Member Typedef Documentation

◆ const_pointer

template<typename T, typename R>
typedef std::add_pointer<typename std::add_const<T>::type>::type TiledArray::detail::TensorInterface< T, R >::const_pointer

Element pointer type.

Definition at line 93 of file tensor_interface.h.

◆ const_reference

template<typename T, typename R>
typedef std::add_lvalue_reference<typename std::add_const<T>::type>::type TiledArray::detail::TensorInterface< T, R >::const_reference

Element reference type.

Definition at line 89 of file tensor_interface.h.

◆ difference_type

template<typename T, typename R>
typedef std::ptrdiff_t TiledArray::detail::TensorInterface< T, R >::difference_type

Difference type.

Definition at line 94 of file tensor_interface.h.

◆ numeric_type

template<typename T, typename R>
typedef detail::numeric_type<value_type>::type TiledArray::detail::TensorInterface< T, R >::numeric_type

the numeric type that supports T

Definition at line 96 of file tensor_interface.h.

◆ pointer

template<typename T, typename R>
typedef std::add_pointer<T>::type TiledArray::detail::TensorInterface< T, R >::pointer

Element pointer type.

Definition at line 91 of file tensor_interface.h.

◆ range_type

template<typename T, typename R>
typedef R TiledArray::detail::TensorInterface< T, R >::range_type

Tensor range type.

Definition at line 82 of file tensor_interface.h.

◆ reference

template<typename T, typename R>
typedef std::add_lvalue_reference<T>::type TiledArray::detail::TensorInterface< T, R >::reference

Element reference type.

Definition at line 87 of file tensor_interface.h.

◆ result_tensor

template<typename T, typename R>
typedef Tensor<T, Eigen::aligned_allocator<T> > TiledArray::detail::TensorInterface< T, R >::result_tensor

Tensor type used as the return type from arithmetic operations.

Definition at line 100 of file tensor_interface.h.

◆ scalar_type

template<typename T, typename R>
typedef detail::scalar_type<value_type>::type TiledArray::detail::TensorInterface< T, R >::scalar_type

the scalar type that supports T

Definition at line 98 of file tensor_interface.h.

◆ size_type

template<typename T, typename R>
typedef range_type::size_type TiledArray::detail::TensorInterface< T, R >::size_type

size type

Definition at line 83 of file tensor_interface.h.

◆ TensorInterface_

template<typename T, typename R>
typedef TensorInterface<T, R> TiledArray::detail::TensorInterface< T, R >::TensorInterface_

This class type.

Definition at line 81 of file tensor_interface.h.

◆ value_type

template<typename T, typename R>
typedef std::remove_const<T>::type TiledArray::detail::TensorInterface< T, R >::value_type

Array element type.

Definition at line 85 of file tensor_interface.h.

Constructor & Destructor Documentation

◆ TensorInterface() [1/7]

template<typename T, typename R>
TiledArray::detail::TensorInterface< T, R >::TensorInterface ( )
delete

Compiler generated functions.

◆ ~TensorInterface()

template<typename T, typename R>
TiledArray::detail::TensorInterface< T, R >::~TensorInterface ( )
default

◆ TensorInterface() [2/7]

template<typename T, typename R>
TiledArray::detail::TensorInterface< T, R >::TensorInterface ( const TensorInterface_ )
default

◆ TensorInterface() [3/7]

template<typename T, typename R>
TiledArray::detail::TensorInterface< T, R >::TensorInterface ( TensorInterface_ &&  )
default

◆ TensorInterface() [4/7]

template<typename T, typename R>
template<typename U , typename std::enable_if< std::is_convertible< typename TensorInterface< U, R >::pointer, pointer >::value >::type * = nullptr>
TiledArray::detail::TensorInterface< T, R >::TensorInterface ( const TensorInterface< U, R > &  other)
inline

Type conversion copy constructor.

Template Parameters
UThe value type of the other view
Parameters
otherThe other tensor view to be copied

Definition at line 152 of file tensor_interface.h.

◆ TensorInterface() [5/7]

template<typename T, typename R>
template<typename U , typename std::enable_if< std::is_convertible< typename TensorInterface< U, R >::pointer, pointer >::value >::type * = nullptr>
TiledArray::detail::TensorInterface< T, R >::TensorInterface ( TensorInterface< U, R > &&  other)
inline

Type conversion move constructor.

Template Parameters
UThe value type of the other tensor view
Parameters
otherThe other tensor view to be moved

Definition at line 164 of file tensor_interface.h.

◆ TensorInterface() [6/7]

template<typename T, typename R>
TiledArray::detail::TensorInterface< T, R >::TensorInterface ( const range_type range,
pointer  data 
)
inline

Construct a new view of tensor.

Parameters
rangeThe range of this tensor
dataThe data pointer for this tensor

Definition at line 174 of file tensor_interface.h.

Here is the call graph for this function:

◆ TensorInterface() [7/7]

template<typename T, typename R>
TiledArray::detail::TensorInterface< T, R >::TensorInterface ( range_type &&  range,
pointer  data 
)
inline

Construct a new view of tensor.

Parameters
rangeThe range of this tensor
dataThe data pointer for this tensor

Definition at line 184 of file tensor_interface.h.

Here is the call graph for this function:

Member Function Documentation

◆ abs_max()

template<typename T, typename R>
numeric_type TiledArray::detail::TensorInterface< T, R >::abs_max ( ) const
inline

Absolute maximum element.

Returns
The maximum elements of this tensor

Definition at line 962 of file tensor_interface.h.

Here is the call graph for this function:

◆ abs_min()

template<typename T, typename R>
numeric_type TiledArray::detail::TensorInterface< T, R >::abs_min ( ) const
inline

Absolute minimum element.

Returns
The minimum elements of this tensor

Definition at line 951 of file tensor_interface.h.

Here is the call graph for this function:

◆ add() [1/6]

template<typename T, typename R>
template<typename Right , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
result_tensor TiledArray::detail::TensorInterface< T, R >::add ( const Right &  right) const
inline

Add this and other to construct a new tensors.

Template Parameters
RightThe right-hand tensor type
Parameters
rightThe tensor that will be added to this tensor
Returns
A new tensor where the elements are the sum of the elements of this and other

Definition at line 431 of file tensor_interface.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add() [2/6]

template<typename T, typename R>
template<typename Right , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
result_tensor TiledArray::detail::TensorInterface< T, R >::add ( const Right &  right,
const Permutation perm 
) const
inline

Add this and other to construct a new, permuted tensor.

Template Parameters
RightThe right-hand tensor type
Parameters
rightThe tensor that will be added to this tensor
permThe permutation to be applied to this tensor
Returns
A new tensor where the elements are the sum of the elements of this and other

Definition at line 446 of file tensor_interface.h.

Here is the call graph for this function:

◆ add() [3/6]

template<typename T, typename R>
template<typename Right , typename Scalar , typename std::enable_if< is_tensor< Right >::value &&detail::is_numeric< Scalar >::value >::type * = nullptr>
result_tensor TiledArray::detail::TensorInterface< T, R >::add ( const Right &  right,
const Scalar  factor 
) const
inline

Scale and add this and other to construct a new tensor.

Template Parameters
RightThe right-hand tensor type
ScalarA scalar type
Parameters
rightThe tensor that will be added to this tensor
factorThe scaling factor
Returns
A new tensor where the elements are the sum of the elements of this and other, scaled by factor

Definition at line 463 of file tensor_interface.h.

Here is the call graph for this function:

◆ add() [4/6]

template<typename T, typename R>
template<typename Right , typename Scalar , typename std::enable_if< is_tensor< Right >::value &&detail::is_numeric< Scalar >::value >::type * = nullptr>
result_tensor TiledArray::detail::TensorInterface< T, R >::add ( const Right &  right,
const Scalar  factor,
const Permutation perm 
) const
inline

Scale and add this and other to construct a new, permuted tensor.

Template Parameters
RightThe right-hand tensor type
ScalarA scalar type
Parameters
rightThe tensor that will be added to this tensor
factorThe scaling factor
permThe permutation to be applied to this tensor
Returns
A new tensor where the elements are the sum of the elements of this and other, scaled by factor

Definition at line 481 of file tensor_interface.h.

Here is the call graph for this function:

◆ add() [5/6]

template<typename T, typename R>
result_tensor TiledArray::detail::TensorInterface< T, R >::add ( const numeric_type  value) const
inline

Add a constant to a copy of this tensor.

Parameters
valueThe constant to be added to this tensor
Returns
A new tensor where the elements are the sum of the elements of this and value

Definition at line 494 of file tensor_interface.h.

Here is the call graph for this function:

◆ add() [6/6]

template<typename T, typename R>
result_tensor TiledArray::detail::TensorInterface< T, R >::add ( const numeric_type  value,
const Permutation perm 
) const
inline

Add a constant to a permuted copy of this tensor.

Parameters
valueThe constant to be added to this tensor
permThe permutation to be applied to this tensor
Returns
A new tensor where the elements are the sum of the elements of this and value

Definition at line 505 of file tensor_interface.h.

Here is the call graph for this function:

◆ add_to() [1/3]

template<typename T, typename R>
template<typename Right , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
TensorInterface_& TiledArray::detail::TensorInterface< T, R >::add_to ( const Right &  right)
inline

Add other to this tensor.

Template Parameters
RightThe right-hand tensor type
Parameters
rightThe tensor that will be added to this tensor
Returns
A reference to this tensor

Definition at line 517 of file tensor_interface.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_to() [2/3]

template<typename T, typename R>
template<typename Right , typename Scalar , typename std::enable_if< is_tensor< Right >::value &&detail::is_numeric< Scalar >::value >::type * = nullptr>
TensorInterface_& TiledArray::detail::TensorInterface< T, R >::add_to ( const Right &  right,
const Scalar  factor 
)
inline

Add other to this tensor, and scale the result.

Template Parameters
RightThe right-hand tensor type
ScalarA scalar type
Parameters
rightThe tensor that will be added to this tensor
factorThe scaling factor
Returns
A reference to this tensor

Definition at line 533 of file tensor_interface.h.

Here is the call graph for this function:

◆ add_to() [3/3]

template<typename T, typename R>
TensorInterface_& TiledArray::detail::TensorInterface< T, R >::add_to ( const numeric_type  value)
inline

Add a constant to this tensor.

Parameters
valueThe constant to be added
Returns
A reference to this tensor

Definition at line 543 of file tensor_interface.h.

Here is the call graph for this function:

◆ binary() [1/2]

template<typename T, typename R>
template<typename Right , typename Op , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
result_tensor TiledArray::detail::TensorInterface< T, R >::binary ( const Right &  right,
Op &&  op 
) const
inline

Use a binary, element wise operation to construct a new tensor.

Template Parameters
RightThe right-hand tensor type
OpThe binary operation type
Parameters
rightThe right-hand argument in the binary operation
opThe binary, element-wise operation
Returns
A tensor where element i of the new tensor is equal to op(*this[i],other[i])

Definition at line 304 of file tensor_interface.h.

Here is the caller graph for this function:

◆ binary() [2/2]

template<typename T, typename R>
template<typename Right , typename Op , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
result_tensor TiledArray::detail::TensorInterface< T, R >::binary ( const Right &  right,
Op &&  op,
const Permutation perm 
) const
inline

Use a binary, element wise operation to construct a new, permuted tensor.

Template Parameters
RightThe right-hand tensor type
OpThe binary operation type
Parameters
rightThe right-hand argument in the binary operation
opThe binary, element-wise operation
permThe permutation to be applied to this tensor
Returns
A tensor where element i of the new tensor is equal to op(*this[i],other[i])

Definition at line 319 of file tensor_interface.h.

◆ conj() [1/4]

template<typename T, typename R>
result_tensor TiledArray::detail::TensorInterface< T, R >::conj ( ) const
inline

Create a complex conjugated copy of this tensor.

Returns
A copy of this tensor that contains the complex conjugate the values

Definition at line 796 of file tensor_interface.h.

Here is the call graph for this function:

◆ conj() [2/4]

template<typename T, typename R>
template<typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
result_tensor TiledArray::detail::TensorInterface< T, R >::conj ( const Scalar  factor) const
inline

Create a complex conjugated and scaled copy of this tensor.

Template Parameters
ScalarA scalar type
Parameters
factorThe scaling factor
Returns
A copy of this tensor that contains the scaled complex conjugate the values

Definition at line 806 of file tensor_interface.h.

Here is the call graph for this function:

◆ conj() [3/4]

template<typename T, typename R>
result_tensor TiledArray::detail::TensorInterface< T, R >::conj ( const Permutation perm) const
inline

Create a complex conjugated and permuted copy of this tensor.

Parameters
permThe permutation to be applied to this tensor
Returns
A permuted copy of this tensor that contains the complex conjugate values

Definition at line 815 of file tensor_interface.h.

Here is the call graph for this function:

◆ conj() [4/4]

template<typename T, typename R>
template<typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
result_tensor TiledArray::detail::TensorInterface< T, R >::conj ( const Scalar  factor,
const Permutation perm 
) const
inline

Create a complex conjugated, scaled, and permuted copy of this tensor.

Template Parameters
ScalarA scalar type
Parameters
factorThe scaling factor
permThe permutation to be applied to this tensor
Returns
A permuted copy of this tensor that contains the complex conjugate values

Definition at line 828 of file tensor_interface.h.

Here is the call graph for this function:

◆ conj_to() [1/2]

template<typename T, typename R>
TensorInterface_& TiledArray::detail::TensorInterface< T, R >::conj_to ( )
inline

Complex conjugate this tensor.

Returns
A reference to this tensor

Definition at line 835 of file tensor_interface.h.

Here is the call graph for this function:

◆ conj_to() [2/2]

template<typename T, typename R>
template<typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
TensorInterface_& TiledArray::detail::TensorInterface< T, R >::conj_to ( const Scalar  factor)
inline

Complex conjugate and scale this tensor.

Template Parameters
ScalarA scalar type
Parameters
factorThe scaling factor
Returns
A reference to this tensor

Definition at line 846 of file tensor_interface.h.

Here is the call graph for this function:

◆ data()

template<typename T, typename R>
pointer TiledArray::detail::TensorInterface< T, R >::data ( ) const
inline

Data pointer accessor.

Returns
The data pointer of the parent tensor

Definition at line 216 of file tensor_interface.h.

Here is the caller graph for this function:

◆ dot()

template<typename T, typename R>
template<typename Right , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
numeric_type TiledArray::detail::TensorInterface< T, R >::dot ( const Right &  other) const
inline

Vector dot product.

Template Parameters
RightThe right-hand tensor type
Parameters
otherThe right-hand tensor to be reduced
Returns
The inner product of the this and other

Definition at line 977 of file tensor_interface.h.

Here is the call graph for this function:

◆ empty()

template<typename T, typename R>
constexpr bool TiledArray::detail::TensorInterface< T, R >::empty ( ) const
inline

Check for empty view.

Returns
false

Definition at line 260 of file tensor_interface.h.

◆ inplace_binary()

template<typename T, typename R>
template<typename Right , typename Op , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
TensorInterface_& TiledArray::detail::TensorInterface< T, R >::inplace_binary ( const Right &  right,
Op &&  op 
)
inline

Use a binary, element wise operation to modify this tensor.

Template Parameters
RightThe right-hand tensor type
OpThe binary operation type
Parameters
rightThe right-hand argument in the binary operation
opThe binary, element-wise operation
Returns
A reference to this object
Exceptions
TiledArray::ExceptionWhen this tensor is empty.
TiledArray::ExceptionWhen other is empty.
TiledArray::ExceptionWhen the range of this tensor is not equal to the range of other.
TiledArray::ExceptionWhen this and other are the same.

Definition at line 337 of file tensor_interface.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ inplace_unary()

template<typename T, typename R>
template<typename Op >
TensorInterface_& TiledArray::detail::TensorInterface< T, R >::inplace_unary ( Op &&  op)
inline

Use a unary, element wise operation to modify this tensor.

Template Parameters
OpThe unary operation type
Parameters
opThe unary, element-wise operation
Returns
A reference to this object
Exceptions
TiledArray::ExceptionWhen this tensor is empty.

Definition at line 375 of file tensor_interface.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ max()

template<typename T, typename R>
numeric_type TiledArray::detail::TensorInterface< T, R >::max ( ) const
inline

Maximum element.

Returns
The maximum elements of this tensor

Definition at line 942 of file tensor_interface.h.

Here is the call graph for this function:

◆ min()

template<typename T, typename R>
numeric_type TiledArray::detail::TensorInterface< T, R >::min ( ) const
inline

Minimum element.

Returns
The minimum elements of this tensor

Definition at line 933 of file tensor_interface.h.

Here is the call graph for this function:

◆ mult() [1/4]

template<typename T, typename R>
template<typename Right , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
result_tensor TiledArray::detail::TensorInterface< T, R >::mult ( const Right &  right) const
inline

Multiply this by right to create a new tensor.

Template Parameters
RightThe right-hand tensor type
Parameters
rightThe tensor that will be multiplied by this tensor
Returns
A new tensor where the elements are the product of the elements of this and right

Definition at line 679 of file tensor_interface.h.

Here is the call graph for this function:

◆ mult() [2/4]

template<typename T, typename R>
template<typename Right , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
result_tensor TiledArray::detail::TensorInterface< T, R >::mult ( const Right &  right,
const Permutation perm 
) const
inline

Multiply this by right to create a new, permuted tensor.

Template Parameters
RightThe right-hand tensor type
Parameters
rightThe tensor that will be multiplied by this tensor
permThe permutation to be applied to this tensor
Returns
A new tensor where the elements are the product of the elements of this and right

Definition at line 694 of file tensor_interface.h.

Here is the call graph for this function:

◆ mult() [3/4]

template<typename T, typename R>
template<typename Right , typename Scalar , typename std::enable_if< is_tensor< Right >::value &&detail::is_numeric< Scalar >::value >::type * = nullptr>
result_tensor TiledArray::detail::TensorInterface< T, R >::mult ( const Right &  right,
const Scalar  factor 
) const
inline

Scale and multiply this by right to create a new tensor.

Template Parameters
RightThe right-hand tensor type
ScalarA scalar type
Parameters
rightThe tensor that will be multiplied by this tensor
factorThe scaling factor
Returns
A new tensor where the elements are the product of the elements of this and right, scaled by factor

Definition at line 711 of file tensor_interface.h.

Here is the call graph for this function:

◆ mult() [4/4]

template<typename T, typename R>
template<typename Right , typename Scalar , typename std::enable_if< is_tensor< Right >::value &&detail::is_numeric< Scalar >::value >::type * = nullptr>
result_tensor TiledArray::detail::TensorInterface< T, R >::mult ( const Right &  right,
const Scalar  factor,
const Permutation perm 
) const
inline

Scale and multiply this by right to create a new, permuted tensor.

Template Parameters
RightThe right-hand tensor type
ScalarA scalar type
Parameters
rightThe tensor that will be multiplied by this tensor
factorThe scaling factor
permThe permutation to be applied to this tensor
Returns
A new tensor where the elements are the product of the elements of this and right, scaled by factor

Definition at line 729 of file tensor_interface.h.

Here is the call graph for this function:

◆ mult_to() [1/2]

template<typename T, typename R>
template<typename Right , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
TensorInterface_& TiledArray::detail::TensorInterface< T, R >::mult_to ( const Right &  right)
inline

Multiply this tensor by right.

Template Parameters
RightThe right-hand tensor type
Parameters
rightThe tensor that will be multiplied by this tensor
Returns
A reference to this tensor

Definition at line 744 of file tensor_interface.h.

Here is the call graph for this function:

◆ mult_to() [2/2]

template<typename T, typename R>
template<typename Right , typename Scalar , typename std::enable_if< is_tensor< Right >::value &&detail::is_numeric< Scalar >::value >::type * = nullptr>
TensorInterface_& TiledArray::detail::TensorInterface< T, R >::mult_to ( const Right &  right,
const Scalar  factor 
)
inline

Scale and multiply this tensor by right.

Template Parameters
RightThe right-hand tensor type
ScalarA scalar type
Parameters
rightThe tensor that will be multiplied by this tensor
factorThe scaling factor
Returns
A reference to this tensor

Definition at line 760 of file tensor_interface.h.

Here is the call graph for this function:

◆ neg() [1/2]

template<typename T, typename R>
result_tensor TiledArray::detail::TensorInterface< T, R >::neg ( ) const
inline

Create a negated copy of this tensor.

Returns
A new tensor that contains the negative values of this tensor

Definition at line 771 of file tensor_interface.h.

Here is the call graph for this function:

◆ neg() [2/2]

template<typename T, typename R>
result_tensor TiledArray::detail::TensorInterface< T, R >::neg ( const Permutation perm) const
inline

Create a negated and permuted copy of this tensor.

Parameters
permThe permutation to be applied to this tensor
Returns
A new tensor that contains the negative values of this tensor

Definition at line 779 of file tensor_interface.h.

Here is the call graph for this function:

◆ neg_to()

template<typename T, typename R>
TensorInterface_& TiledArray::detail::TensorInterface< T, R >::neg_to ( )
inline

Negate elements of this tensor.

Returns
A reference to this tensor

Definition at line 787 of file tensor_interface.h.

Here is the call graph for this function:

◆ norm()

template<typename T, typename R>
numeric_type TiledArray::detail::TensorInterface< T, R >::norm ( ) const
inline

Vector 2-norm.

Returns
The vector norm of this tensor

Definition at line 926 of file tensor_interface.h.

Here is the call graph for this function:

◆ operator()() [1/2]

template<typename T, typename R>
template<typename... Index>
reference TiledArray::detail::TensorInterface< T, R >::operator() ( const Index &...  idx)
inline

Element accessor.

Template Parameters
IndexAn integral type pack or a single coodinate index type
Parameters
idxThe index pack

Definition at line 242 of file tensor_interface.h.

◆ operator()() [2/2]

template<typename T, typename R>
template<typename... Index>
const_reference TiledArray::detail::TensorInterface< T, R >::operator() ( const Index &...  idx) const
inline

Element accessor.

Template Parameters
IndexAn integral type pack or a single coodinate index type
Parameters
idxThe index pack

Definition at line 252 of file tensor_interface.h.

◆ operator=() [1/3]

template<typename T, typename R>
TensorInterface_& TiledArray::detail::TensorInterface< T, R >::operator= ( const TensorInterface_ )
delete

◆ operator=() [2/3]

template<typename T, typename R>
TensorInterface_& TiledArray::detail::TensorInterface< T, R >::operator= ( TensorInterface_ &&  )
delete

◆ operator=() [3/3]

template<typename T, typename R>
template<typename T1 , typename std::enable_if< detail::is_tensor< T1 >::value >::type * = nullptr>
TensorInterface_& TiledArray::detail::TensorInterface< T, R >::operator= ( const T1 &  other)
inline

Definition at line 192 of file tensor_interface.h.

Here is the call graph for this function:

◆ operator[]() [1/2]

template<typename T, typename R>
const_reference TiledArray::detail::TensorInterface< T, R >::operator[] ( const size_type  index) const
inline

Element subscript accessor.

Parameters
indexThe ordinal element index
Returns
A const reference to the element at index.

Definition at line 222 of file tensor_interface.h.

◆ operator[]() [2/2]

template<typename T, typename R>
reference TiledArray::detail::TensorInterface< T, R >::operator[] ( const size_type  index)
inline

Element subscript accessor.

Parameters
indexThe ordinal element index
Returns
A const reference to the element at index.

Definition at line 231 of file tensor_interface.h.

◆ product()

template<typename T, typename R>
numeric_type TiledArray::detail::TensorInterface< T, R >::product ( ) const
inline

Product of elements.

Returns
The product of all elements of this tensor

Definition at line 906 of file tensor_interface.h.

Here is the call graph for this function:

◆ range()

template<typename T, typename R>
const range_type& TiledArray::detail::TensorInterface< T, R >::range ( ) const
inline

Tensor range object accessor.

Returns
The tensor range object

Definition at line 205 of file tensor_interface.h.

Here is the caller graph for this function:

◆ reduce() [1/2]

template<typename T, typename R>
template<typename ReduceOp , typename JoinOp >
numeric_type TiledArray::detail::TensorInterface< T, R >::reduce ( ReduceOp &&  reduce_op,
JoinOp &&  join_op,
const numeric_type  identity 
) const
inline

Unary reduction operation.

Perform an element-wise reduction of the data by executing join_op(result, reduce_op(*this[i])) for each i in the index range of this . result is initialized to identity . If HAVE_INTEL_TBB is defined, and this is a contiguous tensor, the reduction will be executed in an undefined order, otherwise will execute in the order of increasing i .

Template Parameters
ReduceOpThe reduction operation type
JoinOpThe join operation type
Parameters
reduce_opThe element-wise reduction operation
join_opThe join result operation
identityThe identity value of the reduction
Returns
The reduced value

Definition at line 865 of file tensor_interface.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reduce() [2/2]

template<typename T, typename R>
template<typename Right , typename ReduceOp , typename JoinOp , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
numeric_type TiledArray::detail::TensorInterface< T, R >::reduce ( const Right &  other,
ReduceOp &&  reduce_op,
JoinOp &&  join_op,
const numeric_type  identity 
) const
inline

Binary reduction operation.

Perform an element-wise binary reduction of the data of this and other by executing join_op(result, reduce_op(*this[i], other[i])) for each i in the index range of this . result is initialized to identity . If HAVE_INTEL_TBB is defined, and this is a contiguous tensor, the reduction will be executed in an undefined order, otherwise will execute in the order of increasing i .

Template Parameters
RightThe right-hand argument tensor type
ReduceOpThe reduction operation type
JoinOpThe join operation type
Parameters
otherThe right-hand argument of the binary reduction
reduce_opThe element-wise reduction operation
join_opThe join result operation
identityThe identity value of the reduction
Returns
The reduced value

Definition at line 888 of file tensor_interface.h.

Here is the call graph for this function:

◆ scale() [1/2]

template<typename T, typename R>
template<typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
result_tensor TiledArray::detail::TensorInterface< T, R >::scale ( const Scalar  factor) const
inline

Construct a scaled copy of this tensor.

Template Parameters
ScalarA scalar type
Parameters
factorThe scaling factor
Returns
A new tensor where the elements of this tensor are scaled by factor

Definition at line 390 of file tensor_interface.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scale() [2/2]

template<typename T, typename R>
template<typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
result_tensor TiledArray::detail::TensorInterface< T, R >::scale ( const Scalar  factor,
const Permutation perm 
) const
inline

Construct a scaled and permuted copy of this tensor.

Template Parameters
ScalarA scalar type
Parameters
factorThe scaling factor
permThe permutation to be applied to this tensor
Returns
A new tensor where the elements of this tensor are scaled by factor and permuted

Definition at line 404 of file tensor_interface.h.

Here is the call graph for this function:

◆ scale_to()

template<typename T, typename R>
template<typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
TensorInterface_& TiledArray::detail::TensorInterface< T, R >::scale_to ( const Scalar  factor)
inline

Scale this tensor.

Template Parameters
ScalarA scalar type
Parameters
factorThe scaling factor
Returns
A reference to this tensor

Definition at line 416 of file tensor_interface.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shift()

template<typename T, typename R>
template<typename Index >
result_tensor TiledArray::detail::TensorInterface< T, R >::shift ( const Index &  bound_shift) const
inline

Shift the lower and upper bound of this range.

Template Parameters
IndexThe shift array type
Parameters
bound_shiftThe shift to be applied to the tensor range
Returns
A shifted copy of this tensor

Definition at line 288 of file tensor_interface.h.

◆ shift_to()

template<typename T, typename R>
template<typename Index >
TensorInterface_& TiledArray::detail::TensorInterface< T, R >::shift_to ( const Index &  bound_shift)
inline

Shift the lower and upper bound of this tensor.

Template Parameters
IndexThe shift array type
Parameters
bound_shiftThe shift to be applied to the tensor range
Returns
A reference to this tensor

Definition at line 277 of file tensor_interface.h.

◆ size()

template<typename T, typename R>
size_type TiledArray::detail::TensorInterface< T, R >::size ( ) const
inline

Tensor dimension size accessor.

Returns
The number of elements in the tensor

Definition at line 210 of file tensor_interface.h.

◆ squared_norm()

template<typename T, typename R>
scalar_type TiledArray::detail::TensorInterface< T, R >::squared_norm ( ) const
inline

Square of vector 2-norm.

Returns
The vector norm of this tensor

Definition at line 915 of file tensor_interface.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ subt() [1/6]

template<typename T, typename R>
template<typename Right , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
result_tensor TiledArray::detail::TensorInterface< T, R >::subt ( const Right &  right) const
inline

Subtract this and right to construct a new tensor.

Template Parameters
RightThe right-hand tensor type
Parameters
rightThe tensor that will be subtracted from this tensor
Returns
A new tensor where the elements are the different between the elements of this and right

Definition at line 557 of file tensor_interface.h.

Here is the call graph for this function:

◆ subt() [2/6]

template<typename T, typename R>
template<typename Right , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
result_tensor TiledArray::detail::TensorInterface< T, R >::subt ( const Right &  right,
const Permutation perm 
) const
inline

Subtract this and right to construct a new, permuted tensor.

Template Parameters
RightThe right-hand tensor type
Parameters
rightThe tensor that will be subtracted from this tensor
permThe permutation to be applied to this tensor
Returns
A new tensor where the elements are the different between the elements of this and right

Definition at line 572 of file tensor_interface.h.

Here is the call graph for this function:

◆ subt() [3/6]

template<typename T, typename R>
template<typename Right , typename Scalar , typename std::enable_if< is_tensor< Right >::value &&detail::is_numeric< Scalar >::value >::type * = nullptr>
result_tensor TiledArray::detail::TensorInterface< T, R >::subt ( const Right &  right,
const numeric_type  factor 
) const
inline

Scale and subtract this and right to construct a new tensor.

Template Parameters
RightThe right-hand tensor type
ScalarA scalar type
Parameters
rightThe tensor that will be subtracted from this tensor
factorThe scaling factor
Returns
A new tensor where the elements are the different between the elements of this and right, scaled by factor

Definition at line 589 of file tensor_interface.h.

Here is the call graph for this function:

◆ subt() [4/6]

template<typename T, typename R>
template<typename Right , typename Scalar , typename std::enable_if< is_tensor< Right >::value &&detail::is_numeric< Scalar >::value >::type * = nullptr>
result_tensor TiledArray::detail::TensorInterface< T, R >::subt ( const Right &  right,
const Scalar  factor,
const Permutation perm 
) const
inline

Scale and subtract this and right to construct a new, permuted tensor.

Template Parameters
RightThe right-hand tensor type
ScalarA scalar type
Parameters
rightThe tensor that will be subtracted from this tensor
factorThe scaling factor
permThe permutation to be applied to this tensor
Returns
A new tensor where the elements are the different between the elements of this and right, scaled by factor

Definition at line 607 of file tensor_interface.h.

Here is the call graph for this function:

◆ subt() [5/6]

template<typename T, typename R>
result_tensor TiledArray::detail::TensorInterface< T, R >::subt ( const numeric_type  value) const
inline

Subtract a constant from a copy of this tensor.

Returns
A new tensor where the elements are the different between the elements of this and value

Definition at line 619 of file tensor_interface.h.

Here is the call graph for this function:

◆ subt() [6/6]

template<typename T, typename R>
result_tensor TiledArray::detail::TensorInterface< T, R >::subt ( const numeric_type  value,
const Permutation perm 
) const
inline

Subtract a constant from a permuted copy of this tensor.

Parameters
valueThe constant to be subtracted
permThe permutation to be applied to this tensor
Returns
A new tensor where the elements are the different between the elements of this and value

Definition at line 629 of file tensor_interface.h.

Here is the call graph for this function:

◆ subt_to() [1/3]

template<typename T, typename R>
template<typename Right , typename std::enable_if< is_tensor< Right >::value >::type * = nullptr>
TensorInterface_& TiledArray::detail::TensorInterface< T, R >::subt_to ( const Right &  right)
inline

Subtract right from this tensor.

Template Parameters
RightThe right-hand tensor type
Parameters
rightThe tensor that will be subtracted from this tensor
Returns
A reference to this tensor

Definition at line 640 of file tensor_interface.h.

Here is the call graph for this function:

◆ subt_to() [2/3]

template<typename T, typename R>
template<typename Right , typename Scalar , typename std::enable_if< is_tensor< Right >::value &&detail::is_numeric< Scalar >::value >::type * = nullptr>
TensorInterface_& TiledArray::detail::TensorInterface< T, R >::subt_to ( const Right &  right,
const Scalar  factor 
)
inline

Subtract right from and scale this tensor.

Template Parameters
RightThe right-hand tensor type
ScalarA scalar type
Parameters
rightThe tensor that will be subtracted from this tensor
factorThe scaling factor
Returns
A reference to this tensor

Definition at line 656 of file tensor_interface.h.

Here is the call graph for this function:

◆ subt_to() [3/3]

template<typename T, typename R>
TensorInterface_& TiledArray::detail::TensorInterface< T, R >::subt_to ( const numeric_type  value)
inline

Subtract a constant from this tensor.

Returns
A reference to this tensor

Definition at line 665 of file tensor_interface.h.

Here is the call graph for this function:

◆ sum()

template<typename T, typename R>
numeric_type TiledArray::detail::TensorInterface< T, R >::sum ( ) const
inline

Sum of elements.

Returns
The sum of all elements of this tensor

Definition at line 897 of file tensor_interface.h.

Here is the call graph for this function:

◆ swap()

template<typename T, typename R>
void TiledArray::detail::TensorInterface< T, R >::swap ( TensorInterface_ other)
inline

Swap tensor views.

Parameters
otherThe view to be swapped

Definition at line 265 of file tensor_interface.h.

Here is the call graph for this function:

◆ unary() [1/2]

template<typename T, typename R>
template<typename Op >
result_tensor TiledArray::detail::TensorInterface< T, R >::unary ( Op &&  op) const
inline

Use a unary, element wise operation to construct a new tensor.

Template Parameters
OpThe unary operation type
Parameters
opThe unary, element-wise operation
Returns
A tensor where element i of the new tensor is equal to op(*this[i])
Exceptions
TiledArray::ExceptionWhen this tensor is empty.

Definition at line 350 of file tensor_interface.h.

Here is the caller graph for this function:

◆ unary() [2/2]

template<typename T, typename R>
template<typename Op >
result_tensor TiledArray::detail::TensorInterface< T, R >::unary ( Op &&  op,
const Permutation perm 
) const
inline

Use a unary, element wise operation to construct a new, permuted tensor.

Template Parameters
OpThe unary operation type
Parameters
opThe unary operation
permThe permutation to be applied to this tensor
Returns
A permuted tensor with elements that have been modified by op
Exceptions
TiledArray::ExceptionWhen this tensor is empty.
TiledArray::ExceptionThe dimension of perm does not match that of this tensor.

Definition at line 364 of file tensor_interface.h.

Friends And Related Function Documentation

◆ TensorInterface

template<typename T, typename R>
template<typename , typename >
friend class TensorInterface
friend

Definition at line 109 of file tensor_interface.h.

◆ TiledArray::remap [1/4]

template<typename T, typename R>
template<typename U , typename Index >
void TiledArray::remap ( detail::TensorInterface< U, Range > &  ,
U *  const,
const Index &  ,
const Index &   
)
friend

◆ TiledArray::remap [2/4]

template<typename T, typename R>
template<typename U , typename Index >
void TiledArray::remap ( detail::TensorInterface< const U, Range > &  ,
U *  const,
const Index &  ,
const Index &   
)
friend

◆ TiledArray::remap [3/4]

template<typename T, typename R>
template<typename U >
void TiledArray::remap ( detail::TensorInterface< U, Range > &  ,
U *  const,
const std::initializer_list< std::size_t > &  ,
const std::initializer_list< std::size_t > &   
)
friend

◆ TiledArray::remap [4/4]

template<typename T, typename R>
template<typename U >
void TiledArray::remap ( detail::TensorInterface< const U, Range > &  ,
U *  const,
const std::initializer_list< std::size_t > &  ,
const std::initializer_list< std::size_t > &   
)
friend

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