AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
Kernel.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
27// Macro for adding quotes
28#define KERNEL_STRINGIFY(X) KERNEL_STRINGIFY_AUX(X)
29#define KERNEL_STRINGIFY_AUX(X) #X
30
31// Concatenate macro
32#define KERNEL_CAT(X,Y) KERNEL_CAT_AUX(X,Y)
33#define KERNEL_CAT_AUX(X,Y) X##Y
34
35// Kernel suffix
36#ifdef HAVE_3D
37 #define KERNEL_SUFIX 3D
38#else
39 #define KERNEL_SUFIX 2D
40#endif
41
42// Include the file
43#define KERNEL_NAME_SUFIX KERNEL_CAT(KERNEL_NAME,KERNEL_SUFIX)
44#include KERNEL_STRINGIFY(resources/Scripts/KernelFunctions/KERNEL_NAME_SUFIX.hcl)