pub struct KernelArguments {
pub buffers: Vec<Binding>,
pub info: MetadataBindingInfo,
pub tensor_maps: Vec<TensorMapBinding>,
}Expand description
Arguments to execute a kernel.
Fields§
§buffers: Vec<Binding>Buffer bindings
info: MetadataBindingInfoPacked scalars and metadata. First scalars sorted by type, then static metadata, then dynamic metadata.
tensor_maps: Vec<TensorMapBinding>Tensor map bindings
Implementations§
Source§impl KernelArguments
impl KernelArguments
Sourcepub fn new() -> KernelArguments
pub fn new() -> KernelArguments
Create a new bindings struct
Sourcepub fn with_buffer(self, binding: Binding) -> KernelArguments
pub fn with_buffer(self, binding: Binding) -> KernelArguments
Add a buffer binding
Sourcepub fn with_buffers(self, bindings: Vec<Binding>) -> KernelArguments
pub fn with_buffers(self, bindings: Vec<Binding>) -> KernelArguments
Extend the buffers with bindings
Sourcepub fn with_info(self, info: MetadataBindingInfo) -> KernelArguments
pub fn with_info(self, info: MetadataBindingInfo) -> KernelArguments
Set the info to info
Sourcepub fn with_tensor_maps(
self,
bindings: Vec<TensorMapBinding>,
) -> KernelArguments
pub fn with_tensor_maps( self, bindings: Vec<TensorMapBinding>, ) -> KernelArguments
Extend the tensor maps with bindings
Trait Implementations§
Source§impl Debug for KernelArguments
impl Debug for KernelArguments
Source§impl Default for KernelArguments
impl Default for KernelArguments
Source§fn default() -> KernelArguments
fn default() -> KernelArguments
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for KernelArguments
impl !RefUnwindSafe for KernelArguments
impl Send for KernelArguments
impl Sync for KernelArguments
impl Unpin for KernelArguments
impl UnsafeUnpin for KernelArguments
impl !UnwindSafe for KernelArguments
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more