Base for handlers whose left arrays are created by a function given by the user.
More...
template<class AL, class AR = AL>
class molpro::linalg::array::ArrayHandlerWithCopyFunc< AL, AR >
Base for handlers whose left arrays are created by a function given by the user.
Disk arrays may need information beyond the array being copied in order to be created, e.g. where to put the file, so that construction of a new left array as a copy of a right array is delegated to copy_func.
|
| | ArrayHandlerWithCopyFunc (copy_func_type copy_func) |
| | Constructor taking a copy function.
|
| |
| AL | copy (const AR &source) override |
| |
Public Member Functions inherited from molpro::linalg::array::ArrayHandler< AL, AR > |
| virtual void | copy (AL &x, const AR &y)=0 |
| | Copy content of y into x.
|
| |
| virtual void | scal (value_type alpha, AL &x)=0 |
| |
| virtual void | fill (value_type alpha, AL &x)=0 |
| |
| virtual void | axpy (value_type alpha, const AR &x, AL &y)=0 |
| |
| virtual value_type | dot (const AL &x, const AR &y)=0 |
| | The hermitian inner product <x|y>: conjugate-linear in x, linear in y.
|
| |
| virtual void | gemm_outer (const Matrix< value_type > alphas, const CVecRef< AR > &xx, const VecRef< AL > &yy)=0 |
| |
| virtual Matrix< value_type > | gemm_inner (const CVecRef< AL > &xx, const CVecRef< AR > &yy)=0 |
| |
| virtual std::map< size_t, value_type_abs > | select_max_dot (size_t n, const AL &x, const AR &y)=0 |
| | Select n indices with largest by absolute value contributions to the dot product.
|
| |
| virtual std::map< size_t, value_type > | select (size_t n, const AL &x, bool max=false, bool ignore_sign=false)=0 |
| | Select n indices with largest (or smallest) actual (or absolute) value.
|
| |
| const Counter & | counter () const |
| |
| std::string | counter_to_string (std::string L, std::string R) |
| |
| void | clear_counter () |
| |
| virtual | ~ArrayHandler () |
| | Destroys ArrayHandler instance and invalidates any LazyHandler it created. Invalidated handler will not evaluate.
|
| |
| virtual ProxyHandle | lazy_handle ()=0 |
| | Returns a lazy handle. Most implementations simply need to call the overload: return lazy_handle(*this);.
|
| |
|
Protected Member Functions inherited from molpro::linalg::array::ArrayHandler< AL, AR > |
| | ArrayHandler () |
| |
| | ArrayHandler (const ArrayHandler &)=default |
| |
| virtual void | error (const std::string &message) |
| | Throws an error.
|
| |
| virtual void | fused_axpy (const std::vector< std::tuple< size_t, size_t, size_t > > ®, const std::vector< value_type > &alphas, const std::vector< std::reference_wrapper< const AR > > &xx, std::vector< std::reference_wrapper< AL > > &yy) |
| | Default implementation of fused_axpy without any simplification.
|
| |
| virtual void | fused_dot (const std::vector< std::tuple< size_t, size_t, size_t > > ®, const std::vector< std::reference_wrapper< const AL > > &xx, const std::vector< std::reference_wrapper< const AR > > &yy, std::vector< std::reference_wrapper< value_type > > &out) |
| | Default implementation of fused_dot without any simplification.
|
| |
| void | save_handle (const std::shared_ptr< LazyHandle > &handle) |
| | Save weak ptr to a lazy handle.
|
| |
| ProxyHandle | lazy_handle (ArrayHandler< AL, AR > &handler) |
| |