AQUAgpusph 4.1.2
|
A generic Scalar variable. More...
#include <Variable.h>
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 () |
Get variable pointer basis pointer. | |
void * | get_async () |
Get variable pointer basis pointer. | |
void | set (void *ptr) |
Set variable from memory. | |
void | set_async (void *ptr) |
Set variable from memory. | |
virtual const std::string | asString ()=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. | |
virtual bool | isArray ()=0 |
Let efficiently know whether the variable is an array or not. | |
virtual 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 | typesize () const |
Get the variable type size. | |
virtual size_t | size () const |
Get the variable type size. | |
virtual void * | get () |
Get variable pointer basis pointer. | |
virtual void | set (void *ptr)=0 |
Set variable from memory. | |
virtual PyObject * | getPythonObject (int i0=0, int n=0) |
Get a Python interpretation of the variable. | |
virtual bool | setFromPythonObject (PyObject *obj, int i0=0, int n=0) |
Set the variable from a Python object. | |
virtual const std::string | asString () |
Get the variable text representation. | |
void | setEvent (cl_event event) |
Set the variable current event. | |
cl_event | getEvent () |
Returns the last event associated to this variable. | |
Protected Attributes | |
T | _value |
Variable value. | |
Additional Inherited Members | |
Protected Member Functions inherited from Aqua::InputOutput::Variable | |
void | sync () |
Wait for variable underlying event to be complete. | |
A generic Scalar variable.
Aqua::InputOutput::ScalarVariable< T >::ScalarVariable | ( | const std::string | varname, |
const std::string | vartype | ||
) |
Constructor.
varname | Name of the variable. |
vartype | Type of the variable. |
|
inline |
Destructor.
|
pure virtual |
Get the variable text representation.
Reimplemented from Aqua::InputOutput::Variable.
Implemented in Aqua::InputOutput::ScalarNumberVariable< T >, Aqua::InputOutput::ScalarNumberVariable< float >, Aqua::InputOutput::ScalarNumberVariable< int >, Aqua::InputOutput::ScalarNumberVariable< unsigned int >, Aqua::InputOutput::ScalarVecVariable< T >, Aqua::InputOutput::ScalarVecVariable< ivec2 >, Aqua::InputOutput::ScalarVecVariable< ivec3 >, Aqua::InputOutput::ScalarVecVariable< ivec4 >, Aqua::InputOutput::ScalarVecVariable< uivec2 >, Aqua::InputOutput::ScalarVecVariable< uivec3 >, Aqua::InputOutput::ScalarVecVariable< uivec4 >, Aqua::InputOutput::ScalarVecVariable< vec2 >, Aqua::InputOutput::ScalarVecVariable< vec3 >, and Aqua::InputOutput::ScalarVecVariable< vec4 >.
|
inlinevirtual |
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()
Reimplemented from Aqua::InputOutput::Variable.
|
inline |
Get variable pointer basis pointer.
Sometimes a tool would make events micromanagement, becoming useful to can retrieve the value in an asynchronous way. That is for instance the case of events manipulated in callbacks
|
inlinevirtual |
|
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 |
Implements Aqua::InputOutput::Variable.
|
inline |
Set variable from memory.
Sometimes a tool would make events micromanagement, becoming useful to can retrieve the value in an asynchronous way. That is for instance the case of events manipulated in callbacks
ptr | Memory to copy |
|
inlinevirtual |
Get the variable type size.
Reimplemented from Aqua::InputOutput::Variable.
|
protected |
Variable value.