FireSync API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kStatus kCudaUtils_Allocate ( kCudaStream  stream,
kAlloc  alloc,
kSize  size,
void *  mem,
kCudaSync  sync = kCUDA_SYNC_DEFAULT 
)

Allocates a block of memory and attaches it to the specified stream.

For serial managed memory, the buffer will be attached to the stream; for all other memory types, this method is equivalent to kAlloc_Get.

Parameters
streamStream to which memory should be initially attached.
allocAllocator object.
sizeSize of memory to allocate, in bytes.
memReceives pointer to allocated memory (pointer to a pointer).
syncSynchronization mode; if unspecified, mode is determined from default stream sync mode.
Returns
Operation status.