On Jan 21, 2015, at 10:08 , Nils Gudat <[email protected]> wrote: > > Thanks for the clarifications, although Erik's points lead me to a follow-up > question (two, actually): When you say "everything that follows", does this > extend to nested loops? I.e., do I need to write: > > @inbounds for i = 1:1000 > @inbounds for j = 1:1000 > a = x[i,j] > end > end > > or just > > @inbounds for i = 1:1000 > for j = 1:1000 > a = x[i,j] > end > end > > ?
Those two are equivalent. `@inbounds` switches Julia to a no-bounds-checking mode, and it switches back only when the end of the (original) `@inbounds` construct is reached. -erik -- Erik Schnetter <[email protected]> http://www.perimeterinstitute.ca/personal/eschnetter/ My email is as private as my paper mail. I therefore support encrypting and signing email messages. Get my PGP key from https://sks-keyservers.net.
signature.asc
Description: Message signed with OpenPGP using GPGMail
