CUDA warning fix/supporession for Android.

pull/2049/head
Alexander Smorkalov 11 years ago
parent 4aa9f83100
commit 1e038e2837
  1. 41
      modules/core/src/gpumat.cpp
  2. 2
      modules/dynamicuda/CMakeLists.txt
  3. 20
      modules/dynamicuda/src/main.cpp

@ -45,29 +45,42 @@
#include <iostream>
#if defined(HAVE_CUDA)
#include <cuda_runtime.h>
#include <npp.h>
# include <cuda_runtime.h>
# include <npp.h>
#define CUDART_MINIMUM_REQUIRED_VERSION 4020
#define NPP_MINIMUM_REQUIRED_VERSION 4200
# 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 (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
# 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
#ifdef DYNAMIC_CUDA_SUPPORT
#include <dlfcn.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
# include <dlfcn.h>
# include <sys/types.h>
# include <sys/stat.h>
# include <dirent.h>
#endif
#ifdef ANDROID
# ifdef LOG_TAG
# undef LOG_TAG
# endif
# ifdef LOGE
# undef LOGE
# endif
# ifdef LOGD
# undef LOGD
# endif
# ifdef LOGI
# undef LOGI
# endif
# include <android/log.h>
# define LOG_TAG "OpenCV::CUDA"

@ -5,7 +5,7 @@ endif()
set(the_description "Dynamic CUDA linkage")
add_definitions(-DUSE_CUDA)
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef)
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef -Wshadow)
ocv_module_include_directories("${OpenCV_SOURCE_DIR}/modules/gpu/include")
set(OPENCV_MODULE_TYPE SHARED)
if (BUILD_FAT_JAVA_LIB)

@ -6,19 +6,19 @@
#include <iostream>
#ifdef HAVE_CUDA
#include <cuda_runtime.h>
#include <npp.h>
# include <cuda_runtime.h>
# include <npp.h>
#define CUDART_MINIMUM_REQUIRED_VERSION 4020
#define NPP_MINIMUM_REQUIRED_VERSION 4200
# 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 (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
# 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 std;

Loading…
Cancel
Save