FireSync API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kStatus kCudaUtils_ConstructArrayFromTemplate ( kCudaStream  stream,
kArrayProvider outputArray,
kArrayProvider  templateArray,
kAlloc  objectAlloc = kNULL,
kAlloc  valueAlloc = kNULL,
kCudaSync  sync = kCUDA_SYNC_DEFAULT 
)

Constructs an array object, using a template object to determine properties.

This method is typically used to allocate an uninitialized array that is suitable to hold the result of a computation in device memory. However, any type of value allocator may be used.

If serial managed memory is allocated by this method, it will be automatically attached to the stream.

Parameters
streamCuda stream.
outputArrayReceives output array.
templateArrayInput array, which may or may not already be device accessible.
objectAllocObject allocator to be used, if cloning is required.
valueAllocData allocator to be used, if cloning is required (if kNULL, the device allocator will be used).
syncSynchronization mode; if unspecified, mode is determined from default stream sync mode.
Returns
Operation status.