Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
176 views

I know MultiArrayList supports tagged union, but it does it by converting it into struct containing untagged union and a tag field, effectively creating 2 ArrayList fields, one for union and the other ...
Krischal Khanal's user avatar
6 votes
1 answer
150 views

In the code below I could use convenient syntax of std::ranges::transform to copy values from array of structures (AoS) to structure of arrays (SoA) (in this example, just one vector). Is there a way ...
Damir Tenishev's user avatar
2 votes
2 answers
143 views

My current project requires a turbulence code that will use the velocity components of a fluid to advect a distribution of passive tracers. I have written a code below that uses a structure of arrays (...
ashwin's user avatar
  • 31
0 votes
0 answers
140 views

I have a Struct of Vectors that I'm trying to filter based off precomputed indices of out-of-scope particles for a particle-in-cell program. each index will be filtered as a group, so each resulting ...
Joshua Ferguson's user avatar
4 votes
0 answers
463 views

I've been trying to get up to speed on where we are taking advantage of vectorisation. Of course the answer to optimisation is always to profile, make a change and profile again but you don't ...
Bruce Adams's user avatar
  • 5,819
0 votes
2 answers
92 views

I have written a program which makes use of array of structures in order to maintain a sort of "database" program with different options that can be used to manipulate the "database&...
programmerc3981143's user avatar
2 votes
1 answer
232 views

I have a Structure of arrays using the declared type in Fortran e.g. type t_data integer :: N real, allocatable :: x(:) real, allocatable :: z(:) real, allocatable :: y(:) ...
ATK's user avatar
  • 1,546
4 votes
2 answers
918 views

I have implemented a collection class that converts a vector of tuples to a tuple of vectors (it is essentially an AOS to SOA conversion). This code works for this example of two template classes. I ...
motam79's user avatar
  • 3,904
-2 votes
1 answer
479 views

I have some trouble displaying the file I've read into an array of structure. This is my struct: struct Employee { char staffId[5]; char fullName[30]; char phoneNum[15]; char ...
Kate Karat's user avatar
-1 votes
3 answers
1k views

I'm trying to read a text file into an array of structure. I haven't figured out a way to input it into an array of structure yet but the problem with my code is that the output keeps looping. I'm new ...
Kate Karat's user avatar
1 vote
0 answers
148 views

Suppos I need to hold some data consisting of n Foo's, n Bars and n Bazs. The elements of corresponding indices are related, so you can also think of this data as n triplets of Foo, Bar andBaz`. The ...
einpoklum's user avatar
  • 138k