TiledArray
0.7.0
|
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_type & | range () 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 > &) |
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.
TensorInterface
objects. Therefore, it is the user's responsibility to manage the lifetime of the data. Tensor
for that purpose. T | The tensor value type |
R | The range type |
Definition at line 47 of file tensor_interface.h.
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.
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.
typedef std::ptrdiff_t TiledArray::detail::TensorInterface< T, R >::difference_type |
Difference type.
Definition at line 94 of file tensor_interface.h.
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.
typedef std::add_pointer<T>::type TiledArray::detail::TensorInterface< T, R >::pointer |
Element pointer type.
Definition at line 91 of file tensor_interface.h.
typedef R TiledArray::detail::TensorInterface< T, R >::range_type |
Tensor range type.
Definition at line 82 of file tensor_interface.h.
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.
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.
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.
typedef range_type::size_type TiledArray::detail::TensorInterface< T, R >::size_type |
size type
Definition at line 83 of file tensor_interface.h.
typedef TensorInterface<T, R> TiledArray::detail::TensorInterface< T, R >::TensorInterface_ |
This class type.
Definition at line 81 of file tensor_interface.h.
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.
|
delete |
Compiler generated functions.
|
default |
|
default |
|
default |
|
inline |
Type conversion copy constructor.
U | The value type of the other view |
other | The other tensor view to be copied |
Definition at line 152 of file tensor_interface.h.
|
inline |
Type conversion move constructor.
U | The value type of the other tensor view |
other | The other tensor view to be moved |
Definition at line 164 of file tensor_interface.h.
|
inline |
Construct a new view of tensor
.
range | The range of this tensor |
data | The data pointer for this tensor |
Definition at line 174 of file tensor_interface.h.
|
inline |
Construct a new view of tensor
.
range | The range of this tensor |
data | The data pointer for this tensor |
Definition at line 184 of file tensor_interface.h.
|
inline |
Absolute maximum element.
Definition at line 962 of file tensor_interface.h.
|
inline |
Absolute minimum element.
Definition at line 951 of file tensor_interface.h.
|
inline |
Add this and other
to construct a new tensors.
Right | The right-hand tensor type |
right | The tensor that will be added to this tensor |
this
and other
Definition at line 431 of file tensor_interface.h.
|
inline |
Add this and other
to construct a new, permuted tensor.
Right | The right-hand tensor type |
right | The tensor that will be added to this tensor |
perm | The permutation to be applied to this tensor |
this
and other
Definition at line 446 of file tensor_interface.h.
|
inline |
Scale and add this and other
to construct a new tensor.
Right | The right-hand tensor type |
Scalar | A scalar type |
right | The tensor that will be added to this tensor |
factor | The scaling factor |
this
and other
, scaled by factor
Definition at line 463 of file tensor_interface.h.
|
inline |
Scale and add this and other
to construct a new, permuted tensor.
Right | The right-hand tensor type |
Scalar | A scalar type |
right | The tensor that will be added to this tensor |
factor | The scaling factor |
perm | The permutation to be applied to this tensor |
this
and other
, scaled by factor
Definition at line 481 of file tensor_interface.h.
|
inline |
Add a constant to a copy of this tensor.
value | The constant to be added to this tensor |
this
and value
Definition at line 494 of file tensor_interface.h.
|
inline |
Add a constant to a permuted copy of this tensor.
value | The constant to be added to this tensor |
perm | The permutation to be applied to this tensor |
this
and value
Definition at line 505 of file tensor_interface.h.
|
inline |
Add other
to this tensor.
Right | The right-hand tensor type |
right | The tensor that will be added to this tensor |
Definition at line 517 of file tensor_interface.h.
|
inline |
Add other
to this tensor, and scale the result.
Right | The right-hand tensor type |
Scalar | A scalar type |
right | The tensor that will be added to this tensor |
factor | The scaling factor |
Definition at line 533 of file tensor_interface.h.
|
inline |
Add a constant to this tensor.
value | The constant to be added |
Definition at line 543 of file tensor_interface.h.
|
inline |
Use a binary, element wise operation to construct a new tensor.
Right | The right-hand tensor type |
Op | The binary operation type |
right | The right-hand argument in the binary operation |
op | The binary, element-wise operation |
i
of the new tensor is equal to op(*this[i],other[i])
Definition at line 304 of file tensor_interface.h.
|
inline |
Use a binary, element wise operation to construct a new, permuted tensor.
Right | The right-hand tensor type |
Op | The binary operation type |
right | The right-hand argument in the binary operation |
op | The binary, element-wise operation |
perm | The permutation to be applied to this tensor |
i
of the new tensor is equal to op(*this[i],other[i])
Definition at line 319 of file tensor_interface.h.
|
inline |
Create a complex conjugated copy of this tensor.
Definition at line 796 of file tensor_interface.h.
|
inline |
Create a complex conjugated and scaled copy of this tensor.
Scalar | A scalar type |
factor | The scaling factor |
Definition at line 806 of file tensor_interface.h.
|
inline |
Create a complex conjugated and permuted copy of this tensor.
perm | The permutation to be applied to this tensor |
Definition at line 815 of file tensor_interface.h.
|
inline |
Create a complex conjugated, scaled, and permuted copy of this tensor.
Scalar | A scalar type |
factor | The scaling factor |
perm | The permutation to be applied to this tensor |
Definition at line 828 of file tensor_interface.h.
|
inline |
Complex conjugate this tensor.
Definition at line 835 of file tensor_interface.h.
|
inline |
Complex conjugate and scale this tensor.
Scalar | A scalar type |
factor | The scaling factor |
Definition at line 846 of file tensor_interface.h.
|
inline |
Data pointer accessor.
Definition at line 216 of file tensor_interface.h.
|
inline |
Vector dot product.
Right | The right-hand tensor type |
other | The right-hand tensor to be reduced |
other
Definition at line 977 of file tensor_interface.h.
|
inline |
|
inline |
Use a binary, element wise operation to modify this tensor.
Right | The right-hand tensor type |
Op | The binary operation type |
right | The right-hand argument in the binary operation |
op | The binary, element-wise operation |
TiledArray::Exception | When this tensor is empty. |
TiledArray::Exception | When other is empty. |
TiledArray::Exception | When the range of this tensor is not equal to the range of other . |
TiledArray::Exception | When this and other are the same. |
Definition at line 337 of file tensor_interface.h.
|
inline |
Use a unary, element wise operation to modify this tensor.
Op | The unary operation type |
op | The unary, element-wise operation |
TiledArray::Exception | When this tensor is empty. |
Definition at line 375 of file tensor_interface.h.
|
inline |
Maximum element.
Definition at line 942 of file tensor_interface.h.
|
inline |
Minimum element.
Definition at line 933 of file tensor_interface.h.
|
inline |
Multiply this by right
to create a new tensor.
Right | The right-hand tensor type |
right | The tensor that will be multiplied by this tensor |
this
and right
Definition at line 679 of file tensor_interface.h.
|
inline |
Multiply this by right
to create a new, permuted tensor.
Right | The right-hand tensor type |
right | The tensor that will be multiplied by this tensor |
perm | The permutation to be applied to this tensor |
this
and right
Definition at line 694 of file tensor_interface.h.
|
inline |
Scale and multiply this by right
to create a new tensor.
Right | The right-hand tensor type |
Scalar | A scalar type |
right | The tensor that will be multiplied by this tensor |
factor | The scaling factor |
this
and right
, scaled by factor
Definition at line 711 of file tensor_interface.h.
|
inline |
Scale and multiply this by right
to create a new, permuted tensor.
Right | The right-hand tensor type |
Scalar | A scalar type |
right | The tensor that will be multiplied by this tensor |
factor | The scaling factor |
perm | The permutation to be applied to this tensor |
this
and right
, scaled by factor
Definition at line 729 of file tensor_interface.h.
|
inline |
Multiply this tensor by right
.
Right | The right-hand tensor type |
right | The tensor that will be multiplied by this tensor |
Definition at line 744 of file tensor_interface.h.
|
inline |
Scale and multiply this tensor by right
.
Right | The right-hand tensor type |
Scalar | A scalar type |
right | The tensor that will be multiplied by this tensor |
factor | The scaling factor |
Definition at line 760 of file tensor_interface.h.
|
inline |
Create a negated copy of this tensor.
Definition at line 771 of file tensor_interface.h.
|
inline |
Create a negated and permuted copy of this tensor.
perm | The permutation to be applied to this tensor |
Definition at line 779 of file tensor_interface.h.
|
inline |
Negate elements of this tensor.
Definition at line 787 of file tensor_interface.h.
|
inline |
Vector 2-norm.
Definition at line 926 of file tensor_interface.h.
|
inline |
Element accessor.
Index | An integral type pack or a single coodinate index type |
idx | The index pack |
Definition at line 242 of file tensor_interface.h.
|
inline |
Element accessor.
Index | An integral type pack or a single coodinate index type |
idx | The index pack |
Definition at line 252 of file tensor_interface.h.
|
delete |
|
delete |
|
inline |
|
inline |
Element subscript accessor.
index | The ordinal element index |
index
. Definition at line 222 of file tensor_interface.h.
|
inline |
Element subscript accessor.
index | The ordinal element index |
index
. Definition at line 231 of file tensor_interface.h.
|
inline |
Product of elements.
Definition at line 906 of file tensor_interface.h.
|
inline |
Tensor range object accessor.
Definition at line 205 of file tensor_interface.h.
|
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
.
ReduceOp | The reduction operation type |
JoinOp | The join operation type |
reduce_op | The element-wise reduction operation |
join_op | The join result operation |
identity | The identity value of the reduction |
Definition at line 865 of file tensor_interface.h.
|
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
.
Right | The right-hand argument tensor type |
ReduceOp | The reduction operation type |
JoinOp | The join operation type |
other | The right-hand argument of the binary reduction |
reduce_op | The element-wise reduction operation |
join_op | The join result operation |
identity | The identity value of the reduction |
Definition at line 888 of file tensor_interface.h.
|
inline |
Construct a scaled copy of this tensor.
Scalar | A scalar type |
factor | The scaling factor |
factor
Definition at line 390 of file tensor_interface.h.
|
inline |
Construct a scaled and permuted copy of this tensor.
Scalar | A scalar type |
factor | The scaling factor |
perm | The permutation to be applied to this tensor |
factor
and permuted Definition at line 404 of file tensor_interface.h.
|
inline |
Scale this tensor.
Scalar | A scalar type |
factor | The scaling factor |
Definition at line 416 of file tensor_interface.h.
|
inline |
Shift the lower and upper bound of this range.
Index | The shift array type |
bound_shift | The shift to be applied to the tensor range |
Definition at line 288 of file tensor_interface.h.
|
inline |
Shift the lower and upper bound of this tensor.
Index | The shift array type |
bound_shift | The shift to be applied to the tensor range |
Definition at line 277 of file tensor_interface.h.
|
inline |
Tensor dimension size accessor.
Definition at line 210 of file tensor_interface.h.
|
inline |
Square of vector 2-norm.
Definition at line 915 of file tensor_interface.h.
|
inline |
Subtract this and right
to construct a new tensor.
Right | The right-hand tensor type |
right | The tensor that will be subtracted from this tensor |
this
and right
Definition at line 557 of file tensor_interface.h.
|
inline |
Subtract this and right
to construct a new, permuted tensor.
Right | The right-hand tensor type |
right | The tensor that will be subtracted from this tensor |
perm | The permutation to be applied to this tensor |
this
and right
Definition at line 572 of file tensor_interface.h.
|
inline |
Scale and subtract this and right
to construct a new tensor.
Right | The right-hand tensor type |
Scalar | A scalar type |
right | The tensor that will be subtracted from this tensor |
factor | The scaling factor |
this
and right
, scaled by factor
Definition at line 589 of file tensor_interface.h.
|
inline |
Scale and subtract this and right
to construct a new, permuted tensor.
Right | The right-hand tensor type |
Scalar | A scalar type |
right | The tensor that will be subtracted from this tensor |
factor | The scaling factor |
perm | The permutation to be applied to this tensor |
this
and right
, scaled by factor
Definition at line 607 of file tensor_interface.h.
|
inline |
Subtract a constant from a copy of this tensor.
this
and value
Definition at line 619 of file tensor_interface.h.
|
inline |
Subtract a constant from a permuted copy of this tensor.
value | The constant to be subtracted |
perm | The permutation to be applied to this tensor |
this
and value
Definition at line 629 of file tensor_interface.h.
|
inline |
Subtract right
from this tensor.
Right | The right-hand tensor type |
right | The tensor that will be subtracted from this tensor |
Definition at line 640 of file tensor_interface.h.
|
inline |
Subtract right
from and scale this tensor.
Right | The right-hand tensor type |
Scalar | A scalar type |
right | The tensor that will be subtracted from this tensor |
factor | The scaling factor |
Definition at line 656 of file tensor_interface.h.
|
inline |
Subtract a constant from this tensor.
Definition at line 665 of file tensor_interface.h.
|
inline |
Sum of elements.
Definition at line 897 of file tensor_interface.h.
|
inline |
Swap tensor views.
other | The view to be swapped |
Definition at line 265 of file tensor_interface.h.
|
inline |
Use a unary, element wise operation to construct a new tensor.
Op | The unary operation type |
op | The unary, element-wise operation |
i
of the new tensor is equal to op(*this[i])
TiledArray::Exception | When this tensor is empty. |
Definition at line 350 of file tensor_interface.h.
|
inline |
Use a unary, element wise operation to construct a new, permuted tensor.
Op | The unary operation type |
op | The unary operation |
perm | The permutation to be applied to this tensor |
op
TiledArray::Exception | When this tensor is empty. |
TiledArray::Exception | The dimension of perm does not match that of this tensor. |
Definition at line 364 of file tensor_interface.h.
Definition at line 109 of file tensor_interface.h.
|
friend |
|
friend |
|
friend |
|
friend |