The HPC Compiler Reference manual, section 1.2, suggests that C/C++ supports the unsigned __int128
type. I’ve tried compiling the following test program with nvhpc/21.11+gcc/9.40 and nvhpc/21.9+gcc/8.3.0, and get compilation errors on both versions, although the respective g++ compiles work fine:
int main() {
using uint128_t = unsigned __int128;
uint128_t foo = static_cast<uint128_t>(2UL);
return 0;
}
The compilation error is:
"/home/phenning/uint128.cc", line 2: error: expected a ";"
using uint128_t = unsigned __int128;
^
which suggests to me that the compiler doesn’t recognize __int128
. This is for Linux_x86_64, running on a Cascade Lake node. Am I missing something?
Thanks!