allocaArray
Temporarily allocate space for the given number of elements (like
alloca, but for multiple elements).
Execute a computation on the device, passing a pointer to a
temporarily allocated block of memory sufficient to hold the given
number of elements of storable type. The memory is freed when the
computation terminates (normally or via an exception), so the pointer
must not be used after this.
Note that kernel launches can be asynchronous, so you may want to add
a synchronisation point using
sync as part of the continuation.
Execute a computation, passing a pointer to a temporarily allocated
block of memory sufficient to hold the given number of elements of
storable type. The memory is freed when the computation terminates
(normally or via an exception), so the pointer must not be used after
this.
Note that kernel launches can be asynchronous, so you may need to add
a synchronisation point at the end of the computation.
Like
allocaArray, but add an extra position to hold a special
termination element.