|
FireSync API
|
| 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.
| stream | Cuda stream. |
| outputArray | Receives output array. |
| templateArray | Input array, which may or may not already be device accessible. |
| objectAlloc | Object allocator to be used, if cloning is required. |
| valueAlloc | Data allocator to be used, if cloning is required (if kNULL, the device allocator will be used). |
| sync | Synchronization mode; if unspecified, mode is determined from default stream sync mode. |