cuda+npp version check at configure time.

This commit is contained in:
Anatoly Baksheev
2010-11-25 10:42:09 +00:00
parent 03aa0c9fec
commit 36ebf4ef0d
4 changed files with 26 additions and 16 deletions

View File

@@ -67,12 +67,18 @@
#include "opencv2/gpu/stream_accessor.hpp"
#include "npp.h"
#define CUDART_MINIMUM_REQUIRED_VERSION 3020
#define NPP_MINIMUM_REQUIRED_VERSION 3216
#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
#else /* defined(HAVE_CUDA) */
static inline void throw_nogpu() { CV_Error(CV_GpuNotSupported, "The library is compilled without GPU support"); }