AQUAgpusph
5.0.4
Loading...
Searching...
No Matches
aquagpusph
resources
Scripts
types
types.h
Go to the documentation of this file.
1
/*
2
* This file is part of AQUAgpusph, a free CFD program based on SPH.
3
* Copyright (C) 2012 Jose Luis Cercos Pita <jl.cercos@upm.es>
4
*
5
* AQUAgpusph is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation, either version 3 of the License, or
8
* (at your option) any later version.
9
*
10
* AQUAgpusph is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with AQUAgpusph. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
24
25
#ifndef INFINITY
26
#define INFINITY FLT_MAX
27
#endif
28
29
#define vec2 float2
30
#define vec3 float3
31
#define vec4 float4
32
#define vec8 float8
33
#define dvec2 double2
34
#define dvec3 double3
35
#define dvec4 double4
36
#define dvec8 double8
37
#define ivec2 int2
38
#define ivec3 int3
39
#define ivec4 int4
40
#define ivec8 int8
41
#define lvec2 long2
42
#define lvec3 long3
43
#define lvec4 long4
44
#define lvec8 long8
45
#define uivec2 uint2
46
#define uivec3 uint3
47
#define uivec4 uint4
48
#define uivec8 uint8
49
#define ulvec2 ulong2
50
#define ulvec3 ulong3
51
#define ulvec4 ulong4
52
#define ulvec8 ulong8
53
#define svec2 usize2
54
#define svec3 usize3
55
#define svec4 usize4
56
#define svec8 usize8
57
#define ssvec2 ssize2
58
#define ssvec3 ssize3
59
#define ssvec4 ssize4
60
#define ssvec8 ssize8
61
69
#define _CONVERT(TYPE) convert_ ## TYPE
70
82
#define CONVERT(TYPE, v) _CONVERT(TYPE)(v)
83
91
#define C_I() const usize c_i = icell[i]
92
93
#ifdef HAVE_3D
94
#include "
resources/Scripts/types/3D.h
"
95
#else
96
#include "
resources/Scripts/types/2D.h
"
97
#endif
98
106
#define LINKLIST_LOCAL_PARAMS \
107
const __global usize * icell, \
108
const __global usize * ihoc, \
109
svec4 n_cells
110
118
#define LINKLIST_REMOTE_PARAMS \
119
const __global usize * icell, \
120
const __global usize * mpi_icell, \
121
const __global usize * mpi_ihoc, \
122
svec4 n_cells
2D.h
Type definitions for the OpenCL kernels (2D version).
3D.h
Type definitions for the OpenCL kernels (3D version).
Generated by
1.14.0