www.cemf.ir
pFlowMacros.hpp
Go to the documentation of this file.
1
/*------------------------------- phasicFlow ---------------------------------
2
O C enter of
3
O O E ngineering and
4
O O M ultiscale modeling of
5
OOOOOOO F luid flow
6
------------------------------------------------------------------------------
7
Copyright (C): www.cemf.ir
8
email: hamid.r.norouzi AT gmail.com
9
------------------------------------------------------------------------------
10
Licence:
11
This file is part of phasicFlow code. It is a free software for simulating
12
granular and multiphase flows. You can redistribute it and/or modify it under
13
the terms of GNU General Public License v3 or any other later versions.
14
15
phasicFlow is distributed to help others in their research in the field of
16
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
17
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18
19
-----------------------------------------------------------------------------*/
20
21
#ifndef __pFlowMacros_hpp__
22
#define __pFlowMacros_hpp__
23
24
#include "phasicFlowConfig.H"
25
26
#ifdef __GNUC__
27
#define FUNCTION_NAME __PRETTY_FUNCTION__
28
#else
29
#define FUNCTION_NAME __func__
30
#endif
31
32
#ifdef __GNUC__
33
# define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
34
#else
35
# define UNUSED(x) UNUSED_ ## x
36
#endif
37
38
#define CONSUME_PARAM(x) (void)(x);
39
40
/*#if defined(pFlow_Build_Cuda) && !defined(__CUDACC__)
41
#define __CUDACC__
42
#endif*/
43
44
#ifdef __CUDACC__
45
#define INLINE_FUNCTION_HD inline __host__ __device__
46
#define INLINE_FUNCTION_D inline __device__
47
#define INLINE_FUNCTION_H inline __host__
48
#define LAMBDA_HD [=] __host__ __device__
49
#define LAMBDA_D [=] __device__
50
#define CLASS_LAMBDA_HD [=,*this] __host__ __device__
51
#define FUNCTION_HD __host__ __device__
52
#define FUNCTION_H __host__
53
#define FUNCTION_D __device__
54
#else
55
#define INLINE_FUNCTION_HD inline
56
#define INLINE_FUNCTION_D inline
57
#define INLINE_FUNCTION_H inline
58
#define LAMBDA_HD [=]
59
#define LAMBDA_D [=]
60
#define CLASS_LAMBDA_HD [=,*this]
61
#define FUNCTION_HD
62
#define FUNCTION_H
63
#define FUNCTION_D
64
#endif
65
66
#define INLINE_FUNCTION inline
67
68
#ifdef BUILD_SHARED_LIBS
69
#define USE_INSTANTIATION 1
70
#else
71
#define USE_INSTANTIATION 0
72
#endif
73
74
75
#define ForAll(i, container) for(auto i=0; i < container.size(); ++i)
76
77
#ifdef pFlow_STD_Parallel_Alg
78
static
inline
const
bool
useStdParallel__
=
true
;
79
#else
80
static
inline
const
bool
useStdParallel__
=
false
;
81
#endif
82
83
84
#endif //__pFlowMacros_hpp__
useStdParallel__
static const bool useStdParallel__
Definition:
pFlowMacros.hpp:80
src
phasicFlow
globals
pFlowMacros.hpp
Generated by
1.8.17