pub struct Bindings {
pub buffers: Vec<Binding>,
pub metadata: MetadataBinding,
pub scalars: BTreeMap<Elem, ScalarBinding>,
pub tensor_maps: Vec<TensorMapBinding>,
}
Expand description
Bindings to execute a kernel.
Fields§
§buffers: Vec<Binding>
Buffer bindings
metadata: MetadataBinding
Packed metadata for tensor bindings (len, shape, stride, etc). Ordered by inputs, then outputs, then tensormaps
scalars: BTreeMap<Elem, ScalarBinding>
Scalar bindings
tensor_maps: Vec<TensorMapBinding>
Tensor map bindings
Implementations§
Source§impl Bindings
impl Bindings
Sourcepub fn with_buffer(self, binding: Binding) -> Bindings
pub fn with_buffer(self, binding: Binding) -> Bindings
Add a buffer binding
Sourcepub fn with_buffers(self, bindings: Vec<Binding>) -> Bindings
pub fn with_buffers(self, bindings: Vec<Binding>) -> Bindings
Extend the buffers with bindings
Sourcepub fn with_scalar(self, elem: Elem, length: usize, data: Vec<u64>) -> Bindings
pub fn with_scalar(self, elem: Elem, length: usize, data: Vec<u64>) -> Bindings
Add a scalar parameter
Sourcepub fn with_scalars(self, bindings: Vec<ScalarBinding>) -> Bindings
pub fn with_scalars(self, bindings: Vec<ScalarBinding>) -> Bindings
Extend the scalars with bindings
Sourcepub fn with_metadata(self, meta: MetadataBinding) -> Bindings
pub fn with_metadata(self, meta: MetadataBinding) -> Bindings
Set the metadata to meta
Sourcepub fn with_tensor_maps(self, bindings: Vec<TensorMapBinding>) -> Bindings
pub fn with_tensor_maps(self, bindings: Vec<TensorMapBinding>) -> Bindings
Extend the tensor maps with bindings
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Bindings
impl RefUnwindSafe for Bindings
impl Send for Bindings
impl Sync for Bindings
impl Unpin for Bindings
impl UnwindSafe for Bindings
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