tensor.h
Tensor_ shift(const Index &bound_shift) const
Shift the lower and upper bound of this range.
Definition: tensor.h:917
R make_result_range(const Left &left, const Right &right) const
Construct a result range based on left and right ranges.
Definition: gemm_helper.h:165
detail::TensorInterface< const T, BlockRange > block(const Index1 &lower_bound, const Index2 &upper_bound) const
Constructs a view of the block defined by lower_bound and upper_bound.
Definition: tensor.h:714
TiledArray::detail::numeric_type< T >::type numeric_type
the numeric type that supports T
Definition: tensor.h:79
Scalar tensor_reduce(ReduceOp &&reduce_op, JoinOp &&join_op, Scalar identity, const T1 &tensor1, const Ts &... tensors)
Reduction operation for contiguous tensors.
Definition: kernels.h:665
Tensor_ & shift_to(const Index &bound_shift)
Shift the lower and upper bound of this tensor.
Definition: tensor.h:890
archive_array< T > wrap(const T *, unsigned int)
detail::TensorInterface< T, BlockRange > block(const Index1 &lower_bound, const Index2 &upper_bound)
Constructs a view of the block defined by lower_bound and upper_bound.
Definition: tensor.h:704
Tensor_ & subt_to(const numeric_type value)
Subtract a constant from this tensor.
Definition: tensor.h:1386
Tensor_ mult(const Right &right, const Scalar factor) const
Scale and multiply this by right to create a new tensor.
Definition: tensor.h:1439
Tensor_ add(const Right &right, const Perm &perm) const
Add this and other to construct a new, permuted tensor.
Definition: tensor.h:1141
Definition: trace.h:70
detail::TensorInterface< const T, BlockRange > block(const PairRange &bounds) const
Constructs a view of the block defined by its bounds .
Definition: tensor.h:800
bool right_result_congruent(const Right &right, const Result &result) const
Definition: gemm_helper.h:221
detail::TensorInterface< const T, BlockRange > block(const std::initializer_list< Index1 > &lower_bound, const std::initializer_list< Index2 > &upper_bound) const
Constructs a view of the block defined by lower_bound and upper_bound.
Definition: tensor.h:755
bool operator==(const BlockRange &r1, const BlockRange &r2)
BlockRange equality comparison.
Definition: block_range.h:433
void reduce_op(ReduceOp &&reduce_op, JoinOp &&join_op, const Result &identity, const std::size_t n, Result &result, const Args *const ... args)
Definition: vector_op.h:628
Tensor< T, A > operator()(Op &&op, T1 &&t1) const
Definition: tensor.h:2223
Type trait for extracting the scalar type of tensors and arrays.
Definition: type_traits.h:744
bool left_right_congruent(const Left &left, const Right &right) const
Definition: gemm_helper.h:238
constexpr const bool is_tensor_of_tensor_v
Definition: type_traits.h:155
Definition: tile.h:35
std::enable_if_t< trace_is_defined_v< T >, U > enable_if_trace_is_defined_t
SFINAE type for enabling code when the trace operation is defined.
Definition: trace.h:61
Tensor_ conj(const Scalar factor, const Perm &perm) const
Create a complex conjugated, scaled, and permuted copy of this tensor.
Definition: tensor.h:1571
Tensor_ scale(const Scalar factor, const Perm &perm) const
Construct a scaled and permuted copy of this tensor.
Definition: tensor.h:1093
Tensor_ & shift_to(const std::initializer_list< Integer > &bound_shift)
Shift the lower and upper bound of this tensor.
Definition: tensor.h:903
Tensor_ gemm(const Tensor< U, AU > &other, const V factor, const math::GemmHelper &gemm_helper) const
Contract this tensor with other.
Definition: tensor.h:1609
Tensor_ add(const numeric_type value) const
Add a constant to a copy of this tensor.
Definition: tensor.h:1195
Tensor_ shift(const std::initializer_list< Integer > &bound_shift) const
Shift the lower and upper bound of this range.
Definition: tensor.h:931
Tensor_ binary(const Right &right, Op &&op) const
Use a binary, element wise operation to construct a new tensor.
Definition: tensor.h:950
Tensor(const T1 &left, const T2 &right, Op &&op, const Perm &perm)
Copy, modify, and permute the data from left, and right.
Definition: tensor.h:340
constexpr bool operator!=(const DenseShape &a, const DenseShape &b)
Definition: dense_shape.h:382
static std::enable_if_t< Singleton< D >::derived_is_default_constructible, D & > get_instance()
Definition: singleton.h:70
KroneckerDeltaTile< _N >::numeric_type min(const KroneckerDeltaTile< _N > &arg)
decltype(auto) trace(const Tile< Arg > &arg)
Sum the hyper-diagonal elements a tile.
Definition: tile.h:1477
Tensor< T, A > operator()(Op &&op, Perm &&perm, T1 &&t1) const
Definition: tensor.h:2229
bool left_result_congruent(const Left &left, const Result &result) const
Definition: gemm_helper.h:205
TensorMap< T, Range_, OpResult > make_map(T *const data, const Index &lower_bound, const Index &upper_bound)
Definition: tensor_map.h:53
Tensor_ add(const Right &right, const Scalar factor) const
Scale and add this and other to construct a new tensor.
Definition: tensor.h:1162
Tensor< T, A > operator()(Op &&op, T1 &&t1, T2 &&t2) const
Definition: tensor.h:2234
Tensor_ & inplace_unary(Op &&op)
Use a unary, element wise operation to modify this tensor.
Definition: tensor.h:1062
Tensor_ subt(const Right &right, const Perm &perm) const
Subtract right from this and return the result permuted by perm.
Definition: tensor.h:1283
detail::TensorInterface< T, BlockRange > block(const PairRange &bounds)
Constructs a view of the block defined by its bounds .
Definition: tensor.h:808
Tensor_ & inplace_binary(const Right &right, Op &&op)
Use a binary, element wise operation to modify this tensor.
Definition: tensor.h:1005
Tensor_ mult(const Right &right, const Perm &perm) const
Multiply this by right to create a new, permuted tensor.
Definition: tensor.h:1418
Range that references a subblock of another range.
Definition: block_range.h:34
Definition: tile.h:33
TILEDARRAY_FORCE_INLINE auto inner_product(const L l, const R r)
Inner product of a real value and a numeric value.
Definition: complex.h:67
numeric_type max(typename std::enable_if< detail::is_strictly_ordered< Numeric >::value >::type *=nullptr) const
Maximum element.
Definition: tensor.h:2085
Tensor_ conj(const Perm &perm) const
Create a complex conjugated and permuted copy of this tensor.
Definition: tensor.h:1554
Tensor_ scale(const Scalar factor) const
Construct a scaled copy of this tensor.
Definition: tensor.h:1077
detail::TensorInterface< T, BlockRange > block(const std::initializer_list< Index1 > &lower_bound, const std::initializer_list< Index2 > &upper_bound)
Constructs a view of the block defined by lower_bound and upper_bound.
Definition: tensor.h:744
Tensor_ mult(const Right &right) const
Multiply this by right to create a new tensor.
Definition: tensor.h:1398
std::enable_if<!(detail::is_scalar_v< Arg > &&detail::is_scalar_v< Result >)>::type uninitialized_copy_vector(const std::size_t n, const Arg *const arg, Result *const result)
Definition: vector_op.h:674
std::enable_if_t< is_numeric_v< T >, U > enable_if_numeric_t
SFINAE type for enabling code when T is a numeric type.
Definition: type_traits.h:649
std::enable_if<!detail::is_scalar_v< Arg > >::type destroy_vector(const std::size_t n, Arg *const arg)
Definition: vector_op.h:706
Tensor_ & gemm(const Tensor< U, AU > &left, const Tensor< V, AV > &right, const W factor, const math::GemmHelper &gemm_helper)
Contract two tensors and accumulate the scaled result to this tensor.
Definition: tensor.h:1741
Tensor_ & add_to(const Right &right, const Scalar factor)
Add other to this tensor, and scale the result.
Definition: tensor.h:1238
Definition: type_traits.h:77
Tensor_ subt(const numeric_type value, const Perm &perm) const
Subtract a constant from a permuted copy of this tensor.
Definition: tensor.h:1350
Tensor_ permute(const Perm &perm) const
Create a permuted copy of this tensor.
Definition: tensor.h:853
KroneckerDeltaTile< _N >::numeric_type max(const KroneckerDeltaTile< _N > &arg)
void gemm(Op op_a, Op op_b, const integer m, const integer n, const integer k, const S1 alpha, const T1 *a, const integer lda, const T2 *b, const integer ldb, const S2 beta, T3 *c, const integer ldc)
Definition: blas.h:71
Tensor_ subt(const Right &right) const
Subtract right from this and return the result.
Definition: tensor.h:1263
detail::TensorInterface< T, BlockRange > block(const std::initializer_list< std::initializer_list< Index >> &bounds)
Constructs a view of the block defined by its bounds .
Definition: tensor.h:839
detail::TensorInterface< const T, BlockRange > block(const std::initializer_list< std::initializer_list< Index >> &bounds) const
Constructs a view of the block defined by its bounds .
Definition: tensor.h:831
Tensor_ & mult_to(const Right &right, const Scalar factor)
Scale and multiply this tensor by right.
Definition: tensor.h:1491
Tensor_ & subt_to(const Right &right, const Scalar factor)
Subtract right from and scale this tensor.
Definition: tensor.h:1377
Tensor_ subt(const Right &right, const Scalar factor, const Perm &perm) const
Definition: tensor.h:1326
Definition: logger.h:39
Tensor_ neg(const Perm &perm) const
Create a negated and permuted copy of this tensor.
Definition: tensor.h:1513
std::enable_if<!(detail::is_scalar_v< Arg > &&detail::is_scalar_v< Result >)>::type uninitialized_fill_vector(const std::size_t n, const Arg &arg, Result *const result)
Definition: vector_op.h:691
void compute_matrix_sizes(blas::integer &m, blas::integer &n, blas::integer &k, const Left &left, const Right &right) const
Compute the matrix dimension that can be used in a *GEMM call.
Definition: gemm_helper.h:254
Tensor(const T1 &left, const T2 &right, Op &&op)
Copy and modify the data from left, and right.
Definition: tensor.h:321
Tensor_ add(const Right &right) const
Add this and other to construct a new tensors.
Definition: tensor.h:1121
Tensor interface for external data.
Definition: tensor_interface.h:82
Definition: array_impl.cpp:28
Tensor_ mult(const Right &right, const Scalar factor, const Perm &perm) const
Scale and multiply this by right to create a new, permuted tensor.
Definition: tensor.h:1459
reference operator[](const std::initializer_list< Integer > &i)
Element accessor.
Definition: tensor.h:486
Tensor_ subt(const numeric_type value) const
Subtract a constant from a copy of this tensor.
Definition: tensor.h:1339
reference operator()(const std::initializer_list< Integer > &i)
Element accessor.
Definition: tensor.h:546
const_reference operator[](const std::initializer_list< Integer > &i) const
Const element accessor.
Definition: tensor.h:471
Tensor_ binary(const Right &right, Op &&op, const Perm &perm) const
Use a binary, element wise operation to construct a new, permuted tensor.
Definition: tensor.h:968
btas::Tensor< T, Range, Storage > gemm(const btas::Tensor< T, Range, Storage > &left, const btas::Tensor< T, Range, Storage > &right, Scalar factor, const TiledArray::math::GemmHelper &gemm_helper)
Definition: btas.h:596
decltype(auto) reduce(ReduceOp &&reduce_op, JoinOp &&join_op, Scalar identity) const
Unary reduction operation.
Definition: tensor.h:1996
numeric_type min(typename std::enable_if< detail::is_strictly_ordered< Numeric >::value >::type *=nullptr) const
Minimum element.
Definition: tensor.h:2073
ComplexConjugate< S > conj_op(const S factor)
ComplexConjugate operator factory function.
Definition: complex.h:204
Definition: kernels.h:117
Tensor_ subt(const Right &right, const Scalar factor) const
Definition: tensor.h:1305
Tensor(const Range &range, std::initializer_list< T > il)
Definition: tensor.h:213
Tensor_ unary(Op &&op) const
Use a unary, element wise operation to construct a new tensor.
Definition: tensor.h:1018
Tensor_ add(const numeric_type value, const Perm &perm) const
Add a constant to a permuted copy of this tensor.
Definition: tensor.h:1209
Tensor_ add(const Right &right, const Scalar factor, const Perm &perm) const
Scale and add this and other to construct a new, permuted tensor.
Definition: tensor.h:1182
Tensor_ & gemm(const Tensor< U, AU > &left, const Tensor< V, AV > &right, const math::GemmHelper &gemm_helper, ElementMultiplyAddOp &&elem_muladd_op)
Definition: tensor.h:1887
Type trait for extracting the numeric type of tensors and arrays.
Definition: type_traits.h:709
Tensor_ conj(const Scalar factor) const
Create a complex conjugated and scaled copy of this tensor.
Definition: tensor.h:1541
Tensor< T, A > operator()(Op &&op, Perm &&perm, T1 &&t1, T2 &&t2) const
Definition: tensor.h:2241
void inplace_tensor_op(Op &&op, TR &result, const Ts &... tensors)
In-place tensor operations with contiguous data.
Definition: kernels.h:197
Tensor_ unary(Op &&op, const Perm &perm) const
Use a unary, element wise operation to construct a new, permuted tensor.
Definition: tensor.h:1034
void tensor_init(Op &&op, TR &result, const Ts &... tensors)
Initialize tensor with contiguous tensor arguments.
Definition: kernels.h:421
const_reference operator()(const std::initializer_list< Integer > &i) const
Const element accessor.
Definition: tensor.h:531
Tensor(const range_type &range, const Value &value)
Construct a tensor with a fill value.
Definition: tensor.h:175
Tensor(const T1 &other, Op &&op, const Perm &perm)
Copy, modify, and permute the data from other.
Definition: tensor.h:292
Tensor_ & conj_to(const Scalar factor)
Complex conjugate and scale this tensor.
Definition: tensor.h:1591
TiledArray::detail::scalar_type< T >::type scalar_type
the scalar type that supports T
Definition: tensor.h:81
Definition: trace.h:47
A (hyperrectangular) interval on , space of integer -indices.
Definition: range.h:46