pub struct SubgroupReduceOperation<'c> { /* private fields */ }
Expand description
A subgroup_reduce
operation. Reduce values among subgroup..
The subgroup_reduce
op reduces the value of every work item across a
subgroup. The result is equal for all work items of a subgroup.
Example:
%1 = gpu.subgroup_reduce add %0 : (f32) -> (f32)
If uniform
flag is set either none or all work items of a subgroup
need to execute this op in convergence.
Implementations§
source§impl<'c> SubgroupReduceOperation<'c>
impl<'c> SubgroupReduceOperation<'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>
) -> SubgroupReduceOperationBuilder<'c, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> SubgroupReduceOperationBuilder<'c, Unset, Unset>
Creates a builder.
pub fn value(&self) -> Result<Value<'c, '_>, Error>
pub fn op(&self) -> Result<Attribute<'c>, Error>
pub fn set_op(&mut self, value: Attribute<'c>)
pub fn uniform(&self) -> Result<Attribute<'c>, Error>
pub fn set_uniform(&mut self, value: Attribute<'c>)
pub fn remove_uniform(&mut self) -> Result<(), Error>
Trait Implementations§
source§impl<'c> From<SubgroupReduceOperation<'c>> for Operation<'c>
impl<'c> From<SubgroupReduceOperation<'c>> for Operation<'c>
source§fn from(operation: SubgroupReduceOperation<'c>) -> Self
fn from(operation: SubgroupReduceOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for SubgroupReduceOperation<'c>
impl<'c> !Send for SubgroupReduceOperation<'c>
impl<'c> !Sync for SubgroupReduceOperation<'c>
impl<'c> Unpin for SubgroupReduceOperation<'c>
impl<'c> UnwindSafe for SubgroupReduceOperation<'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