fixed out-of-bounds handling
fixed out-of-bounds handling

[git-p4: depot-paths = "//sw/gpgpu/nvbio/main/": change = 18312703]

kimrutherford/nvbio,NVlabs/nvbio,kimrutherford/nvbio,NVlabs/nvbio,NVlabs/nvbio,kimrutherford/nvbio,NVlabs/nvbio,kimrutherford/nvbio