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 #ifdef __CUDACC__
41  #define INLINE_FUNCTION_HD inline __host__ __device__
42  #define INLINE_FUNCTION_D inline __device__
43  #define INLINE_FUNCTION_H inline __host__
44  #define LAMBDA_HD [=] __host__ __device__
45  #define LAMBDA_D [=] __device__
46  #define CLASS_LAMBDA_HD [=,*this] __host__ __device__
47  #define FUNCTION_HD __host__ __device__
48  #define FUNCTION_H __host__
49  #define FUNCTION_D __device__
50 #else
51  #define INLINE_FUNCTION_HD inline
52  #define INLINE_FUNCTION_D inline
53  #define INLINE_FUNCTION_H inline
54  #define LAMBDA_HD [=]
55  #define LAMBDA_D [=]
56  #define CLASS_LAMBDA_HD [=,*this]
57  #define FUNCTION_HD
58  #define FUNCTION_H
59  #define FUNCTION_D
60 #endif
61 
62 #define INLINE_FUNCTION inline
63 
64 #ifdef BUILD_SHARED_LIBS
65  #define USE_INSTANTIATION 1
66 #else
67  #define USE_INSTANTIATION 0
68 #endif
69 
70 
71 #define ForAll(i, container) for(auto i=0; i < container.size(); ++i)
72 
73 #ifdef USE_STD_PARALLEL_ALG
74 static inline const bool useStdParallel__ = true;
75 #else
76 static inline const bool useStdParallel__ = false;
77 #endif
78 
79 
80 #endif //__pFlowMacros_hpp__
useStdParallel__
static const bool useStdParallel__
Definition: pFlowMacros.hpp:76