TiledArray Namespace Reference

Namespaces

 container
 
 detail
 
 eigen
 
 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  BipartitePermutation
 Permutation of a bipartite set. 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 >, std::void_t< decltype(std::declval< TiledArray::Cast< TiledArray::Tensor< typename T::value_type, Allocator >, T >>()(std::declval< const T & >()))> >
 
class  Clone
 Create a deep copy of a tile. More...
 
struct  clone_trait
 Clone trait. More...
 
class  cpu_cuda_vector
 a vector that lives on either host or device side, or both More...
 
class  Debugger
 
class  DensePolicy
 
class  DenseShape
 Dense shape of an array. 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  function_ref
 
class  function_ref< R(Args...)>
 Specialization for function types. More...
 
struct  InitializerListRank
 Primary template for determining how many nested std::initializer_list's are in a type. More...
 
struct  InitializerListRank< std::initializer_list< T >, SizeType >
 Specialization of InitializerListRank used when the template type parameter is a std::initializer_list type. More...
 
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< DensePolicy >
 
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  shared_function
 analogous to std::function, but has shallow-copy semantics More...
 
class  Shift
 Shift the range of tile. More...
 
class  ShiftTo
 Shift the range of tile in place. More...
 
class  Singleton
 Singleton base class To create a singleton class A do: More...
 
class  SparsePolicy
 
class  SparseShape
 Frobenius-norm-based 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
 
struct  TileOpsLogger
 
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, typename OpResult = Tensor<T>>
using TensorMap = detail::TensorInterface< T, Range_, OpResult >
 
template<typename T , typename Range_ = Range, typename OpResult = Tensor<T>>
using TensorConstMap = detail::TensorInterface< typename std::add_const< T >::type, Range_, OpResult >
 
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_trace_t = decltype(trace(std::declval< T >()))
 
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_binary_t = decltype(binary(std::declval< T >()...))
 
template<typename... T>
using result_of_inplace_binary_t = decltype(inplace_binary(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_unary_t = decltype(unary(std::declval< T >()...))
 
template<typename... T>
using result_of_inplace_unary_t = decltype(inplace_unary(std::declval< T >()...))
 
template<typename... T>
using result_of_gemm_t = decltype(gemm(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 , typename ResultType = T>
using result_of_norm_t = decltype(norm(std::declval< T >(), std::declval< ResultType & >()))
 
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 >()))
 
using time_point = std::chrono::high_resolution_clock::time_point
 
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 }
 
enum  MemorySpace { MemorySpace::Null = 0b00, MemorySpace::CPU = 0b01, MemorySpace::CUDA = 0b10, MemorySpace::CUDA_UM = CPU | CUDA }
 enumerates the memory spaces More...
 
enum  ExecutionSpace { ExecutionSpace::CPU, ExecutionSpace::CUDA }
 enumerates the execution spaces More...
 
enum  OrdinalType { OrdinalType::RowMajor = -1, OrdinalType::ColMajor = 1, OrdinalType::Other = 0, OrdinalType::Invalid }
 

Functions

bool is_congruent (const BlockRange &r1, const BlockRange &r2)
 Test that two BlockRange objects are congruent. More...
 
bool is_congruent (const BlockRange &r1, const Range &r2)
 Test that BlockRange and Range are congruent. More...
 
bool is_congruent (const Range &r1, const BlockRange &r2)
 Test that Range and BlockRange are congruent. More...
 
bool operator== (const BlockRange &r1, const BlockRange &r2)
 BlockRange equality comparison. More...
 
bool is_contiguous (const BlockRange &range)
 
template<typename T , typename Range_ , typename Storage_ , typename Tensor_ >
void btas_subtensor_to_tensor (const btas::Tensor< T, Range_, Storage_ > &src, Tensor_ &dst)
 Copy a block of a btas::Tensor into a TiledArray::Tensor. More...
 
template<typename Tensor_ , typename T , typename Range_ , typename Storage_ >
void tensor_to_btas_subtensor (const Tensor_ &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 , typename Storage = std::vector<typename Tile::value_type>>
btas::Tensor< typename Tile::value_type, btas::DEFAULT::range, Storage > array_to_btas_tensor (const TiledArray::DistArray< Tile, Policy > &src, int target_rank=-1)
 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 , typename ResultPolicy = SparsePolicy, typename ArgPolicy >
std::enable_if_t<!is_dense_v< ResultPolicy > &&is_dense_v< ArgPolicy >, DistArray< Tile, ResultPolicy > > to_sparse (DistArray< Tile, ArgPolicy > const &dense_array)
 Function to convert a dense array into a block sparse array. More...
 
template<typename Tile , typename Policy >
std::enable_if_t<!is_dense_v< Policy >, DistArray< Tile, Policy > > to_sparse (DistArray< Tile, Policy > const &sparse_array)
 If the array is already sparse return a copy of the array. More...
 
template<typename T , Eigen::StorageOptions Storage = Eigen::RowMajor, std::enable_if_t< detail::is_contiguous_tensor_v< T >> * = nullptr>
Eigen::Map< const Eigen::Matrix< typename T::value_type, Eigen::Dynamic, Eigen::Dynamic, Storage >, Eigen::AutoAlign > eigen_map (const T &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 , Eigen::StorageOptions Storage = Eigen::RowMajor, std::enable_if_t< detail::is_contiguous_tensor_v< T >> * = nullptr>
Eigen::Map< Eigen::Matrix< typename T::value_type, Eigen::Dynamic, Eigen::Dynamic, Storage >, Eigen::AutoAlign > eigen_map (T &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 , std::enable_if_t< detail::is_contiguous_tensor_v< T >> * = nullptr>
Eigen::Map< const Eigen::Matrix< typename T::value_type, Eigen::Dynamic, 1 >, Eigen::AutoAlign > eigen_map (const T &tensor, const std::size_t n)
 Construct a const Eigen::Map object for a given Tensor object. More...
 
template<typename T , std::enable_if_t< detail::is_contiguous_tensor_v< T >> * = nullptr>
Eigen::Map< Eigen::Matrix< typename T::value_type, Eigen::Dynamic, 1 >, Eigen::AutoAlign > eigen_map (T &tensor, const std::size_t n)
 Construct an Eigen::Map object for a given Tensor object. More...
 
template<typename T , Eigen::StorageOptions Storage = Eigen::RowMajor, std::enable_if_t< detail::is_contiguous_tensor_v< T >> * = nullptr>
Eigen::Map< const Eigen::Matrix< typename T::value_type, Eigen::Dynamic, Eigen::Dynamic, Storage >, Eigen::AutoAlign > eigen_map (const T &tensor)
 Construct a const Eigen::Map object for a given Tensor object. More...
 
template<typename T , Eigen::StorageOptions Storage = Eigen::RowMajor, std::enable_if_t< detail::is_contiguous_tensor_v< T >> * = nullptr>
Eigen::Map< Eigen::Matrix< typename T::value_type, Eigen::Dynamic, Eigen::Dynamic, Storage >, Eigen::AutoAlign > eigen_map (T &tensor)
 Construct an Eigen::Map object for a given Tensor object. More...
 
template<typename T , typename Derived , std::enable_if_t< detail::is_contiguous_tensor_v< T >> * = nullptr>
void eigen_submatrix_to_tensor (const Eigen::MatrixBase< Derived > &matrix, T &tensor)
 Copy a block of an Eigen matrix into a tensor. More...
 
template<typename T , typename Derived , std::enable_if_t< detail::is_contiguous_tensor_v< T >> * = nullptr>
void tensor_to_eigen_submatrix (const T &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, std::shared_ptr< typename A::pmap_interface > pmap={})
 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, std::shared_ptr< typename A::pmap_interface > pmap={})
 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, std::shared_ptr< typename A::pmap_interface > pmap={})
 Convert a column-major matrix buffer into an Array object. 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 TileType , typename PolicyType >
auto retile (const DistArray< TileType, PolicyType > &tensor, const TiledRange &new_trange)
 
template<typename Tile , typename ResultPolicy = DensePolicy, typename ArgPolicy >
std::enable_if_t< is_dense_v< ResultPolicy > &&!is_dense_v< ArgPolicy >, DistArray< Tile, ResultPolicy > > to_dense (DistArray< Tile, ArgPolicy > const &sparse_array)
 
template<typename Tile , typename Policy >
std::enable_if_t< is_dense_v< Policy >, DistArray< Tile, Policy > > to_dense (DistArray< Tile, Policy > const &other)
 
template<typename Tile , typename ConvTile = Tile, typename Policy , typename Op >
decltype(auto) 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 , typename Policy >
std::enable_if_t< is_dense_v< Policy >, void > truncate (DistArray< Tile, Policy > &array, typename Policy::shape_type::value_type=0)
 Truncate a dense Array. More...
 
template<typename Tile , typename Policy >
std::enable_if_t<!is_dense_v< Policy >, void > truncate (DistArray< Tile, Policy > &array, typename Policy::shape_type::value_type thresh=Policy::shape_type::threshold())
 Truncate a sparse Array. More...
 
template<typename Tile , typename Policy >
TA::DistArray< Tile, Policy > fuse_vector_of_arrays_tiles (madness::World &global_world, const std::vector< TA::DistArray< Tile, Policy >> &array_vec, const std::size_t fused_dim_extent, const TiledArray::TiledRange &array_trange, std::size_t block_size=1)
 fuses a vector of DistArray objects, each with the same TiledRange into a DistArray with 1 more dimensions More...
 
template<typename Tile , typename Policy >
void subarray_from_fused_array (madness::World &local_world, const TA::DistArray< Tile, Policy > &fused_array, std::size_t tile_idx, std::vector< TA::DistArray< Tile, Policy >> &split_arrays, const TA::TiledRange &split_trange)
 extracts a subarray of a fused array created with fuse_vector_of_arrays and creates the array in local_world. More...
 
template<MemorySpace Space, typename T , typename HostAlloc , typename DeviceAlloc >
bool in_memory_space (const cpu_cuda_vector< T, HostAlloc, DeviceAlloc > &vec) noexcept
 
template<ExecutionSpace Space, typename T , typename HostAlloc , typename DeviceAlloc >
void to_execution_space (cpu_cuda_vector< T, HostAlloc, DeviceAlloc > &vec, cudaStream_t stream=0)
 
template<typename T >
void make_device_storage (cpu_cuda_vector< T > &storage, std::size_t n, cudaStream_t stream=0)
 
template<typename T >
T * device_data (cpu_cuda_vector< T > &storage)
 
template<typename T >
const T * device_data (const cpu_cuda_vector< T > &storage)
 
template<typename T >
void mult_to_cuda_kernel_impl (T *result, const T *arg, std::size_t n, cudaStream_t stream, int device_id)
 result[i] = result[i] * arg[i] More...
 
template<typename T >
void mult_cuda_kernel_impl (T *result, const T *arg1, const T *arg2, std::size_t n, cudaStream_t stream, int device_id)
 result[i] = arg1[i] * arg2[i] More...
 
template<typename T , typename ReduceOp >
reduce_cuda_kernel_impl (ReduceOp &&op, const T *arg, std::size_t n, T init, cudaStream_t stream, int device_id)
 T = reduce(T* arg) More...
 
template<typename T >
product_reduce_cuda_kernel_impl (const T *arg, std::size_t n, cudaStream_t stream, int device_id)
 
template<typename T >
sum_reduce_cuda_kernel_impl (const T *arg, std::size_t n, cudaStream_t stream, int device_id)
 
template<typename T >
max_reduce_cuda_kernel_impl (const T *arg, std::size_t n, cudaStream_t stream, int device_id)
 
template<typename T >
min_reduce_cuda_kernel_impl (const T *arg, std::size_t n, cudaStream_t stream, int device_id)
 
template<typename T >
absmax_reduce_cuda_kernel_impl (const T *arg, std::size_t n, cudaStream_t stream, int device_id)
 
template<typename T >
absmin_reduce_cuda_kernel_impl (const T *arg, std::size_t n, cudaStream_t stream, int device_id)
 
constexpr MemorySpace operator& (MemorySpace space1, MemorySpace space2)
 
constexpr MemorySpace operator| (MemorySpace space1, MemorySpace space2)
 
constexpr bool overlap (MemorySpace space1, MemorySpace space2)
 
constexpr bool operator== (const DenseShape &a, const DenseShape &b)
 
constexpr bool operator!= (const DenseShape &a, const DenseShape &b)
 
constexpr bool is_replicated (World &world, const DenseShape &t)
 
template<typename Tile , typename Policy >
std::ostream & operator<< (std::ostream &os, const DistArray< Tile, Policy > &a)
 Add the tensor to an output stream. More...
 
template<typename Tile , typename Policy >
auto rank (const DistArray< Tile, Policy > &a)
 
template<typename Tile , typename Policy >
size_t volume (const DistArray< Tile, Policy > &a)
 
template<typename Tile , typename Policy >
auto abs_min (const DistArray< Tile, Policy > &a)
 
template<typename Tile , typename Policy >
auto abs_max (const DistArray< Tile, Policy > &a)
 
template<typename Tile , typename Policy >
auto dot (const DistArray< Tile, Policy > &a, const DistArray< Tile, Policy > &b)
 
template<typename Tile , typename Policy >
auto inner_product (const DistArray< Tile, Policy > &a, const DistArray< Tile, Policy > &b)
 
template<typename Tile , typename Policy >
auto squared_norm (const DistArray< Tile, Policy > &a)
 
template<typename Tile , typename Policy >
auto norm2 (const DistArray< Tile, Policy > &a)
 
void exception_break ()
 
void assert_failed (const std::string &m)
 
bool congruent (const Range &r1, const Range &r2)
 Test if the two ranges are congruent. More...
 
template<typename Perm >
std::enable_if<!TiledArray::detail::is_permutation_v< Perm >, TiledArray::Range >::type permute (const TiledArray::Range &r, const Perm &p)
 
void set_default_world (World &world)
 Sets the default World to world . More...
 
World & get_default_world ()
 
void reset_default_world ()
 
std::unique_ptr< World, decltype(world_resetter)> push_default_world (World &world)
 
bool initialized ()
 
bool finalized ()
 
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::vector. 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 BipartitePermutation &p1, const BipartitePermutation &p2)
 Permutation equality operator. 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...
 
template<typename T , std::size_t N>
boost::container::small_vector< T, N > operator* (const Permutation &perm, const boost::container::small_vector< T, N > &v)
 permute a boost::container::small_vector<T> More...
 
template<typename T , std::size_t N>
boost::container::small_vector< T, N > & operator*= (boost::container::small_vector< T, N > &v, const Permutation &perm)
 In-place permute a boost::container::small_vector. More...
 
bool operator!= (const BipartitePermutation &p1, const BipartitePermutation &p2)
 Permutation inequality operator. More...
 
auto inner (const Permutation &p)
 
auto outer (const Permutation &p)
 
auto inner_size (const Permutation &p)
 
auto outer_size (const Permutation &p)
 
auto inner (const BipartitePermutation &p)
 
auto outer (const BipartitePermutation &p)
 
auto inner_size (const BipartitePermutation &p)
 
auto outer_size (const BipartitePermutation &p)
 
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...
 
template<typename I , typename = std::enable_if_t<std::is_integral_v<I>>>
Range permute (const Range &r, std::initializer_list< I > perm)
 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...
 
bool is_congruent (const Range &r1, const Range &r2)
 Test the two ranges are congruent. More...
 
bool is_contiguous (const Range &range)
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const SparseShape< T > &shape)
 Add the shape to an output stream. More...
 
template<typename T >
bool is_replicated (World &world, const SparseShape< T > &shape)
 collective bitwise-compare-reduce for SparseShape objects More...
 
template<typename Array , typename T = double>
Array diagonal_array (World &world, TiledRange const &trange, T val=1)
 Creates a constant diagonal DistArray. More...
 
template<typename Array , typename RandomAccessIterator >
std::enable_if_t< detail::is_iterator< RandomAccessIterator >::value, Arraydiagonal_array (World &world, TiledRange const &trange, RandomAccessIterator diagonals_begin, RandomAccessIterator diagonals_end={})
 Creates a non-constant diagonal DistArray. 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 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_v< N >>::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_v< N > &&(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_v< N >>::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_v< N >>::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_v< N >>::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 Range_ , typename OpResult , typename Index1 , typename Index2 >
void remap (detail::TensorInterface< T, Range_, OpResult > &, T *const, const Index1 &, const Index2 &)
 
template<typename T , typename Range_ , typename OpResult , typename Index1 , typename Index2 >
void remap (detail::TensorInterface< const T, Range_, OpResult > &, T *const, const Index1 &, const Index2 &)
 
template<typename T , typename Range_ , typename OpResult , typename Index1 , typename Index2 >
void remap (detail::TensorInterface< T, Range_, OpResult > &, T *const, const std::initializer_list< Index1 > &, const std::initializer_list< Index2 > &)
 
template<typename T , typename Range_ , typename OpResult , typename Index1 , typename Index2 >
void remap (detail::TensorInterface< const T, Range_, OpResult > &, T *const, const std::initializer_list< Index1 > &, const std::initializer_list< Index2 > &)
 
template<typename T , typename Range_ = Range, typename OpResult = Tensor<T>, typename Index >
TensorMap< T, Range_, OpResult > make_map (T *const data, const Index &lower_bound, const Index &upper_bound)
 
template<typename T , typename Range_ = Range, typename OpResult = Tensor<T>>
TensorMap< T, Range_, OpResult > 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_ , typename OpResult = Tensor<T>>
TensorMap< T, std::decay_t< Range_ >, OpResult > make_map (T *const data, Range_ &&range)
 
template<typename T , typename Range_ = Range, typename OpResult = Tensor<T>, typename Index >
TensorConstMap< T, Range_, OpResult > make_map (const T *const data, const Index &lower_bound, const Index &upper_bound)
 
template<typename T , typename Range_ = Range, typename OpResult = Tensor<T>>
TensorConstMap< T, Range_, OpResult > 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_ , typename OpResult = Tensor<T>>
TensorConstMap< T, std::decay_t< Range_ >, OpResult > make_map (const T *const data, Range_ &&range)
 
template<typename T , typename Range_ = Range, typename OpResult = Tensor<T>, typename Index >
TensorConstMap< T, Range_, OpResult > make_const_map (const T *const data, const Index &lower_bound, const Index &upper_bound)
 
template<typename T , typename Range_ = Range, typename OpResult = Tensor<T>>
TensorConstMap< T, Range_, OpResult > 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 , typename Range_ , typename OpResult = Tensor<T>>
TensorConstMap< T, std::decay_t< Range_ >, OpResult > make_const_map (const T *const data, Range_ &&range)
 
template<typename T , typename Range_ , typename OpResult = Tensor<T>, typename Index >
TensorConstMap< T, Range_, OpResult > make_const_map (T *const data, const Index &lower_bound, const Index &upper_bound)
 
template<typename T , typename Range_ , typename OpResult = Tensor<T>>
TensorConstMap< T, Range_, OpResult > 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_ , typename OpResult = Tensor<T>>
TensorConstMap< T, std::decay_t< Range_ >, OpResult > make_const_map (T *const data, Range_ &&range)
 
template<typename T , typename Range_ , typename OpResult , typename Index1 , typename Index2 >
void remap (TensorMap< T, Range_, OpResult > &map, T *const data, const Index1 &lower_bound, const Index2 &upper_bound)
 For reusing map without allocating new ranges . . . maybe. More...
 
template<typename T , typename Range_ , typename OpResult , typename Index1 , typename Index2 , typename = std::enable_if_t<!std::is_const<T>::value>>
void remap (TensorConstMap< T, Range_, OpResult > &map, T *const data, const Index1 &lower_bound, const Index2 &upper_bound)
 
template<typename T , typename Range_ , typename OpResult , typename Index1 , typename Index2 >
void remap (TensorMap< T, Range_, OpResult > &map, T *const data, const std::initializer_list< Index1 > &lower_bound, const std::initializer_list< Index2 > &upper_bound)
 
template<typename T , typename Range_ , typename OpResult , typename Index1 , typename Index2 , typename = std::enable_if_t<!std::is_const<T>::value>>
void remap (TensorConstMap< T, Range_, OpResult > &map, T *const data, const std::initializer_list< Index1 > &lower_bound, const std::initializer_list< Index2 > &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 , typename Perm , typename = std::enable_if_t<detail::is_permutation_v<Perm>>>
decltype(auto) permute (const Tile< Arg > &arg, const Perm &perm)
 Create a permuted copy of arg. More...
 
template<typename Arg , typename Index , typename = std::enable_if_t<detail::is_integral_range_v<Index>>>
decltype(auto) shift (const Tile< Arg > &arg, const Index &range_shift)
 Shift the range of arg. More...
 
template<typename Arg , typename Index , typename = std::enable_if_t<std::is_integral_v<Index>>>
decltype(auto) shift (const Tile< Arg > &arg, const std::initializer_list< Index > &range_shift)
 Shift the range of arg. More...
 
template<typename Arg , typename Index , typename = std::enable_if_t<detail::is_integral_range_v<Index>>>
Tile< Arg > & shift_to (Tile< Arg > &arg, const Index &range_shift)
 Shift the range of arg in place. More...
 
template<typename Arg , typename Index , typename = std::enable_if_t<std::is_integral_v<Index>>>
Tile< Arg > & shift_to (Tile< Arg > &arg, const std::initializer_list< 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_v< Scalar >>::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 , typename Perm , typename = std::enable_if_t<detail::is_permutation_v<Perm>>>
decltype(auto) add (const Tile< Left > &left, const Tile< Right > &right, const Perm &perm)
 Add and permute tile arguments. More...
 
template<typename Left , typename Right , typename Scalar , typename Perm , typename std::enable_if< detail::is_numeric_v< Scalar > &&detail::is_permutation_v< Perm >>::type * = nullptr>
decltype(auto) add (const Tile< Left > &left, const Tile< Right > &right, const Scalar factor, const Perm &perm)
 Add, scale, and permute tile arguments. More...
 
template<typename Arg , typename Scalar , typename std::enable_if< detail::is_numeric_v< Scalar >>::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 Perm , typename std::enable_if< detail::is_numeric_v< Scalar > &&detail::is_permutation_v< Perm >>::type * = nullptr>
decltype(auto) add (const Tile< Arg > &arg, const Scalar value, const Perm &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_v< Scalar >>::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_v< Scalar >>::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_v< Scalar >>::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 , typename Perm , typename = std::enable_if_t<detail::is_permutation_v<Perm>>>
decltype(auto) subt (const Tile< Left > &left, const Tile< Right > &right, const Perm &perm)
 Subtract and permute tile arguments. More...
 
template<typename Left , typename Right , typename Scalar , typename Perm , typename std::enable_if< detail::is_numeric_v< Scalar > &&detail::is_permutation_v< Perm >>::type * = nullptr>
decltype(auto) subt (const Tile< Left > &left, const Tile< Right > &right, const Scalar factor, const Perm &perm)
 Subtract, scale, and permute tile arguments. More...
 
template<typename Arg , typename Scalar , typename std::enable_if< detail::is_numeric_v< Scalar >>::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 Perm , typename std::enable_if< detail::is_numeric_v< Scalar > &&detail::is_permutation_v< Perm >>::type * = nullptr>
decltype(auto) subt (const Tile< Arg > &arg, const Scalar value, const Perm &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_v< Scalar >>::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_v< Scalar >>::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_v< Scalar >>::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 , typename Perm , typename = std::enable_if_t<detail::is_permutation_v<Perm>>>
decltype(auto) mult (const Tile< Left > &left, const Tile< Right > &right, const Perm &perm)
 Multiplication and permute tile arguments. More...
 
template<typename Left , typename Right , typename Scalar , typename Perm , typename std::enable_if< detail::is_numeric_v< Scalar > &&detail::is_permutation_v< Perm >>::type * = nullptr>
decltype(auto) mult (const Tile< Left > &left, const Tile< Right > &right, const Scalar factor, const Perm &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_v< Scalar >>::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 Left , typename Right , typename Op >
decltype(auto) binary (const Tile< Left > &left, const Tile< Right > &right, Op &&op)
 Binary element-wise transform producing a new tile. More...
 
template<typename Left , typename Right , typename Op , typename Perm , typename = std::enable_if_t<detail::is_permutation_v<Perm>>>
decltype(auto) binary (const Tile< Left > &left, const Tile< Right > &right, Op &&op, const Perm &perm)
 Binary element-wise transform producing a new tile. More...
 
template<typename Left , typename Right , typename Op >
Tile< Left > & inplace_binary (Tile< Left > &left, const Tile< Right > &right, Op &&op)
 Binary element-wise in-place transform. More...
 
template<typename Arg , typename Scalar , typename std::enable_if< detail::is_numeric_v< Scalar >>::type * = nullptr>
decltype(auto) scale (const Tile< Arg > &arg, const Scalar factor)
 Scalar the tile argument. More...
 
template<typename Arg , typename Scalar , typename Perm , typename std::enable_if< detail::is_numeric_v< Scalar > &&detail::is_permutation_v< Perm >>::type * = nullptr>
decltype(auto) scale (const Tile< Arg > &arg, const Scalar factor, const Perm &perm)
 Scale and permute tile argument. More...
 
template<typename Result , typename Scalar , typename std::enable_if< detail::is_numeric_v< Scalar >>::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 , typename Perm , typename = std::enable_if_t<detail::is_permutation_v<Perm>>>
decltype(auto) neg (const Tile< Arg > &arg, const Perm &perm)
 Negate and permute tile argument. More...
 
template<typename Result >
Tile< Result > & neg_to (Tile< Result > &result)
 In-place negate 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_v< Scalar >>::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 , typename Perm , typename = std::enable_if_t<detail::is_permutation_v<Perm>>>
decltype(auto) conj (const Tile< Arg > &arg, const Perm &perm)
 Create a complex conjugated and permuted copy of a tile. More...
 
template<typename Arg , typename Scalar , typename Perm , typename std::enable_if< TiledArray::detail::is_numeric_v< Scalar > &&detail::is_permutation_v< Perm >>::type * = nullptr>
decltype(auto) conj (const Tile< Arg > &arg, const Scalar factor, const Perm &perm)
 Create a complex conjugated, scaled, and permuted copy of a tile. More...
 
template<typename Result >
Tile< 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_v< Scalar >>::type * = nullptr>
Tile< Result > & conj_to (Tile< Result > &result, const Scalar factor)
 In-place complex conjugate and scale a tile. More...
 
template<typename Arg , typename Op >
decltype(auto) unary (const Tile< Arg > &arg, Op &&op)
 Unary element-wise transform producing a new tile. More...
 
template<typename Arg , typename Op , typename Perm , typename = std::enable_if_t<detail::is_permutation_v<Perm>>>
decltype(auto) unary (const Tile< Arg > &arg, Op &&op, const Perm &perm)
 Unary element-wise transform producing a new tile. More...
 
template<typename Result , typename Op >
Tile< Result > & inplace_unary (Tile< Result > &arg, Op &&op)
 Unary element-wise in-place transform. More...
 
template<typename Left , typename Right , typename Scalar , typename std::enable_if< detail::is_numeric_v< Scalar >>::type * = nullptr>
decltype(auto) gemm (const Tile< Left > &left, const Tile< Right > &right, const Scalar factor, const math::GemmHelper &gemm_config)
 Contract 2 tensors over head/tail modes and scale the product. More...
 
template<typename Result , typename Left , typename Right , typename Scalar , typename std::enable_if< detail::is_numeric_v< Scalar >>::type * = nullptr>
Tile< Result > & gemm (Tile< Result > &result, const Tile< Left > &left, const Tile< Right > &right, const Scalar factor, const math::GemmHelper &gemm_config)
 
template<typename Result , typename Left , typename Right , typename ElementMultiplyAddOp , typename std::enable_if< std::is_invocable_r_v< void, std::remove_reference_t< ElementMultiplyAddOp >, typename Result::value_type &, const typename Left::value_type &, const typename Right::value_type & >>::type * = nullptr>
Tile< Result > & gemm (Tile< Result > &result, const Tile< Left > &left, const Tile< Right > &right, const math::GemmHelper &gemm_config, ElementMultiplyAddOp &&element_multiplyadd_op)
 
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 , typename ResultType >
void norm (const Tile< Arg > &arg, ResultType &result)
 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) inner_product (const Tile< Left > &left, const Tile< Right > &right)
 Vector inner product of a tile. More...
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const Tile< T > &tile)
 
template<typename T1 , typename T2 >
bool operator== (const Tile< T1 > &t1, const Tile< T2 > &t2)
 Tile equality comparison. More...
 
template<typename T1 , typename T2 >
bool operator!= (const Tile< T1 > &t1, const Tile< T2 > &t2)
 Tile inequality comparison. 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_v< Scalar >>::type * = nullptr>
auto add (const Left &left, const Right &right, const Scalar factor)
 Add and scale tile arguments. More...
 
template<typename Left , typename Right , typename Perm , typename = std::enable_if_t<TiledArray::detail::is_permutation_v<Perm> && detail::has_member_function_add_anyreturn_v< const Left, const Right&, const Perm&>>>
auto add (const Left &left, const Right &right, const Perm &perm)
 Add and permute tile arguments. More...
 
template<typename Left , typename Right , typename Scalar , typename Perm , typename std::enable_if< detail::is_numeric_v< Scalar > &&detail::is_permutation_v< Perm >>::type * = nullptr>
auto add (const Left &left, const Right &right, const Scalar factor, const Perm &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_v< Scalar >>::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< madness::remove_fcvr_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 , typename Perm , typename = std::enable_if_t<detail::is_permutation_v<Perm> && detail::has_member_function_permute_anyreturn_v< const Arg, const Perm&>>>
auto permute (const Arg &arg, const Perm &perm)
 Create a permuted copy of arg. More...
 
template<typename Arg , typename Scalar , std::enable_if_t< TiledArray::detail::is_numeric_v< Scalar > &&!TiledArray::detail::is_array_v< Arg >> * = nullptr>
auto scale (const Arg &arg, const Scalar factor)
 Scalar the tile argument. More...
 
template<typename Arg , typename Scalar , typename Perm , std::enable_if_t< TiledArray::detail::is_numeric_v< Scalar > &&TiledArray::detail::is_permutation_v< Perm >> * = nullptr>
auto scale (const Arg &arg, const Scalar factor, const Perm &perm)
 Scale and permute tile argument. More...
 
template<typename Result , typename Scalar , std::enable_if_t< TiledArray::detail::is_numeric_v< Scalar >> * = nullptr>
Result & scale_to (Result &result, const Scalar factor)
 Scale to the result tile. More...
 
template<typename Arg , typename Index , typename = std::enable_if_t<detail::is_integral_range_v<Index>>>
auto shift (const Arg &arg, const Index &range_shift)
 Shift the range of arg. More...
 
template<typename Arg , typename Index , typename = std::enable_if_t<std::is_integral_v<Index>>>
auto shift (const Arg &arg, const std::initializer_list< Index > &range_shift)
 Shift the range of arg. More...
 
template<typename Arg , typename Index , typename = std::enable_if_t<detail::is_integral_range_v<Index>>>
auto shift_to (Arg &arg, const Index &range_shift)
 Shift the range of arg in place. More...
 
template<typename Arg , typename Index , typename = std::enable_if_t<std::is_integral_v<Index>>>
auto shift_to (Arg &arg, const std::initializer_list< Index > &range_shift)
 Shift the range of arg in place. More...
 
template<typename T , typename = detail::enable_if_trace_is_defined_t<T>>
decltype(auto) trace (const T &t)
 
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_v< Scalar >>::type * = nullptr>
auto subt (const Left &left, const Right &right, const Scalar factor)
 Subtract and scale tile arguments. More...
 
template<typename Left , typename Right , typename Perm , typename = std::enable_if_t<detail::is_permutation_v<Perm>>>
auto subt (const Left &left, const Right &right, const Perm &perm)
 Subtract and permute tile arguments. More...
 
template<typename Left , typename Right , typename Scalar , typename Perm , typename std::enable_if< detail::is_numeric_v< Scalar > &&detail::is_permutation_v< Perm >>::type * = nullptr>
auto subt (const Left &left, const Right &right, const Scalar factor, const Perm &perm)
 Subtract, scale, and permute tile arguments. More...
 
template<typename Arg , typename Scalar , typename std::enable_if< detail::is_numeric_v< Scalar >>::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 Perm , typename std::enable_if< detail::is_numeric_v< Scalar > &&detail::is_permutation_v< Perm >>::type * = nullptr>
auto subt (const Arg &arg, const Scalar value, const Perm &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_v< Scalar >>::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_v< Scalar >>::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 , std::enable_if_t< TiledArray::detail::is_numeric_v< Scalar >> * = nullptr>
auto mult (const Left &left, const Right &right, const Scalar factor)
 Multiplication and scale tile arguments. More...
 
template<typename Left , typename Right , typename Perm , typename = std::enable_if_t<detail::is_permutation_v<Perm> && detail::has_member_function_mult_anyreturn_v< const Left, const Right&, const Perm&>>>
auto mult (const Left &left, const Right &right, const Perm &perm)
 Multiplication and permute tile arguments. More...
 
template<typename Left , typename Right , typename Scalar , typename Perm , std::enable_if_t< TiledArray::detail::is_numeric_v< Scalar > &&detail::is_permutation_v< Perm >> * = nullptr>
auto mult (const Left &left, const Right &right, const Scalar factor, const Perm &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 , std::enable_if_t< TiledArray::detail::is_numeric_v< Scalar >> * = nullptr>
Result & mult_to (Result &result, const Arg &arg, const Scalar factor)
 Multiply and scale to the result tile. More...
 
template<typename Left , typename Right , typename Op >
decltype(auto) binary (const Left &left, const Right &right, Op &&op)
 Binary element-wise transform producing a new tile. More...
 
template<typename Left , typename Right , typename Op , typename Perm , typename = std::enable_if_t<detail::is_permutation_v<Perm>>>
decltype(auto) binary (const Left &left, const Right &right, Op &&op, const Perm &perm)
 Binary element-wise transform producing a new tile. More...
 
template<typename Left , typename Right , typename Op >
Left & inplace_binary (Left &left, const Right &right, Op &&op)
 Binary element-wise in-place transform. More...
 
template<typename Arg >
auto neg (const Arg &arg)
 Negate the tile argument. More...
 
template<typename Arg , typename Perm , typename = std::enable_if_t<detail::is_permutation_v<Perm>>>
auto neg (const Arg &arg, const Perm &perm)
 Negate and permute tile argument. More...
 
template<typename Result >
Result & neg_to (Result &result)
 Negate the tile argument in-place. 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_v< Scalar >>::type * = nullptr>
auto conj (const Arg &arg, const Scalar factor)
 Create a complex conjugated and scaled copy of a tile. More...
 
template<typename Arg , typename Perm , typename = std::enable_if_t<detail::is_permutation_v<Perm>>>
auto conj (const Arg &arg, const Perm &perm)
 Create a complex conjugated and permuted copy of a tile. More...
 
template<typename Arg , typename Scalar , typename Perm , typename std::enable_if< TiledArray::detail::is_numeric_v< Scalar > &&detail::is_permutation_v< Perm >>::type * = nullptr>
auto conj (const Arg &arg, const Scalar factor, const Perm &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_v< Scalar >>::type * = nullptr>
Result & conj_to (Result &result, const Scalar factor)
 In-place complex conjugate and scale a tile. More...
 
template<typename Arg , typename Op >
decltype(auto) unary (const Arg &arg, Op &&op)
 Unary element-wise transform producing a new tile. More...
 
template<typename Arg , typename Op , typename Perm , typename = std::enable_if_t<detail::is_permutation_v<Perm>>>
decltype(auto) unary (const Arg &arg, Op &&op, const Perm &perm)
 Unary element-wise transform producing a new tile. More...
 
template<typename Result , typename Op >
Result & inplace_unary (Result &arg, Op &&op)
 Unary element-wise in-place transform. More...
 
template<typename Left , typename Right , typename Scalar , std::enable_if_t< TiledArray::detail::is_numeric_v< Scalar >> * = nullptr>
auto gemm (const Left &left, const Right &right, const Scalar factor, const math::GemmHelper &gemm_config)
 Contract 2 tensors over head/tail modes and scale the product. More...
 
template<typename Result , typename Left , typename Right , typename Scalar , std::enable_if_t< TiledArray::detail::is_numeric_v< Scalar >> * = nullptr>
Result & gemm (Result &result, const Left &left, const Right &right, const Scalar factor, const math::GemmHelper &gemm_config)
 
template<typename Result , typename Left , typename Right , typename ElementMultiplyAddOp , std::enable_if_t< std::is_invocable_r_v< void, std::remove_reference_t< ElementMultiplyAddOp >, typename Result::value_type &, const typename Left::value_type &, const typename Right::value_type & >> * = nullptr>
Result & gemm (Result &result, const Left &left, const Right &right, const math::GemmHelper &gemm_config, ElementMultiplyAddOp &&element_multiplyadd_op)
 
template<typename Arg >
auto sum (const Arg &arg)
 Sum the hyper-diagonal elements 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 , typename ResultType >
void norm (const Arg &arg, ResultType &result)
 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...
 
TiledRange1 concat (const TiledRange1 &r1, const TiledRange1 &r2)
 Concatenates two ranges. More...
 
bool is_congruent (const TiledRange1 &r1, const TiledRange1 &r2)
 Test that two TiledRange1 objects are congruent. More...
 
void launch_gdb_xterm ()
 Use this to launch GNU debugger in xterm. More...
 
void launch_lldb_xterm ()
 Use this to launch LLVM debugger in xterm. More...
 
template<class F >
shared_function< std::decay_t< F > > make_shared_function (F &&f)
 
template<typename R , typename... Args>
constexpr void swap (function_ref< R(Args...)> &lhs, function_ref< R(Args...)> &rhs) noexcept
 Swaps the referred callables of lhs and rhs. More...
 
template<typename Op >
auto make_op_shared_handle (Op &&op)
 
template<typename T , typename U = std::array<TiledRange1, initializer_list_rank_v<std::decay_t<T>>>>
auto tiled_range_from_il (T &&il, U shape={})
 Creates a TiledRange for the provided initializer list. More...
 
template<typename T , typename OutputItr >
auto flatten_il (T &&il, OutputItr out_itr)
 Flattens the contents of a (possibly nested) initializer_list into the provided buffer. More...
 
template<typename T , typename U >
auto get_elem_from_il (T idx, U &&il, std::size_t depth=0)
 Retrieves the specified element from an initializer_list. More...
 
template<typename ArrayType , typename T >
auto array_from_il (World &world, const TiledRange &trange, T &&il)
 Converts an std::initializer_list into a tiled array. More...
 
template<typename ArrayType , typename T >
auto array_from_il (World &world, T &&il)
 Converts an std::initializer_list into a single tile array. More...
 
time_point now ()
 
std::chrono::system_clock::time_point system_now ()
 
double duration_in_s (time_point const &t0, time_point const &t1)
 
int64_t duration_in_ns (time_point const &t0, time_point const &t1)
 
template<typename T , typename A >
std::ostream & operator<< (std::ostream &os, const std::vector< T, A > &vec)
 Vector output stream operator. More...
 
void ignore_tile_position (bool b)
 
bool ignore_tile_position ()
 
foreach/foreach_inplace functions

foreach/foreach_inplace is a generalization of std::transform for DistArray objects. Specifically, it applies callable Op to each tile in the argument DistArray object (or objects for the binary foreach/foreach_inplace ). The Op callable either writes the output to the first tile it's given or it produces a new tile (of potentially different type). It also can optionally compute the norm of the result tile. A foreach function produces new DistArray object, whereas foreach_inplace mutates the first DistArray argument "in-place". For dense arrays Op therefore must be callable as

void(ResultTile&, const ArgTiles&...);

For sparse arrays Op must be callable as either

void(ResultTile&, const ArgTiles&...);

or as

real(ResultTile&, const ArgTiles&...);

where real is convertible to the first DistArray argument's shape value; in the latter case the return value is converted to Policy::shape_type::value_type and used to construct the shape of the result, whereas in the former case the shape of the result is computed from the shapes of the DistArray arguments (e.g. assigned to the shape of the first DistArray argument).

Note
foreach/foreach_inplace are collective, with sparse variants synchronizing due to the need to compute and replicate shapes.
template<typename ResultTile , typename ArgTile , typename Policy , typename Op , typename = typename std::enable_if< !std::is_same<ResultTile, ArgTile>::value>::type>
std::enable_if_t< is_dense_v< Policy >, DistArray< ResultTile, Policy > > foreach (const DistArray< ArgTile, Policy > &arg, Op &&op)
 Apply a function to each tile of a dense Array. More...
 
template<typename Tile , typename Policy , typename Op >
std::enable_if_t< is_dense_v< Policy >, DistArray< Tile, Policy > > foreach (const DistArray< Tile, Policy > &arg, Op &&op)
 Apply a function to each tile of a dense Array. More...
 
template<typename Tile , typename Policy , typename Op , typename = typename std::enable_if<!TiledArray::detail::is_array< typename std::decay<Op>::type>::value>::type>
std::enable_if_t< is_dense_v< Policy >, void > foreach_inplace (DistArray< Tile, Policy > &arg, Op &&op, bool fence=true)
 Modify each tile of a dense Array. More...
 
template<typename ResultTile , typename ArgTile , typename Policy , typename Op , typename = typename std::enable_if< !std::is_same<ResultTile, ArgTile>::value>::type>
std::enable_if_t<!is_dense_v< Policy >, DistArray< ResultTile, Policy > > foreach (const DistArray< ArgTile, Policy > arg, Op &&op)
 Apply a function to each tile of a sparse Array. More...
 
template<typename Tile , typename Policy , typename Op >
std::enable_if_t<!is_dense_v< Policy >, DistArray< Tile, Policy > > foreach (const DistArray< Tile, Policy > &arg, Op &&op)
 Apply a function to each tile of a sparse Array. More...
 
template<typename Tile , typename Policy , typename Op , typename = typename std::enable_if<!TiledArray::detail::is_array< typename std::decay<Op>::type>::value>::type>
std::enable_if_t<!is_dense_v< Policy >, void > foreach_inplace (DistArray< Tile, Policy > &arg, Op &&op, bool fence=true)
 Modify each tile of a sparse Array. More...
 
template<typename ResultTile , typename LeftTile , typename RightTile , typename Policy , typename Op , typename = typename std::enable_if< !std::is_same<ResultTile, LeftTile>::value>::type>
std::enable_if_t< is_dense_v< Policy >, DistArray< ResultTile, Policy > > foreach (const DistArray< LeftTile, Policy > &left, const DistArray< RightTile, Policy > &right, Op &&op)
 
template<typename LeftTile , typename RightTile , typename Policy , typename Op >
std::enable_if_t< is_dense_v< Policy >, DistArray< LeftTile, Policy > > foreach (const DistArray< LeftTile, Policy > &left, const DistArray< RightTile, Policy > &right, Op &&op)
 
template<typename LeftTile , typename RightTile , typename Policy , typename Op >
std::enable_if_t< is_dense_v< Policy >, void > foreach_inplace (DistArray< LeftTile, Policy > &left, const DistArray< RightTile, Policy > &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 Policy , typename Op , typename = typename std::enable_if< !std::is_same<ResultTile, LeftTile>::value>::type>
std::enable_if_t<!is_dense_v< Policy >, DistArray< ResultTile, Policy > > foreach (const DistArray< LeftTile, Policy > &left, const DistArray< RightTile, Policy > &right, Op &&op, const ShapeReductionMethod shape_reduction=ShapeReductionMethod::Intersect)
 
template<typename LeftTile , typename RightTile , typename Policy , typename Op >
std::enable_if_t<!is_dense_v< Policy >, DistArray< LeftTile, Policy > > foreach (const DistArray< LeftTile, Policy > &left, const DistArray< RightTile, Policy > &right, Op &&op, const ShapeReductionMethod shape_reduction=ShapeReductionMethod::Intersect)
 
template<typename LeftTile , typename RightTile , typename Policy , typename Op >
std::enable_if_t<!is_dense_v< Policy >, void > foreach_inplace (DistArray< LeftTile, Policy > &left, const DistArray< RightTile, Policy > &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...
 
TiledArray initialization.

These functions initialize TiledArray and (if needed) MADWorld runtime.

Note
the default World object is set to the object returned by these.
Warning
MADWorld can only be initialized/finalized once, hence if TiledArray initializes MADWorld it can also be initialized/finalized only once.
void ta_abort ()
 
void ta_abort (const std::string &m)
 
void finalize ()
 
TiledArray initialization.

These functions initialize TiledArray and (if needed) MADWorld runtime.

Note
the default World object is set to the object returned by these.
Warning
MADWorld can only be initialized/finalized once, hence if TiledArray initializes MADWorld it can also be initialized/finalized only once.
World & initialize (int &argc, char **&argv, const SafeMPI::Intracomm &comm, bool quiet=true)
 
World & initialize (int &argc, char **&argv, bool quiet=true)
 
World & initialize (int &argc, char **&argv, const MPI_Comm &comm, bool quiet=true)
 

Variables

template<typename T >
constexpr const bool is_dense_v = is_dense<T>::value
 
template<typename T >
constexpr const bool is_lazy_tile_v = is_lazy_tile<T>::value
 is_lazy_tile_v<T> is an alias for is_lazy_tile<T>::value More...
 
template<typename T >
constexpr const bool is_consumable_tile_v = is_consumable_tile<T>::value
 is_consumable_tile_v<T> is an alias for is_consumable_tile<T>::value More...
 
template<typename T , typename SizeType = std::size_t>
constexpr auto initializer_list_rank_v
 Helper variable for retrieving the degree of nesting for an std::initializer_list. More...
 

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 117 of file tiledarray_fwd.h.

◆ EigenMatrixXcd

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

Definition at line 47 of file eigen.h.

◆ EigenMatrixXcf

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

Definition at line 50 of file eigen.h.

◆ EigenMatrixXd

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

Definition at line 42 of file eigen.h.

◆ EigenMatrixXf

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

Definition at line 44 of file eigen.h.

◆ EigenMatrixXi

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

Definition at line 52 of file eigen.h.

◆ EigenMatrixXl

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

Definition at line 54 of file eigen.h.

◆ EigenVectorXcd

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

Definition at line 57 of file eigen.h.

◆ EigenVectorXcf

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

Definition at line 58 of file eigen.h.

◆ EigenVectorXd

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

Definition at line 55 of file eigen.h.

◆ EigenVectorXf

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

Definition at line 56 of file eigen.h.

◆ EigenVectorXi

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

Definition at line 59 of file eigen.h.

◆ EigenVectorXl

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

Definition at line 60 of file eigen.h.

◆ result_of_trace_t

template<typename T >
using TiledArray::result_of_trace_t = typedef decltype(trace(std::declval<T>()))

Helper type for determining the result of taking the trace of a tensor

Template Parameters
TThe type of tensor for which we want to know the type resulting from tracing it.

Definition at line 102 of file trace.h.

◆ TArray

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

Definition at line 93 of file tiledarray_fwd.h.

◆ TArrayC

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

Definition at line 99 of file tiledarray_fwd.h.

◆ TArrayD

typedef TArray<double> TiledArray::TArrayD

Definition at line 94 of file tiledarray_fwd.h.

◆ TArrayF

typedef TArray<float> TiledArray::TArrayF

Definition at line 96 of file tiledarray_fwd.h.

◆ TArrayI

Definition at line 95 of file tiledarray_fwd.h.

◆ TArrayL

typedef TArray<long> TiledArray::TArrayL

Definition at line 97 of file tiledarray_fwd.h.

◆ TArrayZ

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

Definition at line 98 of file tiledarray_fwd.h.

◆ TensorC

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

Definition at line 59 of file tiledarray_fwd.h.

◆ TensorConstMap

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

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 44 of file tensor.h.

◆ TensorD

Definition at line 50 of file tiledarray_fwd.h.

◆ TensorF

Definition at line 52 of file tiledarray_fwd.h.

◆ TensorI

Definition at line 51 of file tiledarray_fwd.h.

◆ TensorL

Definition at line 53 of file tiledarray_fwd.h.

◆ TensorMap

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

Definition at line 45 of file tensor_map.h.

◆ TensorView

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

Definition at line 41 of file tensor.h.

◆ TensorZ

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

Definition at line 56 of file tiledarray_fwd.h.

◆ time_point

using TiledArray::time_point = typedef std::chrono::high_resolution_clock::time_point

Definition at line 33 of file time.h.

◆ TSpArray

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

Definition at line 103 of file tiledarray_fwd.h.

◆ TSpArrayC

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

Definition at line 110 of file tiledarray_fwd.h.

◆ TSpArrayD

Definition at line 105 of file tiledarray_fwd.h.

◆ TSpArrayF

Definition at line 107 of file tiledarray_fwd.h.

◆ TSpArrayI

Definition at line 106 of file tiledarray_fwd.h.

◆ TSpArrayL

Definition at line 108 of file tiledarray_fwd.h.

◆ TSpArrayZ

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

Definition at line 109 of file tiledarray_fwd.h.

Enumeration Type Documentation

◆ ExecutionSpace

enumerates the execution spaces

Enumerator
CPU 
CUDA 

Definition at line 58 of file platform.h.

◆ MemorySpace

enumerates the memory spaces

Enumerator
Null 
CPU 
CUDA 
CUDA_UM 

Definition at line 30 of file platform.h.

◆ OrdinalType

Specifies how coordinates are mapped to ordinal values

  • RowMajor: stride decreases as mode index increases
  • ColMajor: stride increases with the mode index
  • Other: unknown or dynamic order
Enumerator
RowMajor 
ColMajor 
Other 
Invalid 

Definition at line 324 of file type_traits.h.

◆ ShapeReductionMethod

Enumerator
Union 
Intersect 

Definition at line 49 of file foreach.h.

Function Documentation

◆ abs_max()

template<typename Tile , typename Policy >
auto TiledArray::abs_max ( const DistArray< Tile, Policy > &  a)

Definition at line 1635 of file dist_array.h.

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

◆ abs_min()

template<typename Tile , typename Policy >
auto TiledArray::abs_min ( const DistArray< Tile, Policy > &  a)

Definition at line 1630 of file dist_array.h.

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

◆ absmax_reduce_cuda_kernel_impl()

template<typename T >
T TiledArray::absmax_reduce_cuda_kernel_impl ( const T *  arg,
std::size_t  n,
cudaStream_t  stream,
int  device_id 
)

Definition at line 96 of file reduce_kernel_impl.h.

◆ absmin_reduce_cuda_kernel_impl()

template<typename T >
T TiledArray::absmin_reduce_cuda_kernel_impl ( const T *  arg,
std::size_t  n,
cudaStream_t  stream,
int  device_id 
)

Definition at line 113 of file reduce_kernel_impl.h.

◆ 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 43 of file add.h.

◆ add() [2/4]

template<typename Left , typename Right , typename Perm , typename = std::enable_if_t<TiledArray::detail::is_permutation_v<Perm> && detail::has_member_function_add_anyreturn_v< const Left, const Right&, const Perm&>>>
auto TiledArray::add ( const Left &  left,
const Right &  right,
const Perm &  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 77 of file add.h.

◆ add() [3/4]

template<typename Left , typename Right , typename Scalar , typename std::enable_if< detail::is_numeric_v< Scalar >>::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 60 of file add.h.

◆ add() [4/4]

template<typename Left , typename Right , typename Scalar , typename Perm , typename std::enable_if< detail::is_numeric_v< Scalar > &&detail::is_permutation_v< Perm >>::type * = nullptr>
auto TiledArray::add ( const Left &  left,
const Right &  right,
const Scalar  factor,
const Perm &  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 95 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 108 of file add.h.

◆ add_to() [2/2]

template<typename Result , typename Arg , typename Scalar , typename std::enable_if< detail::is_numeric_v< Scalar >>::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 124 of file add.h.

◆ array_from_il() [1/2]

template<typename ArrayType , typename T >
auto TiledArray::array_from_il ( World &  world,
const TiledRange trange,
T &&  il 
)

Converts an std::initializer_list into a tiled array.

This function encapsulates the process of turning an std::initializer_list into a TiledArray array. The resulting tensor will have a tiling consistent with the provided TiledRange, trange.

Note
This function will raise a static assertion if you try to construct a rank 0 tensor (i.e., you pass in a single element and not an std::initializer_list).
Template Parameters
ArrayTypeThe type of the array we are creating. Expected to be have an API akin to that of DistArray
TThe type of the provided std::initializer_list.
Parameters
[in]worldThe context in which the resulting tensor will live.
[in]trangeThe tiling for the resulting tensor.
[in]ilThe initializer_list containing the initial state of the tensor. il is assumed to be non-empty and in row-major form. The nesting of il will be used to determine the rank of the resulting tensor.
Returns
A newly created instance of type ArrayType whose state is derived from il and exists in the world context.
Exceptions
TiledArray::Exceptionif il contains no elements. If an exception is raised world, trange, and il are unchanged (strong throw guarantee).
TiledArray::ExceptionIf the provided std::initializer_list is not rectangular (e.g., attempting to initialize a matrix with the value {{1, 2}, {3, 4, 5}}). If an exception is raised world, trange, and il are unchanged.

Definition at line 315 of file initializer_list.h.

Here is the call graph for this function:

◆ array_from_il() [2/2]

template<typename ArrayType , typename T >
auto TiledArray::array_from_il ( World &  world,
T &&  il 
)

Converts an std::initializer_list into a single tile array.

This function encapsulates the process of turning an std::initializer_list into a TiledArray array. The resulting tensor will consistent of a single tile which holds all of the values.

Note
This function will raise a static assertion if you try to construct a rank 0 tensor (i.e., you pass in a single element and not an std::initializer_list).
Template Parameters
ArrayTypeThe type of the array we are creating. Expected to be have an API akin to that of DistArray
TThe type of the provided std::initializer_list.
Parameters
[in]worldThe context in which the resulting tensor will live.
[in]ilThe initializer_list containing the initial state of the tensor. il is assumed to be non-empty and in row-major form. The nesting of il will be used to determine the rank of the resulting tensor.
Returns
A newly created instance of type ArrayType whose state is derived from il and exists in the world context.
Exceptions
TiledArray::Exceptionif il contains no elements. If an exception is raised world and il are unchanged (strong throw guarantee).
TiledArray::ExceptionIf the provided std::initializer_list is not rectangular (e.g., attempting to initialize a matrix with the value {{1, 2}, {3, 4, 5}}). If an exception is raised world and il are unchanged.

Definition at line 367 of file initializer_list.h.

Here is the call graph for this function:

◆ array_to_btas_tensor()

template<typename Tile , typename Policy , typename Storage = std::vector<typename Tile::value_type>>
btas::Tensor<typename Tile::value_type, btas::DEFAULT::range, Storage> TiledArray::array_to_btas_tensor ( const TiledArray::DistArray< Tile, Policy > &  src,
int  target_rank = -1 
)

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:

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
Parameters
[in]target_rankthe rank on which to create the BTAS tensor containing the data of src ; if target_rank=-1 then create the BTAS tensor on every rank (this requires that src.is_replicated()==true )
Returns
BTAS tensor object containing the data of src , if my rank equals target_rank or target_rank==-1 , default-initialized BTAS tensor otherwise.

Definition at line 301 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 496 of file eigen.h.

Here is the call graph for this function:

◆ assert_failed()

void TiledArray::assert_failed ( const std::string &  m)
inline

Definition at line 64 of file error.h.

Here is the call graph for this function:

◆ btas_subtensor_to_tensor()

template<typename T , typename Range_ , typename Storage_ , typename Tensor_ >
void TiledArray::btas_subtensor_to_tensor ( const btas::Tensor< T, Range_, Storage_ > &  src,
Tensor_ &  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
Tensor_A tensor type (e.g., TiledArray::Tensor or btas::Tensor, optionally wrapped into TiledArray::Tile)
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 60 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 212 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,
std::shared_ptr< typename A::pmap_interface >  pmap = {} 
)
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. Each tile is created using the local contents of matrix, hence it is your responsibility to ensure that the data in matrix is distributed correctly among the ranks. If in doubt, you should replicate matrix among the ranks prior to calling this.

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
replicatedif true, the result will be replicated [default = true].
pmapthe process map object [default=null]; initialized to the default if replicated is false, or a replicated pmap if replicated is true; ignored if replicated is true and world.size()>1
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 662 of file eigen.h.

◆ concat()

TiledRange1 TiledArray::concat ( const TiledRange1 r1,
const TiledRange1 r2 
)
inline

Concatenates two ranges.

Tiles of the second range are concatenated to the tiles of the first. For example:

assert(concat((TiledRange1{1, 3, 7, 9}),(TiledRange1{0, 3, 4,
5})) == (TiledRange1{1, 3, 7, 9, 12, 13, 14}));
assert(concat((TiledRange1{0, 3, 4, 5}),(TiledRange1{1, 3, 7, 9})) ==
(TiledRange1{0, 3, 4, 5, 7, 11, 13}));
Parameters
r1first range
r2second range
Returns
concatenated range

Definition at line 339 of file tiled_range1.h.

Here is the call graph for this function:

◆ congruent()

bool TiledArray::congruent ( const Range r1,
const Range r2 
)
inline

Test if the two ranges are congruent.

This function tests that the rank and extent of r1 are equal to those of r2.

Parameters
r1The first Range to compare
r2The second Range to compare

Definition at line 83 of file btas.h.

Here is the call graph for this function:

◆ device_data() [1/2]

template<typename T >
const T* TiledArray::device_data ( const cpu_cuda_vector< T > &  storage)

Definition at line 198 of file cpu_cuda_vector.h.

Here is the call graph for this function:

◆ device_data() [2/2]

template<typename T >
T* TiledArray::device_data ( cpu_cuda_vector< T > &  storage)

Definition at line 193 of file cpu_cuda_vector.h.

Here is the call graph for this function:

◆ diagonal_array() [1/2]

template<typename Array , typename RandomAccessIterator >
std::enable_if_t<detail::is_iterator<RandomAccessIterator>::value, Array> TiledArray::diagonal_array ( World &  world,
TiledRange const &  trange,
RandomAccessIterator  diagonals_begin,
RandomAccessIterator  diagonals_end = {} 
)

Creates a non-constant diagonal DistArray.

Creates an array whose only nonzero values are the (hyper)diagonal elements (i.e. (n,n,n, ..., n) ); the values of the diagonal elements are given by an input range

Template Parameters
Arraya DistArray type
RandomAccessIteratoran iterator over the range of diagonal elements
Parameters
worldThe world for the array
[in]trangeThe trange for the array
[in]diagonals_beginthe begin iterator of the range of the diagonals
[in]diagonals_endthe end iterator of the range of the diagonals; if not given, default initialized and thus will not be checked
Returns
a constant diagonal DistArray

Definition at line 262 of file diagonal_array.h.

◆ diagonal_array() [2/2]

template<typename Array , typename T = double>
Array TiledArray::diagonal_array ( World &  world,
TiledRange const &  trange,
val = 1 
)

Creates a constant diagonal DistArray.

Creates an array whose only nonzero values are the (hyper)diagonal elements (i.e. (n,n,n, ..., n) ), and they are all have the same value

Template Parameters
Policythe policy type of the resulting DistArray
Ta numeric type
Parameters
worldThe world for the array
[in]trangeThe trange for the array
[in]valThe value of the diagonal elements
Returns
a constant diagonal DistArray

Definition at line 230 of file diagonal_array.h.

Here is the call graph for this function:

◆ dot()

template<typename Tile , typename Policy >
auto TiledArray::dot ( const DistArray< Tile, Policy > &  a,
const DistArray< Tile, Policy > &  b 
)

Definition at line 1640 of file dist_array.h.

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

◆ duration_in_ns()

int64_t TiledArray::duration_in_ns ( time_point const &  t0,
time_point const &  t1 
)
inline

Definition at line 45 of file time.h.

◆ duration_in_s()

double TiledArray::duration_in_s ( time_point const &  t0,
time_point const &  t1 
)
inline

Definition at line 41 of file time.h.

◆ eigen_map() [1/6]

template<typename T , Eigen::StorageOptions Storage = Eigen::RowMajor, std::enable_if_t< detail::is_contiguous_tensor_v< T >> * = nullptr>
Eigen::Map<const Eigen::Matrix<typename T::value_type, Eigen::Dynamic, Eigen::Dynamic, Storage>, Eigen::AutoAlign> TiledArray::eigen_map ( const T &  tensor)
inline

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

The dimensions of the result tensor are extracted from the tensor itself

Template Parameters
TA contiguous tensor type, e.g. TiledArray::Tensor ; namely, TiledArray::detail::is_contiguous_tensor_v<T> must be true
Storagethe tensor layout, either Eigen::RowMajor (default) or Eigen::ColMajor
Parameters
tensorThe tensor object, laid out according to Storage
Returns
An Eigen matrix map for tensor
Exceptions
TiledArray::ExceptionWhen tensor dimensions are not equal to 2 or 1.

Definition at line 161 of file eigen.h.

◆ eigen_map() [2/6]

template<typename T , Eigen::StorageOptions Storage = Eigen::RowMajor, std::enable_if_t< detail::is_contiguous_tensor_v< T >> * = nullptr>
Eigen::Map<const Eigen::Matrix<typename T::value_type, Eigen::Dynamic, Eigen::Dynamic, Storage>, Eigen::AutoAlign> TiledArray::eigen_map ( const T &  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
TA contiguous tensor type, e.g. TiledArray::Tensor ; namely, TiledArray::detail::is_contiguous_tensor_v<T> must be true
Storagethe tensor layout, either Eigen::RowMajor (default) or Eigen::ColMajor
Parameters
tensorThe tensor object, laid out according to Storage
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 77 of file eigen.h.

Here is the caller graph for this function:

◆ eigen_map() [3/6]

template<typename T , std::enable_if_t< detail::is_contiguous_tensor_v< T >> * = nullptr>
Eigen::Map< const Eigen::Matrix<typename T::value_type, Eigen::Dynamic, 1>, Eigen::AutoAlign> TiledArray::eigen_map ( const T &  tensor,
const std::size_t  n 
)
inline

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

Template Parameters
TA contiguous tensor type, e.g. TiledArray::Tensor ; namely, TiledArray::detail::is_contiguous_tensor_v<T> must be true
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 120 of file eigen.h.

◆ eigen_map() [4/6]

template<typename T , Eigen::StorageOptions Storage = Eigen::RowMajor, std::enable_if_t< detail::is_contiguous_tensor_v< T >> * = nullptr>
Eigen::Map<Eigen::Matrix<typename T::value_type, Eigen::Dynamic, Eigen::Dynamic, Storage>, Eigen::AutoAlign> TiledArray::eigen_map ( T &  tensor)
inline

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

The dimensions of the result tensor are extracted from the tensor itself

Template Parameters
TA contiguous tensor type, e.g. TiledArray::Tensor ; namely, TiledArray::detail::is_contiguous_tensor_v<T> must be true
Storagethe tensor layout, either Eigen::RowMajor (default) or Eigen::ColMajor
Parameters
tensorThe tensor object, laid out according to Storage
Returns
An Eigen matrix map for tensor
Exceptions
Whentensor dimensions are not equal to 2 or 1.

Definition at line 184 of file eigen.h.

◆ eigen_map() [5/6]

template<typename T , Eigen::StorageOptions Storage = Eigen::RowMajor, std::enable_if_t< detail::is_contiguous_tensor_v< T >> * = nullptr>
Eigen::Map<Eigen::Matrix<typename T::value_type, Eigen::Dynamic, Eigen::Dynamic, Storage>, Eigen::AutoAlign> TiledArray::eigen_map ( T &  tensor,
const std::size_t  m,
const std::size_t  n 
)
inline

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

Template Parameters
TA contiguous tensor type, e.g. TiledArray::Tensor ; namely, TiledArray::detail::is_contiguous_tensor_v<T> must be true
Storagethe tensor layout, either Eigen::RowMajor (default) or Eigen::ColMajor
Parameters
tensorThe tensor object, laid out according to Storage
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 100 of file eigen.h.

◆ eigen_map() [6/6]

template<typename T , std::enable_if_t< detail::is_contiguous_tensor_v< T >> * = nullptr>
Eigen::Map<Eigen::Matrix<typename T::value_type, Eigen::Dynamic, 1>, Eigen::AutoAlign> TiledArray::eigen_map ( T &  tensor,
const std::size_t  n 
)
inline

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

Template Parameters
TA tensor type, e.g. TiledArray::Tensor
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 139 of file eigen.h.

◆ eigen_submatrix_to_tensor()

template<typename T , typename Derived , std::enable_if_t< detail::is_contiguous_tensor_v< T >> * = nullptr>
void TiledArray::eigen_submatrix_to_tensor ( const Eigen::MatrixBase< Derived > &  matrix,
T &  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
TA tensor type, e.g. TiledArray::Tensor
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 207 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,
std::shared_ptr< typename A::pmap_interface >  pmap = {} 
)

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. Each tile is created using the local contents of matrix, hence it is your responsibility to ensure that the data in matrix is distributed correctly among the ranks. If in doubt, you should replicate matrix among the ranks prior to calling this.

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
replicatedif true, the result will be replicated [default = true].
pmapthe process map object [default=null]; initialized to the default if replicated is false, or a replicated pmap if replicated is true; ignored if replicated is true and world.size()>1
Returns
An Array object that is a copy of matrix

Definition at line 409 of file eigen.h.

◆ exception_break()

void TiledArray::exception_break ( )
inline

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

Definition at line 62 of file error.h.

Here is the caller graph for this function:

◆ finalize()

void TiledArray::finalize ( )

Finalizes TiledArray (and MADWorld runtime, if it had not been initialized when TiledArray::initialize was called).

Definition at line 118 of file tiledarray.cpp.

Here is the call graph for this function:

◆ finalized()

bool TiledArray::finalized ( )
Returns
true if TiledArray has been finalized at least once

Definition at line 66 of file tiledarray.cpp.

Here is the caller graph for this function:

◆ flatten_il()

template<typename T , typename OutputItr >
auto TiledArray::flatten_il ( T &&  il,
OutputItr  out_itr 
)

Flattens the contents of a (possibly nested) initializer_list into the provided buffer.

This function is used to flatten a (possibly nested) std::initializer_list into a buffer provided by the user. The flattening occurs by iterating over the layers of the std::initializer_list in a depth-first manner. As the initializer_list is flattened the data is copied into the container associated with out_itr. It is assumed that the container associated with out_itr is already allocated or that out_itr will internally allocate the memory on-the-fly (e.g. std::back_insert_iterator).

This function works with empty std::initializer_list instances (you will get back out_itr unchanged and the corresponding container is unchanged) as well as single tensor elements (i.e., initializing a scalar); in the latter case the buffer corresponding to out_itr must contain room for at least one element as the element will be copied to the buffer.

Template Parameters
TExpected to be the type of a tensor element (i.e. float, double, etc.) or a (possibly nested) std::initializer_list of tensor elements.
OutputItrThe type of an iterator which can be used to fill a container. It must satisfy the concept of Output Iterator.
Parameters
[in]ilThe std::initializer_list we are flattening.
[in]out_itrAn iterator pointing to the first element where data should be copied to. Memory in the destination container is assumed to be pre-allocated otherwise @
Returns
out_itr pointing to just past the last element inserted by this function.
Exceptions
TiledArray::ExceptionIf the provided std::initializer_list is not rectangular (e.g., attempting to initialize a matrix with the value {{1, 2}, {3, 4, 5}}). If an exception is thrown il and out_itr are in their original state (strong throw guarantee).

Definition at line 205 of file initializer_list.h.

◆ foreach() [1/8]

template<typename ResultTile , typename ArgTile , typename Policy , typename Op , typename = typename std::enable_if< !std::is_same<ResultTile, ArgTile>::value>::type>
std:: enable_if_t<is_dense_v<Policy>, DistArray<ResultTile, Policy> > TiledArray::foreach ( const DistArray< ArgTile, Policy > &  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:

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

The expected signature of the tile operation is:

void op(ResultTile& result_tile,
const ArgTile& arg_tile);
Template Parameters
ResultTileThe tile type of the result array
ArgTileThe tile type of arg
PolicyThe policy type of arg; is_dense_v<Policy> must be true
OpTile operation
Parameters
opThe tile function
argThe argument array

Definition at line 425 of file foreach.h.

◆ foreach() [2/8]

template<typename ResultTile , typename ArgTile , typename Policy , typename Op , typename = typename std::enable_if< !std::is_same<ResultTile, ArgTile>::value>::type>
std:: enable_if_t<!is_dense_v<Policy>, DistArray<ResultTile, Policy> > TiledArray::foreach ( const DistArray< ArgTile, Policy >  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:

TSpArrayD out_array =
foreach(in_array, [] (auto& out_tile,
const auto& 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:

float op(ResultTile& result_tile,
const Tile& arg_tile);

where in the case of standard Policy (i.e. SparsePolicy) 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
ResultTileThe tile type of the result
TileThe tile type of arg
PolicyThe policy type of arg; is_dense_v<Policy> must be false
OpTile operation
Parameters
argThe argument array
opThe tile function

Definition at line 524 of file foreach.h.

◆ foreach() [3/8]

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

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

Definition at line 602 of file foreach.h.

◆ foreach() [4/8]

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

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

Definition at line 613 of file foreach.h.

◆ foreach() [5/8]

template<typename ResultTile , typename LeftTile , typename RightTile , typename Policy , typename Op , typename = typename std::enable_if< !std::is_same<ResultTile, LeftTile>::value>::type>
std:: enable_if_t<!is_dense_v<Policy>, DistArray<ResultTile, Policy> > TiledArray::foreach ( const DistArray< LeftTile, Policy > &  left,
const DistArray< RightTile, Policy > &  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 640 of file foreach.h.

◆ foreach() [6/8]

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

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

Definition at line 653 of file foreach.h.

◆ foreach() [7/8]

template<typename Tile , typename Policy , typename Op >
std::enable_if_t<is_dense_v<Policy>, DistArray<Tile, Policy> > TiledArray::foreach ( const DistArray< Tile, Policy > &  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 436 of file foreach.h.

◆ foreach() [8/8]

template<typename Tile , typename Policy , typename Op >
std::enable_if_t<!is_dense_v<Policy>, DistArray<Tile, Policy> > TiledArray::foreach ( const DistArray< Tile, Policy > &  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 535 of file foreach.h.

◆ foreach_inplace() [1/4]

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

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

Definition at line 622 of file foreach.h.

Here is the call graph for this function:

◆ foreach_inplace() [2/4]

template<typename LeftTile , typename RightTile , typename Policy , typename Op >
std::enable_if_t<!is_dense_v<Policy>, void> TiledArray::foreach_inplace ( DistArray< LeftTile, Policy > &  left,
const DistArray< RightTile, Policy > &  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 664 of file foreach.h.

Here is the call graph for this function:

◆ foreach_inplace() [3/4]

template<typename Tile , typename Policy , typename Op , typename = typename std::enable_if<!TiledArray::detail::is_array< typename std::decay<Op>::type>::value>::type>
std::enable_if_t<is_dense_v<Policy>, void> TiledArray::foreach_inplace ( DistArray< Tile, Policy > &  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:

void op(Tile& tile);
Template Parameters
TileThe tile type of arg
PolicyThe policy type of arg; is_dense_v<Policy> must be true
OpMutating tile operation
Parameters
argThe argument array to be modified
opThe mutating tile function
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 476 of file foreach.h.

Here is the call graph for this function:

◆ foreach_inplace() [4/4]

template<typename Tile , typename Policy , typename Op , typename = typename std::enable_if<!TiledArray::detail::is_array< typename std::decay<Op>::type>::value>::type>
std::enable_if_t<!is_dense_v<Policy>, void> TiledArray::foreach_inplace ( DistArray< Tile, Policy > &  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, [] (auto& 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:

float op(Tile& tile);

where for the standard Policy (i.e. SparsePolicy) the return value of op is the 2-norm (Frobenius norm) of the tile.

Note
This function should not be used to initialize the tiles of an array object.
Template Parameters
TileThe tile type of arg
PolicyThe policy type of arg; is_dense_v<Policy> must be false
OpTile operation
Parameters
argThe argument array to be modified
opThe mutating tile function
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 584 of file foreach.h.

Here is the call graph for this function:

◆ fuse_vector_of_arrays_tiles()

template<typename Tile , typename Policy >
TA::DistArray<Tile, Policy> TiledArray::fuse_vector_of_arrays_tiles ( madness::World &  global_world,
const std::vector< TA::DistArray< Tile, Policy >> &  array_vec,
const std::size_t  fused_dim_extent,
const TiledArray::TiledRange array_trange,
std::size_t  block_size = 1 
)

fuses a vector of DistArray objects, each with the same TiledRange into a DistArray with 1 more dimensions

The leading dimension of the resulting array is the vector dimension, and will be blocked by @block_size .

Parameters
global_worldthe world in which the result will live and across which this is invoked.
[in]array_veca vector of DistArray objects; every element of arrays must have the same TiledRange object and live in the same world.
[in]fused_dim_extentthe extent of the resulting (fused) mode; equals the total number of arrays in a fused arrays (sum of arrays.size() on each rank)
[in]block_sizethe block size for the "vector" dimension of the tiled range of the result
Returns
arrays fused into a DistArray
Note
This is a collective function. It assumes that it is invoked across global_world, but the subarrays are "local" to each rank and distributed in tilewise-round-robin fashion. The result will live in global_world.
See also
detail::fuse_vector_of_shapes_tiles TODO rename to fuse_tilewise_vector_of_arrays

copy the data from a sequence of tiles

write to blocks of fused_array

Definition at line 289 of file vector_of_arrays.h.

Here is the call graph for this function:

◆ get_default_world()

World& TiledArray::get_default_world ( )
inline

Accesses the default World.

Returns
the current default World

Definition at line 90 of file madness.h.

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

◆ get_elem_from_il()

template<typename T , typename U >
auto TiledArray::get_elem_from_il ( idx,
U &&  il,
std::size_t  depth = 0 
)

Retrieves the specified element from an initializer_list.

Given an initializer_list with $N$ nestings, il, and an $N$ element index, idx, this function will return the element which is offset idx[i] along the $i$-th mode of il.

Template Parameters
TThe type of the container holding the index. Assumed to be a random access container whose elements are of an integral type.
UAssumed to be a scalar type (e.g. float, double, etc.) or a (possibly nested) std::initializer_list of scalar types.
Parameters
[in]idxThe desired element's offsets along each mode.
[in]ilThe initializer list we are retrieving the value from.
[in]depthUsed internally to keep track of how many levels of recursion have occurred. Defaults to 0 and should not be modified.
Returns
The requested element.
Exceptions
TiledArray::Exceptionif the number of elements in idx does not equal the nesting of il. Strong throw guarantee.
TiledArray::Exceptionif the offset along a mode is greater than the length of the mode. Strong throw guarantee.

Definition at line 259 of file initializer_list.h.

Here is the caller graph for this function:

◆ ignore_tile_position() [1/2]

bool TiledArray::ignore_tile_position ( )
inline

Reports whether tile positions are checked in binary array operations. These checks are disabled if preprocessor symbol NDEBUG is defined. By default, tile positions are checked.

Returns
if true, tile positions will be ignored in binary array operations.

Definition at line 90 of file utility.h.

Here is the call graph for this function:

◆ ignore_tile_position() [2/2]

void TiledArray::ignore_tile_position ( bool  b)
inline

Controls whether tile positions are checked in binary array operations. These checks are disabled if preprocessor symbol NDEBUG is defined. By default, tile positions are checked.

Parameters
[in]bif true, tile positions will be ignored in binary array operations.
Warning
this function should be called following a fence from the main thread only.

Definition at line 81 of file utility.h.

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

◆ in_memory_space()

template<MemorySpace Space, typename T , typename HostAlloc , typename DeviceAlloc >
bool TiledArray::in_memory_space ( const cpu_cuda_vector< T, HostAlloc, DeviceAlloc > &  vec)
noexcept

Definition at line 162 of file cpu_cuda_vector.h.

Here is the call graph for this function:

◆ initialize() [1/3]

World& TiledArray::initialize ( int &  argc,
char **&  argv,
bool  quiet = true 
)
inline
Exceptions
TiledArray::Exceptionif TiledArray initialized MADWorld and TiledArray::finalize() had been called

Definition at line 38 of file initialize.h.

Here is the call graph for this function:

◆ initialize() [2/3]

World& TiledArray::initialize ( int &  argc,
char **&  argv,
const MPI_Comm &  comm,
bool  quiet = true 
)
inline
Exceptions
TiledArray::Exceptionif TiledArray initialized MADWorld and TiledArray::finalize() had been called

Definition at line 42 of file initialize.h.

Here is the call graph for this function:

◆ initialize() [3/3]

TiledArray::World & TiledArray::initialize ( int &  argc,
char **&  argv,
const SafeMPI::Intracomm &  comm,
bool  quiet = true 
)
Exceptions
TiledArray::Exceptionif TiledArray initialized MADWorld and TiledArray::finalize() had been called

Definition at line 80 of file tiledarray.cpp.

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

◆ initialized()

bool TiledArray::initialized ( )
Returns
true if TiledArray (and, necessarily, MADWorld runtime) is in an initialized state

Definition at line 63 of file tiledarray.cpp.

Here is the caller graph for this function:

◆ inner() [1/2]

auto TiledArray::inner ( const BipartitePermutation p)
inline

Definition at line 829 of file permutation.h.

Here is the call graph for this function:

◆ inner() [2/2]

auto TiledArray::inner ( const Permutation p)
inline

Definition at line 813 of file permutation.h.

Here is the caller graph for this function:

◆ inner_product()

template<typename Tile , typename Policy >
auto TiledArray::inner_product ( const DistArray< Tile, Policy > &  a,
const DistArray< Tile, Policy > &  b 
)

Definition at line 1647 of file dist_array.h.

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

◆ inner_size() [1/2]

auto TiledArray::inner_size ( const BipartitePermutation p)
inline

Definition at line 833 of file permutation.h.

Here is the call graph for this function:

◆ inner_size() [2/2]

auto TiledArray::inner_size ( const Permutation p)
inline

Definition at line 822 of file permutation.h.

Here is the caller graph for this function:

◆ invoke_cast()

template<typename Arg , typename Result = typename TiledArray::eval_trait< madness::remove_fcvr_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 176 of file cast.h.

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

◆ is_congruent() [1/5]

bool TiledArray::is_congruent ( const BlockRange r1,
const BlockRange r2 
)
inline

Test that two BlockRange objects are congruent.

This function tests that the rank, extent of r1 is equal to that of r2.

Parameters
r1The first BlockRange to compare
r2The second BlockRange to compare

Definition at line 400 of file block_range.h.

Here is the caller graph for this function:

◆ is_congruent() [2/5]

bool TiledArray::is_congruent ( const BlockRange r1,
const Range r2 
)
inline

Test that BlockRange and Range are congruent.

This function tests that the rank, extent of r1 is equal to that of r2.

Parameters
r1The BlockRange to compare
r2The Range to compare

Definition at line 412 of file block_range.h.

Here is the call graph for this function:

◆ is_congruent() [3/5]

bool TiledArray::is_congruent ( const Range r1,
const BlockRange r2 
)
inline

Test that Range and BlockRange are congruent.

This function tests that the rank, extent of r1 is equal to that of r2.

Parameters
r1The Range to compare
r2The BlockRange to compare

Definition at line 423 of file block_range.h.

Here is the call graph for this function:

◆ is_congruent() [4/5]

bool TiledArray::is_congruent ( const Range r1,
const Range r2 
)
inline

Test the two ranges are congruent.

This function tests that the rank and extent of r1 are equal to those of r2.

Parameters
r1The first Range to compare
r2The second Range to compare

Definition at line 1301 of file range.h.

Here is the call graph for this function:

◆ is_congruent() [5/5]

bool TiledArray::is_congruent ( const TiledRange1 r1,
const TiledRange1 r2 
)
inline

Test that two TiledRange1 objects are congruent.

This function tests that the tile sizes of the two ranges coincide.

Template Parameters
RangeThe range type
Parameters
r1an TiledRange1 object
r2an TiledRange1 object

Definition at line 362 of file tiled_range1.h.

Here is the call graph for this function:

◆ is_contiguous() [1/2]

bool TiledArray::is_contiguous ( const BlockRange range)
inline

Tests whether a range is contiguous, i.e. whether its ordinal values form a contiguous range

Parameters
rangea BlockRange
Returns
true since TiledArray::BlockRange is contiguous by definition

Definition at line 443 of file block_range.h.

◆ is_contiguous() [2/2]

bool TiledArray::is_contiguous ( const Range range)
inline

Tests whether a range is contiguous, i.e. whether its ordinal values form a contiguous range

Parameters
rangea Range
Returns
true since TiledArray::Range is contiguous by definition

Definition at line 1312 of file range.h.

◆ is_replicated() [1/2]

constexpr bool TiledArray::is_replicated ( World &  world,
const DenseShape t 
)
inlineconstexpr

Definition at line 386 of file dense_shape.h.

Here is the caller graph for this function:

◆ is_replicated() [2/2]

template<typename T >
bool TiledArray::is_replicated ( World &  world,
const SparseShape< T > &  shape 
)

collective bitwise-compare-reduce for SparseShape objects

Parameters
worldthe World object
[in]shapethe SparseShape object
Returns
true if shape is bitwise identical across world
Note
must be invoked on every rank of World

Definition at line 1622 of file sparse_shape.h.

Here is the call graph for this function:

◆ launch_gdb_xterm()

void TiledArray::launch_gdb_xterm ( )

Use this to launch GNU debugger in xterm.

Definition at line 357 of file bug.cpp.

◆ launch_lldb_xterm()

void TiledArray::launch_lldb_xterm ( )

Use this to launch LLVM debugger in xterm.

Definition at line 362 of file bug.cpp.

◆ 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,
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,
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 73 of file make_array.h.

Here is the call graph for this function:
Here is the caller 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,
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 222 of file make_array.h.

◆ make_const_map() [1/6]

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

Definition at line 98 of file tensor_map.h.

Here is the caller graph for this function:

◆ make_const_map() [2/6]

template<typename T , typename Range_ = Range, typename OpResult = Tensor<T>>
TensorConstMap<T, Range_, OpResult> 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 105 of file tensor_map.h.

◆ make_const_map() [3/6]

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

Definition at line 113 of file tensor_map.h.

◆ make_const_map() [4/6]

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

Definition at line 121 of file tensor_map.h.

◆ make_const_map() [5/6]

template<typename T , typename Range_ , typename OpResult = Tensor<T>>
TensorConstMap<T, Range_, OpResult> 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 128 of file tensor_map.h.

◆ make_const_map() [6/6]

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

Definition at line 136 of file tensor_map.h.

◆ make_device_storage()

template<typename T >
void TiledArray::make_device_storage ( cpu_cuda_vector< T > &  storage,
std::size_t  n,
cudaStream_t  stream = 0 
)

Definition at line 187 of file cpu_cuda_vector.h.

◆ make_map() [1/6]

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

Definition at line 74 of file tensor_map.h.

◆ make_map() [2/6]

template<typename T , typename Range_ = Range, typename OpResult = Tensor<T>>
TensorConstMap<T, Range_, OpResult> 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 82 of file tensor_map.h.

◆ make_map() [3/6]

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

Definition at line 90 of file tensor_map.h.

◆ make_map() [4/6]

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

Definition at line 53 of file tensor_map.h.

Here is the caller graph for this function:

◆ make_map() [5/6]

template<typename T , typename Range_ = Range, typename OpResult = Tensor<T>>
TensorMap<T, Range_, OpResult> 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 60 of file tensor_map.h.

◆ make_map() [6/6]

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

Definition at line 67 of file tensor_map.h.

◆ make_op_shared_handle()

template<typename Op >
auto TiledArray::make_op_shared_handle ( Op &&  op)

wraps Op into a shallow-copy copyable handle if Op is an rvalue ref makes an owning handle otherwise makes an non-owning handle

Definition at line 129 of file function.h.

Here is the caller graph for this function:

◆ make_shared_function()

template<class F >
shared_function<std::decay_t<F> > TiledArray::make_shared_function ( F &&  f)

Definition at line 39 of file function.h.

◆ max_reduce_cuda_kernel_impl()

template<typename T >
T TiledArray::max_reduce_cuda_kernel_impl ( const T *  arg,
std::size_t  n,
cudaStream_t  stream,
int  device_id 
)

Definition at line 80 of file reduce_kernel_impl.h.

Here is the call graph for this function:

◆ min_reduce_cuda_kernel_impl()

template<typename T >
T TiledArray::min_reduce_cuda_kernel_impl ( const T *  arg,
std::size_t  n,
cudaStream_t  stream,
int  device_id 
)

Definition at line 88 of file reduce_kernel_impl.h.

Here is the call graph for this function:

◆ mult_cuda_kernel_impl()

template<typename T >
void TiledArray::mult_cuda_kernel_impl ( T *  result,
const T *  arg1,
const T *  arg2,
std::size_t  n,
cudaStream_t  stream,
int  device_id 
)

result[i] = arg1[i] * arg2[i]

Definition at line 48 of file mult_kernel_impl.h.

◆ mult_to_cuda_kernel_impl()

template<typename T >
void TiledArray::mult_to_cuda_kernel_impl ( T *  result,
const T *  arg,
std::size_t  n,
cudaStream_t  stream,
int  device_id 
)

result[i] = result[i] * arg[i]

Definition at line 35 of file mult_kernel_impl.h.

◆ norm2()

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

Definition at line 1660 of file dist_array.h.

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

◆ now()

time_point TiledArray::now ( )
inline

Definition at line 35 of file time.h.

Here is the caller graph for this function:

◆ operator!=() [1/7]

bool TiledArray::operator!= ( const BipartitePermutation p1,
const BipartitePermutation p2 
)
inline

Permutation inequality operator.

Parameters
p1The left-hand permutation to be compared
p2The right-hand permutation to be compared
Returns
false if all elements of p1 and p2 are equal and the partition sizes match, otherwise true.

Definition at line 806 of file permutation.h.

◆ operator!=() [2/7]

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

Definition at line 382 of file dense_shape.h.

◆ operator!=() [3/7]

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 1275 of file range.h.

Here is the call graph for this function:

◆ operator!=() [4/7]

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

Definition at line 2168 of file tensor.h.

◆ operator!=() [5/7]

template<typename T1 , typename T2 >
bool TiledArray::operator!= ( const Tile< T1 > &  t1,
const Tile< T2 > &  t2 
)

Tile inequality comparison.

Definition at line 1650 of file tile.h.

◆ operator!=() [6/7]

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

Definition at line 344 of file tiled_range.h.

Here is the call graph for this function:

◆ operator!=() [7/7]

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

Inequality operator.

Definition at line 318 of file tiled_range1.h.

Here is the call graph for this function:

◆ operator&()

constexpr MemorySpace TiledArray::operator& ( MemorySpace  space1,
MemorySpace  space2 
)
constexpr
Returns
intersection of space1 and space2

Definition at line 43 of file platform.h.

◆ operator*() [1/10]

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 326 of file tiled_range.h.

Here is the call graph for this function:

◆ operator*() [2/10]

template<typename T , std::size_t N>
boost::container::small_vector<T, N> TiledArray::operator* ( const Permutation perm,
const boost::container::small_vector< T, N > &  v 
)
inline

permute a boost::container::small_vector<T>

Template Parameters
TThe element type of the vector
NThe max static size 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 563 of file permutation.h.

Here is the call graph for this function:

◆ operator*() [3/10]

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 1242 of file range.h.

◆ operator*() [4/10]

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 492 of file permutation.h.

Here is the call graph for this function:

◆ operator*() [5/10]

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 528 of file permutation.h.

Here is the call graph for this function:

◆ operator*() [6/10]

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 135 of file operators.h.

Here is the call graph for this function:

◆ operator*() [7/10]

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 595 of file permutation.h.

Here is the call graph for this function:

◆ operator*() [8/10]

template<typename T , typename N , typename std::enable_if<(detail::is_tensor< T >::value||detail::is_tensor_of_tensor< T >::value) &&detail::is_numeric_v< N >>::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 95 of file operators.h.

Here is the call graph for this function:

◆ operator*() [9/10]

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 79 of file operators.h.

Here is the call graph for this function:

◆ operator*() [10/10]

template<typename N , typename T , typename std::enable_if< detail::is_numeric_v< N > &&(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 111 of file operators.h.

Here is the call graph for this function:

◆ operator*=() [1/5]

template<typename T , std::size_t N>
boost::container::small_vector<T, N>& TiledArray::operator*= ( boost::container::small_vector< T, N > &  v,
const Permutation perm 
)
inline

In-place permute a boost::container::small_vector.

Template Parameters
TThe element type of the vector
NThe max static size 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 581 of file permutation.h.

Here is the call graph for this function:

◆ operator*=() [2/5]

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 510 of file permutation.h.

Here is the call graph for this function:

◆ operator*=() [3/5]

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::vector.

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 546 of file permutation.h.

Here is the call graph for this function:

◆ operator*=() [4/5]

template<typename T , typename N , typename std::enable_if<(detail::is_tensor< T >::value||detail::is_tensor_of_tensor< T >::value) &&detail::is_numeric_v< N >>::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 231 of file operators.h.

Here is the call graph for this function:

◆ operator*=() [5/5]

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 183 of file operators.h.

Here is the call graph for this function:

◆ 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 47 of file operators.h.

Here is the call graph for this function:

◆ operator+=() [1/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_v< N >>::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 199 of file operators.h.

Here is the call graph for this function:

◆ operator+=() [2/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 151 of file operators.h.

Here is the call graph for this function:

◆ operator-() [1/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 123 of file operators.h.

Here is the call graph for this function:

◆ operator-() [2/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 63 of file operators.h.

Here is the call graph for this function:

◆ operator-=() [1/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_v< N >>::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 215 of file operators.h.

Here is the call graph for this function:

◆ operator-=() [2/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 167 of file operators.h.

◆ operator<<() [1/7]

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 1602 of file dist_array.h.

Here is the call graph for this function:

◆ operator<<() [2/7]

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 1286 of file range.h.

Here is the call graph for this function:

◆ operator<<() [3/7]

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 1609 of file sparse_shape.h.

Here is the call graph for this function:

◆ operator<<() [4/7]

template<typename T , typename A >
std::ostream& TiledArray::operator<< ( std::ostream &  os,
const std::vector< T, A > &  vec 
)
inline

Vector output stream operator.

Definition at line 91 of file vector.h.

Here is the call graph for this function:

◆ operator<<() [5/7]

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 57 of file tensor.h.

◆ operator<<() [6/7]

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

Definition at line 348 of file tiled_range.h.

Here is the call graph for this function:

◆ operator<<() [7/7]

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

TiledRange1 ostream operator.

Definition at line 323 of file tiled_range1.h.

Here is the call graph for this function:

◆ operator==() [1/8]

bool TiledArray::operator== ( const BipartitePermutation p1,
const BipartitePermutation p2 
)
inline

Permutation equality operator.

Parameters
p1The left-hand permutation to be compared
p2The right-hand permutation to be compared
Returns
true if all elements of p1 and p2 are equal and the partition sizes match, otherwise false.

Definition at line 795 of file permutation.h.

Here is the call graph for this function:

◆ operator==() [2/8]

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

BlockRange 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 433 of file block_range.h.

Here is the caller graph for this function:

◆ operator==() [3/8]

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

Definition at line 378 of file dense_shape.h.

◆ operator==() [4/8]

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 1263 of file range.h.

Here is the call graph for this function:

◆ operator==() [5/8]

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

Definition at line 2163 of file tensor.h.

Here is the call graph for this function:

◆ operator==() [6/8]

template<typename T1 , typename T2 >
bool TiledArray::operator== ( const Tile< T1 > &  t1,
const Tile< T2 > &  t2 
)

Tile equality comparison.

Definition at line 1644 of file tile.h.

Here is the call graph for this function:

◆ operator==() [7/8]

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

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

Definition at line 337 of file tiled_range.h.

Here is the call graph for this function:

◆ operator==() [8/8]

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

Equality operator.

Definition at line 311 of file tiled_range1.h.

Here is the call graph for this function:

◆ operator|()

constexpr MemorySpace TiledArray::operator| ( MemorySpace  space1,
MemorySpace  space2 
)
constexpr
Returns
union of space1 and space2

Definition at line 48 of file platform.h.

◆ outer() [1/2]

auto TiledArray::outer ( const BipartitePermutation p)
inline

Definition at line 831 of file permutation.h.

Here is the call graph for this function:

◆ outer() [2/2]

auto TiledArray::outer ( const Permutation p)
inline

Definition at line 820 of file permutation.h.

Here is the caller graph for this function:

◆ outer_size() [1/2]

auto TiledArray::outer_size ( const BipartitePermutation p)
inline

Definition at line 837 of file permutation.h.

Here is the call graph for this function:

◆ outer_size() [2/2]

auto TiledArray::outer_size ( const Permutation p)
inline

Definition at line 827 of file permutation.h.

Here is the call graph for this function:

◆ overlap()

constexpr bool TiledArray::overlap ( MemorySpace  space1,
MemorySpace  space2 
)
constexpr
Returns
true if intersection of space1 and space2 is nonnull

Definition at line 53 of file platform.h.

Here is the caller graph for this function:

◆ permute() [1/3]

template<typename Arg , typename Perm , typename = std::enable_if_t<detail::is_permutation_v<Perm> && detail::has_member_function_permute_anyreturn_v< const Arg, const Perm&>>>
auto TiledArray::permute ( const Arg &  arg,
const Perm &  perm 
)
inline

Create a permuted copy of arg.

Template Parameters
ArgThe tile argument type
PermA permutation 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 47 of file permute.h.

◆ permute() [2/3]

template<typename I , typename = std::enable_if_t<std::is_integral_v<I>>>
Range TiledArray::permute ( const Range r,
std::initializer_list< I >  perm 
)

Create a permuted range.

Parameters
rThe range to be permuted
permThe permutation to be applied to the range
Returns
A permuted copy of r.
Note
this is an adaptor to BTAS' permute

Definition at line 1253 of file range.h.

◆ permute() [3/3]

template<typename Perm >
std::enable_if<!TiledArray::detail::is_permutation_v<Perm>, TiledArray::Range>::type TiledArray::permute ( const TiledArray::Range r,
const Perm &  p 
)

permute function for TiledArray::Range class with non-TiledArray Permutation object

Definition at line 803 of file btas.h.

Here is the caller graph for this function:

◆ product_reduce_cuda_kernel_impl()

template<typename T >
T TiledArray::product_reduce_cuda_kernel_impl ( const T *  arg,
std::size_t  n,
cudaStream_t  stream,
int  device_id 
)

Definition at line 64 of file reduce_kernel_impl.h.

Here is the call graph for this function:

◆ push_default_world()

std::unique_ptr<World, decltype(world_resetter)> TiledArray::push_default_world ( World &  world)
inline

Sets the default World to world and returns a smart pointer to the current default World. Releasing this pointer will automatically set the default World to the World that it points. Thus use this as follows:

{
auto popper = push_default_world(new_world);
assert(&new_world == &get_default_world()); // new_world is now default
... // TiledArray expressions will use new_world now
} // popper destructor resets the default World back to the old value
Parameters
worlda World object which will become the new default
Returns
a smart pointer to the current default World (i.e. not world) whose deleter will reset the default World back to the stored value

Definition at line 117 of file madness.h.

Here is the call graph for this function:

◆ rank()

template<typename Tile , typename Policy >
auto TiledArray::rank ( const DistArray< Tile, Policy > &  a)

Definition at line 1617 of file dist_array.h.

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

◆ reduce_cuda_kernel_impl()

template<typename T , typename ReduceOp >
T TiledArray::reduce_cuda_kernel_impl ( ReduceOp &&  op,
const T *  arg,
std::size_t  n,
init,
cudaStream_t  stream,
int  device_id 
)

T = reduce(T* arg)

Definition at line 51 of file reduce_kernel_impl.h.

Here is the caller graph for this function:

◆ remap() [1/8]

template<typename T , typename Range_ , typename OpResult , typename Index1 , typename Index2 >
void TiledArray::remap ( detail::TensorInterface< const T, Range_, OpResult > &  ,
T * const  ,
const Index1 &  ,
const Index2 &   
)

◆ remap() [2/8]

template<typename T , typename Range_ , typename OpResult , typename Index1 , typename Index2 >
void TiledArray::remap ( detail::TensorInterface< const T, Range_, OpResult > &  ,
T * const  ,
const std::initializer_list< Index1 > &  ,
const std::initializer_list< Index2 > &   
)

◆ remap() [3/8]

template<typename T , typename Range_ , typename OpResult , typename Index1 , typename Index2 >
void TiledArray::remap ( detail::TensorInterface< T, Range_, OpResult > &  ,
T * const  ,
const Index1 &  ,
const Index2 &   
)
inline

Definition at line 154 of file tensor_map.h.

◆ remap() [4/8]

template<typename T , typename Range_ , typename OpResult , typename Index1 , typename Index2 >
void TiledArray::remap ( detail::TensorInterface< T, Range_, OpResult > &  ,
T * const  ,
const std::initializer_list< Index1 > &  ,
const std::initializer_list< Index2 > &   
)
inline

Definition at line 172 of file tensor_map.h.

◆ remap() [5/8]

template<typename T , typename Range_ , typename OpResult , typename Index1 , typename Index2 , typename = std::enable_if_t<!std::is_const<T>::value>>
void TiledArray::remap ( TensorConstMap< T, Range_, OpResult > &  map,
T *const  data,
const Index1 &  lower_bound,
const Index2 &  upper_bound 
)
inline

Definition at line 154 of file tensor_map.h.

◆ remap() [6/8]

template<typename T , typename Range_ , typename OpResult , typename Index1 , typename Index2 , typename = std::enable_if_t<!std::is_const<T>::value>>
void TiledArray::remap ( TensorConstMap< T, Range_, OpResult > &  map,
T *const  data,
const std::initializer_list< Index1 > &  lower_bound,
const std::initializer_list< Index2 > &  upper_bound 
)
inline

Definition at line 172 of file tensor_map.h.

◆ remap() [7/8]

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

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

Definition at line 145 of file tensor_map.h.

◆ remap() [8/8]

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

Definition at line 162 of file tensor_map.h.

◆ reset_default_world()

void TiledArray::reset_default_world ( )
inline

Resets the default World to the world returned by madness::World::get_default(), i.e. the World that spans all processes

Definition at line 93 of file madness.h.

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

◆ retile()

template<typename TileType , typename PolicyType >
auto TiledArray::retile ( const DistArray< TileType, PolicyType > &  tensor,
const TiledRange new_trange 
)

Definition at line 42 of file retile.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,
std::shared_ptr< typename A::pmap_interface >  pmap = {} 
)
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. Each tile is created using the local contents of matrix, hence it is your responsibility to ensure that the data in matrix is distributed correctly among the ranks. If in doubt, you should replicate matrix among the ranks prior to calling this.

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
replicatedif true, the result will be replicated [default = true].
pmapthe process map object [default=null]; initialized to the default if replicated is false, or a replicated pmap if replicated is true; ignored if replicated is true and world.size()>1
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 593 of file eigen.h.

◆ scale() [1/2]

template<typename Arg , typename Scalar , std::enable_if_t< TiledArray::detail::is_numeric_v< Scalar > &&!TiledArray::detail::is_array_v< Arg >> * = nullptr>
auto TiledArray::scale ( const Arg &  arg,
const Scalar  factor 
)
inline

Scalar the tile argument.

Template Parameters
ArgA tile type
ScalarA numeric type (i.e. TiledArray::detail::is_numeric_v<Scalar> is true)
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/2]

template<typename Arg , typename Scalar , typename Perm , std::enable_if_t< TiledArray::detail::is_numeric_v< Scalar > &&TiledArray::detail::is_permutation_v< Perm >> * = nullptr>
auto TiledArray::scale ( const Arg &  arg,
const Scalar  factor,
const Perm &  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 60 of file scale.h.

◆ scale_to()

template<typename Result , typename Scalar , std::enable_if_t< TiledArray::detail::is_numeric_v< Scalar >> * = 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 73 of file scale.h.

◆ set_default_world()

void TiledArray::set_default_world ( World &  world)
inline

Sets the default World to world .

Expressions that follow this call will use world as the default execution context (the use of default World can be overridden by explicit mechanisms for specifying the execution context, like Expr::set_world() or assigning an expression to a DistArray that has already been initialized with a World).

Note
set_default_world() and get_default_world() are only useful if 1 thread (usually, the main thread ) creates TiledArray expressions.
Parameters
worlda World object which will become the new default

Definition at line 85 of file madness.h.

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

◆ shift() [1/4]

template<typename Arg , typename Index , typename = std::enable_if_t<detail::is_integral_range_v<Index>>>
auto TiledArray::shift ( const Arg &  arg,
const Index &  range_shift 
)
inline

Shift the range of arg.

Template Parameters
ArgThe tile argument type
IndexAn integral range 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 43 of file shift.h.

◆ shift() [2/4]

template<typename Arg , typename Index , typename = std::enable_if_t<std::is_integral_v<Index>>>
auto TiledArray::shift ( const Arg &  arg,
const std::initializer_list< Index > &  range_shift 
)
inline

Shift the range of arg.

Template Parameters
ArgThe tile argument type
IndexAn integral 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 56 of file shift.h.

◆ shift() [3/4]

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 146 of file shift_wrapper.h.

◆ shift() [4/4]

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_to() [1/2]

template<typename Arg , typename Index , typename = std::enable_if_t<detail::is_integral_range_v<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 integral range 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 70 of file shift.h.

◆ shift_to() [2/2]

template<typename Arg , typename Index , typename = std::enable_if_t<std::is_integral_v<Index>>>
auto TiledArray::shift_to ( Arg &  arg,
const std::initializer_list< Index > &  range_shift 
)
inline

Shift the range of arg in place.

Template Parameters
ArgThe tile argument type
IndexAn integral 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 83 of file shift.h.

◆ squared_norm()

template<typename Tile , typename Policy >
auto TiledArray::squared_norm ( const DistArray< Tile, Policy > &  a)

Definition at line 1655 of file dist_array.h.

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

◆ subarray_from_fused_array()

template<typename Tile , typename Policy >
void TiledArray::subarray_from_fused_array ( madness::World &  local_world,
const TA::DistArray< Tile, Policy > &  fused_array,
std::size_t  tile_idx,
std::vector< TA::DistArray< Tile, Policy >> &  split_arrays,
const TA::TiledRange split_trange 
)

extracts a subarray of a fused array created with fuse_vector_of_arrays and creates the array in local_world.

Parameters
[in]local_worldThe World object where the @i -th subarray is created
[in]fused_arraya DistArray created with fuse_vector_of_arrays
[in]ithe index of the subarray to be extracted (i.e. the index of the corresponding element index of the leading dimension)
[in]tile_of_itile range information for tile i
[in]split_trangeTiledRange of the split Array object
Returns
the i -th subarray
See also
detail::subshape_from_fused_tile TODO rename to split_tilewise_fused_array

copy the data from tile

write to blocks of fused_array

Definition at line 393 of file vector_of_arrays.h.

Here is the call graph for this function:

◆ sum_reduce_cuda_kernel_impl()

template<typename T >
T TiledArray::sum_reduce_cuda_kernel_impl ( const T *  arg,
std::size_t  n,
cudaStream_t  stream,
int  device_id 
)

Definition at line 72 of file reduce_kernel_impl.h.

Here is the call graph for this function:

◆ swap() [1/4]

template<typename R , typename... Args>
constexpr void TiledArray::swap ( function_ref< R(Args...)> &  lhs,
function_ref< R(Args...)> &  rhs 
)
constexprnoexcept

Swaps the referred callables of lhs and rhs.

Definition at line 120 of file function.h.

Here is the caller graph for this function:

◆ swap() [2/4]

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

Exchange the values of the give two ranges.

Definition at line 1233 of file range.h.

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

◆ swap() [3/4]

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

Exchange the content of the two given TiledRange's.

Definition at line 334 of file tiled_range.h.

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

◆ swap() [4/4]

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

Exchange the data of the two given ranges.

Definition at line 306 of file tiled_range1.h.

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

◆ system_now()

std::chrono::system_clock::time_point TiledArray::system_now ( )
inline

Definition at line 37 of file time.h.

Here is the call graph for this function:

◆ ta_abort() [1/2]

void TiledArray::ta_abort ( )

Finalizes TiledArray (and MADWorld runtime, if it had not been initialized when TiledArray::initialize was called).

Definition at line 136 of file tiledarray.cpp.

Here is the caller graph for this function:

◆ ta_abort() [2/2]

void TiledArray::ta_abort ( const std::string &  m)

Finalizes TiledArray (and MADWorld runtime, if it had not been initialized when TiledArray::initialize was called).

Definition at line 140 of file tiledarray.cpp.

Here is the call graph for this function:

◆ tensor_to_btas_subtensor()

template<typename Tensor_ , typename T , typename Range_ , typename Storage_ >
void TiledArray::tensor_to_btas_subtensor ( const Tensor_ &  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
Tensor_A tensor type (e.g., TiledArray::Tensor or btas::Tensor, optionally wrapped into TiledArray::Tile)
TThe tensor element type
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 96 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 Derived , std::enable_if_t< detail::is_contiguous_tensor_v< T >> * = nullptr>
void TiledArray::tensor_to_eigen_submatrix ( const T &  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
TA tensor type, e.g. TiledArray::Tensor
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 274 of file eigen.h.

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

◆ tiled_range_from_il()

template<typename T , typename U = std::array<TiledRange1, initializer_list_rank_v<std::decay_t<T>>>>
auto TiledArray::tiled_range_from_il ( T &&  il,
shape = {} 
)

Creates a TiledRange for the provided initializer list.

Tensors which are constructed with initializer lists are assumed to be small enough that the data should reside in a single tile. This function will recurse through il and create a TiledRange instance such that each rank is tiled from [0, n_i) where n_i is the length of the i-th nested std::initializer_list in il.

Template Parameters
TExpected to be the type of a tensor element (i.e. float, double, etc.) or a (possibly nested) std::initializer_list of tensor elements.
UThe type of the container which will hold the TiledRange1 instances for each level of nesting in T. U must satisfy the concept of a random-access container. U defaults to std::array<TiledRange1, N> where N is the degree of nesting of il.
Parameters
[in]ilThe state we intend to initialize the tensor to.
[in]shapeA pre-allocated buffer that will be used to hold the TiledRange1 instances for each std::initializer_list as this function recurses. The default value is an std::array of default constructed TiledRange1 instances, which should suffice for most purposes.
Returns
A TiledRange instance consistent with treating il as a tensor with a single tile.
Exceptions
TiledArray::Exceptionif il contains no elements. If an exception is raised this way il and shape are guaranteed to be in the same state (strong throw guarantee).

Definition at line 131 of file initializer_list.h.

Here is the caller graph for this function:

◆ to_dense() [1/2]

template<typename Tile , typename ResultPolicy = DensePolicy, typename ArgPolicy >
std::enable_if_t<is_dense_v<ResultPolicy> && !is_dense_v<ArgPolicy>, DistArray<Tile, ResultPolicy> > TiledArray::to_dense ( DistArray< Tile, ArgPolicy > const &  sparse_array)
inline

Definition at line 37 of file sparse_to_dense.h.

Here is the call graph for this function:

◆ to_dense() [2/2]

template<typename Tile , typename Policy >
std::enable_if_t<is_dense_v<Policy>, DistArray<Tile, Policy> > TiledArray::to_dense ( DistArray< Tile, Policy > const &  other)
inline

Definition at line 65 of file sparse_to_dense.h.

◆ to_execution_space()

template<ExecutionSpace Space, typename T , typename HostAlloc , typename DeviceAlloc >
void TiledArray::to_execution_space ( cpu_cuda_vector< T, HostAlloc, DeviceAlloc > &  vec,
cudaStream_t  stream = 0 
)

Definition at line 170 of file cpu_cuda_vector.h.

Here is the call graph for this function:

◆ to_new_tile_type()

template<typename Tile , typename ConvTile = Tile, typename Policy , typename Op >
decltype(auto) 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
ConvTileThe tile type to which Tile can be converted to and for which Op(ConvTile) is well-formed
PolicyThe array policy type
OpThe tile conversion operation type
Parameters
arrayThe array to be converted
opThe tile type conversion operation

Definition at line 71 of file to_new_tile_type.h.

◆ to_sparse() [1/2]

template<typename Tile , typename ResultPolicy = SparsePolicy, typename ArgPolicy >
std::enable_if_t<!is_dense_v<ResultPolicy> && is_dense_v<ArgPolicy>, DistArray<Tile, ResultPolicy> > TiledArray::to_sparse ( DistArray< Tile, ArgPolicy > 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 17 of file dense_to_sparse.h.

Here is the call graph for this function:

◆ to_sparse() [2/2]

template<typename Tile , typename Policy >
std::enable_if_t<!is_dense_v<Policy>, DistArray<Tile, Policy> > TiledArray::to_sparse ( DistArray< Tile, Policy > const &  sparse_array)

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

Definition at line 54 of file dense_to_sparse.h.

◆ trace()

template<typename T , typename = detail::enable_if_trace_is_defined_t<T>>
decltype(auto) TiledArray::trace ( const T &  t)

Helper function for taking the trace of a tensor

This function works by creating a detail::Trace instance for the given tile type, T. The implementation of the trace operation can be controlled by specializing Trace<T>. It simply returns the result of Trace<T>::operator()(const T&)const verbatim.

This function only participates in overload resolution if detail::trace_is_defined_v<T> is true.

Template Parameters
TThe type of tensor we are trying to take the trace of.
<anonymous>Template type parameter used for SFINAE. Defaults to void when we know how to take the trace of a tensor type
Parameters
[in]tThe tensor instance we want the trace of.
Returns
The results of calling Trace<T>::operator() on t.
Exceptions
???Any exceptions thrown by Trace<T>::operator() will also be thrown by this function with the same throw guarantee.

Definition at line 92 of file trace.h.

◆ truncate() [1/2]

template<typename Tile , typename Policy >
std::enable_if_t<!is_dense_v<Policy>, void> TiledArray::truncate ( DistArray< Tile, Policy > &  array,
typename Policy::shape_type::value_type  thresh = Policy::shape_type::threshold() 
)
inline

Truncate a sparse Array.

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

Definition at line 56 of file truncate.h.

Here is the call graph for this function:

◆ truncate() [2/2]

template<typename Tile , typename Policy >
std::enable_if_t<is_dense_v<Policy>, void> TiledArray::truncate ( DistArray< Tile, Policy > &  array,
typename Policy::shape_type::value_type  = 0 
)
inline

Truncate a dense Array.

This is a no-op

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

Definition at line 46 of file truncate.h.

Here is the caller graph for this function:

◆ volume()

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

Definition at line 1622 of file dist_array.h.

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

Variable Documentation

◆ initializer_list_rank_v

template<typename T , typename SizeType = std::size_t>
constexpr auto TiledArray::initializer_list_rank_v
constexpr
Initial value:
=
InitializerListRank<T, SizeType>::value

Helper variable for retrieving the degree of nesting for an std::initializer_list.

This helper variable creates a global variable which contains the value of InitializerListRank<T, SizeType> and is intended to be used as a (more) convenient means of retrieving the value.

Template Parameters
TThe type we are analyzing for its std::initializer_list-nested-ness
SizeTypethe type to use for the value member. Defaults to std::size_t.

Definition at line 71 of file initializer_list.h.

◆ is_dense_v

template<typename T >
constexpr const bool TiledArray::is_dense_v = is_dense<T>::value
constexpr

Definition at line 47 of file shape.h.

remove_cvr_t< decltype(*std::begin(std::declval< T & >()))> value_t
Definition: type_traits.h:1113
std::unique_ptr< World, decltype(world_resetter)> push_default_world(World &world)
Definition: madness.h:117
TSpArray< double > TSpArrayD
Tensor_ & inplace_unary(Op &&op)
Use a unary, element wise operation to modify this tensor.
Definition: tensor.h:1062
World & get_default_world()
Definition: madness.h:90
btas::Tensor< typename Tile::value_type, btas::DEFAULT::range, Storage > array_to_btas_tensor(const TiledArray::DistArray< Tile, Policy > &src, int target_rank=-1)
Convert a TiledArray::DistArray object into a btas::Tensor object.
Definition: btas.h:301
Range data of a tiled array.
Definition: tiled_range.h:32
Forward declarations.
Definition: dist_array.h:57
An N-dimensional tensor object.
Definition: tensor.h:50
TiledRange1 concat(const TiledRange1 &r1, const TiledRange1 &r2)
Concatenates two ranges.
Definition: tiled_range1.h:339
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.
Definition: eigen.h:496
A (hyperrectangular) interval on , space of integer -indices.
Definition: range.h:46