- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Linux 2.6.32
Intel compiler: icpc version 13.0.1 (gcc version 4.4.6 compatibility)
#include <iostream> #include <sys/types.h> int main() { std::cerr << sizeof (__uint128_t) << std::endl; return 0; } Output: 16
So, type __uint128_t exists. However, working with __uint128_t produces compilation and run errors.
Programs:
------------------ File int01.cpp #include <cstdint> int main() { uint128_t val128 = 0; return 0; }
------------------ File int02.cpp #include <cstdint> int main() { __uint128_t val128 = 0; return 0; }
------------------ File int03.cpp #include <iostream> #include <cstdint> int main() { __uint128_t val128 = 0; std::cerr << val128 << std::endl; return 0; }
Compilations:
> icpc int01.cpp /usr/include/c++/4.4.6/c++0x_warning.h(31): catastrophic error: #error directive: This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options. #error This file requires compiler and library support for the upcoming \ ^
compilation aborted for int01.cpp (code 4)
> icpc int01.cpp -std=c++0x int01.cpp(4): error: identifier "uint128_t" is undefined uint128_t val128 = 0; ^
compilation aborted for int01.cpp (code 2)
> icpc int02.cpp -std=c++0x // No errors
> icpc int03.cpp -std=c++0x
int03.cpp(6): error: more than one operator "<<" matches these operands: function "std::basic_ostream<_CharT, _Traits>::operator<<(long) [with _CharT=char, _Traits=std::char_traits<char>]" function "std::basic_ostream<_CharT, _Traits>::operator<<(unsigned long) [with _CharT=char, _Traits=std::char_traits<char>]" function "std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT=char, _Traits=std::char_traits<char>]" function "std::basic_ostream<_CharT, _Traits>::operator<<(short) [with _CharT=char, _Traits=std::char_traits<char>]" function "std::basic_ostream<_CharT, _Traits>::operator<<(unsigned short) [with _CharT=char, _Traits=std::char_traits<char>]" function "std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT=char, _Traits=std::char_traits<char>]" function "std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT=char, _Traits=std::char_traits<char>]" function "std::basic_ostream<_CharT, _Traits>::operator<<(long long) [with _CharT=char, _Traits=std::char_traits<char>]" function "std::basic_ostream<_CharT, _Traits>::operator<<(unsigned long long) [with _CharT=char, _Traits=std::char_traits<char>]" function "std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT=char, _Traits=std::char_traits<char>]" function "std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT=char, _Traits=std::char_traits<char>]" function "std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT=char, _Traits=std::char_traits<char>]" operand types are: std::ostream << __uint128_t std::cerr << val128 << std::endl; ^
compilation aborted for int03.cpp (code 2)
Link Copied
- « Previous
-
- 1
- 2
- Next »
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel(R) C++ Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 13.0.1.117 Build 20121010 Copyright (C) 1985-2012 Intel Corporation. All rights reserved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
int128_t doesn't appear in that copy of stdint.h nor in any I can find among my installations of gcc 4.4 or 4.8. I thought when I saw such things in the past it was treated as a case of __m128i. If it's done internal to gcc and not expressed in a header file, icc can't share it with gcc.
If gcc defines the usual arithmetic operations on such data types, it would appear to require support in libgcc. In a default build of libgcc, the only 128-bit data types are bid128.
http://gcc.gnu.org/onlinedocs/gcc/_005f_005fint128.html states that int128 support requires a matching long long int data type.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The __m128i is a container class for use with SSE (AVX). This container class partitions the 128-bit register (and memory storage thereof) into the working uints supported by the small vector instructions. Currently this does not include (unsigned/signed) integer classes of 128-bits for arithmatic operations. Logical operations can be performed as they do not produce a carry or borrow across bit fields.
At some future date AVX may be extended to support 128-bit integers and hopefully 128-bit floating point formats. At this time this is hopeful thinking.
There are extended precision as well as arbitrary precision libraries that are available.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »