OS: Linux (Debian 10)
CC: GCC 8.3
CPU: i7-5775C
There is a unsigned __int128
/__int128
in GCC, but is there any way to have a uint256_t
/int256_t
in GCC?
I have read of a __m256i
which seems to be from Intel. Is there any header that I can include to get it?
Is it as usable as a hypothetic unsigned __int256
? I mean if you can assign from/to it, compare them, bitwise operations, etc.
What is its signed equivalent (if any)?
EDIT 1:
I achieved this:
#include <immintrin.h>
typedef __m256i uint256_t;
and compiled. If I can do some operations with it, I'll update it here.
EDIT 2:
Issues found:
uint256_t m;
int l = 5;
m = ~((uint256_t)1 << l);
ouput:
error: can’t convert a value of type ‘int’ to vector type ‘__vector(4) long long int’ which has different size
m = ~((uint256_t)1 << l);