24#ifndef SETSCALAR_H_INCLUDED
25#define SETSCALAR_H_INCLUDED
83 const std::string expr,
84 const std::string type =
"float",
114 inline const void*
getValue()
const {
return _output; }
143 virtual cl_event
_execute(
const std::vector<cl_event> events);
161 std::vector<InputOutput::Variable*> _in_vars;
165 std::string _output_type;
169 cl_event _user_event;
185 const std::string var_name,
186 const std::string value,
219 std::string _var_name;
The calculation main entry point. (See Aqua::CalcServer::CalcServer for details)
static cl_ulong host_timer()
Get the host timer.
Definition CalcServer.hpp:366
void name(const std::string tool_name)
Definition Tool.hpp:66
const std::string name() const
Get the name.
Definition Tool.hpp:71
Profiler subinstance base class.
Definition Tool.hpp:84
Profile(const std::string name, Tool *tool)
Constructor.
Definition Tool.hpp:90
void sample(cl_ulong start, cl_ulong end)
Add profiling info.
Definition Tool.cpp:43
Base class for tools that has to evaluate a scalar expression.
Definition SetScalar.hpp:74
ScalarExpression(const std::string name, const std::string expr, const std::string type="float", bool once=false)
Constructor.
Definition SetScalar.cpp:32
virtual void setup()
Initialize the tool.
Definition SetScalar.cpp:51
void setOutputType(const std::string type)
Set the output typesize.
Definition SetScalar.cpp:62
const std::string getExpression() const
Get the expression to evaluate.
Definition SetScalar.hpp:109
virtual cl_event _execute(const std::vector< cl_event > events)
Definition SetScalar.cpp:146
void solve()
Evaluate the expression and store the value.
Definition SetScalar.cpp:78
const void * getValue() const
Get the stored output value.
Definition SetScalar.hpp:114
cl_event getUserEvent() const
Get the user event generated by this tool to mark when is finished.
Definition SetScalar.hpp:125
~ScalarExpression()
Destructor.
Definition SetScalar.cpp:45
virtual void _solve()
Evaluate the expression and store the value.
Definition SetScalar.cpp:135
const std::string getOutputType() const
Get the output typesize.
Definition SetScalar.hpp:97
void start()
Start sampling.
Definition SetScalar.hpp:56
~ScalarProfile()
Definition SetScalar.hpp:51
ScalarProfile(const std::string name, Tool *tool)
Definition SetScalar.hpp:44
void end()
End sampling.
Definition SetScalar.hpp:61
void setup()
Initialize the tool.
Definition SetScalar.cpp:218
InputOutput::Variable * getOutputVariable() const
Get the output variable.
Definition SetScalar.hpp:199
void _solve()
Evaluate the expression and populate the value on the varaible Aqua::CalcServer::ScalarExpression::_v...
Definition SetScalar.cpp:235
SetScalar(const std::string name, const std::string var_name, const std::string value, bool once=false)
Constructor.
Definition SetScalar.cpp:205
~SetScalar()
Destructor.
Definition SetScalar.cpp:215
Calculation server name space.
Definition Assert.cpp:32
Main AQUAgpusph namespace.
Definition ArgumentsManager.cpp:50