Just a quick clarification on the @inbounds macro: I've seen it used both 
before and inside loops, like:

@inbounds for i = 1:1000
  a = x[i]
  b = z[i]
end

inbounds for i = 1:1000
  @inbounds a = x[i]
  @inbounds b = z[i]
end

Would I be correct in assuming that both usages are valid and working and 
that the choice between the two basically boils down to whether I want to 
turn off bounds checking inside the entire loop (first case) or only for 
certain lines within the loop (second case)?


Reply via email to