quadgrid 0.1
simple cartesian quad grid with particles for c++/octave
Loading...
Searching...
No Matches
quadgrid_config.h
Go to the documentation of this file.
1#ifndef QUADGRID_CONFIG_H
2#define QUADGRID_CONFIG_H
3
4#ifdef USE_MPI_H
5#include <mpi.h>
6#else
7#define MPI_Comm int
8#define MPI_COMM_WORLD 1
9#define MPI_Initialized(x)
10#define MPI_Comm_size(x, y) { *y = 0; }
11#define MPI_Comm_rank(x, y) { *y = 0; }
12#endif
13
14#ifdef USE_THRUST
15#include <thrust/device_vector.h>
16#include <thrust/execution_policy.h>
17#include <thrust/host_vector.h>
18#include <thrust/copy.h>
19#include <thrust/iterator/counting_iterator.h>
20#include <thrust/transform.h>
21#include <thrust/fill.h>
22#include <thrust/functional.h>
23#define DEVICE __device__
24#define HOST __host__
25#define vector_t thrust::host_vector
26#define device_vector_t thrust::device_vector
27#define algorithm_namespace thrust
28#define device_exec_policy thrust::device
29#define host_exec_policy thrust::host
30
31#ifdef THRUST_CPU
32#include <atomicAdd.h>
33#endif
34
35#else
36#include <functional>
37#include <algorithm>
38#include <atomicAdd.h>
39#include <vector>
40#include <execution>
41#define DEVICE
42#define HOST
43#define vector_t std::vector
44#define device_vector_t std::vector
45#define algorithm_namespace std
46#define device_exec_policy std::execution::par_unseq
47#endif
48using real_t = double;
49
50#endif
double real_t