function
unroll
unroll[func: fn[Int]() capturing -> None, count: Int]()
Repeatedly evaluates a function count
times.
Parameters:
- func (
fn[Int]() capturing -> None
): The function to evaluate. The function should take a singleInt
argument, which is the loop index value. - count (
Int
): A number of repetitions.
unroll[func: fn[Int]() raises capturing -> None, count: Int]()
Repeatedly evaluates a function count
times.
Parameters:
- func (
fn[Int]() raises capturing -> None
): The function to evaluate. The function should take a singleInt
argument, which is the loop index value. - count (
Int
): A number of repetitions.
unroll[func: fn[Int, Int]() capturing -> None, dim0: Int, dim1: Int]()
Repeatedly evaluates a 2D nested loop.
Parameters:
- func (
fn[Int, Int]() capturing -> None
): The function to evaluate. The function should take twoInt
arguments: the outer and inner loop index values. - dim0 (
Int
): The first dimension size. - dim1 (
Int
): The second dimension size.
unroll[func: fn[Int, Int, Int]() capturing -> None, dim0: Int, dim1: Int, dim2: Int]()
Repeatedly evaluates a 3D nested loop.
Parameters:
- func (
fn[Int, Int, Int]() capturing -> None
): The function to evaluate. The function should take threeInt
arguments: one for each nested loop index value. - dim0 (
Int
): The first dimension size. - dim1 (
Int
): The second dimension size. - dim2 (
Int
): The second dimension size.