]> rtime.felk.cvut.cz Git - hercules2020/kcf.git/blobdiff - src/complexmat.cuh
Add convenience ComplexMat constructors + code updates
[hercules2020/kcf.git] / src / complexmat.cuh
index 907ea1f55d9f7c1ebd0af9ff83764ca4af4e713d..940900e7aa141281f898348238eeeae097acfa5f 100644 (file)
@@ -30,6 +30,12 @@ class ComplexMat {
         CudaSafeCall(cudaMalloc(&p_data, n_channels * cols * rows * sizeof(cufftComplex)));
     }
 
+    ComplexMat(cv::Size size, uint _n_channels)
+        : cols(size.width), rows(size.height), n_channels(_n_channels)
+    {
+        CudaSafeCall(cudaMalloc(&p_data, n_channels * cols * rows * sizeof(cufftComplex)));
+    }
+
     ComplexMat(ComplexMat &&other)
     {
         cols = other.cols;