mirror of https://github.com/opencv/opencv.git
parent
e88253ccad
commit
d4087f19a2
6 changed files with 1200 additions and 1071 deletions
@ -0,0 +1,11 @@ |
||||
project(opencv_core_cuda) |
||||
set(HAVE_CUDA FALSE) |
||||
add_definitions("-DHAVE_CUDA") |
||||
include_directories(${CUDA_INCLUDE_DIRS} |
||||
"../src/" |
||||
"../include/opencv2/core/" |
||||
"${OpenCV_SOURCE_DIR}/modules/gpu/include" |
||||
) |
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef) |
||||
cuda_add_library(opencv_core_cuda SHARED main.cpp ../src/cuda/matrix_operations.cu) |
||||
target_link_libraries(opencv_core_cuda ${CUDA_LIBRARIES}) |
@ -0,0 +1,23 @@ |
||||
#include "opencv2/core/core.hpp" |
||||
#include "opencv2/core/gpumat.hpp" |
||||
|
||||
#ifdef HAVE_CUDA |
||||
#include <cuda_runtime.h> |
||||
#include <npp.h> |
||||
|
||||
#define CUDART_MINIMUM_REQUIRED_VERSION 4020 |
||||
#define NPP_MINIMUM_REQUIRED_VERSION 4200 |
||||
|
||||
#if (CUDART_VERSION < CUDART_MINIMUM_REQUIRED_VERSION) |
||||
#error "Insufficient Cuda Runtime library version, please update it." |
||||
#endif |
||||
|
||||
#if (NPP_VERSION_MAJOR * 1000 + NPP_VERSION_MINOR * 100 + NPP_VERSION_BUILD < NPP_MINIMUM_REQUIRED_VERSION) |
||||
#error "Insufficient NPP version, please update it." |
||||
#endif |
||||
#endif |
||||
|
||||
using namespace cv; |
||||
using namespace cv::gpu; |
||||
|
||||
#include "gpumat_cuda.hpp" |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue