pub struct KernelBuilder {
pub context: Scope,
/* private fields */
}
Expand description
Prepare a kernel to create a kernel definition.
Fields§
§context: Scope
Cube scope.
Implementations§
Source§impl KernelBuilder
impl KernelBuilder
Sourcepub fn scalar(&mut self, elem: Elem) -> ExpandElement
pub fn scalar(&mut self, elem: Elem) -> ExpandElement
Register a scalar and return the element to be used for kernel expansion.
Sourcepub fn output_tensor(&mut self, item: Item) -> ExpandElement
pub fn output_tensor(&mut self, item: Item) -> ExpandElement
Register an output array and return the element to be used for kernel expansion.
Sourcepub fn tensor_map(&mut self) -> ExpandElement
pub fn tensor_map(&mut self) -> ExpandElement
Register a tensor map and return the element to be used for kernel expansion.
Sourcepub fn input_tensor(&mut self, item: Item) -> ExpandElement
pub fn input_tensor(&mut self, item: Item) -> ExpandElement
Register an input array and return the element to be used for kernel expansion.
Sourcepub fn output_array(&mut self, item: Item) -> ExpandElement
pub fn output_array(&mut self, item: Item) -> ExpandElement
Register an output array and return the element to be used for kernel expansion.
Sourcepub fn inplace_output(&mut self, position: Id) -> ExpandElement
pub fn inplace_output(&mut self, position: Id) -> ExpandElement
Register an output that uses the same resource as the input as the given position.
Sourcepub fn input_array(&mut self, item: Item) -> ExpandElement
pub fn input_array(&mut self, item: Item) -> ExpandElement
Register an input array and return the element to be used for kernel expansion.
Sourcepub fn build(self, settings: KernelSettings) -> KernelDefinition
pub fn build(self, settings: KernelSettings) -> KernelDefinition
Build the kernel definition.
pub fn new() -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KernelBuilder
impl !RefUnwindSafe for KernelBuilder
impl !Send for KernelBuilder
impl !Sync for KernelBuilder
impl Unpin for KernelBuilder
impl !UnwindSafe for KernelBuilder
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