Mojo function
parallelize_over_rows
parallelize_over_rows[: origin.set, //, func: fn(Int, Int) capturing -> None](shape: IndexList[size, element_bitwidth=element_bitwidth, unsigned=unsigned], axis: Int, grain_size: Int)
Parallelize func over non-axis dims of shape.
Parameters:
- func (
fn(Int, Int) capturing -> None
): Function to call on range of rows.
Args:
- shape (
IndexList[size, element_bitwidth=element_bitwidth, unsigned=unsigned]
): Shape to parallelize over. - axis (
Int
): Rows are slices along the axis dimension of shape. - grain_size (
Int
): The minimum number of elements to warrant using an additional thread.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!