From: Michal Sojka Date: Tue, 22 Jan 2019 08:46:11 +0000 (+0100) Subject: Remove debug printf X-Git-Url: https://rtime.felk.cvut.cz/gitweb/hercules2020/kcf.git/commitdiff_plain/dc09fcf3326df0870b03c0b29378d4b8915fa1b6 Remove debug printf --- diff --git a/src/dynmem.hpp b/src/dynmem.hpp index 2d62352..8e49643 100644 --- a/src/dynmem.hpp +++ b/src/dynmem.hpp @@ -51,10 +51,9 @@ template class DynMem_ { { #ifdef CUFFT ptr_h = reinterpret_cast(mmng.get(num_elem)); - if (!ptr_h) { - printf("malloc(%zu)\n", num_elem); + if (!ptr_h) CudaSafeCall(cudaHostAlloc(reinterpret_cast(&ptr_h), num_elem * sizeof(T), cudaHostAllocMapped)); - } + CudaSafeCall(cudaHostGetDevicePointer(reinterpret_cast(&ptr_d), reinterpret_cast(ptr_h), 0)); #else ptr_h = new T[num_elem];