AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
Data Structures | Macros | Functions | Variables
sphPrerequisites.h File Reference

Set of definitions and macros related with the implementation. More...

#include <string>
#include <config.h>
#include <CL/cl.h>
Include dependency graph for sphPrerequisites.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  mat
 Matrix of real components. More...
 

Macros

#define XSTR(x)   STR(x)
 Just an alias for STR.
 
#define STR(x)   #x
 An auxiliary macro to can print defined variables in compilation time.
 
#define vec2   cl_float2
 Vector of 2 real components.
 
#define vec3   cl_float3
 Vector of 3 real components.
 
#define vec4   cl_float4
 Vector of 4 real components.
 
#define ivec2   cl_int2
 Vector of 2 integer components.
 
#define ivec3   cl_int3
 Vector of 3 integer components.
 
#define ivec4   cl_int4
 Vector of 4 integer components.
 
#define uivec2   cl_uint2
 Vector of 2 unsigned integer components.
 
#define uivec3   cl_uint3
 Vector of 3 unsigned integer components.
 
#define uivec4   cl_uint4
 Vector of 4 unsigned integer components.
 
#define vec   vec4
 Vector of real components.
 
#define ivec   ivec4
 Vector of integer components.
 
#define uivec   uivec4
 Vector of unsigned integer components.
 
#define matrix   cl_float16
 Matrix of float numbers.
 
#define __CL_MIN_LOCALSIZE__   64
 Minimum local work size to execute kernels.
 
#define __CL_MAX_LOCALSIZE__   1024
 Maximum local work size to execute kernels.
 
#define __ERROR_SHOW_TIME__   0u
 Time let to the user to notice and read the error.
 
#define __METHOD_CLASS_NAME__   methodAndClassName(__PRETTY_FUNCTION__)
 Returns automatically the current class and function names.
 

Functions

const std::string methodAndClassName (const std::string &pretty_function)
 Function to extract the class and function from <strong class= macro.
 

Variables

static std::string methodAndClassName_str
 Helper string for methodAndClassName function.
 

Detailed Description

Set of definitions and macros related with the implementation.

Macro Definition Documentation

◆ __CL_MAX_LOCALSIZE__

#define __CL_MAX_LOCALSIZE__   1024

Maximum local work size to execute kernels.

The selected value have been tested in the following platforms:

  • AMD CPU
  • Intel CPU
  • AMD GPU
  • NVidia GPU

◆ __CL_MIN_LOCALSIZE__

#define __CL_MIN_LOCALSIZE__   64

Minimum local work size to execute kernels.

The selected value have been tested in the following platforms:

  • AMD CPU
  • Intel CPU
  • AMD GPU
  • NVidia GPU

◆ __ERROR_SHOW_TIME__

#define __ERROR_SHOW_TIME__   0u

Time let to the user to notice and read the error.

0 seconds if ncurses is disabled, and 3 seconds otherwise.

◆ __METHOD_CLASS_NAME__

#define __METHOD_CLASS_NAME__   methodAndClassName(__PRETTY_FUNCTION__)

Returns automatically the current class and function names.

See also
methodAndClassName()
addMessageF

◆ ivec

#define ivec   ivec4

Vector of integer components.

The number of components depends on weather the 2D version or 3D version is compiled:

  • 2D = 2 components
  • 3D = 4 components

◆ ivec2

#define ivec2   cl_int2

Vector of 2 integer components.

◆ ivec3

#define ivec3   cl_int3

Vector of 3 integer components.

◆ ivec4

#define ivec4   cl_int4

Vector of 4 integer components.

◆ matrix

#define matrix   cl_float16

Matrix of float numbers.

The number of components depends on weather the 2D version or 3D version is compiled:

  • 2D = 2x2 components
  • 3D = 4x4 components

◆ STR

#define STR (   x)    #x

An auxiliary macro to can print defined variables in compilation time.

For instance:

#define _VAR 1
#pragma message "_VAR = " STR(_VAR)

◆ uivec

#define uivec   uivec4

Vector of unsigned integer components.

The number of components depends on weather the 2D version or 3D version is compiled:

  • 2D = 2 components
  • 3D = 4 components

◆ uivec2

#define uivec2   cl_uint2

Vector of 2 unsigned integer components.

◆ uivec3

#define uivec3   cl_uint3

Vector of 3 unsigned integer components.

◆ uivec4

#define uivec4   cl_uint4

Vector of 4 unsigned integer components.

◆ vec

#define vec   vec4

Vector of real components.

The number of components depends on weather the 2D version or 3D version is compiled:

  • 2D = 2 components
  • 3D = 4 components

◆ vec2

#define vec2   cl_float2

Vector of 2 real components.

◆ vec3

#define vec3   cl_float3

Vector of 3 real components.

◆ vec4

#define vec4   cl_float4

Vector of 4 real components.

◆ XSTR

#define XSTR (   x)    STR(x)

Just an alias for STR.

Function Documentation

◆ methodAndClassName()

const std::string methodAndClassName ( const std::string &  pretty_function)
inline

Function to extract the class and function from <strong class= macro.

The GNU compiler (GCC) macro <strong class= contains a lot of information about the name space, the returning value, and the parameters.

In order to print log information this data should be simplified.

Parameters
pretty_functionGCC <strong class= macro
Returns
Class and function name ("Class::function")
See also
__METHOD_CLASS_NAME__

Variable Documentation

◆ methodAndClassName_str

std::string methodAndClassName_str
static

Helper string for methodAndClassName function.