AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
Namespaces | Data Structures | Functions | Variables
Aqua::CalcServer Namespace Reference

Calculation server name space. More...

Namespaces

namespace  Reports
 Runtime outputs name space.
 

Data Structures

class  Assert
 Check that a condition holds true, or trhow a fatal error otherwise. More...
 
class  CalcServer
 Exception raised when the user manually interrupts the simulation. More...
 
struct  clientData
 Data structure to store the variables requested and a flag to know if the entry point has been found. More...
 
class  Conditional
 Base class for conditional tools like While or If. More...
 
class  Copy
 Copy an array component by component. More...
 
class  End
 Close the scope open by a previous conditional tool, like While or If. More...
 
class  If
 Execute all the tools in its scope if the condition is fulfilled. More...
 
class  Kernel
 A tool consisting in an OpenCL kernel execution. The variables used in the OpenCL kernel are automatically detected. More...
 
class  LinkList
 Complex tool to perform the link-list based on the "pos" array. This tool include the following steps: More...
 
class  MPISync
 Synchronize arrays between processes. More...
 
class  Python
 Execute a Python script. More...
 
class  RadixSort
 Methods to perform a radix sort using the GPU (or any device supported by OpenCL). The code has 3 steps: More...
 
class  Reduction
 Reductions, like scans, prefix sums, maximum or minimum, etc... More...
 
class  Set
 Set all the components of an array with the desired value. More...
 
class  SetScalar
 Set a scalar variable. More...
 
class  Tool
 Tools base class. The way that AQUAgpusph compute each problem is set through a set of tools that are computed sequentially. Several tools can be considered, for instance: More...
 
class  UnSort
 Recover the original id of each particle. More...
 
class  user_interruption
 
class  While
 Execute all the tools in its scope until the condition becomes unfulfilled. More...
 

Functions

void sigint_handler (int s)
 Handle SIGINT signals.
 
cl_command_queue create_command_queue (cl_context context, cl_device_id device, cl_int *errcode_ret)
 Create an OpenCL command queue.
 
void CL_CALLBACK context_error_notify (const char *errinfo, const void *private_info, size_t cb, void *user_data)
 Runtime error reporting tool.
 
CXChildVisitResult cursorVisitor (CXCursor cursor, CXCursor parent, CXClientData client_data)
 Main traverse method, which will parse all tokens except functions declarations.
 
CXChildVisitResult functionDeclVisitor (CXCursor cursor, CXCursor parent, CXClientData client_data)
 

Variables

static bool sigint_received = false
 Have been a SIGINT already registered?
 
std::string LINKLIST_INC = xxd2string(LinkList_hcl_in, LinkList_hcl_in_len)
 
std::string LINKLIST_SRC = xxd2string(LinkList_cl_in, LinkList_cl_in_len)
 
std::string RADIXSORT_INC = xxd2string(RadixSort_hcl_in, RadixSort_hcl_in_len)
 
std::string RADIXSORT_SRC = xxd2string(RadixSort_cl_in, RadixSort_cl_in_len)
 
std::string REDUCTION_INC = xxd2string(Reduction_hcl_in, Reduction_hcl_in_len)
 
std::string REDUCTION_SRC = xxd2string(Reduction_cl_in, Reduction_cl_in_len)
 
std::string SET_INC = xxd2string(Set_hcl_in, Set_hcl_in_len)
 
std::string SET_SRC = xxd2string(Set_cl_in, Set_cl_in_len)
 
std::string UNSORT_INC = xxd2string(UnSort_hcl_in, UnSort_hcl_in_len)
 
std::string UNSORT_SRC = xxd2string(UnSort_cl_in, UnSort_cl_in_len)
 

Detailed Description

Calculation server name space.

Function Documentation

◆ context_error_notify()

void CL_CALLBACK Aqua::CalcServer::context_error_notify ( const char *  errinfo,
const void *  private_info,
size_t  cb,
void *  user_data 
)

Runtime error reporting tool.

Errors reported in this way directly depends on the implementation.

Parameters
errinfois a pointer to an error string.
private_infopointer to binary data that is returned by the OpenCL implementation that can be used to log additional information helpful in debugging the error.
cbSize of the binary data, #private_info.
user_dataCurrent tool name.

◆ create_command_queue()

cl_command_queue Aqua::CalcServer::create_command_queue ( cl_context  context,
cl_device_id  device,
cl_int *  errcode_ret 
)

Create an OpenCL command queue.

This function is just a wrapper for backguard compatibility. More specifically, clCreateCommandQueue is deprecated since OpenCL 1.2

Parameters
contextOpenCL context
deviceOpenCL device
errcode_retReturning error code
See also
https://www.khronos.org/registry/OpenCL/sdk/2.0/docs/man/xhtml/deprecated.html
https://www.khronos.org/registry/OpenCL/sdk/2.0/docs/man/xhtml/clCreateCommandQueueWithProperties.html

◆ cursorVisitor()

CXChildVisitResult Aqua::CalcServer::cursorVisitor ( CXCursor  cursor,
CXCursor  parent,
CXClientData  client_data 
)

Main traverse method, which will parse all tokens except functions declarations.

Parameters
cursorthe cursor whose child may be visited. All kinds of cursors can be visited, including invalid cursors (which, by definition, have no children).
parentthe visitor function that will be invoked for each child of parent.
client_datapointer data supplied by the client, which will be passed to the visitor each time it is invoked.
Returns
CXChildVisit_Continue if a function declaration is found, CXChildVisit_Recurse otherwise.
Here is the call graph for this function:

◆ functionDeclVisitor()

CXChildVisitResult Aqua::CalcServer::functionDeclVisitor ( CXCursor  cursor,
CXCursor  parent,
CXClientData  client_data 
)

Method traverse method, which will parse the input arguments.

Parameters
cursorthe cursor whose child may be visited. All kinds of cursors can be visited, including invalid cursors (which, by definition, have no children).
parentthe visitor function that will be invoked for each child of parent.
client_datapointer data supplied by the client, which will be passed to the visitor each time it is invoked.
Returns
CXChildVisit_Continue.

◆ sigint_handler()

void Aqua::CalcServer::sigint_handler ( int  s)

Handle SIGINT signals.

The first time a SIGINT is received, Aqua::CalcServer::sigint_received is set to true, such that, at the end of the current time step the simulation will stop, the last output will be printed, and the resources will be correctly released.

If SIGINT is received twice, then this handler will enforce the inmediate program exit.

Parameters
sRecevied signal, SIGINT

Variable Documentation

◆ LINKLIST_INC

std::string Aqua::CalcServer::LINKLIST_INC = xxd2string(LinkList_hcl_in, LinkList_hcl_in_len)

◆ LINKLIST_SRC

std::string Aqua::CalcServer::LINKLIST_SRC = xxd2string(LinkList_cl_in, LinkList_cl_in_len)

◆ RADIXSORT_INC

std::string Aqua::CalcServer::RADIXSORT_INC = xxd2string(RadixSort_hcl_in, RadixSort_hcl_in_len)

◆ RADIXSORT_SRC

std::string Aqua::CalcServer::RADIXSORT_SRC = xxd2string(RadixSort_cl_in, RadixSort_cl_in_len)

◆ REDUCTION_INC

std::string Aqua::CalcServer::REDUCTION_INC = xxd2string(Reduction_hcl_in, Reduction_hcl_in_len)

◆ REDUCTION_SRC

std::string Aqua::CalcServer::REDUCTION_SRC = xxd2string(Reduction_cl_in, Reduction_cl_in_len)

◆ SET_INC

std::string Aqua::CalcServer::SET_INC = xxd2string(Set_hcl_in, Set_hcl_in_len)

◆ SET_SRC

std::string Aqua::CalcServer::SET_SRC = xxd2string(Set_cl_in, Set_cl_in_len)

◆ sigint_received

bool Aqua::CalcServer::sigint_received = false
static

Have been a SIGINT already registered?

◆ UNSORT_INC

std::string Aqua::CalcServer::UNSORT_INC = xxd2string(UnSort_hcl_in, UnSort_hcl_in_len)

◆ UNSORT_SRC

std::string Aqua::CalcServer::UNSORT_SRC = xxd2string(UnSort_cl_in, UnSort_cl_in_len)