From dc09fcf3326df0870b03c0b29378d4b8915fa1b6 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Tue, 22 Jan 2019 09:46:11 +0100 Subject: [PATCH] Remove debug printf --- src/dynmem.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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]; -- 2.39.2