Commit 40e64c21 authored by fenglei.tian's avatar fenglei.tian

fix get buffer bug

parent 763d448a
......@@ -501,7 +501,7 @@ void runtime::gpu::GPU_ExternalFunction::compile()
size_t temp_pool_size = current_function->get_temporary_pool_size();
writer << "// Allocate the memory pool\n";
// TODO memory pool malloc.
writer << "void** pool_base_ptr = runtime::gpu::create_gpu_buffer(" << temp_pool_size
writer << "void* pool_base_ptr = runtime::gpu::create_gpu_buffer(" << temp_pool_size
<< ");\n";
// Add temporaries to the variable name map
......
......@@ -47,10 +47,10 @@ void runtime::gpu::check_cuda_errors(CUresult err)
assert(err == CUDA_SUCCESS);
}
void** runtime::gpu::create_gpu_buffer(size_t buffer_size)
void* runtime::gpu::create_gpu_buffer(size_t buffer_size)
{
void** allocated_buffer_pool;
cudaMalloc(&allocated_buffer_pool, buffer_size);
void* allocated_buffer_pool;
cudaMalloc((void**) &allocated_buffer_pool, buffer_size);
return allocated_buffer_pool;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment