-
Notifications
You must be signed in to change notification settings - Fork 65
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
Remove println
statements accompanying errors
#172
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Feel free to bump the patch version.
Great, done! |
Codecov Report
@@ Coverage Diff @@
## master #172 +/- ##
==========================================
+ Coverage 92.75% 94.67% +1.92%
==========================================
Files 32 32
Lines 4516 4511 -5
==========================================
+ Hits 4189 4271 +82
+ Misses 327 240 -87
Continue to review full report at Codecov.
|
I'll merge and issue another release once tests pass. |
Perhaps add a @test_throws LoadError @macroexpand @avx for i = 𝒶𝓍i
if i ∈ (axes)(var"𝛥≪rand(10)≫", 1)
var"𝛥≪rand(10)≫"[i] = var"𝛥≪rand(10)≫"[i] + 𝛥ℛ[i]
else
(zero)((eltype)(var"𝛥≪rand(10)≫"))
end
end ? |
Done. Assuming that this kind of if-else is something unlikely to ever work, I guess. It was just the first one I happened to pick up for quick tests locally. By the way, there isn't an AVX-friendly way of doing that, is there? I mean of testing some index & returning zero (or some other padding) out of bounds? Something like |
Yeah, maybe it's better to have a wonkier example now, but I figured it wouldn't be that bad to change it later.
There is, see here for an example. xim = i > ifirst ? x[Ipre, i-1, Ipost] : xi you'd want ((i >= first(axes(ys,1))) & (i <= last(axes(ys,1)))) ? ys[i] : 0.0 and that should work already. AVX has a masked move instruction: |
That looks great, thanks! Will try this out. |
This replaces
println(ex); throw(str)
with an error type, so that if macro expansion fails within a try-catch block, nothing is printed.Closes mcabbott/Tullio.jl#26
Example of new behaviour: