Thursday 1 June 2017

What is the use of cudaMalloc() function and what arguments does it accept?


                         Function cudaMalloc() is provided by header file cuda.h. It is used to dynamically allocate memory from GPU (global memory) to the pointers. 

Syntax: cudaMalloc(Address of Pointer variable, Size of memory to be allocated)

e.g. cudaMalloc((void **)&d, 6*sizeof(int));

No comments:

Post a Comment