From ce26a0b069824ba9db4887d34dc60d627e9c3d75 Mon Sep 17 00:00:00 2001 From: anapt Date: Fri, 26 Jan 2018 12:23:34 +0200 Subject: [PATCH] compile error fixex --- mean_shift_cuda/meanshift_utils.cu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mean_shift_cuda/meanshift_utils.cu b/mean_shift_cuda/meanshift_utils.cu index efafd56..f636dc7 100644 --- a/mean_shift_cuda/meanshift_utils.cu +++ b/mean_shift_cuda/meanshift_utils.cu @@ -475,12 +475,12 @@ double * calculate_denominator(double **kernel_matrix){ size = NUMBER_OF_POINTS * sizeof(double); - double * denominator = malloc(size); + double ** denominator = (double**)malloc(size); gpuErrchk( cudaMemcpy(&((*denominator)[0]), d_denominator_matrix.elements ,size, cudaMemcpyDeviceToHost) ); gpuErrchk( cudaFree(d_kernel_matrix.elements) ); gpuErrchk( cudaFree(d_denominator_matrix.elements) ); - return denominator; + return (*denominator); } \ No newline at end of file