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
val ipiv = DenseVector(5,7,10,8,8,9,10,9,10,10)
val P_indices = (0::10).mutable
println("P_indices before: " )
P_indices.pprint
var i = 0
while (i < ipiv.length) {
val swap = P_indices(i)
P_indices(i) = P_indices(ipiv(i)-1)
P_indices(ipiv(i)-1) = swap
i += 1
}
println("P_indices after: " )
P_indices.pprint
The P_indices value will not be correctly updated unless there is an effect inside the while loop body like println(P_indices(i)) or changing "val swap" to "var swap". I tried various other things, like disabling fusion and SoA, and trying to hide the structness of P_indices (to see if struct rewrites were the problem), but nothing else worked.
Anyone have any idea what's going on?
The text was updated successfully, but these errors were encountered:
The following OptiML code triggers this bug:
The P_indices value will not be correctly updated unless there is an effect inside the while loop body like println(P_indices(i)) or changing "val swap" to "var swap". I tried various other things, like disabling fusion and SoA, and trying to hide the structness of P_indices (to see if struct rewrites were the problem), but nothing else worked.
Anyone have any idea what's going on?
The text was updated successfully, but these errors were encountered: