Moving an assert out of for loop (perf optimization) and adding back a declartion of a CudaNdarray_inplace_add