You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let iota_2d (n: i64) : [n][n](i64, i64) =
tabulate_2d n n (\i j -> (i, j))
let first_anti_diag [n] 't (i: i64) (xs: [n][n]t) =
if i >= 0 then
xs
|> flatten
|> (.[i:n * i + 1:n - 1])
else []
let process_block [b]
(prev_anti_diag: [][b][b]i32)
(block: [b][b]i32)
(i: i64) : *[b][b]i32 =
let inds = tabulate b (\tx -> (tx, tx))
let vals = tabulate b (\tx -> prev_anti_diag[i, tx - 1, b - 1])
in scatter_2d (copy block) inds vals
let main [b][num_blocks] (i: i64) (matb: *[num_blocks][num_blocks][b][b]i32) =
#[unsafe]
let ip1 = i + 1
let res = map2 (process_block (first_anti_diag (i - 1) matb))
(first_anti_diag i matb :> [ip1][b][b]i32)
(iota ip1)
in scatter_2d matb (iota_2d num_blocks |> first_anti_diag i :> [ip1](i64, i64)) res
My guess is that we're not being careful about the aliases of that if expression.
The text was updated successfully, but these errors were encountered:
My guess is that we're not being careful about the aliases of that
if
expression.The text was updated successfully, but these errors were encountered: