Implements quantity_wrapper. Wraps scalar quantities, which are accessible via a device based accessor in ViennaSHE (cf. accessor.hpp) More...
#include <quantity_wrappers.hpp>
Public Types | |
typedef accessor_based_quantity_wrapper< DeviceT, AccessorT, ElementTagT > | self_type |
Public Member Functions | |
accessor_based_quantity_wrapper (AccessorT const &acc, DeviceT const &dev, std::string name) | |
CTOR. More... | |
accessor_based_quantity_wrapper (accessor_based_quantity_wrapper const &o) | |
void | operator= (accessor_based_quantity_wrapper const &o) |
double | get (std::size_t id) const |
Simple forward to the accessor. More... | |
virtual void | fill (double **values, viennashe_index_type *len) const |
Implementation of fill. More... | |
virtual void | fill_single (std::size_t idx, std::vector< double > &values) const |
Implemenation of fill_single. Uses get() More... | |
virtual quantity_wrapper * | copy () const |
A simple copy factory for storage. More... | |
Public Member Functions inherited from libviennashe::quantity::quantity_wrapper | |
quantity_wrapper (std::string name) | |
quantity_wrapper () | |
Default CTOR. Creates an empty wrapper. More... | |
quantity_wrapper (quantity_wrapper const &v) | |
virtual | ~quantity_wrapper () |
void | operator= (quantity_wrapper const &o) |
virtual void | fill (double **values, viennashe_index_type *len) const =0 |
Interface. Fills values with all quantity values, where the length of values[i] is to be found in len[i]. More... | |
virtual void | fill_single (std::size_t idx, std::vector< double > &values) const =0 |
Interface. Fills values with a single value (scalar or vector) at the given element index. More... | |
virtual quantity_wrapper * | copy () const =0 |
A simple copy factory for storage. More... | |
std::string | name () const |
Returns the unique name of the quantity. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from libviennashe::quantity::quantity_wrapper | |
void | set_name (std::string const &n) |
Name setter for implementing classes. More... | |
Implements quantity_wrapper. Wraps scalar quantities, which are accessible via a device based accessor in ViennaSHE (cf. accessor.hpp)
Definition at line 89 of file quantity_wrappers.hpp.
typedef accessor_based_quantity_wrapper<DeviceT, AccessorT, ElementTagT> libviennashe::quantity::accessor_based_quantity_wrapper< DeviceT, AccessorT, ElementTagT >::self_type |
Definition at line 93 of file quantity_wrappers.hpp.
|
inline |
CTOR.
acc | The accessor. Must be deep copy-able! |
dev | The device. A const reference to the device will be stored by this class |
name | The unique name of the quantity |
Definition at line 101 of file quantity_wrappers.hpp.
|
inline |
Definition at line 107 of file quantity_wrappers.hpp.
|
inlinevirtual |
A simple copy factory for storage.
Implements libviennashe::quantity::quantity_wrapper.
Definition at line 149 of file quantity_wrappers.hpp.
|
inlinevirtual |
Implementation of fill.
Implements libviennashe::quantity::quantity_wrapper.
Definition at line 128 of file quantity_wrappers.hpp.
|
inlinevirtual |
Implemenation of fill_single. Uses get()
Implements libviennashe::quantity::quantity_wrapper.
Definition at line 143 of file quantity_wrappers.hpp.
|
inline |
Simple forward to the accessor.
id | The id of the element on which the data is stored |
Definition at line 120 of file quantity_wrappers.hpp.
|
inline |
Definition at line 111 of file quantity_wrappers.hpp.