-m32 support for long int
see https://godbolt.org/z/7j7hVU for a minimal reproducer.
Do you need to use long or would int32_t also work?
Otherwise, I guess we could use sizeof(long) == 4 && std::is_signed<long> to map to int32_t or int64_t depending on the architecture.
Do you need to use long or would int32_t also work?
It's not about me, it's about xsimd :-) and my guess is that xsimd should support long.
Otherwise, I guess we could use sizeof(long) == 4 && std::is_signed
to map to int32_t or int64_t depending on the architecture.
Yes!
AFAIK, on 64bits architecure, long == int64, on 32 bits architecture sizeof(long) == 32 but long != int32_t. Also long is always signed.
So the easiest solution (the one I am implementing) is to have batch<int32_t, N> as the batch_type for long and add the load/store overloads in every batch for 32-bit ABI.
But unsigned long might not be signed?
Le 10 oct. 2018 13:29, "Johan Mabille" [email protected] a écrit :
AFAIK, on 64bits architecure, long == int64, on 32 bits architecture sizeof(long) == 32 but long != int32_t. Also long is always signed.
So the easiest solution (the one I am implementing) is to have batch<int32_t, N> as the batch_type for long and add the load/store overloads in every batch for 32-bit ABI.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/QuantStack/xsimd/issues/204#issuecomment-428537121, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2BPtYcALhUmulbzbLsx9F9sgrp3uZBks5ujdoCgaJpZM4XUov_ .
Indeed, unsigned long is unsigned, and will be mapped to uint32_t on 32-bit systems.
Doesn't seem to resolve all the cases: https://godbolt.org/z/9q5PnY
Let's reopen this.
The extra example, provided by @diorcety (hi btw o/) now passes once updated to 8.x API: https://godbolt.org/z/GEffvnGch