© 2026 Hedgehog Software, LLC
@mojo from algorithm.functional import vectorize fn matmul_tiled(inout C: Matrix, A: Matrix, B: Matrix): @parameter fn calc_row(m: Int): @parameter fn calc_tile[tile_x: Int, tile_y: Int](x: Int, y: Int): for k in range(y, y + tile_y): @parameter fn dot[nelts: Int](n: Int): C.store( m, n + x, C.load[nelts](m, n + x) + A[m, k] * B.load[nelts](k, n + x), ) vectorize[dot, nelts, size=tile_x]() tile[calc_tile, tile_n, tile_k](C.cols, B.rows) parallelize[calc_row](C.rows, C.rows)
vectorize[dot, nelts, size=tile_x]()
Cannot pass 'fn[Int](n = Int) capturing -> None' value, parameter expected 'Int'mojo