Merge pull request #14827 from YashasSamaga:cuda4dnn-csl-low
[platform/upstream/opencv.git] / modules / dnn / src / cuda4dnn / csl / nvcc_defs.hpp
1 // This file is part of OpenCV project.
2 // It is subject to the license terms in the LICENSE file found in the top-level directory
3 // of this distribution and at http://opencv.org/license.html.
4
5 #ifndef OPENCV_DNN_SRC_CUDA4DNN_CSL_NVCC_DEFS_HPP
6 #define OPENCV_DNN_SRC_CUDA4DNN_CSL_NVCC_DEFS_HPP
7
8 #include <cuda_runtime_api.h>
9
10 #ifdef __CUDACC__
11 #   define CUDA4DNN_HOST __host__
12 #   define CUDA4DNN_DEVICE __device__
13 #   define CUDA4DNN_HOST_DEVICE CUDA4DNN_HOST CUDA4DNN_DEVICE
14 #else
15 #   define CUDA4DNN_HOST
16 #   define CUDA4DNN_DEVICE
17 #   define CUDA4DNN_HOST_DEVICE
18 #endif
19
20 #endif /* OPENCV_DNN_SRC_CUDA4DNN_CSL_NVCC_DEFS_HPP */