Registers operations for lazy evaluation. Evaluation is triggered by calling eval() or on destruction. More...
#include <ArrayHandler.h>

Registers operations for lazy evaluation. Evaluation is triggered by calling eval() or on destruction.
Public Types | |
| using | value_type = ArrayHandler< AL, AR >::value_type |
| template<typename T > | |
| using | ref_wrap = std::reference_wrapper< T > |
Public Member Functions | |
| LazyHandle (ArrayHandler< AL, AR > &handler) | |
| virtual | ~LazyHandle () |
| virtual void | axpy (value_type alpha, const AR &x, AL &y) |
| virtual void | dot (const AL &x, const AR &y, value_type &out) |
| virtual void | eval () |
| Calls handler to evaluate the registered operations. More... | |
| void | invalidate () |
| Flag the handler as invalid so that no new operations are registered operations eval() does nothing. More... | |
| bool | invalid () |
Protected Member Functions | |
| void | error (std::string message) |
| virtual bool | register_op_type (const std::string &type) |
| Register an operation type. More... | |
| void | clear () |
| Clear the registry. More... | |
Protected Attributes | |
| std::set< std::string > | m_op_types |
| Types of operations currently registered. Types are strings, because derived classes might add new operations. More... | |
| util::OperationRegister< value_type, ref_wrap< const AR >, ref_wrap< AL > > | m_axpy |
| register of axpy operations More... | |
| util::OperationRegister< ref_wrap< const AL >, ref_wrap< const AR >, ref_wrap< value_type > > | m_dot |
| register of dot operations More... | |
| ArrayHandler< AL, AR > & | m_handler |
| all operations are still done through the handler More... | |
| bool | m_invalid = false |
| flags if the handler has been destroyed and LazyHandle is now invalid More... | |
| using molpro::linalg::array::ArrayHandler< AL, AR >::LazyHandle::ref_wrap = std::reference_wrapper<T> |
| using molpro::linalg::array::ArrayHandler< AL, AR >::LazyHandle::value_type = ArrayHandler<AL, AR>::value_type |
|
inlineexplicit |
|
inlinevirtual |
|
inlinevirtual |
|
inlineprotected |
Clear the registry.
|
inlinevirtual |
|
inlineprotected |
|
inlinevirtual |
Calls handler to evaluate the registered operations.
|
inline |
Returns true if the handle is marked as invalid. LazyHandle becomes invalid when the overlying ArrayHandler is destroyed, or invalidate() is called
|
inline |
Flag the handler as invalid so that no new operations are registered operations eval() does nothing.
|
inlineprotectedvirtual |
Register an operation type.
Currently, only one type of operation is suported at any time.
| type | type of operation |
|
protected |
register of axpy operations
|
protected |
register of dot operations
|
protected |
all operations are still done through the handler
|
protected |
flags if the handler has been destroyed and LazyHandle is now invalid
|
protected |
Types of operations currently registered. Types are strings, because derived classes might add new operations.