Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change DeviceArray.__iter__ and DeviceArray.__reversed__ to forward t…
…o the _value. This has the effect of transferring the entire array to the host and iterating over it in host memory, rather than slicing out individual elements in device memory one by one. This is much faster for examples like `list(np.arange(10000))`; previously this took several seconds the first time due to compilation and 100ms+ subsequent times. With this change it takes < 1ms.
- Loading branch information