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