|
AQUAgpusph 5.0.4
|
General program settings. More...
#include <ProblemSetup.hpp>
Public Types | |
| enum | _patch { AUTO = 0 , ENABLED = 1 , DISABLED = 2 } |
| Possible patch enabling states. More... | |
| typedef enum Aqua::InputOutput::ProblemSetup::sphSettings::device::_patch | patch_state |
| Possible patch enabling states. | |
Public Member Functions | |
| device (const unsigned int platform_index, const unsigned int device_index, const cl_device_type t=CL_DEVICE_TYPE_ALL, const unsigned int bits=32, const std::string compile_flags="") | |
| Constructor. | |
| ~device () | |
| Destructor. | |
| bool | isPatchEnabled (const std::string name) const |
| Is the patch enabled? | |
| bool | isPatchDisabled (const std::string name) const |
| Is the patch disabled? | |
Data Fields | |
| unsigned int | platform_id |
| Index of the OpenCL platform to use. | |
| unsigned int | device_id |
| Index of the OpenCL device to use in the platform platform_id. | |
| cl_device_type | device_type |
| Type of devices that will be considered in the platform platform_id. | |
| unsigned int | addr_bits |
| Address bits of the device. | |
| std::string | compilation_flags |
| Extra flags considered by this device when compiling kernels. | |
| std::map< std::string, int > | patches |
| List of patchs to be forcibly enabled/disabled. | |
General program settings.
These setting are set between the following XML tags:
| typedef enum Aqua::InputOutput::ProblemSetup::sphSettings::device::_patch Aqua::InputOutput::ProblemSetup::sphSettings::device::patch_state |
Possible patch enabling states.
|
inline |
Constructor.
| platform_index | Index of the OpenCL platform to use |
| device_index | Index of the OpenCL device to use from the platform |
| t | Type of OpenCL device |
| bits | The address bits of the device. 0 to consider CL_DEVICE_ADDRESS_BITS |
|
inline |
Destructor.
|
inline |
Is the patch disabled?
| patch | Patch name |
|
inline |
Is the patch enabled?
| patch | Patch name |
| unsigned int Aqua::InputOutput::ProblemSetup::sphSettings::device::addr_bits |
Address bits of the device.
If not provided, 32 will be considered, i.e. the CL_DEVICE_ADDRESS_BITS will be queried
This field can be set with the tag Device, for instance: <Device platform="0" device="0" type="GPU" addr_bits="0" />
| std::string Aqua::InputOutput::ProblemSetup::sphSettings::device::compilation_flags |
Extra flags considered by this device when compiling kernels.
By default no compilation flags are considered. Note that AQUAgpusph will allways enable the compilation flag "-cl-kernel-arg-info", since it is a requirement to get it properly working
This field can be set with the tag Device, using the attributes compile_flags. For instance: <Device platform="0" device="0" type="GPU" compile_flags="-g -cl-opt-disable" />
| unsigned int Aqua::InputOutput::ProblemSetup::sphSettings::device::device_id |
Index of the OpenCL device to use in the platform platform_id.
AQUAgpusph is providing the available OpenCL platforms, and the devices into them.
This field can be set with the tag Device, for instance: <Device platform="0" device="0" type="GPU" addr_bits="0" />
| cl_device_type Aqua::InputOutput::ProblemSetup::sphSettings::device::device_type |
Type of devices that will be considered in the platform platform_id.
This field can be set with the tag Device, for instance: <Device platform="0" device="0" type="GPU" addr_bits="0" />
| std::map<std::string, int> Aqua::InputOutput::ProblemSetup::sphSettings::device::patches |
List of patchs to be forcibly enabled/disabled.
The several patches currently exist:
If a patch is not forcibly enabled/disabled, AQUAgpusph will automatically decide whether it is required or not.
This field can be set with the tag Device, using the attributes enable_patch and disable_patch. The patchs are separated by commas. If a patch is found simultaneously on enable_patch and disable_patch attributes, it will be disabled. For instance: <Device platform="0" device="0" type="GPU" enable_patch="nvidia_#4665567" />
| unsigned int Aqua::InputOutput::ProblemSetup::sphSettings::device::platform_id |
Index of the OpenCL platform to use.
AQUAgpusph is providing the available OpenCL platforms, and the devices into them.
This field can be set with the tag Device, for instance: <Device platform="0" device="0" type="GPU" addr_bits="0" />