# Initializing CuArrays

**URL:** <https://discourse.julialang.org/t/initializing-cuarrays/27976>\
**Category:** General Usage\
**Tags:** cudanative, gpuarrays, cuda, array\
**Created:** [August 25, 2019, 11:24pm UTC](https://discourse.julialang.org/t/initializing-cuarrays/27976 "2019-08-25T23:24:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wiktorkujawa](https://avatars.discourse-cdn.com/v4/letter/w/bc8723/32.png) [@wiktorkujawa](https://discourse.julialang.org/u/wiktorkujawa)\
**Post date:** [August 25, 2019, 11:24pm UTC](https://discourse.julialang.org/t/initializing-cuarrays/27976/1 "2019-08-25T23:24:39Z")

</div>

How to initialize this type of array:  
`ArrayName=cu(fill([0.0f0,0.0f0],(20,20,5)))`,  
I don’t want to use Tuples because there are too many problems with math operations doing on them(they can’t for example increment and work with `@atomic` statements).  
I mean I can do something like

```julia
ArrayName=cu(fill((0.0f0,0.0f0),(20,20,5)));
#in @cuda kernel
@atomic ArrayName[Index]= ArrayName[Index].+SomeDataValues

```

, but I get undefined operation error, when I use it that way. So i would prefer using Arrays of Array:

```julia
ArrayName=cu(fill((0.0f0,0.0f0),(20,20,5)));
@atomic ArrayName[Index]+=SomeDataValues

```

I know that the easiest way is to double Arrays(I mean to create two single Arrays instead of double one), but it would be slower and I would have to duplicate code.
