# Could cuda.jl support @view in Kernel programming

**URL:** <https://discourse.julialang.org/t/could-cuda-jl-support-view-in-kernel-programming/76298>\
**Category:** GPU\
**Tags:** cuda\
**Created:** [February 12, 2022, 2:24pm UTC](https://discourse.julialang.org/t/could-cuda-jl-support-view-in-kernel-programming/76298 "2022-02-12T14:24:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![FkerYJ](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fkeryj/32/33750_2.png) [@FkerYJ](https://discourse.julialang.org/u/FkerYJ)\
**Post date:** [February 12, 2022, 2:24pm UTC](https://discourse.julialang.org/t/could-cuda-jl-support-view-in-kernel-programming/76298/1 "2022-02-12T14:24:36Z")

</div>

Is it possible to create a new array by seting an offset parameter indicating how many bytes to add to the base array pointer? To achieve the function of view in [Kernel programming](https://cuda.juliagpu.org/stable/api/kernel/#Kernel-programming)

---

<div class="post-metadata">

**Author:** ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Post date:** [February 14, 2022, 7:09am UTC](https://discourse.julialang.org/t/could-cuda-jl-support-view-in-kernel-programming/76298/2 "2022-02-14T07:09:55Z")

</div>

The `view` API doesn’t take a byte offset. You can accomplish the same though, e.g. by reinterpreting the array or correctly computing the view indices.
