pub struct ShuffleOperation<'c> { /* private fields */ }
Expand description
A shuffle
operation. Shuffles values within a subgroup..
The “shuffle” op moves values to a different invocation within the same subgroup.
Example:
%1, %2 = gpu.shuffle %0, %offset, %width xor : f32
For lane k returns the value from lane k ^ offset
and true
if that lane
is smaller than %width. Otherwise it returns an unspecified value and
false
. A lane is the index of an invocation relative to its subgroup.
The width specifies the number of invocations that participate in the
shuffle. The width needs to be the same for all invocations that participate
in the shuffle. Exactly the first width
invocations of a subgroup need to
execute this op in convergence.
Implementations§
source§impl<'c> ShuffleOperation<'c>
impl<'c> ShuffleOperation<'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>
) -> ShuffleOperationBuilder<'c, Unset, Unset, Unset, Unset, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> ShuffleOperationBuilder<'c, Unset, Unset, Unset, Unset, Unset, Unset>
Creates a builder.
pub fn shuffle_result(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn valid(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn value(&self) -> Result<Value<'c, '_>, Error>
pub fn offset(&self) -> Result<Value<'c, '_>, Error>
pub fn width(&self) -> Result<Value<'c, '_>, Error>
pub fn mode(&self) -> Result<Attribute<'c>, Error>
pub fn set_mode(&mut self, value: Attribute<'c>)
Trait Implementations§
source§impl<'c> From<ShuffleOperation<'c>> for Operation<'c>
impl<'c> From<ShuffleOperation<'c>> for Operation<'c>
source§fn from(operation: ShuffleOperation<'c>) -> Self
fn from(operation: ShuffleOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for ShuffleOperation<'c>
impl<'c> !Send for ShuffleOperation<'c>
impl<'c> !Sync for ShuffleOperation<'c>
impl<'c> Unpin for ShuffleOperation<'c>
impl<'c> UnwindSafe for ShuffleOperation<'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