# Question about coalesced read and write to the global memory using CUDA.jl 2D grid

**URL:** https://discourse.julialang.org/t/question-about-coalesced-read-and-write-to-the-global-memory-using-cuda-jl-2d-grid/97689
**Category:** GPU
**Tags:** question
**Created:** [April 20, 2023, 9:05am UTC](https://discourse.julialang.org/t/question-about-coalesced-read-and-write-to-the-global-memory-using-cuda-jl-2d-grid/97689 "2023-04-20T09:05:07Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [April 20, 2023, 8:02pm UTC](https://discourse.julialang.org/t/question-about-coalesced-read-and-write-to-the-global-memory-using-cuda-jl-2d-grid/97689/2 "2023-04-20T20:02:22Z")

</div>

The general rule of thumb is that consecutive threads should access consecutive memory locations; see [CuArray is Row Major or Column Major? - #2 by maleadt](https://discourse.julialang.org/t/cuarray-is-row-major-or-column-major/7402/2) for a similar question.

---

_[View the full topic](https://discourse.julialang.org/t/question-about-coalesced-read-and-write-to-the-global-memory-using-cuda-jl-2d-grid/97689)._
