25#ifndef VARIABLE_H_INCLUDED
26#define VARIABLE_H_INCLUDED
35#define VecVariable Vec4Variable
36#define IVecVariable IVec4Variable
37#define UIVecVariable UIVec4Variable
39#define VecVariable Vec2Variable
40#define IVecVariable IVec2Variable
41#define UIVecVariable UIVec2Variable
45namespace InputOutput {
58 Variable(
const std::string varname,
const std::string vartype);
81 std::string
name()
const {
return _name; }
86 virtual std::string
type()
const {
return _typename; }
101 virtual void*
get() {
return NULL; }
106 virtual void set(
void* ptr) = 0;
129 virtual const std::string
asString() {
return ""; }
165 std::string _typename;
185 ScalarVariable(
const std::string varname,
const std::string vartype);
233 inline void set(
void* ptr)
236 memcpy(&
_value, ptr,
sizeof(T));
279 virtual const std::string
asString();
387 const std::string vartype,
388 const unsigned int dims);
397 virtual const std::string
asString();
706 ArrayVariable(
const std::string varname,
const std::string vartype);
735 void*
get() {
return &_value; }
740 void set(
void* ptr) { _value = *(cl_mem*)ptr; }
767 const std::string
asString(
size_t i);
788 std::vector<void*> _data;
793 std::vector<PyObject*> _objects;
824 const std::string type,
826 const std::string value);
843 std::vector<Variable*>
getAll() {
return _vars; }
848 unsigned int size()
const {
return _vars.size(); }
866 static unsigned int typeToN(
const std::string type);
875 const std::string type_b,
876 bool ignore_asterisk =
true);
885 void solve(
const std::string type_name,
886 const std::string value,
888 const std::string name =
"NULL");
895 void populate(
const std::string name =
"");
910 void registerScalar(
const std::string name,
911 const std::string type,
912 const std::string value);
920 void registerClMem(
const std::string name,
921 const std::string type,
922 const std::string
length);
931 void readComponents(
const std::string name,
932 const std::string value,
937 std::vector<Variable*> _vars;
Python script execution tool. (See Aqua::CalcServer::Python for details)
Math expression evaluator. (See Aqua::Tokenizer for details)
Tool to evaluate math expressions.
Definition: Tokenizer.h:42
Main AQUAgpusph namespace.
Definition: ArgumentsManager.cpp:45
float length(vec v)
Compute the vector length.
Definition: AuxiliarMethods.cpp:521
Set of definitions and macros related with the implementation.