# What's the k in AoSoA?

**URL:** <https://pyfr.discourse.group/t/whats-the-k-in-aosoa/749>\
**Category:** Development\
**Tags:** backend\
**Created:** [8 February 2023 06:45 UTC](https://pyfr.discourse.group/t/whats-the-k-in-aosoa/749 "2023-02-08T06:45:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![luli](https://avatars.discourse-cdn.com/v4/letter/l/5f9b8f/32.png) [@luli](https://pyfr.discourse.group/u/luli)\
**Post date:** [8 February 2023 06:45 UTC](https://pyfr.discourse.group/t/whats-the-k-in-aosoa/749/1 "2023-02-08T06:45:44Z")

</div>

Hello, I have some trouble in understanding the format of AoSoA. From the introduction of pyfr data structure, I know that the memory arrangement of AoSoA is as shown in the figure.I guess the k in the picture corresponds to soasz on cuda platform, and its value is 32. Is that right?  
 ![image](https://global.discourse-cdn.com/free1/uploads/pyfr/original/1X/c351eb0a8db53e7d1eca1d564087bb9b9293646a.png)

---

<div class="post-metadata">

**Author:** ![fdw](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@fdw](https://pyfr.discourse.group/u/fdw)\
**Post date:** [8 February 2023 14:54 UTC](https://pyfr.discourse.group/t/whats-the-k-in-aosoa/749/2 "2023-02-08T14:54:24Z")

</div>

Yes; if you look at:

> <https://github.com/PyFR/PyFR/blob/83c972d7af2c8263f9dfe305a7889cfe3f8263c7/pyfr/backends/base/types.py#L36>

where:

> <https://github.com/PyFR/PyFR/blob/83c972d7af2c8263f9dfe305a7889cfe3f8263c7/pyfr/backends/base/types.py#L24>

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![luli](https://avatars.discourse-cdn.com/v4/letter/l/5f9b8f/32.png) [@luli](https://pyfr.discourse.group/u/luli)\
**Post date:** [7 March 2023 01:32 UTC](https://pyfr.discourse.group/t/whats-the-k-in-aosoa/749/3 "2023-03-07T01:32:52Z")

</div>

It seems this value equal to wrap size on cuda platform, so in hip platform this value should be 64?

---

<div class="post-metadata">

**Author:** ![fdw](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@fdw](https://pyfr.discourse.group/u/fdw)\
**Post date:** [7 March 2023 01:42 UTC](https://pyfr.discourse.group/t/whats-the-k-in-aosoa/749/4 "2023-03-07T01:42:00Z")

</div>

Yes, although some (consumer grade) HIP devices have a size of 32, rather than 64.

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![luli](https://avatars.discourse-cdn.com/v4/letter/l/5f9b8f/32.png) [@luli](https://pyfr.discourse.group/u/luli)\
**Post date:** [7 March 2023 04:31 UTC](https://pyfr.discourse.group/t/whats-the-k-in-aosoa/749/5 "2023-03-07T04:31:00Z")

</div>

Thank you very much!
