From ef849724bdc158bcf4cadd0f30f9f8cc81415049 Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Sun, 7 Aug 2011 23:55:25 +0100 Subject: [PATCH] Explicitly cast to void** when allocating memory Without this patch, CUDA SDK 2.0 fails with the following error: argument of type "float **" is incompatible with parameter of type "void **" Signed-off-by: Tobias Grosser Signed-off-by: Sven Verdoolaege --- cuda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuda.c b/cuda.c index 2efa8b7..57638b4 100644 --- a/cuda.c +++ b/cuda.c @@ -354,7 +354,7 @@ static void allocate_device_arrays(struct cuda_gen *gen) int i; for (i = 0; i < gen->n_array; ++i) { - fprintf(gen->cuda.host_c, "cudaMalloc(&dev_%s, ", + fprintf(gen->cuda.host_c, "cudaMalloc((void **) &dev_%s, ", gen->array[i].name); print_array_size(gen, gen->cuda.host_c, &gen->array[i]); fprintf(gen->cuda.host_c, ");\n"); -- 2.11.4.GIT