Struct krnl_core::kernel::Kernel

source ·
pub struct Kernel { /* private fields */ }
Available on target_arch="spirv" only.

Implementations§

source§

impl Kernel

source

pub fn global_threads(&self) -> usize

The number of global threads.

global_threads = groups * threads

source

pub fn global_id(&self) -> usize

The global thread id.

global_id = group_id * threads + thread_id

source

pub fn groups(&self) -> usize

The number of thread groups.

source

pub fn group_id(&self) -> usize

The group id.

source

pub fn subgroups(&self) -> usize

The number of subgroups per group.

source

pub fn subgroup_id(&self) -> usize

The subgroup id.

source

pub fn subgroup_thread_id(&self) -> usize

The subgroup thread id.

source

pub fn threads(&self) -> usize

The number of threads per group.

source

pub fn thread_id(&self) -> usize

The thread id.

Auto Trait Implementations§

§

impl Freeze for Kernel

§

impl RefUnwindSafe for Kernel

§

impl Send for Kernel

§

impl Sync for Kernel

§

impl Unpin for Kernel

§

impl UnwindSafe for Kernel

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.