iterative-solver 0.0
molpro::linalg::array Namespace Reference

Namespaces

namespace  detail
 
namespace  span
 
namespace  util
 

Classes

struct  array_family
 Deduces which family an array type belongs to. More...
 
struct  array_family< T, false, false, true, false >
 
struct  array_family< T, false, false, true, true >
 
struct  array_family< T, false, true, false, false >
 
struct  array_family< T, true, false, false, false >
 
class  ArrayHandler
 Enhances various operations between pairs of arrays and allows dynamic code injection with uniform interface. More...
 
class  ArrayHandlerDDisk
 
class  ArrayHandlerDDiskDistr
 
class  ArrayHandlerDDiskSparse
 
class  ArrayHandlerDDiskSparse< AL, AR, true >
 Array handler between an iterable and a sparse arrays. Iterable container must implement access operator. More...
 
class  ArrayHandlerDefault
 Fall back handler that calls member functions of arrays. More...
 
class  ArrayHandlerDistr
 
class  ArrayHandlerDistrDDisk
 
class  ArrayHandlerDistrSparse
 
class  ArrayHandlerDistrSparse< AL, AR, true >
 Array handler between an iterable and a sparse arrays. Iterable container must implement access operator. More...
 
class  ArrayHandlerIterable
 Array handler for two containers both of which can be iterated through using begin() and end() member functions, and have a copy constructor. More...
 
class  ArrayHandlerIterableSparse
 
class  ArrayHandlerIterableSparse< AL, AR, true >
 Array handler between an iterable and a sparse arrays. Iterable container must implement access operator. More...
 
class  ArrayHandlerSparse
 Array handler between two sparse arrays (e.g. std::map) More...
 
struct  default_handler
 
struct  default_handler< T, S, ArrayFamily::Distributed, ArrayFamily::Distributed >
 
struct  default_handler< T, S, ArrayFamily::Distributed, ArrayFamily::DistributedDisk >
 
struct  default_handler< T, S, ArrayFamily::Distributed, ArrayFamily::Sparse >
 
struct  default_handler< T, S, ArrayFamily::DistributedDisk, ArrayFamily::Distributed >
 
struct  default_handler< T, S, ArrayFamily::DistributedDisk, ArrayFamily::DistributedDisk >
 
struct  default_handler< T, S, ArrayFamily::DistributedDisk, ArrayFamily::Sparse >
 
struct  default_handler< T, S, ArrayFamily::Iterable, ArrayFamily::Iterable >
 
struct  default_handler< T, S, ArrayFamily::Iterable, ArrayFamily::Sparse >
 
struct  default_handler< T, S, ArrayFamily::Sparse, ArrayFamily::Sparse >
 
class  DistrArray
 Array distributed across many processes supporting remote-memory-access, access to process local buffer, and some linear algebra operations. More...
 
class  DistrArrayDisk
 Distributed array located primarily on disk. More...
 
class  DistrArrayFile
 Distributed array storing the buffer on disk using temporary local files. More...
 
class  DistrArrayGA
 Distributed array which uses Global Arrays for managing the array buffer and RMA calls. More...
 
class  DistrArrayMPI3
 Implementation of distributed array using MPI3 RMA operations. More...
 
class  DistrArraySpan
 
struct  has_mapped_type
 checks that type name A::mapped_type exists More...
 
struct  has_mapped_type< A, void_t< typename A::mapped_type > >
 
struct  is_disk
 Checks if class T has a tag marking it as a distributed disk array. More...
 
struct  is_disk< T, void_t< typename T::disk_array > >
 
struct  is_distributed
 Checks if class T has a tag marking it as a distributed array. More...
 
struct  is_distributed< T, void_t< typename T::distributed_array > >
 
struct  is_iterable
 Checks that class T can be iterated with std::begin and std::end, and is not sparse. More...
 
struct  is_iterable< T, void_t< decltype(std::begin(std::declval< T >())), decltype(std::end(std::declval< T >())), std::enable_if_t<!is_sparse_v< T > > > >
 
struct  mapped_or_value_type
 Stores A::mapped_type or A::value_type as member type value, with former taking priority if both exist. More...
 
struct  mapped_or_value_type< A, true >
 
class  Span
 Non-owning container taking a pointer to the data buffer and its size and exposing routines for iteration. More...
 

Typedefs

template<class... Ts>
using void_t = void
 Utility for metaprogramming that maps any types to void. More...
 
template<class A >
using mapped_or_value_type_t = typename mapped_or_value_type< A >::type
 
template<class T , class S >
using default_handler_t = typename default_handler< T, S >::value
 

Enumerations

enum class  ArrayFamily {
  None ,
  Iterable ,
  Sparse ,
  Distributed ,
  DistributedDisk
}
 A tag to distinguish different families for array types, e.g. std::vector<> is iterable, std::map is sparse etc. More...
 

Functions

template<typename T >
auto begin (Span< T > &x)
 
template<typename T >
auto begin (const Span< T > &x)
 
template<typename T >
auto end (Span< T > &x)
 
template<typename T >
auto end (const Span< T > &x)
 
template<typename T >
constexpr auto check_abs ()
 
template<class T , class S >
auto create_default_handler ()
 Creates an appropriate handler for the given array types. More...
 
double dot (const DistrArrayDisk &x, const DistrArrayDisk &y)
 
double dot (const DistrArrayDisk &x, const DistrArray &y)
 
double dot (const DistrArray &x, const DistrArrayDisk &y)
 
void swap (DistrArrayFile &x, DistrArrayFile &y) noexcept
 
void swap (DistrArraySpan &a1, DistrArraySpan &a2) noexcept
 
void swap (DistrArrayMPI3 &a1, DistrArrayMPI3 &a2) noexcept
 

Variables

template<class A >
constexpr bool has_mapped_type_v = has_mapped_type<A>{}
 
template<class T >
constexpr bool is_sparse_v = has_mapped_type_v<T>
 
template<class T >
constexpr bool is_iterable_v = is_iterable<T>{}
 
template<class T >
constexpr bool is_distributed_v = is_distributed<T>::value
 
template<class T >
constexpr bool is_disk_v = is_disk<T>::value
 
template<class T >
constexpr auto array_family_v = array_family<T>{}.value()
 
std::mutex s_open_error_mutex
 

Typedef Documentation

◆ default_handler_t

template<class T , class S >
using molpro::linalg::array::default_handler_t = typedef typename default_handler<T, S>::value

◆ mapped_or_value_type_t

template<class A >
using molpro::linalg::array::mapped_or_value_type_t = typedef typename mapped_or_value_type<A>::type

◆ void_t

template<class... Ts>
using molpro::linalg::array::void_t = typedef void

Utility for metaprogramming that maps any types to void.

Enumeration Type Documentation

◆ ArrayFamily

A tag to distinguish different families for array types, e.g. std::vector<> is iterable, std::map is sparse etc.

Enumerator
None 
Iterable 
Sparse 
Distributed 
DistributedDisk 

Function Documentation

◆ check_abs()

template<typename T >
constexpr auto molpro::linalg::array::check_abs ( )
constexpr

◆ create_default_handler()

template<class T , class S >
auto molpro::linalg::array::create_default_handler ( )

Creates an appropriate handler for the given array types.

◆ dot() [1/3]

double molpro::linalg::array::dot ( const DistrArray x,
const DistrArrayDisk y 
)

◆ dot() [2/3]

double molpro::linalg::array::dot ( const DistrArrayDisk x,
const DistrArray y 
)

◆ dot() [3/3]

double molpro::linalg::array::dot ( const DistrArrayDisk x,
const DistrArrayDisk y 
)

◆ swap() [1/3]

void molpro::linalg::array::swap ( DistrArrayFile x,
DistrArrayFile y 
)
noexcept

◆ swap() [2/3]

void molpro::linalg::array::swap ( DistrArrayMPI3 a1,
DistrArrayMPI3 a2 
)
noexcept

◆ swap() [3/3]

void molpro::linalg::array::swap ( DistrArraySpan a1,
DistrArraySpan a2 
)
noexcept

Variable Documentation

◆ array_family_v

template<class T >
constexpr auto molpro::linalg::array::array_family_v = array_family<T>{}.value()
constexpr

◆ has_mapped_type_v

template<class A >
constexpr bool molpro::linalg::array::has_mapped_type_v = has_mapped_type<A>{}
constexpr

◆ is_disk_v

template<class T >
constexpr bool molpro::linalg::array::is_disk_v = is_disk<T>::value
constexpr

◆ is_distributed_v

template<class T >
constexpr bool molpro::linalg::array::is_distributed_v = is_distributed<T>::value
constexpr

◆ is_iterable_v

template<class T >
constexpr bool molpro::linalg::array::is_iterable_v = is_iterable<T>{}
constexpr

◆ is_sparse_v

template<class T >
constexpr bool molpro::linalg::array::is_sparse_v = has_mapped_type_v<T>
constexpr

◆ s_open_error_mutex

std::mutex molpro::linalg::array::s_open_error_mutex