]> rtime.felk.cvut.cz Git - hercules2020/kcf.git/commitdiff
Initial commit to cuda-streams.
authorShanigen <vkaraf@gmail.com>
Tue, 24 Jul 2018 12:23:38 +0000 (14:23 +0200)
committerMichal Sojka <michal.sojka@cvut.cz>
Wed, 5 Sep 2018 06:38:33 +0000 (08:38 +0200)
src/CMakeLists.txt
src/fft_cufft.cpp

index a7adb533d4cc4f4f6e41ffab18d811d93a9656e5..bb31ccbaf428d8bfaa07c839fbb8689a17267e5e 100644 (file)
@@ -61,7 +61,7 @@ IF((FFT STREQUAL "OpenCV") AND BIG_BATCH)
   message(SEND_ERROR "OpenCV version does not support big batch mode.")
 ENDIF()
 
-IF((FFT STREQUAL "cuFFT") AND (ASYNC OR (OPENMP AND NOT BIG_BATCH)))
+IF((FFT STREQUAL "cuFFT") AND (ASYNC))
   message(SEND_ERROR "cuFFT version does not support ASYNC and OpenMP only if used with big batch mode.")
 ENDIF()
 
index 85271b6fc91aef30e16fbff3de0245bec0fd3ce7..f220015b4de42fc79baa23f1d79e6761d7d14d59 100644 (file)
@@ -23,17 +23,17 @@ void cuFFT::init(unsigned width, unsigned height, unsigned num_of_feats, unsigne
     {
         CudaSafeCall(cudaMalloc(&data_f_all_scales, m_height*m_num_of_scales*m_width*sizeof(cufftReal)));
 
-       int rank = 2;
-       int n[] = {(int)m_height, (int)m_width};
-       int howmany = m_num_of_scales;
-       int idist = m_height*m_width, odist = m_height*(m_width/2+1);
-       int istride = 1, ostride = 1;
-       int *inembed = n, onembed[] = {(int)m_height, (int)m_width/2+1};
-
-       CufftErrorCheck(cufftPlanMany(&plan_f_all_scales, rank, n,
-                     inembed, istride, idist,
-                     onembed, ostride, odist,
-                     CUFFT_R2C, howmany));
+        int rank = 2;
+        int n[] = {(int)m_height, (int)m_width};
+        int howmany = m_num_of_scales;
+        int idist = m_height*m_width, odist = m_height*(m_width/2+1);
+        int istride = 1, ostride = 1;
+        int *inembed = n, onembed[] = {(int)m_height, (int)m_width/2+1};
+
+        CufftErrorCheck(cufftPlanMany(&plan_f_all_scales, rank, n,
+                 inembed, istride, idist,
+                 onembed, ostride, odist,
+                 CUFFT_R2C, howmany));
     }
     //FFT forward window one scale
     {