diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-01-21 19:03:35 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-01-21 19:03:35 +0000 |
commit | 0ebf740b9c9bc7c10ac41bea315ecc6c01c79166 (patch) | |
tree | 15bb76d57cfb8652fd2627a24007e0bb92ec4a99 /media-libs/opencv/files | |
parent | 5b5df25227111ef465caf5c52bcfb66dac3219cd (diff) |
gentoo resync : 21.01.2018
Diffstat (limited to 'media-libs/opencv/files')
3 files changed, 149 insertions, 0 deletions
diff --git a/media-libs/opencv/files/opencv-3.3.0-cuda9-cmake.patch b/media-libs/opencv/files/opencv-3.3.0-cuda9-cmake.patch new file mode 100644 index 000000000000..270c599d708c --- /dev/null +++ b/media-libs/opencv/files/opencv-3.3.0-cuda9-cmake.patch @@ -0,0 +1,87 @@ +diff --git a/cmake/FindCUDA.cmake b/cmake/FindCUDA.cmake +index 678b450ab..c2a58bd00 100644 +--- a/cmake/FindCUDA.cmake ++++ b/cmake/FindCUDA.cmake +@@ -283,7 +283,38 @@ + # CUDA_nppc_LIBRARY -- NVIDIA Performance Primitives lib (core). + # Only available for CUDA version 5.5+. + # CUDA_nppi_LIBRARY -- NVIDIA Performance Primitives lib (image processing). +-# Only available for CUDA version 5.5+. ++# Only available for CUDA version 5.5+ and was split up ++# in CUDA version 8.0+ and doesn't exist in combined ++# form in CUDA version 9.0+. ++# CUDA_nppial_LIBRARY -- NVIDIA Performance Primatives library (arithmetic and ++# logical operation functions). Only available for CUDA ++# version 8.0+. ++# CUDA_nppicc_LIBRARY -- NVIDIA Performance Primatives library (color conversion ++# and sampling functions). Only available for CUDA version ++# 8.0+. ++# CUDA_nppicom_LIBRARY -- NVIDIA Performance Primatives library (JPEG compression ++# and decompression functions). Only available for CUDA ++# version 8.0+. ++# CUDA_nppidei_LIBRARY -- NVIDIA Performance Primatives library (data exchange and ++# initialization functions). Only available for CUDA ++# version 8.0+. ++# CUDA_nppif_LIBRARY -- NVIDIA Performance Primatives library (filtering and ++# computer vision functions). Only available for CUDA ++# version 8.0+. ++# CUDA_nppig_LIBRARY -- NVIDIA Performance Primatives library (geometry ++# transformation functions). Only available for CUDA ++# version 8.0+. ++# CUDA_nppim_LIBRARY -- NVIDIA Performance Primatives library (morphological ++# operation functions). Only available for CUDA version ++# 8.0+. ++# CUDA_nppist_LIBRARY -- NVIDIA Performance Primatives library (statistics and ++# linear transform). Only available for CUDA version ++# 8.0+. ++# CUDA_nppisu_LIBRARY -- NVIDIA Performance Primatives library (memory support ++# functions). Only available for CUDA version 8.0+. ++# CUDA_nppitc_LIBRARY -- NVIDIA Performance Primatives library (threshold and ++# compare operation functions). Only available for CUDA ++# version 8.0+. + # CUDA_npps_LIBRARY -- NVIDIA Performance Primitives lib (signal processing). + # Only available for CUDA version 5.5+. + # CUDA_nvcuvenc_LIBRARY -- CUDA Video Encoder library. +@@ -522,6 +553,16 @@ macro(cuda_unset_include_and_libraries) + unset(CUDA_npp_LIBRARY CACHE) + unset(CUDA_nppc_LIBRARY CACHE) + unset(CUDA_nppi_LIBRARY CACHE) ++ unset(CUDA_nppial_LIBRARY CACHE) ++ unset(CUDA_nppicc_LIBRARY CACHE) ++ unset(CUDA_nppicom_LIBRARY CACHE) ++ unset(CUDA_nppidei_LIBRARY CACHE) ++ unset(CUDA_nppif_LIBRARY CACHE) ++ unset(CUDA_nppig_LIBRARY CACHE) ++ unset(CUDA_nppim_LIBRARY CACHE) ++ unset(CUDA_nppist_LIBRARY CACHE) ++ unset(CUDA_nppisu_LIBRARY CACHE) ++ unset(CUDA_nppitc_LIBRARY CACHE) + unset(CUDA_npps_LIBRARY CACHE) + unset(CUDA_nvcuvenc_LIBRARY CACHE) + unset(CUDA_nvcuvid_LIBRARY CACHE) +@@ -787,7 +828,22 @@ if(NOT CUDA_VERSION VERSION_LESS "3.2") + find_cuda_helper_libs(nvcuvid) + endif() + endif() +-if(CUDA_VERSION VERSION_GREATER "5.0") ++if(CUDA_VERSION VERSION_GREATER "7.5") ++ # In CUDA 8.0 NPP was splitted onto 12 separate libraries. ++ find_cuda_helper_libs(nppc) ++ find_cuda_helper_libs(nppial) ++ find_cuda_helper_libs(nppicc) ++ find_cuda_helper_libs(nppicom) ++ find_cuda_helper_libs(nppidei) ++ find_cuda_helper_libs(nppif) ++ find_cuda_helper_libs(nppig) ++ find_cuda_helper_libs(nppim) ++ find_cuda_helper_libs(nppist) ++ find_cuda_helper_libs(nppisu) ++ find_cuda_helper_libs(nppitc) ++ find_cuda_helper_libs(npps) ++ set(CUDA_npp_LIBRARY "${CUDA_nppc_LIBRARY};${CUDA_nppial_LIBRARY};${CUDA_nppicc_LIBRARY};${CUDA_nppicom_LIBRARY};${CUDA_nppidei_LIBRARY};${CUDA_nppif_LIBRARY};${CUDA_nppig_LIBRARY};${CUDA_nppim_LIBRARY};${CUDA_nppist_LIBRARY};${CUDA_nppisu_LIBRARY};${CUDA_nppitc_LIBRARY};${CUDA_npps_LIBRARY}") ++elseif(CUDA_VERSION VERSION_GREATER "5.0") + # In CUDA 5.5 NPP was splitted onto 3 separate libraries. + find_cuda_helper_libs(nppc) + find_cuda_helper_libs(nppi) + + diff --git a/media-libs/opencv/files/opencv-3.3.0-cuda9-compute20.patch b/media-libs/opencv/files/opencv-3.3.0-cuda9-compute20.patch new file mode 100644 index 000000000000..384630002d98 --- /dev/null +++ b/media-libs/opencv/files/opencv-3.3.0-cuda9-compute20.patch @@ -0,0 +1,21 @@ +--- a/cmake/OpenCVDetectCUDA.cmake 2018-01-02 11:57:50.358147518 -0500 ++++ b/cmake/OpenCVDetectCUDA.cmake 2018-01-02 12:48:44.108965500 -0500 +@@ -104,7 +104,7 @@ + if(${CUDA_VERSION} VERSION_LESS "8.0") + set(__cuda_arch_bin "2.0 3.0 3.5 3.7 5.0 5.2") + else() +- set(__cuda_arch_bin "2.0 3.0 3.5 3.7 5.0 5.2 6.0 6.1") ++ set(__cuda_arch_bin "3.0 3.5 3.7 5.0 5.2 6.0 6.1") + endif() + endif() + endif() +@@ -209,7 +209,7 @@ if(CUDA_FOUND) + endif() + + if(UNIX OR APPLE) +- set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xcompiler -fPIC) ++ set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xcompiler -fPIC --expt-relaxed-constexpr) + endif() + if(APPLE) + set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xcompiler -fno-finite-math-only) + diff --git a/media-libs/opencv/files/opencv-3.3.0-cuda9-saturate.patch b/media-libs/opencv/files/opencv-3.3.0-cuda9-saturate.patch new file mode 100644 index 000000000000..43e2a0833cae --- /dev/null +++ b/media-libs/opencv/files/opencv-3.3.0-cuda9-saturate.patch @@ -0,0 +1,41 @@ +diff --git a/var/tmp/portage/media-libs/opencv-3.3.0-r4/work/opencv-3.3.0/modules/cudev/include/opencv2/cudev/util/saturate_cast.hpp b/./saturate_cast.hpp +index ec9804c..4359d18 100644 +--- a/modules/cudev/include/opencv2/cudev/util/saturate_cast.hpp ++++ b/modules/cudev/include/opencv2/cudev/util/saturate_cast.hpp +@@ -47,6 +47,9 @@ + #define OPENCV_CUDEV_UTIL_SATURATE_CAST_HPP + + #include "../common.hpp" ++#if __CUDACC_VER_MAJOR__ >= 9 ++#include <cuda_fp16.h> ++#endif + + namespace cv { namespace cudev { + +@@ -274,15 +277,25 @@ template <typename T, typename D> __device__ __forceinline__ D cast_fp16(T v); + + template <> __device__ __forceinline__ float cast_fp16<short, float>(short v) + { ++#if __CUDACC_VER_MAJOR__ >= 9 ++ return float(*(__half*)&v); ++#else + return __half2float(v); ++#endif + } + + template <> __device__ __forceinline__ short cast_fp16<float, short>(float v) + { +- return (short)__float2half_rn(v); ++#if __CUDACC_VER_MAJOR__ >= 9 ++ __half h(v); ++ return *(short*)&v; ++#else ++ return (short)__float2half_rn(v); ++#endif + } + //! @} + + }} + + #endif ++ |