pub struct LocalBuffer<T> { /* private fields */ }
Expand description
A buffer on the GPU.
The concept of a local buffer is from OpenCL. In CUDA you don’t allocate a buffer directly
via API call. Instead you pass in the amount of shared memory that should be used.
There can be at most a single local buffer per kernel. On CUDA a null pointer will be passed
in, instead of an actual value. The memory that should get allocated is then passed into the
kernel call automatically.
Returns a new buffer of the specified length
.
Formats the value using the given formatter.
Read more
Converts into a C void pointer.
Returns the shared memory size. This is usally 0, except for
LocalBuffer
s. This
informations is used to allocate the memory correctly.
Apply the kernel argument to the kernel.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.