|
AQUAgpusph 5.0.4
|
A generic Scalar variable. More...
#include <Variable.hpp>


Public Member Functions | |
| ScalarVariable (const std::string varname, const std::string vartype) | |
| Constructor. | |
| ~ScalarVariable () | |
| Destructor. | |
| bool | isArray () |
| Report that the varaible is not an array. | |
| size_t | typesize () const |
| Get the variable type size. | |
| void * | get (bool synced=true) |
| Get variable pointer basis pointer. | |
| void | get (T &value, bool synced=true) |
| Get variable value. | |
| void | set (void *ptr, bool synced=true) |
| Set variable from memory. | |
| void | set (T &value, bool synced=true) |
| Set variable value. | |
| T | value (bool synced=true) |
| Get the variable value. | |
| void | value (T &value, bool synced=true) |
| Set the variable value. | |
| virtual PyObject * | getPythonObject (int i0=0, int n=0)=0 |
| Get a Python Object representation of the variable. | |
| virtual bool | setFromPythonObject (PyObject *obj, int i0=0, int n=0)=0 |
| Set the variable from a Python object. | |
| virtual const std::string | asString (bool synced)=0 |
| Get the variable text representation. | |
| Public Member Functions inherited from Aqua::InputOutput::Variable | |
| Variable (const std::string varname, const std::string vartype) | |
| Constructor. | |
| virtual | ~Variable () |
| Destructor. | |
| bool | isScalar () |
| Let efficiently know whether the variable is a scalar or not. | |
| std::string | name () const |
| Name of the variable. | |
| virtual std::string | type () const |
| Type of the variable. | |
| virtual size_t | size () const |
| Get the variable type size. | |
| virtual void * | get (bool UNUSED_PARAM synced=true) |
| Get variable pointer basis pointer. | |
| void * | get_async () |
| Get variable pointer basis pointer. | |
| void | set_async (void *ptr) |
| Set variable from memory. | |
| virtual PyObject * | getPythonObject (int UNUSED_PARAM i0=0, int UNUSED_PARAM n=0) |
| Get a Python interpretation of the variable. | |
| virtual bool | setFromPythonObject (PyObject UNUSED_PARAM *obj, int UNUSED_PARAM i0=0, int UNUSED_PARAM n=0) |
| Set the variable from a Python object. | |
| virtual const std::string | asString (bool UNUSED_PARAM synced=true) |
| Get the variable text representation. | |
| void | setEvent (cl_event event) |
| Set the variable current writing event. | |
| void | setWritingEvent (cl_event event) |
| Alias of InputOutput::Variable::setEvent() | |
| cl_event | getEvent () const |
| Returns the last writing event associated to this variable. | |
| cl_event | getWritingEvent () const |
| Alias of InputOutput::Variable::getEvent() | |
| void | addReadingEvent (cl_event event) |
| Add a new reading event to the variable. | |
| std::vector< cl_event > | getReadingEvents () const |
| Get the list of reading events. | |
| void | sync (bool readonly=false) |
| Wait for variable reading and writing events to be completed. | |
Protected Attributes | |
| T | _value |
| Variable value. | |
Additional Inherited Members | |
| Protected Member Functions inherited from Aqua::InputOutput::Variable | |
| void | cleanReadingEvents () |
| Clean up the list of reading events. | |
| Static Protected Member Functions inherited from Aqua::InputOutput::Variable | |
| static cl_event | createDummyEvent () |
| Create a competed user event to be set as the writing event when synced writing operations are carried out. | |
A generic Scalar variable.
|
inline |
Constructor.
| varname | Name of the variable. |
| vartype | Type of the variable. |

|
inline |
Destructor.
|
pure virtual |
Get the variable text representation.
| synced | true if the function shall block until the last writing event is dispatched, false otherwise |
Implemented in Aqua::InputOutput::ScalarNumberVariable< T >, Aqua::InputOutput::ScalarNumberVariable< dcl >, Aqua::InputOutput::ScalarNumberVariable< fcl >, Aqua::InputOutput::ScalarNumberVariable< icl >, Aqua::InputOutput::ScalarNumberVariable< lcl >, Aqua::InputOutput::ScalarNumberVariable< uicl >, Aqua::InputOutput::ScalarNumberVariable< ulcl >, and Aqua::InputOutput::ScalarVecVariable< T >.
|
inline |
Get variable pointer basis pointer.
This is a blocking operation, that will retain the program until the underlying variable event is complete. For asynchronous variable retrieval see get_async()
| synced | true if the operation shall block the execution until the variable events are dispatched |

|
inline |
Get variable value.
This is a blocking operation, that will retain the program until the underlying variable event is complete. For asynchronous variable retrieval see get_async()
| value | Output value |
| synced | true if the operation shall block the execution until the variable events are dispatched |

|
pure virtual |
Get a Python Object representation of the variable.
| i0 | ignored parameter. |
| n | ignored parameter. |
Implemented in Aqua::InputOutput::DoubleVariable, Aqua::InputOutput::FloatVariable, Aqua::InputOutput::IntVariable, Aqua::InputOutput::LongVariable, Aqua::InputOutput::ScalarVecVariable< T >, Aqua::InputOutput::UIntVariable, and Aqua::InputOutput::ULongVariable.
|
inlinevirtual |
|
inline |
Set variable value.
This is a blocking operation, that will retain the program until the underlying variable event is complete.
| value | New value |
| synced | true if the operation shall block the execution until the variable events are dispatched |

|
inlinevirtual |
Set variable from memory.
This is a blocking operation, that will retain the program until the underlying variable event is complete.
| ptr | Memory to copy |
| synced | true if the operation shall block the execution until the variable events are dispatched |
Reimplemented from Aqua::InputOutput::Variable.

|
pure virtual |
Set the variable from a Python object.
| obj | Python object. |
| i0 | ignored parameter. |
| n | ignored parameter |
Implemented in Aqua::InputOutput::DoubleVariable, Aqua::InputOutput::FloatVariable, Aqua::InputOutput::IntVariable, Aqua::InputOutput::LongVariable, Aqua::InputOutput::ScalarVecVariable< T >, Aqua::InputOutput::UIntVariable, and Aqua::InputOutput::ULongVariable.
|
inlinevirtual |
Get the variable type size.
Reimplemented from Aqua::InputOutput::Variable.
|
inline |
Get the variable value.
| synced | true if the operation shall block the execution until the variable events are dispatched |

|
inline |
Set the variable value.
| synced | true if the operation shall block the execution until the variable events are dispatched |

|
protected |
Variable value.