23#ifndef SPHPREREQUISITES_H_INCLUDED
24#define SPHPREREQUISITES_H_INCLUDED
53#if !defined(HAVE_2D) && !defined(HAVE_3D)
105#define uivec2 cl_uint2
111#define uivec3 cl_uint3
117#define uivec4 cl_uint4
163#define matrix cl_float16
176#define matrix cl_float4
180#ifndef __CL_MIN_LOCALSIZE__
190#define __CL_MIN_LOCALSIZE__ 64
192#ifndef __CL_MAX_LOCALSIZE__
202#define __CL_MAX_LOCALSIZE__ 1024
205#ifndef __ERROR_SHOW_TIME__
212#define __ERROR_SHOW_TIME__ 0u
219#define __ERROR_SHOW_TIME__ 3u
238inline const std::string
241 std::string all_name, method_name, class_name;
245 end = pretty_function.find(
"(");
246 begin = pretty_function.substr(0, end).rfind(
" ") + 1;
248 all_name = pretty_function.substr(begin, end);
251 begin = all_name.rfind(
"::");
252 if (begin == std::string::npos) {
257 method_name = all_name.substr(begin + 2, std::string::npos);
259 begin = all_name.substr(0, end).rfind(
"::");
260 if (begin == std::string::npos)
265 class_name = all_name.substr(begin, end);
275#define __METHOD_CLASS_NAME__ methodAndClassName(__PRETTY_FUNCTION__)
341 R.x = row[0].x * V.x + row[0].y * V.y + row[0].z * V.z + row[0].w * V.w;
342 R.y = row[1].x * V.x + row[1].y * V.y + row[1].z * V.z + row[1].w * V.w;
343 R.z = row[2].x * V.x + row[2].y * V.y + row[2].z * V.z + row[2].w * V.w;
344 R.w = row[3].x * V.x + row[3].y * V.y + row[3].z * V.z + row[3].w * V.w;
346 R.x = row[0].x * V.x + row[0].y * V.y;
347 R.y = row[1].x * V.x + row[1].y * V.y;
Matrix of real components.
Definition: sphPrerequisites.h:288
mat & operator=(const mat &M)
Definition: sphPrerequisites.h:356
vec & operator[](unsigned index)
Definition: sphPrerequisites.h:330
mat()
Constructor.
Definition: sphPrerequisites.h:294
vec const & operator[](unsigned index) const
Subscript operator to return a matrix row.
Definition: sphPrerequisites.h:325
vec operator*(const vec &V)
Definition: sphPrerequisites.h:336
const std::string methodAndClassName(const std::string &pretty_function)
Function to extract the class and function from <strong class= macro.
Definition: sphPrerequisites.h:239
static std::string methodAndClassName_str
Helper string for methodAndClassName function.
Definition: sphPrerequisites.h:224
#define vec
Vector of real components.
Definition: sphPrerequisites.h:130