Mojo function
parallelize_over_rows
parallelize_over_rows[func: fn(Int, Int) capturing -> None](shape: StaticIntTuple[size], 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 (
StaticIntTuple[size]
): 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!
π What went wrong?