plane_shuffle_xor

Function plane_shuffle_xor 

Source
pub fn plane_shuffle_xor<E: CubePrimitive>(value: E, mask: u32) -> E
Expand description

Perform a shuffle XOR operation across the plane. Each unit exchanges its value with another unit at an index determined by XOR with the mask. This is useful for butterfly reduction patterns.

ยงExample

For a 32-lane warp with mask=1:

  • Lane 0 gets value from lane 1, lane 1 gets value from lane 0
  • Lane 2 gets value from lane 3, lane 3 gets value from lane 2
  • etc.