Re: [eigen] Intermediate Packet Storage |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
I'm no ARM expert, but I assume {d{2k}-d{2k+1}} is an alias for `q{k}`
Correct.
As I mentioned, my project requires GCC 5. I would be interested to
know if newer versions of ARM GCC have the same issue - but there
seems to be some issue with Eigen on newer versions, because godbolt
is giving me errors.
Yes, I have no idea about what causes this -- maybe some ARM expert can
chip in.
Thinking about it, I suppose the question is how to get an ARM SIMD
(e.g. int32x4_t) in to/out of a POD int32_t[4] array.
At the moment, Eigen implements this in NEON pload/ploudu using these
intrinsics:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0472k/chr1359125041077.html
And for storing:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0472k/chr1359125041077.html
So, if Eigen uses these intrinsics, I guess it's no surprise that this
results in the intructions we see. The problem is that I don't know how
else to load/store an int32x4_t into POD without using these intrinsics.
Perhaps there is a way.
Are you able to implement the above (or something similar) with pure
intrinsics?
Yes - the intermediate would be stored in a float32x4_t register in each
of these cases.
> If that is not possible, I'd see no way at all to do this with that
> compiler. If it is possible, I'd see some hope in implementing the
> previously mentioned Meta-Packets.
I guess one thought would be the syntax inspired by std::placeholders,
and boost::lambda:
using Eigen = E;
y = x.bind((E::_1 > 0.0f).select(E::sin(E::_1), E::cos(E::_1));
And if there were combined with std::tie inspired syntax you could do
multi-assignment one-liners:
E::tie(x, y) = E::tie(E::cos(a), E::cos(b))
.bind(E::_1 + E::_2, E::_1 - E::2);
Just a thought!
Thanks for you thoughts.
Joel