parallelize_over_rows
parallelize_over_rows[func: def(Int, Int) capturing -> None](shape: IndexList[shape.size, element_type=shape.element_type], axis: Int, grain_size: Int, ctx: Optional[DeviceContext] = None)
Parallelize func over non-axis dims of shape.
Parameters:
- func (
def(Int, Int) capturing -> None): Function to call on range of rows.
Args:
parallelize_over_rows[FuncType: def(Int, Int) register_passable -> None](func: FuncType, shape: IndexList[shape.size, element_type=shape.element_type], axis: Int, grain_size: Int, ctx: Optional[DeviceContext] = None)
Parallelize func over non-axis dims of shape.
Parameters:
- FuncType (
def(Int, Int) register_passable -> None): The body function type.
Args:
- func (
FuncType): The closure carrying the captured state of the body function. - shape (
IndexList): 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. - ctx (
Optional): Optional CPU DeviceContext to execute the work on.