Skip to main content

Wave

Struct Wave 

Source
pub struct Wave {
    pub threads: Vec<Thread>,
    pub pc: u32,
    pub active_mask: u64,
    pub status: WaveStatus,
    pub wave_width: u32,
    pub wave_id: u32,
    pub control_flow: ControlFlowManager,
    /* private fields */
}

Fields§

§threads: Vec<Thread>§pc: u32§active_mask: u64§status: WaveStatus§wave_width: u32§wave_id: u32§control_flow: ControlFlowManager

Implementations§

Source§

impl Wave

Source

pub fn new( wave_width: u32, register_count: u32, wave_id: u32, workgroup_id: [u32; 3], workgroup_size: [u32; 3], grid_size: [u32; 3], base_thread_index: u32, total_threads_in_workgroup: u32, num_waves: u32, ) -> Self

Source

pub fn is_thread_active(&self, lane: u32) -> bool

Source

pub fn active_thread_count(&self) -> u32

Source

pub fn set_thread_active(&mut self, lane: u32, active: bool)

Source

pub fn push_call(&mut self, return_pc: u32) -> Result<(), &'static str>

Source

pub fn pop_call(&mut self) -> Option<u32>

Source

pub fn call_depth(&self) -> usize

Source

pub fn halt(&mut self)

Source

pub fn suspend(&mut self)

Source

pub fn resume(&mut self)

Source

pub fn is_halted(&self) -> bool

Source

pub fn is_ready(&self) -> bool

Source

pub fn advance_pc(&mut self, bytes: u32)

Source

pub fn set_pc(&mut self, pc: u32)

Trait Implementations§

Source§

impl Debug for Wave

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Wave

§

impl RefUnwindSafe for Wave

§

impl Send for Wave

§

impl Sync for Wave

§

impl Unpin for Wave

§

impl UnsafeUnpin for Wave

§

impl UnwindSafe for Wave

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>,

Source§

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>,

Source§

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.