OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
cudify_vars.cpp
1 #include "config.h"
2 #include "cudify_hardware_common.hpp"
3 #ifdef HAVE_BOOST_CONTEXT
4 #include <boost/context/continuation.hpp>
5 #endif
6 #include <vector>
7 #include "cudify_hardware_common.hpp"
8 
9 #ifdef HAVE_ALPAKA
10 #include "cudify_hardware_alpaka.hpp"
11 
12 alpa_base_structs __alpa_base__;
13 #endif
14 
15 #if defined(CUDIFY_USE_SEQUENTIAL) || defined(CUDIFY_USE_OPENMP)
16 
17 thread_local dim3 threadIdx;
18 thread_local dim3 blockIdx;
19 
20 unsigned int * tid_x[OPENMP_MAX_NUM_THREADS];
21 unsigned int * tid_y[OPENMP_MAX_NUM_THREADS];
22 unsigned int * tid_z[OPENMP_MAX_NUM_THREADS];
23 
24 dim3 blockDim;
25 dim3 gridDim;
26 
27 #endif
28 
29 bool init_wrappers_call = false;
30 
31 thread_local int vct_atomic_add;
32 thread_local int vct_atomic_rem;
33 
34 size_t n_workers = 1;
35 
36 #ifdef HAVE_BOOST_CONTEXT
37 std::vector<void *> mem_stack;
38 
39 std::vector<boost::context::detail::fcontext_t> contexts;
40 thread_local void * par_glob;
41 thread_local boost::context::detail::fcontext_t main_ctx;
42 #endif