AQUAgpusph 4.1.2
|
Base class for conditional tools like While or If. More...
#include <CalcServer/Conditional.h>
Public Member Functions | |
Conditional (const std::string name, const std::string condition, bool once=false) | |
Constructor. | |
~Conditional () | |
Destructor. | |
void | setup () |
Initialize the tool. | |
virtual Tool * | next_tool () |
const int | scope_modifier () |
Public Member Functions inherited from Aqua::CalcServer::Tool | |
Tool (const std::string tool_name, bool once=false) | |
virtual | ~Tool () |
void | name (const std::string tool_name) |
const std::string | name () |
virtual void | setup () |
virtual void | execute () |
Execute the tool measuring the elapsed time. | |
virtual Tool * | next_tool () |
size_t | allocatedMemory () const |
unsigned int | used_times () const |
float | elapsedTime (bool averaged=true) const |
float | elapsedTimeVariance () const |
float | elapsedTimeDeviation () const |
virtual const int | scope_modifier () |
Protected Member Functions | |
cl_event | _execute (const std::vector< cl_event > events) |
Protected Member Functions inherited from Aqua::CalcServer::Tool | |
int | id_in_pipeline () |
void | next_tool (Tool *tool) |
void | allocatedMemory (size_t mem_size) |
virtual cl_event | _execute (const std::vector< cl_event > events) |
void | addElapsedTime (float elapsed_time) |
Add new data to the average and squared elapsed times. | |
void | setDependencies (std::vector< std::string > var_names) |
Set the depedencies of the tool. | |
void | setDependencies (std::vector< InputOutput::Variable * > vars) |
Set the depedencies of the tool. | |
const std::vector< InputOutput::Variable * > | getDependencies () |
Get the depedencies of the tool. | |
Protected Attributes | |
bool | _result |
Condition result. | |
Additional Inherited Members | |
Static Protected Member Functions inherited from Aqua::CalcServer::Tool | |
static std::vector< cl_kernel > | compile (const std::string source, const std::vector< std::string > names, const std::string flags="") |
Compile an OpenCL source code and generate the corresponding kernel. | |
static cl_kernel | compile_kernel (const std::string source, const std::string kernel_name, const std::string flags="") |
Compile an OpenCL source code and generate the corresponding kernel. | |
Base class for conditional tools like While or If.
If the result of evaluating the condition expression is equal to 0, the result will be considered false, and therefore all the tools until the next End tool will be disabled
Aqua::CalcServer::Conditional::Conditional | ( | const std::string | name, |
const std::string | condition, | ||
bool | once = false |
||
) |
Aqua::CalcServer::Conditional::~Conditional | ( | ) |
Destructor.
|
protectedvirtual |
Execute the tool
events | List of events that shall be waited before safe execution |
Reimplemented from Aqua::CalcServer::Tool.
Reimplemented in Aqua::CalcServer::If.
|
virtual |
Get the next tool to be executed in the pipeline.
Depending on the condition value, that tool is the next one or the tool after the End tool which closes the scope
Reimplemented from Aqua::CalcServer::Tool.
Reimplemented in Aqua::CalcServer::If.
|
inlinevirtual |
Open a new scope
Reimplemented from Aqua::CalcServer::Tool.
|
virtual |
Initialize the tool.
Reimplemented from Aqua::CalcServer::Tool.
Reimplemented in Aqua::CalcServer::While, and Aqua::CalcServer::If.
|
protected |
Condition result.