Mojo function
broadcast
broadcast[val_type: DType, simd_width: Int, //](val: SIMD[val_type, simd_width]) -> SIMD[val_type, simd_width]
Broadcasts a SIMD value across the warp.
Parameters:
- val_type (
DType
): The type of the SIMD value. - simd_width (
Int
): The width of the SIMD value.
Args:
- val (
SIMD[val_type, simd_width]
): The SIMD value to broadcast.
Returns:
A SIMD value with all lanes equal to the input value.
broadcast(val: Int) -> Int
Broadcasts an Int value across the warp.
Args:
- val (
Int
): The Int value to broadcast.
Returns:
An Int value with all lanes equal to the input value.
broadcast(val: UInt) -> UInt
Broadcasts a UInt value across the warp.
Args:
- val (
UInt
): The UInt value to broadcast.
Returns:
A UInt value with all lanes equal to the input value.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!