Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
cuda_thrust.h
1 /*
2  * The MIT License (MIT)
3  *
4  * Copyright (c) 2016 The SKA organisation
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to deal
8  * in the Software without restriction, including without limitation the rights
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10  * copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all
14  * copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22  * SOFTWARE.
23  */
24 #ifndef SKA_CHEETAH_CUDA_UTILS_CUDA_THRUST_H
25 #define SKA_CHEETAH_CUDA_UTILS_CUDA_THRUST_H
26 
27 #include "cheetah/version.h"
28 
29 #ifdef ENABLE_CUDA
30 #pragma GCC diagnostic push
31 #pragma GCC diagnostic ignored "-Wall"
32 #pragma GCC diagnostic ignored "-Wpragmas"
33 #pragma GCC diagnostic ignored "-Wunused-parameter"
34 #pragma GCC diagnostic ignored "-Wunused-variable"
35 #include <thrust/device_vector.h>
36 #include <thrust/host_vector.h>
37 #include <thrust/device_ptr.h>
38 #include <thrust/device_malloc_allocator.h>
39 #include <thrust/transform.h>
40 #include <thrust/iterator/counting_iterator.h>
41 #include <thrust/iterator/transform_iterator.h>
42 #include <thrust/iterator/constant_iterator.h>
43 #include <thrust/iterator/zip_iterator.h>
44 #include <thrust/gather.h>
45 #include <thrust/functional.h>
46 #include <thrust/execution_policy.h>
47 #include <thrust/transform_reduce.h>
48 #include <thrust/for_each.h>
49 #include <thrust/complex.h>
50 #include <thrust/tuple.h>
51 #include <thrust/extrema.h>
52 #include <thrust/detail/raw_pointer_cast.h>
53 #include <thrust/reduce.h>
54 #include <thrust/sort.h>
55 #include <thrust/distance.h>
56 #include <thrust/copy.h>
57 #include <thrust/fill.h>
58 #include <thrust/execution_policy.h>
59 #include <thrust/system/cuda/execution_policy.h>
60 #include <thrust/system/cuda/vector.h>
61 #pragma GCC diagnostic pop
62 
63 #if ((CHEETAH_CUDA_MAJOR_VERSION == 7) && (CHEETAH_CUDA_MINOR_VERSION == 5))
64 #define CUDA_BROKEN_THRUST_WITH_ALLOCATOR
65 #else // cuda 7.5
66 #if ((CHEETAH_CUDA_MAJOR_VERSION == 8) && (CHEETAH_CUDA_MINOR_VERSION == 0))
67 #define CUDA_BROKEN_THRUST_WITH_ALLOCATOR
68 #endif // cuda 8.0
69 #endif // broken thrust
70 
71 #endif //ENABLE_CUDA
72 
73 
74 namespace ska {
75 namespace cheetah {
76 namespace cuda_utils {
77 
78 } // namespace cuda_utils
79 } // namespace cheetah
80 } // namespace ska
81 
82 #endif // SKA_CHEETAH_CUDA_UTILS_CUDA_THRUST_H
Some limits and constants for FLDO.
Definition: Brdz.h:35