pub struct Kernel {
pub id: usize,
pub device: Device,
pub name: String,
pub descriptor: KernelDescriptor,
pub handle: KernelHandle,
pub metadata: KernelMetadata,
}Expand description
Compute kernel handle
Fields§
§id: usizeUnique kernel ID
device: DeviceDevice this kernel is compiled for
name: StringKernel name
descriptor: KernelDescriptorKernel descriptor used for creation
handle: KernelHandleBackend-specific handle
metadata: KernelMetadataKernel metadata
Implementations§
Source§impl Kernel
impl Kernel
Sourcepub fn new(
id: usize,
device: Device,
name: String,
descriptor: KernelDescriptor,
handle: KernelHandle,
metadata: KernelMetadata,
) -> Self
pub fn new( id: usize, device: Device, name: String, descriptor: KernelDescriptor, handle: KernelHandle, metadata: KernelMetadata, ) -> Self
Create a new kernel
Sourcepub fn metadata(&self) -> &KernelMetadata
pub fn metadata(&self) -> &KernelMetadata
Get kernel metadata
Sourcepub fn handle(&self) -> &KernelHandle
pub fn handle(&self) -> &KernelHandle
Get backend-specific handle
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Kernel
impl !RefUnwindSafe for Kernel
impl Send for Kernel
impl Sync for Kernel
impl Unpin for Kernel
impl UnsafeUnpin for Kernel
impl !UnwindSafe for Kernel
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more