24#ifndef CALCSERVER_H_INCLUDED
25#define CALCSERVER_H_INCLUDED
76 : std::runtime_error(msg){};
126 std::vector<std::string>
definitions()
const {
return _definitions; }
131 std::vector<Tool*>
tools()
const {
return _tools; }
136 cl_context
context()
const {
return _context; }
141 cl_platform_id
platform()
const {
return _platform; }
146 cl_device_id
device()
const {
return _device; }
166 return _command_queue_parallel;
167 return _command_queue;
189 const std::string
base_path()
const {
return _base_path.c_str(); }
205 void setupPlatform();
211 cl_uint _num_platforms;
213 cl_platform_id* _platforms;
215 cl_uint _num_devices;
217 cl_device_id* _devices;
221 cl_platform_id _platform;
223 cl_device_id _device;
225 cl_command_queue _command_queue;
229 cl_command_queue _command_queue_parallel;
235 std::vector<std::string> _definitions;
238 std::vector<Tool*> _tools;
244 std::string _base_path;
254 char* _current_tool_name;
259 std::map<std::string, UnSort*> unsorters;
Simulation configuration data structures. (See Aqua::InputOutput::ProblemSetup for details)
Singleton instance. (See Aqua::Singleton for details)
Simulation time flow events manager. (See Aqua::InputOutput::TimeManager for details)
Virtual variables environment to allow the user define/manipulate the variables used in the simulatio...
Exception raised when the user manually interrupts the simulation.
Definition: CalcServer.h:92
std::vector< std::string > definitions() const
Definition: CalcServer.h:126
void update(InputOutput::TimeManager &t_manager)
Internal time loop.
Definition: CalcServer.cpp:504
cl_device_id device() const
Definition: CalcServer.h:146
std::vector< Tool * > tools() const
Definition: CalcServer.h:131
InputOutput::Variables * variables()
Definition: CalcServer.h:121
const std::string base_path() const
Get the AQUAgpusph root path.
Definition: CalcServer.h:189
cl_context context() const
Definition: CalcServer.h:136
void setup()
Setup some additional simulation data.
Definition: CalcServer.cpp:943
bool debug_mode() const
Report if the tools debug mode is enabled.
Definition: CalcServer.h:195
cl_command_queue command_queue(bool parallel=false) const
Definition: CalcServer.h:163
~CalcServer()
Destructor.
Definition: CalcServer.cpp:473
cl_event getUnsortedMem(const std::string var_name, size_t offset, size_t cb, void *ptr)
Download a unsorted variable from the device.
Definition: CalcServer.cpp:548
cl_platform_id platform() const
Definition: CalcServer.h:141
Definition: CalcServer.h:72
user_interruption(const std::string msg)
Constructor.
Definition: CalcServer.h:75
Simple but versatile singleton instance (Meyers singleton).
Definition: Singleton.h:57
Main AQUAgpusph namespace.
Definition: ArgumentsManager.cpp:45
Set of definitions and macros related with the implementation.