Flattening of gpuArray - row major or column major order?
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Sofie Lovdal
il 18 Giu 2018
Commentato: Sofie Lovdal
il 19 Giu 2018
Dear Matlab experts,
I am having some unexpected results passing a 2D Matrix to a CUDA kernel via feval. I think the reason might have to do with the way Matlab flattens the array when passing it to the kernel, but this far I haven't found anything online that would confirm this. My CUDA kernel expects row-major order.
How does Matlab pass the array to the GPU? Does it flatten it with row-major order or column-major order?
Thankful for response!
0 Commenti
Risposta accettata
Edric Ellis
il 19 Giu 2018
gpuArray data is stored in column-major format, just like CPU data in MATLAB.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Loops and Conditional Statements in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!