TiledArray  0.7.0
TiledArray Namespace Reference

Namespaces

 detail
 
 expressions
 
 math
 
 meta
 
 symmetry
 
 tile_interface
 

Classes

class  AbsMaxReduction
 Maxabs tile reduction. More...
 
class  AbsMinReduction
 Minabs tile reduction. More...
 
class  Add
 Add tile operation. More...
 
class  AddTo
 Add-to tile operation. More...
 
class  BlockRange
 Range that references a subblock of another range. More...
 
class  Cast
 Tile cast operation. More...
 
struct  Cast< TiledArray::Tensor< T, Allocator >, btas::Tensor< T, Range_, Storage > >
 converts a btas::Tensor to a TiledArray::Tensor More...
 
struct  Cast< TiledArray::Tensor< typename T::value_type, Allocator >, Tile< T >, detail::void_t< decltype(std::declval< TiledArray::Cast< TiledArray::Tensor< typename T::value_type, Allocator >, T >>()(std::declval< const T & >()))> >
 implement conversions from Tile<T> to TiledArray::Tensor<T::value_type,Allocator> More...
 
class  Clone
 Create a deep copy of a tile. More...
 
struct  clone_trait
 Clone trait. More...
 
struct  ConjugateGradientSolver
 
class  DensePolicy
 
class  DenseShape
 Dense shape of an array. More...
 
class  DIIS
 DIIS (‘‘direct inversion of iterative subspace’’) extrapolation. More...
 
class  DistArray
 Forward declarations. More...
 
class  DotReduction
 Vector dot product tile reduction. More...
 
struct  eval_trait
 Determine the object type used in the evaluation of tensor expressions. More...
 
class  Exception
 
class  InnerProductReduction
 Vector inner product tile reduction. More...
 
class  Irrep
 Irrep of an $ S_n $ symmetric group. More...
 
struct  is_consumable_tile
 Consumable tile type trait. More...
 
struct  is_consumable_tile< ZeroTensor >
 
struct  is_dense
 Type trait to detect dense shape types. More...
 
struct  is_dense< DenseShape >
 
struct  is_dense< DistArray< Tile, Policy > >
 
struct  is_lazy_tile
 Detect lazy evaluation tiles. More...
 
struct  is_lazy_tile< DistArray< Tile, Policy > >
 
class  MaxReduction
 Maximum tile reduction. More...
 
class  MaxReduction< Tile, typename std::enable_if< detail::is_strictly_ordered< detail::numeric_t< Tile > >::value >::type >
 
class  MinReduction
 Minimum tile reduction. More...
 
class  MinReduction< Tile, typename std::enable_if< detail::is_strictly_ordered< detail::numeric_t< Tile > >::value >::type >
 
class  Permutation
 Permutation of a sequence of objects indexed by base-0 indices. More...
 
class  Permute
 Permute a tile. More...
 
struct  permute_trait
 Permute trait. More...
 
class  Pmap
 Process map. More...
 
class  ProductReduction
 Tile product reduction. More...
 
class  Range
 A (hyperrectangular) interval on $ Z^n $, space of integer n-indices. More...
 
class  ScalAdd
 Add tile operation. More...
 
class  ScalAddTo
 Add-to and scale tile operation. More...
 
class  Scale
 Scale tile. More...
 
struct  scale_trait
 Scale trait. More...
 
class  Shift
 Shift the range of tile. More...
 
class  ShiftTo
 Shift the range of tile in place. More...
 
class  SparsePolicy
 
class  SparseShape
 Arbitrary sparse shape. More...
 
class  SquaredNormReduction
 Squared norm tile reduction. More...
 
class  SumReduction
 Tile sum reduction. More...
 
class  Tensor
 An N-dimensional tensor object. More...
 
class  Tile
 An N-dimensional shallow copy wrapper for tile objects. More...
 
class  TiledRange
 Range data of a tiled array. More...
 
class  TiledRange1
 
class  TraceReduction
 Tile trace reduction. More...
 
struct  ZeroTensor
 Place-holder object for a zero tensor. More...
 

Typedefs

typedef Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > EigenMatrixXd
 
typedef Eigen::Matrix< float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > EigenMatrixXf
 
typedef Eigen::Matrix< std::complex< double >, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > EigenMatrixXcd
 
typedef Eigen::Matrix< std::complex< float >, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > EigenMatrixXcf
 
typedef Eigen::Matrix< int, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > EigenMatrixXi
 
typedef Eigen::Matrix< long, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > EigenMatrixXl
 
typedef Eigen::Matrix< double, Eigen::Dynamic, 1 > EigenVectorXd
 
typedef Eigen::Matrix< float, Eigen::Dynamic, 1 > EigenVectorXf
 
typedef Eigen::Matrix< std::complex< double >, 1, Eigen::Dynamic > EigenVectorXcd
 
typedef Eigen::Matrix< std::complex< float >, 1, Eigen::Dynamic > EigenVectorXcf
 
typedef Eigen::Matrix< int, Eigen::Dynamic, 1 > EigenVectorXi
 
typedef Eigen::Matrix< long, Eigen::Dynamic, 1 > EigenVectorXl
 
template<typename T , typename Range_ = Range>
using TensorMap = detail::TensorInterface< T, Range_ >
 
template<typename T , typename Range_ = Range>
using TensorConstMap = detail::TensorInterface< typename std::add_const< T >::type, Range_ >
 
template<typename T >
using TensorView = detail::TensorInterface< T, BlockRange >
 
template<typename T >
using TensorConstView = detail::TensorInterface< typename std::add_const< T >::type, BlockRange >
 
template<typename... T>
using result_of_subt_t = decltype(subt(std::declval< T >()...))
 
template<typename... T>
using result_of_subt_to_t = decltype(subt_to(std::declval< T >()...))
 
template<typename... T>
using result_of_mult_t = decltype(mult(std::declval< T >()...))
 
template<typename... T>
using result_of_mult_to_t = decltype(mult_to(std::declval< T >()...))
 
template<typename... T>
using result_of_neg_t = decltype(neg(std::declval< T >()...))
 
template<typename... T>
using result_of_neg_to_t = decltype(neg_to(std::declval< T >()...))
 
template<typename... T>
using result_of_conj_t = decltype(conj(std::declval< T >()...))
 
template<typename... T>
using result_of_conj_to_t = decltype(conj_to(std::declval< T >()...))
 
template<typename... T>
using result_of_gemm_t = decltype(gemm(std::declval< T >()...))
 
template<typename T >
using result_of_trace_t = decltype(mult(std::declval< T >()))
 
template<typename T >
using result_of_sum_t = decltype(sum(std::declval< T >()))
 
template<typename T >
using result_of_product_t = decltype(product(std::declval< T >()))
 
template<typename T >
using result_of_squared_norm_t = decltype(squared_norm(std::declval< T >()))
 
template<typename T >
using result_of_norm_t = decltype(norm(std::declval< T >()))
 
template<typename T >
using result_of_max_t = decltype(max(std::declval< T >()))
 
template<typename T >
using result_of_min_t = decltype(min(std::declval< T >()))
 
template<typename T >
using result_of_abs_max_t = decltype(abs_max(std::declval< T >()))
 
template<typename T >
using result_of_abs_min_t = decltype(abs_min(std::declval< T >()))
 
template<typename L , typename R >
using result_of_dot_t = decltype(dot(std::declval< L >(), std::declval< R >()))
 
typedef Tensor< double, Eigen::aligned_allocator< double > > TensorD
 
typedef Tensor< int, Eigen::aligned_allocator< int > > TensorI
 
typedef Tensor< float, Eigen::aligned_allocator< float > > TensorF
 
typedef Tensor< long, Eigen::aligned_allocator< long > > TensorL
 
typedef Tensor< std::complex< double >, Eigen::aligned_allocator< std::complex< double > > > TensorZ
 
typedef Tensor< std::complex< float >, Eigen::aligned_allocator< std::complex< float > > > TensorC
 
template<typename T >
using TArray = DistArray< Tensor< T, Eigen::aligned_allocator< T > >, DensePolicy >
 
typedef TArray< double > TArrayD
 
typedef TArray< int > TArrayI
 
typedef TArray< float > TArrayF
 
typedef TArray< long > TArrayL
 
typedef TArray< std::complex< double > > TArrayZ
 
typedef TArray< std::complex< float > > TArrayC
 
template<typename T >
using TSpArray = DistArray< Tensor< T, Eigen::aligned_allocator< T > >, SparsePolicy >
 
typedef TSpArray< double > TSpArrayD
 
typedef TSpArray< int > TSpArrayI
 
typedef TSpArray< float > TSpArrayF
 
typedef TSpArray< long > TSpArrayL
 
typedef TSpArray< std::complex< double > > TSpArrayZ
 
typedef TSpArray< std::complex< float > > TSpArrayC
 
template<typename T , unsigned int = 0, typename Tile = Tensor<T, Eigen::aligned_allocator<T> >, typename Policy = DensePolicy>
using Array = DistArray< Tile, Policy >
 

Enumerations

enum  ShapeReductionMethod { ShapeReductionMethod::Union, ShapeReductionMethod::Intersect }
 

Functions

template<typename Tile , typename Policy >
size_t size (const DistArray< Tile, Policy > &a)
 
template<typename Tile , typename Policy >
DistArray< Tile, Policy > copy (const DistArray< Tile, Policy > &a)
 
template<typename Tile , typename Policy >
void zero (DistArray< Tile, Policy > &a)
 
template<typename Tile , typename Policy >
DistArray< Tile, Policy >::element_type minabs_value (const DistArray< Tile, Policy > &a)
 
template<typename Tile , typename Policy >
DistArray< Tile, Policy >::element_type maxabs_value (const DistArray< Tile, Policy > &a)
 
template<typename Tile , typename Policy >
void vec_multiply (DistArray< Tile, Policy > &a1, const DistArray< Tile, Policy > &a2)
 
template<typename Tile , typename Policy >
DistArray< Tile, Policy >::element_type dot_product (const DistArray< Tile, Policy > &a1, const DistArray< Tile, Policy > &a2)
 
template<typename Left , typename Right >
TiledArray::expressions::ExprTrait< Left >::scalar_type dot (const TiledArray::expressions::Expr< Left > &a1, const TiledArray::expressions::Expr< Right > &a2)
 
template<typename Tile , typename Policy >
void scale (DistArray< Tile, Policy > &a, typename DistArray< Tile, Policy >::element_type scaling_factor)
 
template<typename Tile , typename Policy >
void axpy (DistArray< Tile, Policy > &y, typename DistArray< Tile, Policy >::element_type a, const DistArray< Tile, Policy > &x)
 
template<typename Tile , typename Policy >
void assign (DistArray< Tile, Policy > &m1, const DistArray< Tile, Policy > &m2)
 
template<typename Tile , typename Policy >
DistArray< Tile, Policy >::scalar_type norm2 (const DistArray< Tile, Policy > &a)
 
template<typename Tile , typename Policy >
void print (const DistArray< Tile, Policy > &a, const char *label)
 
template<typename T , typename Range_ , typename Storage_ , typename Allocator_ >
void btas_subtensor_to_tensor (const btas::Tensor< T, Range_, Storage_ > &src, Tensor< T, Allocator_ > &dst)
 Copy a block of a btas::Tensor into a TiledArray::Tensor. More...
 
template<typename T , typename Allocator_ , typename Range_ , typename Storage_ >
void tensor_to_btas_subtensor (const Tensor< T, Allocator_ > &src, btas::Tensor< T, Range_, Storage_ > &dst)
 Copy a block of a btas::Tensor into a TiledArray::Tensor. More...
 
template<typename DistArray_ , typename T , typename Range , typename Storage >
DistArray_ btas_tensor_to_array (World &world, const TiledArray::TiledRange &trange, const btas::Tensor< T, Range, Storage > &src, bool replicated=false)
 Convert a btas::Tensor object into a TiledArray::DistArray object. More...
 
template<typename Tile , typename Policy >
btas::Tensor< typename Tile::value_type > array_to_btas_tensor (const TiledArray::DistArray< Tile, Policy > &src)
 Convert a TiledArray::DistArray object into a btas::Tensor object. More...
 
template<typename Tile , typename Policy >
DistArray< Tile, Policy > clone (const DistArray< Tile, Policy > &arg)
 Create a deep copy of an array. More...
 
template<typename Tile >
DistArray< Tile, SparsePolicyto_sparse (DistArray< Tile, DensePolicy > const &dense_array)
 Function to convert a dense array into a block sparse array. More...
 
template<typename Tile >
DistArray< Tile, SparsePolicyto_sparse (DistArray< Tile, SparsePolicy > const &sparse_array)
 If the array is already sparse return a copy of the array. More...
 
template<typename T , typename A >
Eigen::Map< const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >, Eigen::AutoAlign > eigen_map (const Tensor< T, A > &tensor, const std::size_t m, const std::size_t n)
 Construct a const Eigen::Map object for a given Tensor object. More...
 
template<typename T , typename A >
Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >, Eigen::AutoAlign > eigen_map (Tensor< T, A > &tensor, const std::size_t m, const std::size_t n)
 Construct an Eigen::Map object for a given Tensor object. More...
 
template<typename T , typename A >
Eigen::Map< const Eigen::Matrix< T, Eigen::Dynamic, 1 >, Eigen::AutoAlign > eigen_map (const Tensor< T, A > &tensor, const std::size_t n)
 Construct a const Eigen::Map object for a given Tensor object. More...
 
template<typename T , typename A >
Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, 1 >, Eigen::AutoAlign > eigen_map (Tensor< T, A > &tensor, const std::size_t n)
 Construct an Eigen::Map object for a given Tensor object. More...
 
template<typename T , typename A >
Eigen::Map< const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >, Eigen::AutoAlign > eigen_map (const Tensor< T, A > &tensor)
 Construct a const Eigen::Map object for a given Tensor object. More...
 
template<typename T , typename A >
Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >, Eigen::AutoAlign > eigen_map (Tensor< T, A > &tensor)
 Construct an Eigen::Map object for a given Tensor object. More...
 
template<typename T , typename A , typename Derived >
void eigen_submatrix_to_tensor (const Eigen::MatrixBase< Derived > &matrix, Tensor< T, A > &tensor)
 Copy a block of an Eigen matrix into a tensor. More...
 
template<typename T , typename A , typename Derived >
void tensor_to_eigen_submatrix (const Tensor< T, A > &tensor, Eigen::MatrixBase< Derived > &matrix)
 Copy the content of a tensor into an Eigen matrix block. More...
 
template<typename A , typename Derived >
eigen_to_array (World &world, const typename A::trange_type &trange, const Eigen::MatrixBase< Derived > &matrix, bool replicated=false)
 Convert an Eigen matrix into an Array object. More...
 
template<typename Tile , typename Policy , unsigned int EigenStorageOrder = Eigen::ColMajor>
Eigen::Matrix< typename Tile::value_type, Eigen::Dynamic, Eigen::Dynamic, EigenStorageOrder > array_to_eigen (const DistArray< Tile, Policy > &array)
 Convert an Array object into an Eigen matrix object. More...
 
template<typename A >
row_major_buffer_to_array (World &world, const typename A::trange_type &trange, const typename A::value_type::value_type *buffer, const std::size_t m, const std::size_t n, const bool replicated=false)
 Convert a row-major matrix buffer into an Array object. More...
 
template<typename A >
column_major_buffer_to_array (World &world, const typename A::trange_type &trange, const typename A::value_type::value_type *buffer, const std::size_t m, const std::size_t n, const bool replicated=false)
 Convert a column-major matrix buffer into an Array object. More...
 
template<typename ResultTile , typename ArgTile , typename Op , typename = typename std::enable_if<!std::is_same<ResultTile,ArgTile>::value>::type>
DistArray< ResultTile, DensePolicyforeach (const DistArray< ArgTile, DensePolicy > &arg, Op &&op)
 Apply a function to each tile of a dense Array. More...
 
template<typename Tile , typename Op >
DistArray< Tile, DensePolicyforeach (const DistArray< Tile, DensePolicy > &arg, Op &&op)
 Apply a function to each tile of a dense Array. More...
 
template<typename Tile , typename Op , typename = typename std::enable_if<! TiledArray::detail::is_array<typename std::decay<Op>::type>::value>::type>
void foreach_inplace (DistArray< Tile, DensePolicy > &arg, Op &&op, bool fence=true)
 Modify each tile of a dense Array. More...
 
template<typename ResultTile , typename ArgTile , typename Op , typename = typename std::enable_if<!std::is_same<ResultTile,ArgTile>::value>::type>
DistArray< ResultTile, SparsePolicyforeach (const DistArray< ArgTile, SparsePolicy > arg, Op &&op)
 Apply a function to each tile of a sparse Array. More...
 
template<typename Tile , typename Op >
DistArray< Tile, SparsePolicyforeach (const DistArray< Tile, SparsePolicy > &arg, Op &&op)
 Apply a function to each tile of a sparse Array. More...
 
template<typename Tile , typename Op , typename = typename std::enable_if<! TiledArray::detail::is_array<typename std::decay<Op>::type>::value>::type>
void foreach_inplace (DistArray< Tile, SparsePolicy > &arg, Op &&op, bool fence=true)
 Modify each tile of a sparse Array. More...
 
template<typename ResultTile , typename LeftTile , typename RightTile , typename Op , typename = typename std::enable_if<!std::is_same<ResultTile, LeftTile>::value>::type>
DistArray< ResultTile, DensePolicyforeach (const DistArray< LeftTile, DensePolicy > &left, const DistArray< RightTile, DensePolicy > &right, Op &&op)
 
template<typename LeftTile , typename RightTile , typename Op >
DistArray< LeftTile, DensePolicyforeach (const DistArray< LeftTile, DensePolicy > &left, const DistArray< RightTile, DensePolicy > &right, Op &&op)
 
template<typename LeftTile , typename RightTile , typename Op >
void foreach_inplace (DistArray< LeftTile, DensePolicy > &left, const DistArray< RightTile, DensePolicy > &right, Op &&op, bool fence=true)
 This function takes two input tiles and put result into the left tile. More...
 
template<typename ResultTile , typename LeftTile , typename RightTile , typename Op , typename = typename std::enable_if<!std::is_same<ResultTile, LeftTile>::value>::type>
DistArray< ResultTile, SparsePolicyforeach (const DistArray< LeftTile, SparsePolicy > &left, const DistArray< RightTile, SparsePolicy > &right, Op &&op, const ShapeReductionMethod shape_reduction=ShapeReductionMethod::Intersect)
 
template<typename LeftTile , typename RightTile , typename Op >
DistArray< LeftTile, SparsePolicyforeach (const DistArray< LeftTile, SparsePolicy > &left, const DistArray< RightTile, SparsePolicy > &right, Op &&op, const ShapeReductionMethod shape_reduction=ShapeReductionMethod::Intersect)
 
template<typename LeftTile , typename RightTile , typename Op >
void foreach_inplace (DistArray< LeftTile, SparsePolicy > &left, const DistArray< RightTile, SparsePolicy > &right, Op &&op, const ShapeReductionMethod shape_reduction=ShapeReductionMethod::Intersect, bool fence=true)
 This function takes two input tiles and put result into the left tile. More...
 
template<typename Array , typename Op , typename std::enable_if< is_dense< Array >::value >::type * = nullptr>
Array make_array (World &world, const detail::trange_t< Array > &trange, const std::shared_ptr< detail::pmap_t< Array > > &pmap, Op &&op)
 Construct dense Array. More...
 
template<typename Array , typename Op >
Array make_array (World &world, const detail::trange_t< Array > &trange, Op &&op)
 Construct an Array. More...
 
template<typename Tile >
DistArray< Tile, DensePolicyto_dense (DistArray< Tile, SparsePolicy > const &sparse_array)
 
template<typename Tile >
DistArray< Tile, DensePolicyto_dense (DistArray< Tile, DensePolicy > const &other)
 
template<typename Tile , typename Policy , typename Op >
DistArray< typename std::result_of< Op(Tile)>::type, Policy > to_new_tile_type (DistArray< Tile, Policy > const &old_array, Op &&op)
 Function to convert an array to a new array with a different tile type. More...
 
template<typename Tile >
void truncate (DistArray< Tile, DensePolicy > &array)
 Truncate a dense Array. More...
 
template<typename Tile >
void truncate (DistArray< Tile, SparsePolicy > &array)
 Truncate a sparse Array. More...
 
constexpr bool operator== (const DenseShape &a, const DenseShape &b)
 
constexpr bool operator!= (const DenseShape &a, const DenseShape &b)
 
template<typename Tile , typename Policy >
std::ostream & operator<< (std::ostream &os, const DistArray< Tile, Policy > &a)
 Add the tensor to an output stream. More...
 
void exception_break ()
 Place a break point on this function to stop before TiledArray exceptions are thrown. More...
 
template<typename Perm >
TiledArray::Range permute (const TiledArray::Range &r, const Perm &p)
 
bool operator== (const Permutation &p1, const Permutation &p2)
 Permutation equality operator. More...
 
std::ostream & operator<< (std::ostream &output, const Permutation &p)
 Add permutation to an output stream. More...
 
template<typename T , std::size_t N>
std::array< T, N > operator* (const Permutation &perm, const std::array< T, N > &a)
 Permute a std::array. More...
 
template<typename T , std::size_t N>
std::array< T, N > & operator*= (std::array< T, N > &a, const Permutation &perm)
 In-place permute a std::array. More...
 
template<typename T , typename A >
std::vector< T > operator* (const Permutation &perm, const std::vector< T, A > &v)
 permute a std::vector<T> More...
 
template<typename T , typename A >
std::vector< T, A > & operator*= (std::vector< T, A > &v, const Permutation &perm)
 In-place permute a std::array. More...
 
template<typename T >
std::vector< T > operator* (const Permutation &perm, const T *MADNESS_RESTRICT const ptr)
 Permute a memory buffer. More...
 
bool operator!= (const Permutation &p1, const Permutation &p2)
 Permutation inequality operator. More...
 
bool operator< (const Permutation &p1, const Permutation &p2)
 Permutation less-than operator. More...
 
Permutation operator- (const Permutation &perm)
 Inverse permutation operator. More...
 
Permutation operator* (const Permutation &p1, const Permutation &p2)
 Permutation multiplication operator. More...
 
Permutationoperator*= (Permutation &p1, const Permutation &p2)
 return *this ^ other More...
 
Permutation operator^ (const Permutation &perm, int n)
 Raise perm to the n-th power. More...
 
void swap (Range &r0, Range &r1)
 Exchange the values of the give two ranges. More...
 
Range operator* (const Permutation &perm, const Range &r)
 Create a permuted range. More...
 
bool operator== (const Range &r1, const Range &r2)
 Range equality comparison. More...
 
bool operator!= (const Range &r1, const Range &r2)
 Range inequality comparison. More...
 
std::ostream & operator<< (std::ostream &os, const Range &r)
 Range output operator. More...
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const SparseShape< T > &shape)
 Add the shape to an output stream. More...
 
template<typename T >
DistArray< Tensor< T >, DensePolicydense_diagonal_array (World &world, TiledRange const &trange, T val=1)
 
template<typename T >
DistArray< Tensor< T >, SparsePolicysparse_diagonal_array (World &world, TiledRange const &trange, T val=1)
 
template<typename T , typename Policy >
DistArray< Tensor< T >, std::enable_if_t< std::is_same< Policy, DensePolicy >::value, Policy >> diagonal_array (World &world, TiledRange const &trange, T val=1)
 
template<typename T , typename Policy >
DistArray< Tensor< T >, std::enable_if_t< std::is_same< Policy, SparsePolicy >::value, Policy >> diagonal_array (World &world, TiledRange const &trange, T val=1)
 
template<typename T1 , typename T2 , typename std::enable_if< detail::is_tensor< T1, T2 >::value||detail::is_tensor_of_tensor< T1, T2 >::value >::type * = nullptr>
auto operator+ (const T1 &left, const T2 &right)
 Tensor plus operator. More...
 
template<typename T1 , typename T2 , typename std::enable_if< detail::is_tensor< T1, T2 >::value||detail::is_tensor_of_tensor< T1, T2 >::value >::type * = nullptr>
auto operator- (const T1 &left, const T2 &right)
 Tensor minus operator. More...
 
template<typename T1 , typename T2 , typename std::enable_if< detail::is_tensor< T1, T2 >::value||detail::is_tensor_of_tensor< T1, T2 >::value >::type * = nullptr>
auto operator* (const T1 &left, const T2 &right)
 Tensor multiplication operator. More...
 
template<typename T , typename N , typename std::enable_if<(detail::is_tensor< T >::value||detail::is_tensor_of_tensor< T >::value) &&detail::is_numeric< N >::value >::type * = nullptr>
auto operator* (const T &left, N right)
 Create a copy of left that is scaled by right. More...
 
template<typename N , typename T , typename std::enable_if< detail::is_numeric< N >::value &&(detail::is_tensor< T >::value||detail::is_tensor_of_tensor< T >::value)>::type * = nullptr>
auto operator* (N left, const T &right)
 Create a copy of right that is scaled by left. More...
 
template<typename T , typename std::enable_if< detail::is_tensor< T >::value||detail::is_tensor_of_tensor< T >::value >::type * = nullptr>
auto operator- (const T &arg) -> decltype(arg.neg())
 Create a negated copy of arg. More...
 
template<typename T , typename std::enable_if< detail::is_tensor< T >::value||detail::is_tensor_of_tensor< T >::value >::type * = nullptr>
auto operator* (const Permutation &perm, const T &arg)
 Create a permuted copy of arg. More...
 
template<typename T1 , typename T2 , typename std::enable_if< detail::is_tensor< T1, T2 >::value||detail::is_tensor_of_tensor< T1, T2 >::value >::type * = nullptr>
auto operator+= (T1 &left, const T2 &right)
 Tensor plus operator. More...
 
template<typename T1 , typename T2 , typename std::enable_if< detail::is_tensor< T1, T2 >::value||detail::is_tensor_of_tensor< T1, T2 >::value >::type * = nullptr>
auto operator-= (T1 &left, const T2 &right)
 Tensor minus operator. More...
 
template<typename T1 , typename T2 , typename std::enable_if< detail::is_tensor< T1, T2 >::value||detail::is_tensor_of_tensor< T1, T2 >::value >::type * = nullptr>
auto operator*= (T1 &left, const T2 &right)
 In place tensor multiplication. More...
 
template<typename T , typename N , typename std::enable_if<(detail::is_tensor< T >::value||detail::is_tensor_of_tensor< T >::value) &&detail::is_numeric< N >::value >::type * = nullptr>
auto operator+= (T &left, N right)
 In place tensor add constant. More...
 
template<typename T , typename N , typename std::enable_if<(detail::is_tensor< T >::value||detail::is_tensor_of_tensor< T >::value) &&detail::is_numeric< N >::value >::type * = nullptr>
auto operator-= (T &left, N right)
 In place tensor subtract constant. More...
 
template<typename T , typename N , typename std::enable_if<(detail::is_tensor< T >::value||detail::is_tensor_of_tensor< T >::value) &&detail::is_numeric< N >::value >::type * = nullptr>
auto operator*= (T &left, N right)
 In place tensor scale. More...
 
template<typename T >
detail::ShiftWrapper< T > shift (T &tensor)
 Shift a tensor from one range to another. More...
 
template<typename T >
detail::ShiftWrapper< const T > shift (const T &tensor)
 Shift a tensor from one range to another. More...
 
template<typename T , typename A >
bool operator== (const Tensor< T, A > &a, const Tensor< T, A > &b)
 
template<typename T , typename A >
bool operator!= (const Tensor< T, A > &a, const Tensor< T, A > &b)
 
template<typename T , typename Index >
void remap (detail::TensorInterface< T, Range > &, T *const, const Index &, const Index &)
 
template<typename T , typename Index >
void remap (detail::TensorInterface< const T, Range > &, T *const, const Index &, const Index &)
 
template<typename T >
void remap (detail::TensorInterface< T, Range > &, T *const, const std::initializer_list< std::size_t > &, const std::initializer_list< std::size_t > &)
 
template<typename T >
void remap (detail::TensorInterface< const T, Range > &, T *const, const std::initializer_list< std::size_t > &, const std::initializer_list< std::size_t > &)
 
template<typename T , typename Index >
TensorMap< T > make_map (T *const data, const Index &lower_bound, const Index &upper_bound)
 
template<typename T >
TensorMap< T > make_map (T *const data, const std::initializer_list< std::size_t > &lower_bound, const std::initializer_list< std::size_t > &upper_bound)
 
template<typename T , typename Range_ >
TensorMap< T, std::decay_t< Range_ > > make_map (T *const data, Range_ &&range)
 
template<typename T , typename Index >
TensorConstMap< T > make_map (const T *const data, const Index &lower_bound, const Index &upper_bound)
 
template<typename T >
TensorConstMap< T > make_map (const T *const data, const std::initializer_list< std::size_t > &lower_bound, const std::initializer_list< std::size_t > &upper_bound)
 
template<typename T , typename Range_ >
TensorConstMap< T, std::decay_t< Range_ > > make_map (const T *const data, Range_ &&range)
 
template<typename T , typename Index >
TensorConstMap< T > make_const_map (const T *const data, const Index &lower_bound, const Index &upper_bound)
 
template<typename T >
TensorConstMap< T > make_const_map (const T *const data, const std::initializer_list< std::size_t > &lower_bound, const std::initializer_list< std::size_t > &upper_bound)
 
template<typename T >
TensorConstMap< T > make_const_map (const T *const data, const Range &range)
 
template<typename T , typename Index >
TensorConstMap< T > make_const_map (T *const data, const Index &lower_bound, const Index &upper_bound)
 
template<typename T >
TensorConstMap< T > make_const_map (T *const data, const std::initializer_list< std::size_t > &lower_bound, const std::initializer_list< std::size_t > &upper_bound)
 
template<typename T , typename Range_ >
TensorConstMap< T, std::decay_t< Range_ > > make_const_map (T *const data, Range_ &&range)
 
template<typename T , typename Index >
void remap (TensorMap< T > &map, T *const data, const Index &lower_bound, const Index &upper_bound)
 For reusing map without allocating new ranges . . . maybe. More...
 
template<typename T , typename Index >
void remap (TensorConstMap< T > &map, T *const data, const Index &lower_bound, const Index &upper_bound)
 
template<typename T >
void remap (TensorMap< T > &map, T *const data, const std::initializer_list< std::size_t > &lower_bound, const std::initializer_list< std::size_t > &upper_bound)
 
template<typename T >
void remap (TensorConstMap< T > &map, T *const data, const std::initializer_list< std::size_t > &lower_bound, const std::initializer_list< std::size_t > &upper_bound)
 
template<typename T , typename std::enable_if< detail::is_tensor< T >::value &&detail::is_contiguous_tensor< T >::value >::type * = nullptr>
std::ostream & operator<< (std::ostream &os, const T &t)
 Tensor output operator. More...
 
template<typename Arg >
Tile< Arg > clone (const Tile< Arg > &arg)
 Create a copy of arg. More...
 
template<typename Arg >
bool empty (const Tile< Arg > &arg)
 Check that arg is empty (no data) More...
 
template<typename Arg >
decltype(auto) permute (const Tile< Arg > &arg, const Permutation &perm)
 Create a permuted copy of arg. More...
 
template<typename Arg , typename Index >
decltype(auto) shift (const Tile< Arg > &arg, const Index &range_shift)
 Shift the range of arg. More...
 
template<typename Arg , typename Index >
Tile< Arg > & shift_to (Tile< Arg > &arg, const Index &range_shift)
 Shift the range of arg in place. More...
 
template<typename Left , typename Right >
decltype(auto) add (const Tile< Left > &left, const Tile< Right > &right)
 Add tile arguments. More...
 
template<typename Left , typename Right , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
decltype(auto) add (const Tile< Left > &left, const Tile< Right > &right, const Scalar factor)
 Add and scale tile arguments. More...
 
template<typename Left , typename Right >
decltype(auto) add (const Tile< Left > &left, const Tile< Right > &right, const Permutation &perm)
 Add and permute tile arguments. More...
 
template<typename Left , typename Right , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
decltype(auto) add (const Tile< Left > &left, const Tile< Right > &right, const Scalar factor, const Permutation &perm)
 Add, scale, and permute tile arguments. More...
 
template<typename Arg , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
decltype(auto) add (const Tile< Arg > &arg, const Scalar value)
 Add a constant scalar to tile argument. More...
 
template<typename Arg , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
decltype(auto) add (const Tile< Arg > &arg, const Scalar value, const Permutation &perm)
 Add a constant scalar and permute tile argument. More...
 
template<typename Result , typename Arg >
Tile< Result > & add_to (Tile< Result > &result, const Tile< Arg > &arg)
 Add to the result tile. More...
 
template<typename Result , typename Arg , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
Tile< Result > & add_to (Tile< Result > &result, const Tile< Arg > &arg, const Scalar factor)
 Add and scale to the result tile. More...
 
template<typename Result , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
Tile< Result > & add_to (Tile< Result > &result, const Scalar value)
 Add constant scalar to the result tile. More...
 
template<typename Left , typename Right >
decltype(auto) subt (const Tile< Left > &left, const Tile< Right > &right)
 Subtract tile arguments. More...
 
template<typename Left , typename Right , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
decltype(auto) subt (const Tile< Left > &left, const Tile< Right > &right, const Scalar factor)
 Subtract and scale tile arguments. More...
 
template<typename Left , typename Right >
decltype(auto) subt (const Tile< Left > &left, const Tile< Right > &right, const Permutation &perm)
 Subtract and permute tile arguments. More...
 
template<typename Left , typename Right , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
decltype(auto) subt (const Tile< Left > &left, const Tile< Right > &right, const Scalar factor, const Permutation &perm)
 Subtract, scale, and permute tile arguments. More...
 
template<typename Arg , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
decltype(auto) subt (const Tile< Arg > &arg, const Scalar value)
 Subtract a scalar constant from the tile argument. More...
 
template<typename Arg , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
decltype(auto) subt (const Tile< Arg > &arg, const Scalar value, const Permutation &perm)
 Subtract a constant scalar and permute tile argument. More...
 
template<typename Result , typename Arg >
Tile< Result > & subt_to (Tile< Result > &result, const Tile< Arg > &arg)
 Subtract from the result tile. More...
 
template<typename Result , typename Arg , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
Tile< Result > & subt_to (Tile< Result > &result, const Tile< Arg > &arg, const Scalar factor)
 Subtract and scale from the result tile. More...
 
template<typename Result , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
Tile< Result > & subt_to (Tile< Result > &result, const Scalar value)
 Subtract constant scalar from the result tile. More...
 
template<typename Left , typename Right >
decltype(auto) mult (const Tile< Left > &left, const Tile< Right > &right)
 Multiplication tile arguments. More...
 
template<typename Left , typename Right , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
decltype(auto) mult (const Tile< Left > &left, const Tile< Right > &right, const Scalar factor)
 Multiplication and scale tile arguments. More...
 
template<typename Left , typename Right >
decltype(auto) mult (const Tile< Left > &left, const Tile< Right > &right, const Permutation &perm)
 Multiplication and permute tile arguments. More...
 
template<typename Left , typename Right , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
decltype(auto) mult (const Tile< Left > &left, const Tile< Right > &right, const Scalar factor, const Permutation &perm)
 Multiplication, scale, and permute tile arguments. More...
 
template<typename Result , typename Arg >
Tile< Result > & mult_to (Tile< Result > &result, const Tile< Arg > &arg)
 Multiply to the result tile. More...
 
template<typename Result , typename Arg , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
Tile< Result > & mult_to (Tile< Result > &result, const Tile< Arg > &arg, const Scalar factor)
 Multiply and scale to the result tile. More...
 
template<typename Arg , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
decltype(auto) scale (const Tile< Arg > &arg, const Scalar factor)
 Scalar the tile argument. More...
 
template<typename Arg , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
decltype(auto) scale (const Tile< Arg > &arg, const Scalar factor, const Permutation &perm)
 Scale and permute tile argument. More...
 
template<typename Result , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
Tile< Result > & scale_to (Tile< Result > &result, const Scalar factor)
 Scale to the result tile. More...
 
template<typename Arg >
decltype(auto) neg (const Tile< Arg > &arg)
 Negate the tile argument. More...
 
template<typename Arg >
decltype(auto) neg (const Tile< Arg > &arg, const Permutation &perm)
 Negate and permute tile argument. More...
 
template<typename Result >
Tile< Result > & neg_to (Tile< Result > &result)
 Multiplication constant scalar to a tile. More...
 
template<typename Arg >
decltype(auto) conj (const Tile< Arg > &arg)
 Create a complex conjugated copy of a tile. More...
 
template<typename Arg , typename Scalar , typename std::enable_if< TiledArray::detail::is_numeric< Scalar >::value >::type * = nullptr>
decltype(auto) conj (const Tile< Arg > &arg, const Scalar factor)
 Create a complex conjugated and scaled copy of a tile. More...
 
template<typename Arg >
decltype(auto) conj (const Tile< Arg > &arg, const Permutation &perm)
 Create a complex conjugated and permuted copy of a tile. More...
 
template<typename Arg , typename Scalar , typename std::enable_if< TiledArray::detail::is_numeric< Scalar >::value >::type * = nullptr>
decltype(auto) conj (const Tile< Arg > &arg, const Scalar factor, const Permutation &perm)
 Create a complex conjugated, scaled, and permuted copy of a tile. More...
 
template<typename Result >
Result & conj_to (Tile< Result > &result)
 In-place complex conjugate a tile. More...
 
template<typename Result , typename Scalar , typename std::enable_if< TiledArray::detail::is_numeric< Scalar >::value >::type * = nullptr>
Result & conj_to (Tile< Result > &result, const Scalar factor)
 In-place complex conjugate and scale a tile. More...
 
template<typename Left , typename Right , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
decltype(auto) gemm (const Tile< Left > &left, const Tile< Right > &right, const Scalar factor, const math::GemmHelper &gemm_config)
 Contract and scale tile arguments. More...
 
template<typename Result , typename Left , typename Right , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
Tile< Result > & gemm (Tile< Result > &result, const Tile< Left > &left, const Tile< Right > &right, const Scalar factor, const math::GemmHelper &gemm_config)
 Contract and scale tile arguments to the result tile. More...
 
template<typename Arg >
decltype(auto) trace (const Tile< Arg > &arg)
 Sum the hyper-diagonal elements a tile. More...
 
template<typename Arg >
decltype(auto) sum (const Tile< Arg > &arg)
 Sum the elements of a tile. More...
 
template<typename Arg >
decltype(auto) product (const Tile< Arg > &arg)
 Multiply the elements of a tile. More...
 
template<typename Arg >
decltype(auto) squared_norm (const Tile< Arg > &arg)
 Squared vector 2-norm of the elements of a tile. More...
 
template<typename Arg >
decltype(auto) norm (const Tile< Arg > &arg)
 Vector 2-norm of a tile. More...
 
template<typename Arg >
decltype(auto) max (const Tile< Arg > &arg)
 Maximum element of a tile. More...
 
template<typename Arg >
decltype(auto) min (const Tile< Arg > &arg)
 Minimum element of a tile. More...
 
template<typename Arg >
decltype(auto) abs_max (const Tile< Arg > &arg)
 Absolute maximum element of a tile. More...
 
template<typename Arg >
decltype(auto) abs_min (const Tile< Arg > &arg)
 Absolute mainimum element of a tile. More...
 
template<typename Left , typename Right >
decltype(auto) dot (const Tile< Left > &left, const Tile< Right > &right)
 Vector dot product of a tile. More...
 
template<typename Left , typename Right >
decltype(auto) operator+ (const Tile< Left > &left, const Tile< Right > &right)
 Add tiles operator. More...
 
template<typename Left , typename Right >
Tile< Left > & operator+= (Tile< Left > &left, const Tile< Right > &right)
 In-place add tile operator. More...
 
template<typename Left , typename Right >
decltype(auto) operator- (const Tile< Left > &left, const Tile< Right > &right)
 Subtract tiles operator. More...
 
template<typename Left , typename Right >
Tile< Left > & operator-= (Tile< Left > &left, const Tile< Right > &right)
 In-place subtract tile operator. More...
 
template<typename Left , typename Right >
decltype(auto) operator* (const Tile< Left > &left, const Tile< Right > &right)
 Product tiles operator. More...
 
template<typename Left , typename Right , typename std::enable_if< detail::is_numeric< Right >::value >::type * = nullptr>
decltype(auto) operator* (const Tile< Left > &left, const Right right)
 Scale tile operator. More...
 
template<typename Left , typename Right , typename std::enable_if< TiledArray::detail::is_numeric< Left >::value >::type * = nullptr>
decltype(auto) operator* (const Left left, const Tile< Right > &right)
 Scale tile operator. More...
 
template<typename Left , typename Right >
Tile< Left > & operator*= (Tile< Left > &left, const Tile< Right > &right)
 In-place product tile operator. More...
 
template<typename Arg >
decltype(auto) operator- (const Tile< Arg > &arg)
 Negate tile operator. More...
 
template<typename Arg >
decltype(auto) operator* (const Permutation &perm, Tile< Arg > const arg)
 Permute tile operator. More...
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const Tile< T > &tile)
 Tile output stream operator. More...
 
template<typename Left , typename Right >
auto add (const Left &left, const Right &right) -> decltype(left.add(right))
 Add tile arguments. More...
 
template<typename Left , typename Right , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
auto add (const Left &left, const Right &right, const Scalar factor)
 Add and scale tile arguments. More...
 
template<typename Left , typename Right >
auto add (const Left &left, const Right &right, const Permutation &perm)
 Add and permute tile arguments. More...
 
template<typename Left , typename Right , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
auto add (const Left &left, const Right &right, const Scalar factor, const Permutation &perm)
 Add, scale, and permute tile arguments. More...
 
template<typename Result , typename Arg >
Result & add_to (Result &result, const Arg &arg)
 Add to the result tile. More...
 
template<typename Result , typename Arg , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
Result & add_to (Result &result, const Arg &arg, const Scalar factor)
 Add and scale to the result tile. More...
 
template<typename Arg , typename Result = typename TiledArray::eval_trait<std::decay_t<Arg>>::type>
auto invoke_cast (Arg &&arg)
 
template<typename Arg >
auto clone (const Arg &arg)
 Create a copy of arg. More...
 
template<typename Arg >
auto permute (const Arg &arg, const Permutation &perm)
 Create a permuted copy of arg. More...
 
template<typename Arg , typename Scalar , typename std::enable_if< TiledArray::detail::is_numeric< Scalar >::value >::type * = nullptr>
auto scale (const Arg &arg, const Scalar factor)
 Scalar the tile argument. More...
 
template<typename Arg , typename Scalar , typename std::enable_if< TiledArray::detail::is_numeric< Scalar >::value >::type * = nullptr>
auto scale (const Arg &arg, const Scalar factor, const Permutation &perm)
 Scale and permute tile argument. More...
 
template<typename Result , typename Scalar , typename std::enable_if< TiledArray::detail::is_numeric< Scalar >::value >::type * = nullptr>
Result & scale_to (Result &result, const Scalar factor)
 Scale to the result tile. More...
 
template<typename Arg , typename Index >
auto shift (const Arg &arg, const Index &range_shift)
 Shift the range of arg. More...
 
template<typename Arg , typename Index >
auto shift_to (Arg &arg, const Index &range_shift)
 Shift the range of arg in place. More...
 
template<typename Arg >
bool empty (const Arg &arg)
 Check that arg is empty (no data) More...
 
template<typename Left , typename Right >
auto subt (const Left &left, const Right &right)
 Subtract tile arguments. More...
 
template<typename Left , typename Right , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
auto subt (const Left &left, const Right &right, const Scalar factor)
 Subtract and scale tile arguments. More...
 
template<typename Left , typename Right >
auto subt (const Left &left, const Right &right, const Permutation &perm)
 Subtract and permute tile arguments. More...
 
template<typename Left , typename Right , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
auto subt (const Left &left, const Right &right, const Scalar factor, const Permutation &perm)
 Subtract, scale, and permute tile arguments. More...
 
template<typename Arg , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
auto subt (const Arg &arg, const Scalar value)
 Subtract a scalar constant from the tile argument. More...
 
template<typename Arg , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
auto subt (const Arg &arg, const Scalar value, const Permutation &perm)
 Subtract a constant scalar and permute tile argument. More...
 
template<typename Result , typename Arg >
Result & subt_to (Result &result, const Arg &arg)
 Subtract from the result tile. More...
 
template<typename Result , typename Arg , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
Result & subt_to (Result &result, const Arg &arg, const Scalar factor)
 Subtract and scale from the result tile. More...
 
template<typename Result , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
Result & subt_to (Result &result, const Scalar value)
 Subtract constant scalar from the result tile. More...
 
template<typename Left , typename Right >
auto mult (const Left &left, const Right &right)
 Multiplication tile arguments. More...
 
template<typename Left , typename Right , typename Scalar , typename std::enable_if< TiledArray::detail::is_numeric< Scalar >::value >::type * = nullptr>
auto mult (const Left &left, const Right &right, const Scalar factor)
 Multiplication and scale tile arguments. More...
 
template<typename Left , typename Right >
auto mult (const Left &left, const Right &right, const Permutation &perm)
 Multiplication and permute tile arguments. More...
 
template<typename Left , typename Right , typename Scalar , typename std::enable_if< TiledArray::detail::is_numeric< Scalar >::value >::type * = nullptr>
auto mult (const Left &left, const Right &right, const Scalar factor, const Permutation &perm)
 Multiplication, scale, and permute tile arguments. More...
 
template<typename Result , typename Arg >
Result & mult_to (Result &result, const Arg &arg)
 Multiply to the result tile. More...
 
template<typename Result , typename Arg , typename Scalar , typename std::enable_if< TiledArray::detail::is_numeric< Scalar >::value >::type * = nullptr>
Result & mult_to (Result &result, const Arg &arg, const Scalar factor)
 Multiply and scale to the result tile. More...
 
template<typename Arg >
auto neg (const Arg &arg)
 Negate the tile argument. More...
 
template<typename Arg >
auto neg (const Arg &arg, const Permutation &perm)
 Negate and permute tile argument. More...
 
template<typename Result >
Result & neg_to (Result &result)
 Multiplication constant scalar to a tile. More...
 
template<typename Arg >
auto conj (const Arg &arg)
 Create a complex conjugated copy of a tile. More...
 
template<typename Arg , typename Scalar , typename std::enable_if< TiledArray::detail::is_numeric< Scalar >::value >::type * = nullptr>
auto conj (const Arg &arg, const Scalar factor)
 Create a complex conjugated and scaled copy of a tile. More...
 
template<typename Arg >
auto conj (const Arg &arg, const Permutation &perm)
 Create a complex conjugated and permuted copy of a tile. More...
 
template<typename Arg , typename Scalar , typename std::enable_if< TiledArray::detail::is_numeric< Scalar >::value >::type * = nullptr>
auto conj (const Arg &arg, const Scalar factor, const Permutation &perm)
 Create a complex conjugated, scaled, and permuted copy of a tile. More...
 
template<typename Result >
Result & conj_to (Result &result)
 In-place complex conjugate a tile. More...
 
template<typename Result , typename Scalar , typename std::enable_if< TiledArray::detail::is_numeric< Scalar >::value >::type * = nullptr>
Result & conj_to (Result &result, const Scalar factor)
 In-place complex conjugate and scale a tile. More...
 
template<typename Left , typename Right , typename Scalar , typename std::enable_if< TiledArray::detail::is_numeric< Scalar >::value >::type * = nullptr>
auto gemm (const Left &left, const Right &right, const Scalar factor, const math::GemmHelper &gemm_config)
 Contract and scale tile arguments. More...
 
template<typename Result , typename Left , typename Right , typename Scalar , typename std::enable_if< TiledArray::detail::is_numeric< Scalar >::value >::type * = nullptr>
Result & gemm (Result &result, const Left &left, const Right &right, const Scalar factor, const math::GemmHelper &gemm_config)
 Contract and scale tile arguments to the result tile. More...
 
template<typename Arg >
auto trace (const Arg &arg)
 Sum the hyper-diagonal elements a tile. More...
 
template<typename Arg >
auto sum (const Arg &arg)
 Sum the elements of a tile. More...
 
template<typename Arg >
auto product (const Arg &arg)
 Multiply the elements of a tile. More...
 
template<typename Arg >
auto squared_norm (const Arg &arg)
 Squared vector 2-norm of the elements of a tile. More...
 
template<typename Arg >
auto norm (const Arg &arg)
 Vector 2-norm of a tile. More...
 
template<typename Arg >
auto max (const Arg &arg)
 Maximum element of a tile. More...
 
template<typename Arg >
auto min (const Arg &arg)
 Minimum element of a tile. More...
 
template<typename Arg >
auto abs_max (const Arg &arg)
 Absolute maximum element of a tile. More...
 
template<typename Arg >
auto abs_min (const Arg &arg)
 Absolute mainimum element of a tile. More...
 
template<typename Left , typename Right >
auto dot (const Left &left, const Right &right)
 Vector dot product of two tiles. More...
 
template<typename Left , typename Right >
auto inner_product (const Left &left, const Right &right)
 Vector inner product of two tiles. More...
 
TiledRange operator* (const Permutation &p, const TiledRange &r)
 TiledRange permutation operator. More...
 
void swap (TiledRange &r0, TiledRange &r1)
 Exchange the content of the two given TiledRange's. More...
 
bool operator== (const TiledRange &r1, const TiledRange &r2)
 Returns true when all tile and element ranges are the same. More...
 
bool operator!= (const TiledRange &r1, const TiledRange &r2)
 
std::ostream & operator<< (std::ostream &out, const TiledRange &rng)
 
void swap (TiledRange1 &r0, TiledRange1 &r1)
 Exchange the data of the two given ranges. More...
 
bool operator== (const TiledRange1 &r1, const TiledRange1 &r2)
 Equality operator. More...
 
bool operator!= (const TiledRange1 &r1, const TiledRange1 &r2)
 Inequality operator. More...
 
std::ostream & operator<< (std::ostream &out, const TiledRange1 &rng)
 TiledRange1 ostream operator. More...
 
TiledArray initialization.

These functions initialize TiledArray AND MADWorld runtime components.

Note
the default World object is set to the object returned by these.
World & initialize (int &argc, char **&argv, const SafeMPI::Intracomm &comm)
 
World & initialize (int &argc, char **&argv)
 
World & initialize (int &argc, char **&argv, const MPI_Comm &comm)
 
void finalize ()
 

Typedef Documentation

◆ Array

template<typename T , unsigned int = 0, typename Tile = Tensor<T, Eigen::aligned_allocator<T> >, typename Policy = DensePolicy>
using TiledArray::Array = typedef DistArray<Tile, Policy>

Definition at line 77 of file tiledarray_fwd.h.

◆ EigenMatrixXcd

typedef Eigen::Matrix<std::complex<double>, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> TiledArray::EigenMatrixXcd

Definition at line 43 of file eigen.h.

◆ EigenMatrixXcf

typedef Eigen::Matrix<std::complex<float>, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> TiledArray::EigenMatrixXcf

Definition at line 44 of file eigen.h.

◆ EigenMatrixXd

typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> TiledArray::EigenMatrixXd

Definition at line 41 of file eigen.h.

◆ EigenMatrixXf

typedef Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> TiledArray::EigenMatrixXf

Definition at line 42 of file eigen.h.

◆ EigenMatrixXi

typedef Eigen::Matrix<int, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> TiledArray::EigenMatrixXi

Definition at line 45 of file eigen.h.

◆ EigenMatrixXl

typedef Eigen::Matrix<long, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> TiledArray::EigenMatrixXl

Definition at line 46 of file eigen.h.

◆ EigenVectorXcd

typedef Eigen::Matrix<std::complex<double>, 1, Eigen::Dynamic> TiledArray::EigenVectorXcd

Definition at line 49 of file eigen.h.

◆ EigenVectorXcf

typedef Eigen::Matrix<std::complex<float>, 1, Eigen::Dynamic> TiledArray::EigenVectorXcf

Definition at line 50 of file eigen.h.

◆ EigenVectorXd

typedef Eigen::Matrix<double, Eigen::Dynamic, 1> TiledArray::EigenVectorXd

Definition at line 47 of file eigen.h.

◆ EigenVectorXf

typedef Eigen::Matrix<float, Eigen::Dynamic, 1> TiledArray::EigenVectorXf

Definition at line 48 of file eigen.h.

◆ EigenVectorXi

typedef Eigen::Matrix<int, Eigen::Dynamic, 1> TiledArray::EigenVectorXi

Definition at line 51 of file eigen.h.

◆ EigenVectorXl

typedef Eigen::Matrix<long, Eigen::Dynamic, 1> TiledArray::EigenVectorXl

Definition at line 52 of file eigen.h.

◆ TArray

template<typename T >
using TiledArray::TArray = typedef DistArray<Tensor<T, Eigen::aligned_allocator<T> >, DensePolicy>

Definition at line 57 of file tiledarray_fwd.h.

◆ TArrayC

typedef TArray<std::complex<float> > TiledArray::TArrayC

Definition at line 63 of file tiledarray_fwd.h.

◆ TArrayD

typedef TArray<double> TiledArray::TArrayD

Definition at line 58 of file tiledarray_fwd.h.

◆ TArrayF

typedef TArray<float> TiledArray::TArrayF

Definition at line 60 of file tiledarray_fwd.h.

◆ TArrayI

Definition at line 59 of file tiledarray_fwd.h.

◆ TArrayL

typedef TArray<long> TiledArray::TArrayL

Definition at line 61 of file tiledarray_fwd.h.

◆ TArrayZ

typedef TArray<std::complex<double> > TiledArray::TArrayZ

Definition at line 62 of file tiledarray_fwd.h.

◆ TensorC

typedef Tensor<std::complex<float>, Eigen::aligned_allocator<std::complex<float> > > TiledArray::TensorC

Definition at line 49 of file tiledarray_fwd.h.

◆ TensorConstMap

template<typename T , typename Range_ = Range>
using TiledArray::TensorConstMap = typedef detail::TensorInterface<typename std::add_const<T>::type, Range_>

Definition at line 48 of file tensor_map.h.

◆ TensorConstView

template<typename T >
using TiledArray::TensorConstView = typedef detail::TensorInterface<typename std::add_const<T>::type, BlockRange>

Definition at line 46 of file tensor.h.

◆ TensorD

Definition at line 42 of file tiledarray_fwd.h.

◆ TensorF

Definition at line 46 of file tiledarray_fwd.h.

◆ TensorI

Definition at line 45 of file tiledarray_fwd.h.

◆ TensorL

Definition at line 47 of file tiledarray_fwd.h.

◆ TensorMap

template<typename T , typename Range_ = Range>
using TiledArray::TensorMap = typedef detail::TensorInterface<T, Range_>

Definition at line 44 of file tensor_map.h.

◆ TensorView

template<typename T >
using TiledArray::TensorView = typedef detail::TensorInterface<T, BlockRange>

Definition at line 42 of file tensor.h.

◆ TensorZ

typedef Tensor<std::complex<double>, Eigen::aligned_allocator<std::complex<double> > > TiledArray::TensorZ

Definition at line 48 of file tiledarray_fwd.h.

◆ TSpArray

template<typename T >
using TiledArray::TSpArray = typedef DistArray<Tensor<T, Eigen::aligned_allocator<T> >, SparsePolicy>

Definition at line 67 of file tiledarray_fwd.h.

◆ TSpArrayC

typedef TSpArray<std::complex<float> > TiledArray::TSpArrayC

Definition at line 73 of file tiledarray_fwd.h.

◆ TSpArrayD

Definition at line 68 of file tiledarray_fwd.h.

◆ TSpArrayF

Definition at line 70 of file tiledarray_fwd.h.

◆ TSpArrayI

Definition at line 69 of file tiledarray_fwd.h.

◆ TSpArrayL

Definition at line 71 of file tiledarray_fwd.h.

◆ TSpArrayZ

typedef TSpArray<std::complex<double> > TiledArray::TSpArrayZ

Definition at line 72 of file tiledarray_fwd.h.

Enumeration Type Documentation

◆ ShapeReductionMethod

Enumerator
Union 
Intersect 

Definition at line 44 of file foreach.h.

Function Documentation

◆ add() [1/4]

template<typename Left , typename Right >
auto TiledArray::add ( const Left &  left,
const Right &  right 
) -> decltype(left.add(right))
inline

Add tile arguments.

Template Parameters
LeftThe left-hand tile type
RightThe right-hand tile type
Parameters
leftThe left-hand argument to be added
rightThe right-hand argument to be added
Returns
A tile that is equal to (left + right)

Definition at line 42 of file add.h.

◆ add() [2/4]

template<typename Left , typename Right , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
auto TiledArray::add ( const Left &  left,
const Right &  right,
const Scalar  factor 
)
inline

Add and scale tile arguments.

Template Parameters
LeftThe left-hand tile type
RightThe right-hand tile type
ScalarA scalar type
Parameters
leftThe left-hand argument to be added
rightThe right-hand argument to be added
factorThe scaling factor
Returns
A tile that is equal to (left + right) * factor

Definition at line 57 of file add.h.

◆ add() [3/4]

template<typename Left , typename Right >
auto TiledArray::add ( const Left &  left,
const Right &  right,
const Permutation perm 
)
inline

Add and permute tile arguments.

Template Parameters
LeftThe left-hand tile type
RightThe right-hand tile type
Parameters
leftThe left-hand argument to be added
rightThe right-hand argument to be added
permThe permutation to be applied to the result
Returns
A tile that is equal to perm ^ (left + right)

Definition at line 69 of file add.h.

◆ add() [4/4]

template<typename Left , typename Right , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
auto TiledArray::add ( const Left &  left,
const Right &  right,
const Scalar  factor,
const Permutation perm 
)
inline

Add, scale, and permute tile arguments.

Template Parameters
LeftThe left-hand tile type
RightThe right-hand tile type
ScalarA scalar type
Parameters
leftThe left-hand argument to be added
rightThe right-hand argument to be added
factorThe scaling factor
permThe permutation to be applied to the result
Returns
A tile that is equal to perm ^ (left + right) * factor

Definition at line 84 of file add.h.

◆ add_to() [1/2]

template<typename Result , typename Arg >
Result& TiledArray::add_to ( Result &  result,
const Arg &  arg 
)
inline

Add to the result tile.

Template Parameters
ResultThe result tile type
ArgThe argument tile type
Parameters
resultThe result tile
argThe argument to be added to the result
Returns
A tile that is equal to result[i] += arg[i]

Definition at line 96 of file add.h.

◆ add_to() [2/2]

template<typename Result , typename Arg , typename Scalar , typename std::enable_if< detail::is_numeric< Scalar >::value >::type * = nullptr>
Result& TiledArray::add_to ( Result &  result,
const Arg &  arg,
const Scalar  factor 
)
inline

Add and scale to the result tile.

Template Parameters
ResultThe result tile type
ArgThe argument tile type
ScalarA scalar type
Parameters
resultThe result tile
argThe argument to be added to result
factorThe scaling factor
Returns
A tile that is equal to (result[i] += arg[i]) *= factor

Definition at line 110 of file add.h.

◆ array_to_btas_tensor()

template<typename Tile , typename Policy >
btas::Tensor<typename Tile::value_type> TiledArray::array_to_btas_tensor ( const TiledArray::DistArray< Tile, Policy > &  src)

Convert a TiledArray::DistArray object into a btas::Tensor object.

This function will copy the contents of src into a btas::Tensor object. The copy operation is done in parallel, and this function will block until all elements of src have been copied into the result array tiles. The size of src.world().size() must be equal to 1 or src must be a replicated TiledArray::DistArray. Usage:

TiledArray::TArrayD array(world, trange);
// Set tiles of array ...
auto t = array_to_btas_tensor(array);
Template Parameters
Tilethe tile type of src
Policythe policy type of src
Parameters
[in]srcThe TiledArray::DistArray<Tile,Policy> object whose contents will be copied to the result.
Returns
A btas::Tensor object that is a copy of src
Exceptions
TiledArray::ExceptionWhen world size is greater than 1 and src is not replicated

Definition at line 259 of file btas.h.

Here is the call graph for this function:

◆ array_to_eigen()

template<typename Tile , typename Policy , unsigned int EigenStorageOrder = Eigen::ColMajor>
Eigen::Matrix<typename Tile::value_type, Eigen::Dynamic, Eigen::Dynamic, EigenStorageOrder> TiledArray::array_to_eigen ( const DistArray< Tile, Policy > &  array)

Convert an Array object into an Eigen matrix object.

This function will copy the content of an Array object into matrix. The copy operation is done in parallel, and this function will block until all elements of array have been copied into the result matrix. The size of world must be exactly equal to 1, or array must be a replicated object. Usage:

TiledArray::Array<double, 2> array(world, trange);
// Set tiles of array ...
Eigen::MatrixXd m = array_to_eigen(array);
Template Parameters
TileThe array tile type
EigenStorageOrderThe storage order of the resulting Eigen::Matrix object; the default is Eigen::ColMajor, i.e. the column-major storage
Parameters
arrayThe array to be converted. It must be replicated if using 2 or more World ranks.
Returns
an Eigen matrix; it will contain same data on each World rank.
Exceptions
TiledArray::ExceptionWhen world size is greater than 1 and array is not replicated.
TiledArray::ExceptionWhen the number of dimensions of array is not equal to 1 or 2.

Definition at line 436 of file eigen.h.

Here is the call graph for this function:

◆ assign()

template<typename Tile , typename Policy >
void TiledArray::assign ( DistArray< Tile, Policy > &  m1,
const DistArray< Tile, Policy > &  m2 
)
inline

Definition at line 123 of file utils.h.

Here is the caller graph for this function:

◆ axpy()

template<typename Tile , typename Policy >
void TiledArray::axpy ( DistArray< Tile, Policy > &  y,
typename DistArray< Tile, Policy >::element_type  a,
const DistArray< Tile, Policy > &  x 
)
inline

Definition at line 115 of file utils.h.

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

◆ btas_subtensor_to_tensor()

template<typename T , typename Range_ , typename Storage_ , typename Allocator_ >
void TiledArray::btas_subtensor_to_tensor ( const btas::Tensor< T, Range_, Storage_ > &  src,
Tensor< T, Allocator_ > &  dst 
)
inline

Copy a block of a btas::Tensor into a TiledArray::Tensor.

A block of btas::Tensor src will be copied into TiledArray::Tensor dst. The block dimensions will be determined by the dimensions of the range of dst .

Template Parameters
TThe tensor element type
Range_The range type of the source btas::Tensor object
Storage_The storage type of the source btas::Tensor object
Allocator_The allocator type of the destination TiledArray::Tensor object
Parameters
[in]srcThe source object; its subblock defined by the {lower,upper} bounds {dst.lobound(),dst.upbound()} will be copied to dst
[out]dstThe object that will contain the contents of the corresponding subblock of src
Exceptions
TiledArray::ExceptionWhen the dimensions of src and dst do not match.

Definition at line 52 of file btas.h.

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

◆ btas_tensor_to_array()

template<typename DistArray_ , typename T , typename Range , typename Storage >
DistArray_ TiledArray::btas_tensor_to_array ( World &  world,
const TiledArray::TiledRange trange,
const btas::Tensor< T, Range, Storage > &  src,
bool  replicated = false 
)

Convert a btas::Tensor object into a TiledArray::DistArray object.

This function will copy the contents of src into a DistArray_ object that is tiled according to the trange object. If the DistArray_ object has sparse policy, a sparse map with large norm is created to ensure all the values from src copy to the DistArray_ object. The copy operation is done in parallel, and this function will block until all elements of src have been copied into the result array tiles. The size of world.size() must be equal to 1 or replicate must be equal to true . If replicate is true, it is your responsibility to ensure that the data in src is identical on all nodes. Upon completion, if the DistArray_ object has sparse policy truncate() is called.
Usage:

btas::Tensor<double> src(100, 100, 100);
// Fill src with data ...
// Create a range for the new array object
std::vector<std::size_t> blocks;
for(std::size_t i = 0ul; i <= 100ul; i += 10ul)
blocks.push_back(i);
std::array<TiledArray::TiledRange1, 3> blocks3 =
{{ TiledArray::TiledRange1(blocks.begin(), blocks.end()),
TiledArray::TiledRange1(blocks.begin(), blocks.end()),
TiledArray::TiledRange1(blocks.begin(), blocks.end()) }};
TiledArray::TiledRange trange(blocks3.begin(), blocks3.end());
// Create an Array from the source btas::Tensor object
btas_tensor_to_array<decltype(array)>(world, trange, src);
Template Parameters
DistArray_a TiledArray::DistArray type
TArgsthe type pack in type btas::Tensor<TArgs...> of src
Parameters
[in,out]worldThe world where the result array will live
[in]trangeThe tiled range of the new array
[in]srcThe btas::Tensor<TArgs..> object whose contents will be copied to the result.
[in]replicatedtrue indicates that the result array should be a replicated array [default = false].
Returns
A DistArray_ object that is a copy of src
Exceptions
TiledArray::ExceptionWhen world size is greater than 1
Note
If using 2 or more World ranks, set replicated=true and make sure matrix is the same on each rank!

Definition at line 186 of file btas.h.

Here is the call graph for this function:

◆ clone() [1/2]

template<typename Arg >
auto TiledArray::clone ( const Arg &  arg)
inline

Create a copy of arg.

Template Parameters
ArgThe tile argument type
Parameters
argThe tile argument to be permuted
Returns
A (deep) copy of arg

Definition at line 40 of file clone.h.

◆ clone() [2/2]

template<typename Tile , typename Policy >
DistArray<Tile, Policy> TiledArray::clone ( const DistArray< Tile, Policy > &  arg)
inline

Create a deep copy of an array.

Template Parameters
TileThe tile type of the array
PolicyThe policy of the array
Parameters
argThe array to be cloned

Definition at line 43 of file clone.h.

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

◆ column_major_buffer_to_array()

template<typename A >
A TiledArray::column_major_buffer_to_array ( World &  world,
const typename A::trange_type &  trange,
const typename A::value_type::value_type *  buffer,
const std::size_t  m,
const std::size_t  n,
const bool  replicated = false 
)
inline

Convert a column-major matrix buffer into an Array object.

This function will copy the content of buffer into an Array object that is tiled according to the trange object. The copy operation is done in parallel, and this function will block until all elements of matrix have been copied into the result array tiles. The size of world.size() must be equal to 1 or replicate must be equal to true . If replicate is true, it is your responsibility to ensure that the data in buffer is identical on all nodes. Usage:

double* buffer = new double[100 * 100];
// Fill buffer with data ...
// Create a range for the new array object
std::vector<std::size_t> blocks;
for(std::size_t i = 0ul; i <= 100ul; i += 10ul)
blocks.push_back(i);
std::array<TiledArray::TiledRange1, 2> blocks2 =
{{ TiledArray::TiledRange1(blocks.begin(), blocks.end()),
TiledArray::TiledRange1(blocks.begin(), blocks.end()) }};
TiledArray::TiledRange trange(blocks2.begin(), blocks2.end());
// Create an Array from an Eigen matrix.
column_major_buffer_to_array<TiledArray::Array<double, 2> >(world, trange, buffer, 100, 100);
delete [] buffer;
Template Parameters
AThe array type
Parameters
worldThe world where the array will live
trangeThe tiled range of the new array
bufferThe row-major matrix buffer to be copied
mThe number of rows in the matrix
nThe number of columns in the matrix
replicatedtrue indicates that the result array should be a replicated array [default = false].
Returns
An Array object that is a copy of matrix
Exceptions
TiledArray::ExceptionWhen m and n are not equal to the number of rows or columns in tiled range.

Definition at line 576 of file eigen.h.

Here is the call graph for this function:

◆ copy()

template<typename Tile , typename Policy >
DistArray<Tile,Policy> TiledArray::copy ( const DistArray< Tile, Policy > &  a)
inline

Definition at line 58 of file utils.h.

Here is the caller graph for this function:

◆ dense_diagonal_array()

template<typename T >
DistArray<Tensor<T>,DensePolicy> TiledArray::dense_diagonal_array ( World &  world,
TiledRange const &  trange,
val = 1 
)

Create a DensePolicy DistArray with only diagonal elements, the expected behavior is that every element (n,n,n, ..., n) will be nonzero.

Parameters
worldThe world for the array
trangeThe trange for the array
valThe value to be written along the diagonal elements

Definition at line 138 of file diagonal_array.h.

Here is the call graph for this function:

◆ diagonal_array() [1/2]

template<typename T , typename Policy >
DistArray<Tensor<T>, std::enable_if_t<std::is_same<Policy, DensePolicy>::value, Policy>> TiledArray::diagonal_array ( World &  world,
TiledRange const &  trange,
val = 1 
)

Definition at line 177 of file diagonal_array.h.

◆ diagonal_array() [2/2]

template<typename T , typename Policy >
DistArray<Tensor<T>, std::enable_if_t<std::is_same<Policy, SparsePolicy>::value, Policy>> TiledArray::diagonal_array ( World &  world,
TiledRange const &  trange,
val = 1 
)

Definition at line 185 of file diagonal_array.h.

◆ dot()

template<typename Left , typename Right >
TiledArray::expressions::ExprTrait<Left>::scalar_type TiledArray::dot ( const TiledArray::expressions::Expr< Left > &  a1,
const TiledArray::expressions::Expr< Right > &  a2 
)
inline

Definition at line 96 of file utils.h.

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

◆ dot_product()

template<typename Tile , typename Policy >
DistArray<Tile,Policy>::element_type TiledArray::dot_product ( const DistArray< Tile, Policy > &  a1,
const DistArray< Tile, Policy > &  a2 
)
inline

Definition at line 89 of file utils.h.

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

◆ eigen_map() [1/6]

template<typename T , typename A >
Eigen::Map<const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>, Eigen::AutoAlign> TiledArray::eigen_map ( const Tensor< T, A > &  tensor,
const std::size_t  m,
const std::size_t  n 
)
inline

Construct a const Eigen::Map object for a given Tensor object.

Template Parameters
TThe tensor element type
AThe tensor allocator type
Parameters
tensorThe tensor object
mThe number of rows in the result matrix
nThe number of columns in the result matrix
Returns
An m x n Eigen matrix map for tensor
Exceptions
TiledArray::ExceptionWhen m * n is not equal to tensor size

Definition at line 66 of file eigen.h.

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

◆ eigen_map() [2/6]

template<typename T , typename A >
Eigen::Map<Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>, Eigen::AutoAlign> TiledArray::eigen_map ( Tensor< T, A > &  tensor,
const std::size_t  m,
const std::size_t  n 
)
inline

Construct an Eigen::Map object for a given Tensor object.

Template Parameters
TThe tensor element type
AThe tensor allocator type
Parameters
tensorThe tensor object
mThe number of rows in the result matrix
nThe number of columns in the result matrix
Returns
An m x n Eigen matrix map for tensor
Exceptions
TiledArray::ExceptionWhen m * n is not equal to tensor size

Definition at line 84 of file eigen.h.

Here is the call graph for this function:

◆ eigen_map() [3/6]

template<typename T , typename A >
Eigen::Map<const Eigen::Matrix<T, Eigen::Dynamic, 1>, Eigen::AutoAlign> TiledArray::eigen_map ( const Tensor< T, A > &  tensor,
const std::size_t  n 
)
inline

Construct a const Eigen::Map object for a given Tensor object.

Template Parameters
TThe tensor element type
AThe tensor allocator type
Parameters
tensorThe tensor object
nThe number of elements in the result matrix
Returns
An n element Eigen vector map for tensor
Exceptions
TiledArray::ExceptionWhen n is not equal to tensor size

Definition at line 101 of file eigen.h.

Here is the call graph for this function:

◆ eigen_map() [4/6]

template<typename T , typename A >
Eigen::Map<Eigen::Matrix<T, Eigen::Dynamic, 1>, Eigen::AutoAlign> TiledArray::eigen_map ( Tensor< T, A > &  tensor,
const std::size_t  n 
)
inline

Construct an Eigen::Map object for a given Tensor object.

Template Parameters
TThe tensor element type
AThe tensor allocator type
Parameters
tensorThe tensor object
nThe number of elements in the result matrix
Returns
An n element Eigen vector map for tensor
Exceptions
TiledArray::ExceptionWhen m * n is not equal to tensor size

Definition at line 118 of file eigen.h.

Here is the call graph for this function:

◆ eigen_map() [5/6]

template<typename T , typename A >
Eigen::Map<const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>, Eigen::AutoAlign> TiledArray::eigen_map ( const Tensor< T, A > &  tensor)
inline

Construct a const Eigen::Map object for a given Tensor object.

The dimensions of the result tensor

Template Parameters
TThe tensor element type
AThe tensor allocator type
Parameters
tensorThe tensor object
Returns
An Eigen matrix map for tensor
Exceptions
TiledArray::ExceptionWhen tensor dimensions are not equal to 2 or 1.

Definition at line 135 of file eigen.h.

Here is the call graph for this function:

◆ eigen_map() [6/6]

template<typename T , typename A >
Eigen::Map<Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>, Eigen::AutoAlign> TiledArray::eigen_map ( Tensor< T, A > &  tensor)
inline

Construct an Eigen::Map object for a given Tensor object.

Template Parameters
TThe tensor element type
AThe tensor allocator type
Parameters
tensorThe tensor object
Returns
An Eigen matrix map for tensor
Exceptions
Whentensor dimensions are not equal to 2 or 1.

Definition at line 151 of file eigen.h.

Here is the call graph for this function:

◆ eigen_submatrix_to_tensor()

template<typename T , typename A , typename Derived >
void TiledArray::eigen_submatrix_to_tensor ( const Eigen::MatrixBase< Derived > &  matrix,
Tensor< T, A > &  tensor 
)
inline

Copy a block of an Eigen matrix into a tensor.

A block of matrix will be copied into tensor. The block dimensions will be determined by the dimensions of the tensor's range.

Template Parameters
TThe tensor element type
AThe tensor allocator type
DerivedThe derived type of an Eigen matrix
Parameters
[in]matrixThe object that will be assigned the content of tensor
[out]tensorThe object that will be assigned the content of matrix
Exceptions
TiledArray::ExceptionWhen the dimensions of tensor are not equal to 1 or 2.
TiledArray::ExceptionWhen the range of tensor is outside the range of matrix .

Definition at line 172 of file eigen.h.

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

◆ eigen_to_array()

template<typename A , typename Derived >
A TiledArray::eigen_to_array ( World &  world,
const typename A::trange_type &  trange,
const Eigen::MatrixBase< Derived > &  matrix,
bool  replicated = false 
)

Convert an Eigen matrix into an Array object.

This function will copy the content of matrix into an Array object that is tiled according to the trange object. The copy operation is done in parallel, and this function will block until all elements of matrix have been copied into the result array tiles. The size of world.size() must be equal to 1 or replicate must be equal to true . If replicate is true, it is your responsibility to ensure that the data in matrix is identical on all nodes. Usage:

Eigen::MatrixXd m(100, 100);
// Fill m with data ...
// Create a range for the new array object
std::vector<std::size_t> blocks;
for(std::size_t i = 0ul; i <= 100ul; i += 10ul)
blocks.push_back(i);
std::array<TiledArray::TiledRange1, 2> blocks2 =
{{ TiledArray::TiledRange1(blocks.begin(), blocks.end()),
TiledArray::TiledRange1(blocks.begin(), blocks.end()) }};
TiledArray::TiledRange trange(blocks2.begin(), blocks2.end());
// Create an Array from an Eigen matrix.
eigen_to_array<TiledArray::Array<double, 2> >(world, trange, m);
Template Parameters
AThe array type
DerivedThe Eigen matrix derived type
Parameters
worldThe world where the array will live
trangeThe tiled range of the new array
matrixThe Eigen matrix to be copied
replicatedtrue indicates that the result array should be a replicated array [default = false].
Returns
An Array object that is a copy of matrix
Exceptions
TiledArray::ExceptionWhen world size is greater than 1
Note
If using 2 or more World ranks, set replicated=true and make sure matrix is the same on each rank!

Definition at line 361 of file eigen.h.

Here is the caller graph for this function:

◆ exception_break()

void TiledArray::exception_break ( )
inline

Place a break point on this function to stop before TiledArray exceptions are thrown.

Definition at line 63 of file error.h.

◆ finalize()

void TiledArray::finalize ( )
inline

Definition at line 143 of file madness.h.

◆ foreach() [1/8]

template<typename ResultTile , typename ArgTile , typename Op , typename = typename std::enable_if<!std::is_same<ResultTile,ArgTile>::value>::type>
DistArray<ResultTile, DensePolicy> TiledArray::foreach ( const DistArray< ArgTile, DensePolicy > &  arg,
Op &&  op 
)
inline

Apply a function to each tile of a dense Array.

This function uses an Array object to generate a new Array where the output tiles are a function of the input tiles. Users must provide a function/functor that initializes the tiles for the new Array object. For example, if we want to create a new array with were each element is equal to the square root of the corresponding element of the original array:

foreach(in_array, [=] (TiledArray::Tensor<double>& out_tile,
const TiledArray::Tensor<double>& in_tile) {
out_tile = in_tile.unary([=] (const double value) -> double
{ return std::sqrt(value); });
});

The expected signature of the tile operation is:

Template Parameters
OpTile operation
ResultTileThe tile type of the result array
ArgTileThe tile type of arg
Parameters
opThe tile function
argThe argument array

Definition at line 288 of file foreach.h.

◆ foreach() [2/8]

template<typename Tile , typename Op >
DistArray<Tile, DensePolicy> TiledArray::foreach ( const DistArray< Tile, DensePolicy > &  arg,
Op &&  op 
)
inline

Apply a function to each tile of a dense Array.

Specialization of foreach<ResultTile,ArgTile,Op> for the case ResultTile == ArgTile

Definition at line 298 of file foreach.h.

◆ foreach() [3/8]

template<typename ResultTile , typename ArgTile , typename Op , typename = typename std::enable_if<!std::is_same<ResultTile,ArgTile>::value>::type>
DistArray<ResultTile, SparsePolicy> TiledArray::foreach ( const DistArray< ArgTile, SparsePolicy arg,
Op &&  op 
)
inline

Apply a function to each tile of a sparse Array.

This function uses an Array object to generate a new Array where the output tiles are a function of the input tiles. Users must provide a function/functor that initializes the tiles for the new Array object. For example, if we want to create a new array with were each element is equal to the square root of the corresponding element of the original array:

foreach(in_array, [] (TiledArray::Tensor<double>& out_tile,
const TiledArray::Tensor<double>& in_tile) -> float
{
double norm_squared = 0.0;
out_tile = in_tile.unary([&] (const double value) -> double {
const double result = std::sqrt(value);
norm_squared += result * result;
return result;
});
return std::sqrt(norm_squared);
});

The expected signature of the tile operation is:

where the return value of op is the 2-norm (Frobenius norm) of the result tile.

Note
This function should not be used to initialize the tiles of an array object.
Template Parameters
OpTile operation
TileThe tile type of the array
Parameters
opThe tile function
argThe argument array

Definition at line 382 of file foreach.h.

◆ foreach() [4/8]

template<typename Tile , typename Op >
DistArray<Tile, SparsePolicy> TiledArray::foreach ( const DistArray< Tile, SparsePolicy > &  arg,
Op &&  op 
)
inline

Apply a function to each tile of a sparse Array.

Specialization of foreach<ResultTile,ArgTile,Op> for the case ResultTile == ArgTile

Definition at line 392 of file foreach.h.

◆ foreach() [5/8]

template<typename ResultTile , typename LeftTile , typename RightTile , typename Op , typename = typename std::enable_if<!std::is_same<ResultTile, LeftTile>::value>::type>
DistArray<ResultTile, DensePolicy> TiledArray::foreach ( const DistArray< LeftTile, DensePolicy > &  left,
const DistArray< RightTile, DensePolicy > &  right,
Op &&  op 
)
inline

Apply a function to each tile of dense Arrays The following function takes two input tiles

Definition at line 455 of file foreach.h.

◆ foreach() [6/8]

template<typename LeftTile , typename RightTile , typename Op >
DistArray<LeftTile, DensePolicy> TiledArray::foreach ( const DistArray< LeftTile, DensePolicy > &  left,
const DistArray< RightTile, DensePolicy > &  right,
Op &&  op 
)
inline

Specialization of foreach<ResultTile,ArgTile,Op> for the case ResultTile == ArgTile

Definition at line 465 of file foreach.h.

◆ foreach() [7/8]

template<typename ResultTile , typename LeftTile , typename RightTile , typename Op , typename = typename std::enable_if<!std::is_same<ResultTile, LeftTile>::value>::type>
DistArray<ResultTile, SparsePolicy> TiledArray::foreach ( const DistArray< LeftTile, SparsePolicy > &  left,
const DistArray< RightTile, SparsePolicy > &  right,
Op &&  op,
const ShapeReductionMethod  shape_reduction = ShapeReductionMethod::Intersect 
)
inline

Apply a function to each tile of sparse Arrays The following function takes two input tiles

Definition at line 490 of file foreach.h.

◆ foreach() [8/8]

template<typename LeftTile , typename RightTile , typename Op >
DistArray<LeftTile, SparsePolicy> TiledArray::foreach ( const DistArray< LeftTile, SparsePolicy > &  left,
const DistArray< RightTile, SparsePolicy > &  right,
Op &&  op,
const ShapeReductionMethod  shape_reduction = ShapeReductionMethod::Intersect 
)
inline

Specialization of foreach<ResultTile,ArgTile,Op> for the case ResultTile == ArgTile

Definition at line 501 of file foreach.h.

◆ foreach_inplace() [1/4]

template<typename Tile , typename Op , typename = typename std::enable_if<! TiledArray::detail::is_array<typename std::decay<Op>::type>::value>::type>
void TiledArray::foreach_inplace ( DistArray< Tile, DensePolicy > &  arg,
Op &&  op,
bool  fence = true 
)
inline

Modify each tile of a dense Array.

This function modifies the tile data of Array object. Users must provide a function/functor that modifies the tile data. For example, if we want to modify the elements of the array to be equal to the square root of the original value:

foreach(array, [] (TiledArray::TensorD& tile) {
tile.inplace_unary([&] (double& value) { value = std::sqrt(value); });
});

The expected signature of the tile operation is:

Template Parameters
OpMutating tile operation
TileThe tile type of the array
Parameters
opThe mutating tile function
argThe argument array to be modified
fenceA flag that indicates fencing behavior. If true this function will fence before data is modified.
Warning
This function fences by default to avoid data race conditions. Only disable the fence if you can ensure, the data is not being read by another thread.
If there is a another copy of arg that was created via (or arg was created by) the Array copy constructor or copy assignment operator, this function will modify the data of that array since the data of a tile is held in a std::shared_ptr. If you need to ensure other copies of the data are not modified or this behavior causes problems in your application, use the TiledArray::foreach function instead.

Definition at line 335 of file foreach.h.

Here is the call graph for this function:

◆ foreach_inplace() [2/4]

template<typename Tile , typename Op , typename = typename std::enable_if<! TiledArray::detail::is_array<typename std::decay<Op>::type>::value>::type>
void TiledArray::foreach_inplace ( DistArray< Tile, SparsePolicy > &  arg,
Op &&  op,
bool  fence = true 
)
inline

Modify each tile of a sparse Array.

This function modifies the tile data of Array object. Users must provide a function/functor that modifies the tile data in place. For example, if we want to modify the elements of the array to be equal to the square root of the original value:

foreach(array, [] (TiledArray::Tensor<double>& tile) -> float {
double norm_squared = 0.0;
tile.inplace_unary([&] (double& value) {
norm_squared += value; // Assume value >= 0
value = std::sqrt(value);
});
return std::sqrt(norm_squared);
});

The expected signature of the tile operation is:

where the return value of op is the 2-norm (Fibrinous norm) of the tile.

Note
This function should not be used to initialize the tiles of an array object.
Template Parameters
OpTile operation
TileThe tile type of the array
Parameters
opThe mutating tile function
argThe argument array to be modified
fenceA flag that indicates fencing behavior. If true this function will fence before data is modified.
Warning
This function fences by default to avoid data race conditions. Only disable the fence if you can ensure, the data is not being read by another thread.
If there is a another copy of arg that was created via (or arg was created by) the Array copy constructor or copy assignment operator, this function will modify the data of that array since the data of a tile is held in a std::shared_ptr. If you need to ensure other copies of the data are not modified or this behavior causes problems in your application, use the TiledArray::foreach function instead.

Definition at line 439 of file foreach.h.

Here is the call graph for this function:

◆ foreach_inplace() [3/4]

template<typename LeftTile , typename RightTile , typename Op >
void TiledArray::foreach_inplace ( DistArray< LeftTile, DensePolicy > &  left,
const DistArray< RightTile, DensePolicy > &  right,
Op &&  op,
bool  fence = true 
)
inline

This function takes two input tiles and put result into the left tile.

Definition at line 474 of file foreach.h.

Here is the call graph for this function:

◆ foreach_inplace() [4/4]

template<typename LeftTile , typename RightTile , typename Op >
void TiledArray::foreach_inplace ( DistArray< LeftTile, SparsePolicy > &  left,
const DistArray< RightTile, SparsePolicy > &  right,
Op &&  op,
const ShapeReductionMethod  shape_reduction = ShapeReductionMethod::Intersect,
bool  fence = true 
)
inline

This function takes two input tiles and put result into the left tile.

Definition at line 511 of file foreach.h.

Here is the call graph for this function:

◆ initialize() [1/3]

World& TiledArray::initialize ( int &  argc,
char **&  argv,
const SafeMPI::Intracomm &  comm 
)
inline

Definition at line 129 of file madness.h.

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

◆ initialize() [2/3]

World& TiledArray::initialize ( int &  argc,
char **&  argv 
)
inline

Definition at line 135 of file madness.h.

Here is the call graph for this function:

◆ initialize() [3/3]

World& TiledArray::initialize ( int &  argc,
char **&  argv,
const MPI_Comm &  comm 
)
inline

Definition at line 139 of file madness.h.

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

◆ invoke_cast()

template<typename Arg , typename Result = typename TiledArray::eval_trait<std::decay_t<Arg>>::type>
auto TiledArray::invoke_cast ( Arg &&  arg)

Invokes TiledArray::Cast to cast/convert the argument to type Result. The operation may be nonblocking, if needed. The cast may involve zero, one, or more conversions, depending on the implementation of Cast<>, and the properties of types Arg and Result.

Definition at line 178 of file cast.h.

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

◆ make_array() [1/2]

template<typename Array , typename Op , typename std::enable_if< is_dense< Array >::value >::type * = nullptr>
Array TiledArray::make_array ( World &  world,
const detail::trange_t< Array > &  trange,
const std::shared_ptr< detail::pmap_t< Array > > &  pmap,
Op &&  op 
)
inline

Construct dense Array.

Construct sparse Array.

This function is used to construct a DistArray object. Users must provide a world object, tiled range object, and function/functor that generates the tiles for the new array object. For example, if we want to create an array with were the elements are equal to 1:

make_array<TiledArray::TArray<double> >(world, trange, pmap,
[=] (TiledArray::Tensor<double>& tile, const TiledArray::Range& range) {
for(auto& it : tile)
*it = 1;
});

Note that the result is default constructed before (contains no data) and must be initialized inside the function/functor with the provided range object. The expected signature of the tile operation is:

void op(tile_t& tile, const range_t& range);

where tile_t and range_t are your tile type and tile range type, respectively.

Template Parameters
ArrayThe DistArray type
OpTile operation
Parameters
worldThe world where the array will live
trangeThe tiled range of the array
opThe tile function/functor
Returns
An array object of type Array

This function is used to construct a DistArray object. Users must provide a world object, tiled range object, process map, and function/ functor that generates the tiles for the new array object. For example, if we want to create an array with all elements equal to 1:

make_array<TiledArray::TSpArray<double> >(world, trange, pmap,
[=] (TiledArray::Tensor<double>& tile, const TiledArray::Range& range) -> double {
for(auto& it : tile)
*it = 1;
return tile.norm();
});

You may choose not to initialize a tile inside the tile initialization function (not shown in the example) by returning 0 for the tile norm. Note that the result is default constructed before (contains no data) and must be initialized inside the function/functor with the provided range object unless the returned tile norm is zero. The expected signature of the tile operation is:

value_t op(tile_t& tile, const range_t& range);

where value_t, tile_t and range_t are your tile value type, tile type, and tile range type, respectively.

Template Parameters
ArrayThe DistArray type
OpTile operation
Parameters
worldThe world where the array will live
trangeThe tiled range of the array
pmapA shared pointer to the array process map
opThe tile function/functor
Returns
An array object of type Array

Definition at line 71 of file make_array.h.

Here is the call graph for this function:

◆ make_array() [2/2]

template<typename Array , typename Op >
Array TiledArray::make_array ( World &  world,
const detail::trange_t< Array > &  trange,
Op &&  op 
)
inline

Construct an Array.

This function is used to construct a DistArray object. Users must provide a world object, tiled range object, and function/functor that generates the tiles for the new array object. For example, if we want to create an array with were the elements are equal to 1:

make_array<TiledArray::TSpArray<double> >(world, trange,
[=] (TiledArray::Tensor<double>& tile, const TiledArray::Range& range) -> double {
for(auto& it : tile)
*it = 1;
return tile.norm();
});

For sparse arrays, you may choose not to initialize a tile inside the tile initialization (not shown in the example) by returning 0 for the tile norm. Note that the result is default constructed before (contains no data) and must be initialized inside the function/functor with the provided range object unless the returned tile norm is zero. The expected signature of the tile operation is:

value_t op(tile_t& tile, const range_t& range);

where value_t, tile_t and range_t are your tile value type, tile type, and tile range type, respectively.

Template Parameters
ArrayThe DistArray type
OpTile operation
Parameters
worldThe world where the array will live
trangeThe tiled range of the array
opThe tile function/functor
Returns
An array object of type Array

Definition at line 219 of file make_array.h.

◆ make_const_map() [1/6]

template<typename T , typename Index >
TensorConstMap<T> TiledArray::make_const_map ( const T *const  data,
const Index &  lower_bound,
const Index &  upper_bound 
)
inline

Definition at line 83 of file tensor_map.h.

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

◆ make_const_map() [2/6]

template<typename T >
TensorConstMap<T> TiledArray::make_const_map ( const T *const  data,
const std::initializer_list< std::size_t > &  lower_bound,
const std::initializer_list< std::size_t > &  upper_bound 
)
inline

Definition at line 89 of file tensor_map.h.

Here is the call graph for this function:

◆ make_const_map() [3/6]

template<typename T >
TensorConstMap<T> TiledArray::make_const_map ( const T *const  data,
const Range range 
)
inline

Definition at line 95 of file tensor_map.h.

Here is the call graph for this function:

◆ make_const_map() [4/6]

template<typename T , typename Index >
TensorConstMap<T> TiledArray::make_const_map ( T *const  data,
const Index &  lower_bound,
const Index &  upper_bound 
)
inline

Definition at line 99 of file tensor_map.h.

Here is the call graph for this function:

◆ make_const_map() [5/6]

template<typename T >
TensorConstMap<T> TiledArray::make_const_map ( T *const  data,
const std::initializer_list< std::size_t > &  lower_bound,
const std::initializer_list< std::size_t > &  upper_bound 
)
inline

Definition at line 105 of file tensor_map.h.

Here is the call graph for this function:

◆ make_const_map() [6/6]

template<typename T , typename Range_ >
TensorConstMap<T, std::decay_t<Range_> > TiledArray::make_const_map ( T *const  data,
Range_ &&  range 
)
inline

Definition at line 111 of file tensor_map.h.

Here is the call graph for this function:

◆ make_map() [1/6]

template<typename T , typename Index >
TensorMap<T> TiledArray::make_map ( T *const  data,
const Index &  lower_bound,
const Index &  upper_bound 
)
inline

Definition at line 51 of file tensor_map.h.

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

◆ make_map() [2/6]

template<typename T >
TensorMap<T> TiledArray::make_map ( T *const  data,
const std::initializer_list< std::size_t > &  lower_bound,
const std::initializer_list< std::size_t > &  upper_bound 
)
inline

Definition at line 56 of file tensor_map.h.

Here is the call graph for this function:

◆ make_map() [3/6]

template<typename T , typename Range_ >
TensorMap<T, std::decay_t<Range_> > TiledArray::make_map ( T *const  data,
Range_ &&  range 
)
inline

Definition at line 62 of file tensor_map.h.

Here is the call graph for this function:

◆ make_map() [4/6]

template<typename T , typename Index >
TensorConstMap<T> TiledArray::make_map ( const T *const  data,
const Index &  lower_bound,
const Index &  upper_bound 
)
inline

Definition at line 66 of file tensor_map.h.

Here is the call graph for this function:

◆ make_map() [5/6]

template<typename T >
TensorConstMap<T> TiledArray::make_map ( const T *const  data,
const std::initializer_list< std::size_t > &  lower_bound,
const std::initializer_list< std::size_t > &  upper_bound 
)
inline

Definition at line 72 of file tensor_map.h.

Here is the call graph for this function:

◆ make_map() [6/6]

template<typename T , typename Range_ >
TensorConstMap<T, std::decay_t<Range_> > TiledArray::make_map ( const T *const  data,
Range_ &&  range 
)
inline

Definition at line 78 of file tensor_map.h.

Here is the call graph for this function:

◆ maxabs_value()

template<typename Tile , typename Policy >
DistArray<Tile,Policy>::element_type TiledArray::maxabs_value ( const DistArray< Tile, Policy > &  a)
inline

Definition at line 76 of file utils.h.

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

◆ minabs_value()

template<typename Tile , typename Policy >
DistArray<Tile,Policy>::element_type TiledArray::minabs_value ( const DistArray< Tile, Policy > &  a)
inline

Definition at line 70 of file utils.h.

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

◆ norm2()

template<typename Tile , typename Policy >
DistArray<Tile,Policy>::scalar_type TiledArray::norm2 ( const DistArray< Tile, Policy > &  a)
inline

Definition at line 130 of file utils.h.

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

◆ operator!=() [1/5]

constexpr bool TiledArray::operator!= ( const DenseShape a,
const DenseShape b 
)
inline

Definition at line 179 of file dense_shape.h.

◆ operator!=() [2/5]

bool TiledArray::operator!= ( const TiledRange1 r1,
const TiledRange1 r2 
)
inline

Inequality operator.

Definition at line 231 of file tiled_range1.h.

Here is the call graph for this function:

◆ operator!=() [3/5]

bool TiledArray::operator!= ( const TiledRange r1,
const TiledRange r2 
)
inline

Definition at line 305 of file tiled_range.h.

Here is the call graph for this function:

◆ operator!=() [4/5]

bool TiledArray::operator!= ( const Range r1,
const Range r2 
)
inline

Range inequality comparison.

Parameters
r1The first range to be compared
r2The second range to be compared
Returns
true when r1 does not represent the same range as r2, otherwise false.

Definition at line 1078 of file range.h.

Here is the call graph for this function:

◆ operator!=() [5/5]

template<typename T , typename A >
bool TiledArray::operator!= ( const Tensor< T, A > &  a,
const Tensor< T, A > &  b 
)

Definition at line 1489 of file tensor.h.

◆ operator*() [1/9]

template<typename T , std::size_t N>
std::array< T, N > TiledArray::operator* ( const Permutation perm,
const std::array< T, N > &  a 
)
inline

Permute a std::array.

Template Parameters
TThe element type of the array
NThe size of the array
Parameters
permThe permutation
aThe array to be permuted
Returns
A permuted copy of a
Exceptions
TiledArray::ExceptionWhen the dimension of the permutation is not equal to the size of a.

Definition at line 484 of file permutation.h.

Here is the call graph for this function:

◆ operator*() [2/9]

template<typename T , typename A >
std::vector< T > TiledArray::operator* ( const Permutation perm,
const std::vector< T, A > &  v 
)
inline

permute a std::vector<T>

Template Parameters
TThe element type of the vector
AThe allocator type of the vector
Parameters
permThe permutation
vThe vector to be permuted
Returns
A permuted copy of v
Exceptions
TiledArray::ExceptionWhen the dimension of the permutation is not equal to the size of v.

Definition at line 518 of file permutation.h.

Here is the call graph for this function:

◆ operator*() [3/9]

template<typename T >
std::vector< T > TiledArray::operator* ( const Permutation perm,
const T *MADNESS_RESTRICT const  ptr 
)
inline

Permute a memory buffer.

Template Parameters
TThe element type of the memory buffer
Parameters
permThe permutation
ptrA pointer to the memory buffer to be permuted
Returns
A permuted copy of the memory buffer as a std::vector

Definition at line 548 of file permutation.h.

Here is the call graph for this function:

◆ operator*() [4/9]

template<typename T1 , typename T2 , typename std::enable_if< detail::is_tensor< T1, T2 >::value||detail::is_tensor_of_tensor< T1, T2 >::value >::type * = nullptr>
auto TiledArray::operator* ( const T1 &  left,
const T2 &  right 
)
inline

Tensor multiplication operator.

Element-wise multiplication of two tensors

Template Parameters
T1The left-hand tensor type
T2The right-hand tensor type
Parameters
leftThe left-hand tensor argument
rightThe right-hand tensor argument
Returns
A tensor where element i is equal to left[i] * right[i]

Definition at line 80 of file operators.h.

◆ operator*() [5/9]

template<typename T , typename N , typename std::enable_if<(detail::is_tensor< T >::value||detail::is_tensor_of_tensor< T >::value) &&detail::is_numeric< N >::value >::type * = nullptr>
auto TiledArray::operator* ( const T &  left,
right 
)
inline

Create a copy of left that is scaled by right.

Scale a tensor

Template Parameters
TThe left-hand tensor type
NNumeric type
Parameters
leftThe left-hand tensor argument
rightThe right-hand scalar argument
Returns
A tensor where element i is equal to left[i] * right

Definition at line 97 of file operators.h.

◆ operator*() [6/9]

template<typename N , typename T , typename std::enable_if< detail::is_numeric< N >::value &&(detail::is_tensor< T >::value||detail::is_tensor_of_tensor< T >::value)>::type * = nullptr>
auto TiledArray::operator* ( left,
const T &  right 
)
inline

Create a copy of right that is scaled by left.

Template Parameters
NA numeric type
TThe right-hand tensor type
Parameters
leftThe left-hand scalar argument
rightThe right-hand tensor argument
Returns
A tensor where element i is equal to left * right[i]

Definition at line 112 of file operators.h.

◆ operator*() [7/9]

template<typename T , typename std::enable_if< detail::is_tensor< T >::value||detail::is_tensor_of_tensor< T >::value >::type * = nullptr>
auto TiledArray::operator* ( const Permutation perm,
const T &  arg 
)
inline

Create a permuted copy of arg.

Template Parameters
TThe argument tensor type
Parameters
permThe permutation to be applied to arg
argThe argument tensor to be permuted

Definition at line 137 of file operators.h.

◆ operator*() [8/9]

TiledRange TiledArray::operator* ( const Permutation p,
const TiledRange r 
)
inline

TiledRange permutation operator.

This function will permute the range. Note: only tiles that are not being used by other objects will be permuted. The owner of those objects are

Definition at line 288 of file tiled_range.h.

Here is the call graph for this function:

◆ operator*() [9/9]

Range TiledArray::operator* ( const Permutation perm,
const Range r 
)
inline

Create a permuted range.

Parameters
permThe permutation to be applied to the range
rThe range to be permuted
Returns
A permuted copy of r.

Definition at line 1058 of file range.h.

◆ operator*=() [1/4]

template<typename T , std::size_t N>
std::array< T, N > & TiledArray::operator*= ( std::array< T, N > &  a,
const Permutation perm 
)
inline

In-place permute a std::array.

Template Parameters
TThe element type of the array
NThe size of the array
Parameters
[out]aThe array to be permuted
[in]permThe permutation
Returns
A reference to a
Exceptions
TiledArray::ExceptionWhen the dimension of the permutation is not equal to the size of a.

Definition at line 501 of file permutation.h.

Here is the call graph for this function:

◆ operator*=() [2/4]

template<typename T , typename A >
std::vector< T, A > & TiledArray::operator*= ( std::vector< T, A > &  v,
const Permutation perm 
)
inline

In-place permute a std::array.

Template Parameters
TThe element type of the vector
AThe allocator type of the vector
Parameters
[out]vThe vector to be permuted
[in]permThe permutation
Returns
A reference to v
Exceptions
TiledArray::ExceptionWhen the dimension of the permutation is not equal to the size of v.

Definition at line 535 of file permutation.h.

Here is the call graph for this function:

◆ operator*=() [3/4]

template<typename T1 , typename T2 , typename std::enable_if< detail::is_tensor< T1, T2 >::value||detail::is_tensor_of_tensor< T1, T2 >::value >::type * = nullptr>
auto TiledArray::operator*= ( T1 &  left,
const T2 &  right 
)
inline

In place tensor multiplication.

Multiply the elements of left by that of right

Template Parameters
T1The left-hand tensor type
T2The right-hand tensor type
Parameters
leftThe left-hand tensor argument
rightThe right-hand tensor argument
Returns
A reference to left

Definition at line 185 of file operators.h.

◆ operator*=() [4/4]

template<typename T , typename N , typename std::enable_if<(detail::is_tensor< T >::value||detail::is_tensor_of_tensor< T >::value) &&detail::is_numeric< N >::value >::type * = nullptr>
auto TiledArray::operator*= ( T &  left,
right 
)
inline

In place tensor scale.

Scale the elements of left by right

Template Parameters
TThe left-hand tensor type
NNumeric type
Parameters
leftThe left-hand tensor argument
rightThe right-hand scalar argument
Returns
A reference to left

Definition at line 234 of file operators.h.

◆ operator+()

template<typename T1 , typename T2 , typename std::enable_if< detail::is_tensor< T1, T2 >::value||detail::is_tensor_of_tensor< T1, T2 >::value >::type * = nullptr>
auto TiledArray::operator+ ( const T1 &  left,
const T2 &  right 
)
inline

Tensor plus operator.

Add two tensors

Template Parameters
T1The left-hand tensor type
T2The right-hand tensor type
Parameters
leftThe left-hand tensor argument
rightThe right-hand tensor argument
Returns
A tensor where element i is equal to left[i] + right[i]

Definition at line 48 of file operators.h.

◆ operator+=() [1/2]

template<typename T1 , typename T2 , typename std::enable_if< detail::is_tensor< T1, T2 >::value||detail::is_tensor_of_tensor< T1, T2 >::value >::type * = nullptr>
auto TiledArray::operator+= ( T1 &  left,
const T2 &  right 
)
inline

Tensor plus operator.

Add the elements of right to that of left

Template Parameters
T1The left-hand tensor type
T2The right-hand tensor type
Parameters
leftThe left-hand tensor argument
rightThe right-hand tensor argument
Returns
A tensor where element i is equal to left[i] + right[i]

Definition at line 153 of file operators.h.

◆ operator+=() [2/2]

template<typename T , typename N , typename std::enable_if<(detail::is_tensor< T >::value||detail::is_tensor_of_tensor< T >::value) &&detail::is_numeric< N >::value >::type * = nullptr>
auto TiledArray::operator+= ( T &  left,
right 
)
inline

In place tensor add constant.

Scale the elements of left by right

Template Parameters
TThe left-hand tensor type
NNumeric type
Parameters
leftThe left-hand tensor argument
rightThe right-hand scalar argument
Returns
A reference to left

Definition at line 202 of file operators.h.

◆ operator-() [1/2]

template<typename T1 , typename T2 , typename std::enable_if< detail::is_tensor< T1, T2 >::value||detail::is_tensor_of_tensor< T1, T2 >::value >::type * = nullptr>
auto TiledArray::operator- ( const T1 &  left,
const T2 &  right 
)
inline

Tensor minus operator.

Subtract two tensors

Template Parameters
T1The left-hand tensor type
T2The right-hand tensor type
Parameters
leftThe left-hand tensor argument
rightThe right-hand tensor argument
Returns
A tensor where element i is equal to left[i] - right[i]

Definition at line 64 of file operators.h.

◆ operator-() [2/2]

template<typename T , typename std::enable_if< detail::is_tensor< T >::value||detail::is_tensor_of_tensor< T >::value >::type * = nullptr>
auto TiledArray::operator- ( const T &  arg) -> decltype(arg.neg())
inline

Create a negated copy of arg.

Template Parameters
TThe element type of arg
Parameters
argThe argument tensor
Returns
A tensor where element i is equal to -arg[i]

Definition at line 124 of file operators.h.

◆ operator-=() [1/2]

template<typename T1 , typename T2 , typename std::enable_if< detail::is_tensor< T1, T2 >::value||detail::is_tensor_of_tensor< T1, T2 >::value >::type * = nullptr>
auto TiledArray::operator-= ( T1 &  left,
const T2 &  right 
)
inline

Tensor minus operator.

Subtract the elements of right from that of left

Template Parameters
T1The left-hand tensor type
T2The right-hand tensor type
Parameters
leftThe left-hand tensor argument
rightThe right-hand tensor argument
Returns
A reference to left

Definition at line 169 of file operators.h.

◆ operator-=() [2/2]

template<typename T , typename N , typename std::enable_if<(detail::is_tensor< T >::value||detail::is_tensor_of_tensor< T >::value) &&detail::is_numeric< N >::value >::type * = nullptr>
auto TiledArray::operator-= ( T &  left,
right 
)
inline

In place tensor subtract constant.

Scale the elements of left by right

Template Parameters
TThe left-hand tensor type
NNumeric type
Parameters
leftThe left-hand tensor argument
rightThe right-hand scalar argument
Returns
A reference to left

Definition at line 218 of file operators.h.

◆ operator<<() [1/6]

template<typename T , typename std::enable_if< detail::is_tensor< T >::value &&detail::is_contiguous_tensor< T >::value >::type * = nullptr>
std::ostream & TiledArray::operator<< ( std::ostream &  os,
const T &  t 
)
inline

Tensor output operator.

Output tensor t to the output stream, os .

Template Parameters
TThe tensor type
Parameters
osThe output stream
tThe tensor to be output
Returns
A reference to the output stream

Definition at line 60 of file tensor.h.

◆ operator<<() [2/6]

std::ostream& TiledArray::operator<< ( std::ostream &  out,
const TiledRange1 rng 
)
inline

TiledRange1 ostream operator.

Definition at line 236 of file tiled_range1.h.

Here is the call graph for this function:

◆ operator<<() [3/6]

std::ostream& TiledArray::operator<< ( std::ostream &  out,
const TiledRange rng 
)
inline

Definition at line 309 of file tiled_range.h.

Here is the call graph for this function:

◆ operator<<() [4/6]

template<typename Tile , typename Policy >
std::ostream& TiledArray::operator<< ( std::ostream &  os,
const DistArray< Tile, Policy > &  a 
)
inline

Add the tensor to an output stream.

This function will iterate through all tiles on node 0 and print non-zero tiles. It will wait for each tile to be evaluated (i.e. it is a blocking function). Tasks will continue to be processed.

Template Parameters
TThe element type of Array
TileThe Tile type
Parameters
osThe output stream
aThe array to be put in the output stream
Returns
A reference to the output stream

Definition at line 853 of file dist_array.h.

◆ operator<<() [5/6]

std::ostream& TiledArray::operator<< ( std::ostream &  os,
const Range r 
)
inline

Range output operator.

Parameters
osThe output stream that will be used to print r
rThe range to be printed
Returns
A reference to the output stream

Definition at line 1088 of file range.h.

Here is the call graph for this function:

◆ operator<<() [6/6]

template<typename T >
std::ostream& TiledArray::operator<< ( std::ostream &  os,
const SparseShape< T > &  shape 
)
inline

Add the shape to an output stream.

Template Parameters
Tthe numeric type supporting the type of shape
Parameters
osThe output stream
shapethe SparseShape<T> object
Returns
A reference to the output stream

Definition at line 1158 of file sparse_shape.h.

◆ operator==() [1/5]

constexpr bool TiledArray::operator== ( const DenseShape a,
const DenseShape b 
)
inline

Definition at line 178 of file dense_shape.h.

Here is the caller graph for this function:

◆ operator==() [2/5]

bool TiledArray::operator== ( const TiledRange1 r1,
const TiledRange1 r2 
)
inline

Equality operator.

Definition at line 225 of file tiled_range1.h.

Here is the call graph for this function:

◆ operator==() [3/5]

bool TiledArray::operator== ( const TiledRange r1,
const TiledRange r2 
)
inline

Returns true when all tile and element ranges are the same.

Definition at line 299 of file tiled_range.h.

Here is the call graph for this function:

◆ operator==() [4/5]

bool TiledArray::operator== ( const Range r1,
const Range r2 
)
inline

Range equality comparison.

Parameters
r1The first range to be compared
r2The second range to be compared
Returns
true when r1 represents the same range as r2, otherwise false.

Definition at line 1068 of file range.h.

Here is the call graph for this function:

◆ operator==() [5/5]

template<typename T , typename A >
bool TiledArray::operator== ( const Tensor< T, A > &  a,
const Tensor< T, A > &  b 
)

Definition at line 1485 of file tensor.h.

◆ permute() [1/2]

template<typename Arg >
auto TiledArray::permute ( const Arg &  arg,
const Permutation perm 
)
inline

Create a permuted copy of arg.

Template Parameters
ArgThe tile argument type
Parameters
argThe tile argument to be permuted
permThe permutation to be applied to the result
Returns
A tile that is equal to perm ^ arg

Definition at line 43 of file permute.h.

◆ permute() [2/2]

template<typename Perm >
TiledArray::Range TiledArray::permute ( const TiledArray::Range r,
const Perm &  p 
)

Definition at line 285 of file btas.h.

Here is the caller graph for this function:

◆ print()

template<typename Tile , typename Policy >
void TiledArray::print ( const DistArray< Tile, Policy > &  a,
const char *  label 
)
inline

Definition at line 135 of file utils.h.

◆ remap() [1/8]

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

◆ remap() [2/8]

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

◆ remap() [3/8]

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

◆ remap() [4/8]

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

◆ remap() [5/8]

template<typename T , typename Index >
void TiledArray::remap ( TensorMap< T > &  map,
T *const  data,
const Index &  lower_bound,
const Index &  upper_bound 
)
inline

For reusing map without allocating new ranges . . . maybe.

Definition at line 116 of file tensor_map.h.

Here is the call graph for this function:

◆ remap() [6/8]

template<typename T , typename Index >
void TiledArray::remap ( TensorConstMap< T > &  map,
T *const  data,
const Index &  lower_bound,
const Index &  upper_bound 
)
inline

Definition at line 124 of file tensor_map.h.

Here is the call graph for this function:

◆ remap() [7/8]

template<typename T >
void TiledArray::remap ( TensorMap< T > &  map,
T *const  data,
const std::initializer_list< std::size_t > &  lower_bound,
const std::initializer_list< std::size_t > &  upper_bound 
)
inline

Definition at line 131 of file tensor_map.h.

Here is the call graph for this function:

◆ remap() [8/8]

template<typename T >
void TiledArray::remap ( TensorConstMap< T > &  map,
T *const  data,
const std::initializer_list< std::size_t > &  lower_bound,
const std::initializer_list< std::size_t > &  upper_bound 
)
inline

Definition at line 140 of file tensor_map.h.

Here is the call graph for this function:

◆ row_major_buffer_to_array()

template<typename A >
A TiledArray::row_major_buffer_to_array ( World &  world,
const typename A::trange_type &  trange,
const typename A::value_type::value_type *  buffer,
const std::size_t  m,
const std::size_t  n,
const bool  replicated = false 
)
inline

Convert a row-major matrix buffer into an Array object.

This function will copy the content of buffer into an Array object that is tiled according to the trange object. The copy operation is done in parallel, and this function will block until all elements of matrix have been copied into the result array tiles. The size of world.size() must be equal to 1 or replicate must be equal to true . If replicate is true, it is your responsibility to ensure that the data in buffer is identical on all nodes. Usage:

double* buffer = new double[100 * 100];
// Fill buffer with data ...
// Create a range for the new array object
std::vector<std::size_t> blocks;
for(std::size_t i = 0ul; i <= 100ul; i += 10ul)
blocks.push_back(i);
std::array<TiledArray::TiledRange1, 2> blocks2 =
{{ TiledArray::TiledRange1(blocks.begin(), blocks.end()),
TiledArray::TiledRange1(blocks.begin(), blocks.end()) }};
TiledArray::TiledRange trange(blocks2.begin(), blocks2.end());
// Create an Array from an Eigen matrix.
row_major_buffer_to_array<TiledArray::Array<double, 2> >(world, trange, buffer, 100, 100);
delete [] buffer;
Template Parameters
AThe array type
Parameters
worldThe world where the array will live
trangeThe tiled range of the new array
bufferThe row-major matrix buffer to be copied
mThe number of rows in the matrix
nThe number of columns in the matrix
replicatedtrue indicates that the result array should be a replicated array [default = false].
Returns
An Array object that is a copy of matrix
Exceptions
TiledArray::ExceptionWhen m and n are not equal to the number of rows or columns in tiled range.

Definition at line 520 of file eigen.h.

Here is the call graph for this function:

◆ scale() [1/3]

template<typename Arg , typename Scalar , typename std::enable_if< TiledArray::detail::is_numeric< Scalar >::value >::type * = nullptr>
auto TiledArray::scale ( const Arg &  arg,
const Scalar  factor 
)
inline

Scalar the tile argument.

Template Parameters
ArgThe tile argument type
ScalarA scalar type
Parameters
argThe left-hand argument to be scaled
factorThe scaling factor
Returns
A tile that is equal to arg * factor

Definition at line 44 of file scale.h.

◆ scale() [2/3]

template<typename Arg , typename Scalar , typename std::enable_if< TiledArray::detail::is_numeric< Scalar >::value >::type * = nullptr>
auto TiledArray::scale ( const Arg &  arg,
const Scalar  factor,
const Permutation perm 
)
inline

Scale and permute tile argument.

Template Parameters
ArgThe tile argument type
ScalarA scalar type
Parameters
argThe left-hand argument to be scaled
factorThe scaling factor
permThe permutation to be applied to the result
Returns
A tile that is equal to perm ^ (arg * factor)

Definition at line 57 of file scale.h.

◆ scale() [3/3]

template<typename Tile , typename Policy >
void TiledArray::scale ( DistArray< Tile, Policy > &  a,
typename DistArray< Tile, Policy >::element_type  scaling_factor 
)
inline

Definition at line 108 of file utils.h.

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

◆ scale_to()

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

Scale to the result tile.

Template Parameters
ResultThe result tile type
ScalarA scalar type
Parameters
resultThe result tile to be scaled
factorThe scaling factor
Returns
A tile that is equal to result *= factor

Definition at line 69 of file scale.h.

◆ shift() [1/3]

template<typename Arg , typename Index >
auto TiledArray::shift ( const Arg &  arg,
const Index &  range_shift 
)
inline

Shift the range of arg.

Template Parameters
ArgThe tile argument type
IndexAn array type
Parameters
argThe tile argument to be shifted
range_shiftThe offset to be applied to the argument range
Returns
A copy of the tile with a new range

Definition at line 42 of file shift.h.

◆ shift() [2/3]

template<typename T >
detail::ShiftWrapper<T> TiledArray::shift ( T &  tensor)

Shift a tensor from one range to another.

Template Parameters
TA tensor type
Parameters
tensorThe tensor object to shift
Returns
A shifted tensor object

Definition at line 136 of file shift_wrapper.h.

Here is the caller graph for this function:

◆ shift() [3/3]

template<typename T >
detail::ShiftWrapper<const T> TiledArray::shift ( const T &  tensor)

Shift a tensor from one range to another.

Template Parameters
TA tensor type
Parameters
tensorThe tensor object to shift
Returns
A shifted tensor object

Definition at line 147 of file shift_wrapper.h.

◆ shift_to()

template<typename Arg , typename Index >
auto TiledArray::shift_to ( Arg &  arg,
const Index &  range_shift 
)
inline

Shift the range of arg in place.

Template Parameters
ArgThe tile argument type
IndexAn array type
Parameters
argThe tile argument to be shifted
range_shiftThe offset to be applied to the argument range
Returns
A copy of the tile with a new range

Definition at line 54 of file shift.h.

◆ size()

template<typename Tile , typename Policy >
size_t TiledArray::size ( const DistArray< Tile, Policy > &  a)
inline

Definition at line 49 of file utils.h.

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

◆ sparse_diagonal_array()

template<typename T >
DistArray<Tensor<T>, SparsePolicy> TiledArray::sparse_diagonal_array ( World &  world,
TiledRange const &  trange,
val = 1 
)

Create a SparsePolicy DistArray with only diagonal elements, the expected behavior is that every element (n,n,n, ..., n) will be nonzero.

Parameters
worldThe world for the array
trangeThe trange for the array
valThe value to be written along the diagonal elements

Definition at line 158 of file diagonal_array.h.

Here is the call graph for this function:

◆ swap() [1/3]

void TiledArray::swap ( TiledRange1 r0,
TiledRange1 r1 
)
inline

Exchange the data of the two given ranges.

Definition at line 220 of file tiled_range1.h.

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

◆ swap() [2/3]

void TiledArray::swap ( TiledRange r0,
TiledRange r1 
)
inline

Exchange the content of the two given TiledRange's.

Definition at line 296 of file tiled_range.h.

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

◆ swap() [3/3]

void TiledArray::swap ( Range r0,
Range r1 
)
inline

Exchange the values of the give two ranges.

Definition at line 1048 of file range.h.

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

◆ tensor_to_btas_subtensor()

template<typename T , typename Allocator_ , typename Range_ , typename Storage_ >
void TiledArray::tensor_to_btas_subtensor ( const Tensor< T, Allocator_ > &  src,
btas::Tensor< T, Range_, Storage_ > &  dst 
)
inline

Copy a block of a btas::Tensor into a TiledArray::Tensor.

TiledArray::Tensor src will be copied into a block of btas::Tensor dst. The block dimensions will be determined by the dimensions of the range of src .

Template Parameters
TThe tensor element type
Allocator_The allocator type of the source TiledArray::Tensor object
Range_The range type of the destination btas::Tensor object
Storage_The storage type of the destination btas::Tensor object
Parameters
[in]srcThe source object whose contents will be copied into a subblock of dst
[out]dstThe destination object; its subblock defined by the {lower,upper} bounds {src.lobound(),src.upbound()} will be overwritten with the content of src
Exceptions
TiledArray::ExceptionWhen the dimensions of src and dst do not match.

Definition at line 76 of file btas.h.

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

◆ tensor_to_eigen_submatrix()

template<typename T , typename A , typename Derived >
void TiledArray::tensor_to_eigen_submatrix ( const Tensor< T, A > &  tensor,
Eigen::MatrixBase< Derived > &  matrix 
)
inline

Copy the content of a tensor into an Eigen matrix block.

The content of tensor will be copied into a block of matrix. The block dimensions will be determined by the dimensions of the tensor's range.

Template Parameters
TThe tensor element type
AThe tensor allocator type
DerivedThe derived type of an Eigen matrix
Parameters
[in]tensorThe object that will be copied to matrix
[out]matrixThe object that will be assigned the content of tensor
Exceptions
TiledArray::ExceptionWhen the dimensions of tensor are not equal to 1 or 2.
TiledArray::ExceptionWhen the range of tensor is outside the range of matrix .

Definition at line 236 of file eigen.h.

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

◆ to_dense() [1/2]

template<typename Tile >
DistArray<Tile, DensePolicy> TiledArray::to_dense ( DistArray< Tile, SparsePolicy > const &  sparse_array)

Definition at line 35 of file sparse_to_dense.h.

Here is the call graph for this function:

◆ to_dense() [2/2]

template<typename Tile >
DistArray<Tile, DensePolicy> TiledArray::to_dense ( DistArray< Tile, DensePolicy > const &  other)

Definition at line 64 of file sparse_to_dense.h.

◆ to_new_tile_type()

template<typename Tile , typename Policy , typename Op >
DistArray<typename std::result_of<Op(Tile)>::type, Policy> TiledArray::to_new_tile_type ( DistArray< Tile, Policy > const &  old_array,
Op &&  op 
)
inline

Function to convert an array to a new array with a different tile type.

Template Parameters
TileThe array tile type
PolicyThe array policy type
OpThe tile conversion operation type
Parameters
arrayThe array to be converted
opThe tile type conversion operation

Definition at line 42 of file to_new_tile_type.h.

Here is the call graph for this function:

◆ to_sparse() [1/2]

template<typename Tile >
DistArray<Tile, SparsePolicy> TiledArray::to_sparse ( DistArray< Tile, DensePolicy > const &  dense_array)

Function to convert a dense array into a block sparse array.

If the input array is dense then create a copy by checking the norms of the tiles in the dense array and then cloning the significant tiles into the sparse array.

Definition at line 16 of file dense_to_sparse.h.

Here is the call graph for this function:

◆ to_sparse() [2/2]

template<typename Tile >
DistArray<Tile, SparsePolicy> TiledArray::to_sparse ( DistArray< Tile, SparsePolicy > const &  sparse_array)

If the array is already sparse return a copy of the array.

Definition at line 53 of file dense_to_sparse.h.

◆ truncate() [1/2]

template<typename Tile >
void TiledArray::truncate ( DistArray< Tile, DensePolicy > &  array)
inline

Truncate a dense Array.

This is a no op

Template Parameters
TileThe tile type of the array
Parameters
[in,out]arrayThe array object to be truncated

Definition at line 44 of file truncate.h.

Here is the caller graph for this function:

◆ truncate() [2/2]

template<typename Tile >
void TiledArray::truncate ( DistArray< Tile, SparsePolicy > &  array)
inline

Truncate a sparse Array.

Template Parameters
TileThe tile type of the array
Parameters
[in,out]arrayThe array object to be truncated

Definition at line 51 of file truncate.h.

Here is the call graph for this function:

◆ vec_multiply()

template<typename Tile , typename Policy >
void TiledArray::vec_multiply ( DistArray< Tile, Policy > &  a1,
const DistArray< Tile, Policy > &  a2 
)
inline

Definition at line 81 of file utils.h.

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

◆ zero()

template<typename Tile , typename Policy >
void TiledArray::zero ( DistArray< Tile, Policy > &  a)
inline

Definition at line 63 of file utils.h.

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