Reputation: 1125
I have multiple arrays as separate fields, when I join them together, somehow an specific column gets switched with another column strangely.
All columns have proper data on their own, but shuffled when joined. I also used af::eval but didn't fix the issue. And notice that this is completely random, sometimes if I comment the print lines it works! (It's OK with the CPU backend)
Info: ArrayFire v3.9.0 using unified backend as CUDA.
Upvotes: 0
Views: 17
Reputation: 16
I had a similar issue where the cuda backend was jumbling my data. I'm not sure if there is a performance penalty for my solution, but the following worked for me.
const auto dim0 = transformedPc1.dims(0) + transformedPc2.dims(0);
return af::moddims(af::join(0, af::flat(transformedPc1), af::flat(transformedPc2)), af::dim4(dim0, 3));
Basically, I flatten both of the arrays first, then join them. After joining I modify the dimensions to match what I had before. Hopefully this help!
Upvotes: 0