loop specialization fix
sequence unrolling
update matrix using scalar index, smaller specialization for easier inlining