AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
Aqua::InputOutput::ProblemSetup::sphDefinitions Struct Reference

OpenCL kernels compilation definitions. More...

#include <ProblemSetup.h>

Public Member Functions

 sphDefinitions ()
 Constructor.
 
 ~sphDefinitions ()
 Destructor.
 
void define (const std::string name, const std::string value, const bool evaluate)
 Add a new definition.
 
bool isDefined (std::string name)
 Reports if a the required name has been already defined.
 
void undefine (std::string name)
 Undefine a registered definition.
 

Data Fields

std::vector< std::string > names
 Name of the definition.
 
std::vector< std::string > values
 Value of the definition, empty for named definitions.
 
std::vector< bool > evaluations
 

Detailed Description

OpenCL kernels compilation definitions.

In order to make AQUAgpusph more extensible, preprocessor definitions can be set, such that they will be defined for all the compiled kernels.

3 types of definitions can be practised:

The definitions are set between the following XML tags:

<Definitions>
</Definitions>
See also
Aqua::InputOutput::ProblemSetup
Warning
The definitions are made right after the variables setup, and they are set just one time, so you cannot use them to pass changing variables to the OpenCL kernels.

Constructor & Destructor Documentation

◆ sphDefinitions()

Aqua::InputOutput::ProblemSetup::sphDefinitions::sphDefinitions ( )
inline

Constructor.

◆ ~sphDefinitions()

Aqua::InputOutput::ProblemSetup::sphDefinitions::~sphDefinitions ( )
inline

Destructor.

Member Function Documentation

◆ define()

void Aqua::InputOutput::ProblemSetup::sphDefinitions::define ( const std::string  name,
const std::string  value,
const bool  evaluate 
)

Add a new definition.

It can be repeated, such that the definition will be overwritten later by the last instance found.

Parameters
nameName of the definition.
valueValue of the definition, empty for named definitions.
evaluateTrue if the value should be evaluated as a math expression, false otherwise.

◆ isDefined()

bool Aqua::InputOutput::ProblemSetup::sphDefinitions::isDefined ( std::string  name)

Reports if a the required name has been already defined.

Parameters
nameName of the definition.
Returns
true if it is already defined, false otherwise.

◆ undefine()

void Aqua::InputOutput::ProblemSetup::sphDefinitions::undefine ( std::string  name)

Undefine a registered definition.

Parameters
nameName of the definition.

Field Documentation

◆ evaluations

std::vector<bool> Aqua::InputOutput::ProblemSetup::sphDefinitions::evaluations

True if the value should be evaluated as a math expression, false otherwise

◆ names

std::vector<std::string> Aqua::InputOutput::ProblemSetup::sphDefinitions::names

Name of the definition.

◆ values

std::vector<std::string> Aqua::InputOutput::ProblemSetup::sphDefinitions::values

Value of the definition, empty for named definitions.


The documentation for this struct was generated from the following files: