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
Create an @inbands to replicate the behaviour of @inbounds for the case where a user knows that the operation is inside the bands. This way the performance of @inbands A[k,j] should be equivalent to
@inbounds A.data[A.u + k - j +1, j]
The text was updated successfully, but these errors were encountered:
It looks like @inbounds is hard coded into inference.jl, so it's not possible to replicate it's behaviour.
I think it's OK to use @inbounds to mean inside the band. @inbounds implicitly implies that the user knows something about the data storage, so if the user uses @inbounds incorrectly, it's their own fault.
On second thought, this is a bad idea, as Base assumes @inbounds works for all indexes:
functioncopy!{T,N}(dest::AbstractArray{T,N}, src::AbstractArray{T,N})
@boundscheckcheckbounds(dest, indices(src)...)
for I ineachindex(linearindexing(src,dest), src)
@inbounds dest[I] = src[I]
end
dest
end
Create an
@inbands
to replicate the behaviour of@inbounds
for the case where a user knows that the operation is inside the bands. This way the performance of@inbands A[k,j]
should be equivalent toThe text was updated successfully, but these errors were encountered: