pub struct ThreadIdOperation<'c> { /* private fields */ }
Expand description
A thread_id
operation.
Returns the thread id, i.e. the index of the current thread within the block
along the x, y, or z dimension
.
Example:
%tIdX = gpu.thread_id x
Implementations§
source§impl<'c> ThreadIdOperation<'c>
impl<'c> ThreadIdOperation<'c>
sourcepub fn as_operation(&self) -> &Operation<'c>
pub fn as_operation(&self) -> &Operation<'c>
Returns a generic operation.
sourcepub fn builder(
context: &'c Context,
location: Location<'c>
) -> ThreadIdOperationBuilder<'c, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> ThreadIdOperationBuilder<'c, Unset>
Creates a builder.
pub fn dimension(&self) -> Result<Attribute<'c>, Error>
pub fn set_dimension(&mut self, value: Attribute<'c>)
Trait Implementations§
source§impl<'c> From<ThreadIdOperation<'c>> for Operation<'c>
impl<'c> From<ThreadIdOperation<'c>> for Operation<'c>
source§fn from(operation: ThreadIdOperation<'c>) -> Self
fn from(operation: ThreadIdOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for ThreadIdOperation<'c>
impl<'c> !Send for ThreadIdOperation<'c>
impl<'c> !Sync for ThreadIdOperation<'c>
impl<'c> Unpin for ThreadIdOperation<'c>
impl<'c> UnwindSafe for ThreadIdOperation<'c>
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