hey so ur in row-major form and this works \`\`\` for k in 0..n { let krow = k \* n; let mut p = k; let mut scl = m\krow + k\]; { let mut irow = krow; for i in k + 1..n { irow += n; let cur\_s = m\[irow + k\]; if cur\_s.abs() > scl.abs() { p = i; scl = cur\_s; } } } \`\`\`
but lets abstract out a little bit, u get like \~ 8 numbers in as u scan as u go down the rows, u essentially want to find a way to find the orders, for the pivots dependent upon their values in that column... so something like this would work \`\`\` type Row: usize; type Val: usize; let mut super\_heap: Vec<MaxHeap<(Row, Val)>>; let mut seen = HashSet<Row>;
for p in thing { let r = super\_heap.pop().unwrap(); if super\_heap.insert(r) { // do processing else already contains } }
\`\`\`
is there something better than super-heap? where i can jump row offsets in row-major form but utilize other vals for rankings that isn't as oof as my super-heap alternative?
i'm optimizing my LU, but i hate the pivoting code, is there something i'm not seeing (besides my obvious ikj cache locality issues i'm still fixing with workspace, like specifically with pivoting?)