-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using @threads works, using @batch has no effect #138
Comments
Could you try it with @batch _j = 0:n-1
j = n - _j
# rest of code
end ? |
Interesting. With your suggested edit, it works correctly. Note also that with my original code, I occasionally get an error:
|
Not handling step ranges with negative steps is a bug. Threading means there is no guaranteed order, so it isn't iterating backwards. Just use |
Hah, you're right, reverse iteration is unnecessary anyway. In the context of multithreading, it doesn't even make sense, as you pointed out. However, if we computed in-place (gradually replacing Thanks! |
The following function
computes the inverse of an upper-triangular matrix. If X is not square, it is assumed that it represents a larger square matrix, by extending (
hcat
orvcat
) by the identity matrix. We can see it works correctly, sincereturns
However, replacing
Threads.@threads
byPolyester.@batch
results in matrixXi
being zero. So something isn't right here.Btw, this was run with
Polyester v0.7.10
onJulia 1.9.2
inLinux Mint 20
.The text was updated successfully, but these errors were encountered: