Skip to content
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

Bounds check in vstore #51

Closed
nlw0 opened this issue Mar 16, 2019 · 4 comments · Fixed by #63
Closed

Bounds check in vstore #51

nlw0 opened this issue Mar 16, 2019 · 4 comments · Fixed by #63

Comments

@nlw0
Copy link
Contributor

nlw0 commented Mar 16, 2019

I noticed this line is commented on similar functions, with a "todo". Should this be the same case? In this about implementing some missing mechanism to allow @inbounds propagation to work?

@boundscheck 1 <= i <= length(arr) - (N-1) || throw(BoundsError())

@eschnett
Copy link
Owner

I have not carefully implemented bounds checking. SIMD should, of course, check array bounds by default, even if I expect most application code to opt out. A mechanism that ensures that @inbounds is working would be most appreciated.

@nlw0
Copy link
Contributor Author

nlw0 commented Mar 28, 2019

I hope I can try implementing this some day, but right now I see myself having to use my own patched package so I can comment this. Shouldn't this perhaps be made similar to the other functions while the mechanism isn't properly implemented? Or maybe we can make a separate function in order to keep this one with the check?

@eschnett
Copy link
Owner

@nlw0 I don't understand what you are suggesting.

@KristofferC
Copy link
Collaborator

Just make sure you use this inside a @inbounds block and the boundscheck goes away (actually probably not on master due to JuliaLang/julia#30411 but it should be fixed in #63)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants