dist_array_vector.h File Reference
#include "mpqc/math/external/tiledarray/fwd.h"
#include <TiledArray/dist_array.h>
#include <TiledArray/error.h>
#include <TiledArray/expressions/expr.h>
#include <TiledArray/expressions/tsr_expr.h>
#include <TiledArray/math/linalg/basic.h>
#include <cmath>
#include <utility>
Include dependency graph for dist_array_vector.h:
This graph shows which files directly or indirectly include this file:

Classes

class  TiledArray::detail::VectorBase< T >
 A vector of objects. More...
 
class  TiledArray::ShapeVector< Shape_ >
 
struct  TiledArray::expressions::is_tsr_expression< E >
 
struct  TiledArray::expressions::is_tsr_expression< TsrExpr< Array, Alias > >
 
class  TiledArray::expressions::ExprVector< Expr_, typename >
 
class  TiledArray::DistArrayVector< Tile, Policy >
 A vector of DistArray objects. More...
 

Namespaces

 TiledArray
 
 TiledArray::detail
 
 TiledArray::expressions
 
 madness
 

Macros

#define TA_EXPRVEC_UNARYREDUCTION_DEF(op)
 
#define TA_EXPRVEC_BINARYREDUCTION_DEF(op)
 
#define TA_EXPRVEC_BINARYOP_DEF(op, result_type)
 

Typedefs

template<typename E >
using TiledArray::expressions::enable_if_expression = std::void_t< typename ExprTrait< E >::engine_type >
 

Functions

template<typename E >
auto TiledArray::expressions::operator* (const double &factor, const ExprVector< E > &expr)
 
template<typename E , typename = enable_if_expression<E>>
const Expr< E > & TiledArray::expressions::to_base_expr (const ExprVector< E > &e)
 
template<typename Tile , typename Policy , typename Op , typename = typename std::enable_if<!TiledArray::detail::is_array< typename std::decay<Op>::type>::value>::type>
auto TiledArray::foreach_inplace (DistArrayVector< Tile, Policy > &arg, Op &&op, bool fence=true)
 
template<typename Tile , typename Policy >
auto TiledArray::norm2 (const DistArrayVector< Tile, Policy > &a) -> decltype(norm2(std::declval< typename DistArrayVector< Tile, Policy >::array_type >()))
 
template<typename Tile , typename Policy >
void TiledArray::zero (DistArrayVector< Tile, Policy > &a)
 
template<typename Tile , typename Policy >
auto TiledArray::dot (const DistArrayVector< Tile, Policy > &a, const DistArrayVector< Tile, Policy > &b)
 
template<typename Tile , typename Policy >
auto TiledArray::inner_product (const DistArrayVector< Tile, Policy > &a, const DistArrayVector< Tile, Policy > &b)
 
template<typename Tile , typename Policy , typename Scalar >
void TiledArray::axpy (DistArrayVector< Tile, Policy > &y, Scalar a, const DistArrayVector< Tile, Policy > &x)
 
template<typename Tile , typename Policy , typename Scalar >
void TiledArray::scale (DistArrayVector< Tile, Policy > &y, Scalar a)
 
template<typename T >
auto madness::trace (const std::vector< madness::Future< T >> &vec)
 

Variables

template<typename E >
constexpr const bool TiledArray::expressions::is_tsr_expression_v = is_tsr_expression<E>::value
 

Macro Definition Documentation

◆ TA_EXPRVEC_BINARYOP_DEF

#define TA_EXPRVEC_BINARYOP_DEF (   op,
  result_type 
)

◆ TA_EXPRVEC_BINARYREDUCTION_DEF

#define TA_EXPRVEC_BINARYREDUCTION_DEF (   op)
Value:
template <typename E, typename = enable_if_expression<E>> \
auto op(const E &right_expr, World &world) const { \
std::vector<decltype((*this)[0].op(right_expr, world))> result; \
result.reserve(this->size()); \
for (auto &&v : (*this)) result.emplace_back(v.op(right_expr, world)); \
return result; \
} \
template <typename E, typename = enable_if_expression<E>> \
auto op(const E &right_expr) const { \
return this->op(right_expr, this->default_world()); \
} \
template <typename E, typename = enable_if_expression<E>> \
auto op(const ExprVector<E> &right_expr, World &world) const { \
std::vector<decltype((*this)[0].op(right_expr[0], world))> result; \
const auto sz = this->size(); \
TA_ASSERT(sz == right_expr.size()); \
result.reserve(sz); \
for (size_t i = 0; i != sz; ++i) \
result.emplace_back((*this)[i].op(right_expr[i], world)); \
return result; \
} \
template <typename E, typename = enable_if_expression<E>> \
auto op(const ExprVector<E> &right_expr) const { \
return this->op(right_expr, this->default_world()); \
}

◆ TA_EXPRVEC_UNARYREDUCTION_DEF

#define TA_EXPRVEC_UNARYREDUCTION_DEF (   op)
Value:
auto op(World &world) const { \
std::vector<decltype((*this)[0].op(world))> result; \
result.reserve(this->size()); \
for (auto &&v : (*this)) result.emplace_back(v.op(world)); \
return result; \
} \
auto op() const { return this->op(this->default_world()); }
constexpr auto size(const C &c) -> decltype(c.size())
Definition: tcb_span.hpp:178
std::void_t< typename ExprTrait< E >::engine_type > enable_if_expression
Definition: dist_array_vector.h:137
py::object default_world()