Set all the components of an array with the desired value.
More...
#include <CalcServer/Set.h>
|
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.
|
|
Set all the components of an array with the desired value.
◆ Set()
Aqua::CalcServer::Set::Set |
( |
const std::string |
name, |
|
|
const std::string |
var_name, |
|
|
const std::string |
value, |
|
|
bool |
once = false |
|
) |
| |
Constructor.
- Parameters
-
name | Tool name. |
var_name | Variable to set. |
value | Value to set. |
once | Run this tool just once. Useful to make initializations. |
- Note
- Some helpers are available for value:
- VEC_ZERO: Zeroes vector.
- VEC_ONE: Ones vector, in 3D cases the last component will be zero.
- VEC_ALL_ONE: Equal to VEC_ONE, but in 3D cases the last component will be one as well.
- VEC_INFINITY: INFINITY components vector, in 3D cases the last component will be zero.
- VEC_ALL_INFINITY: Equal to VEC_INFINITY, but in 3D cases the last component will be INFINITY as well.
- VEC_NEG_INFINITY: -VEC_INFINITY
- VEC_ALL_NEG_INFINITY: -VEC_ALL_INFINITY.
◆ ~Set()
Aqua::CalcServer::Set::~Set |
( |
| ) |
|
◆ _execute()
cl_event Aqua::CalcServer::Set::_execute |
( |
const std::vector< cl_event > |
events | ) |
|
|
protectedvirtual |
Execute the tool
- Parameters
-
events | List of events that shall be waited before safe execution |
- Returns
- OpenCL event to be waited before accessing the dependencies
Reimplemented from Aqua::CalcServer::Tool.
◆ setup()
void Aqua::CalcServer::Set::setup |
( |
| ) |
|
|
virtual |
The documentation for this class was generated from the following files:
- /home/pepe/SPH/Code/aquagpusph/include/CalcServer/Set.h
- /home/pepe/SPH/Code/aquagpusph/src/CalcServer/Set.cpp