- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you in advance
I was trying to compile a code where I have:
[bash]typedef int int128_t __attribute__((mode(TI)));
typedef unsigned int uint128_t __attribute__((mode(TI)));[/bash]
Is there anyway to fix this, usingsomething like
[bash]#ifdef __INTEL_COMPILER && __x86_64[/bash]
so it's compilable with icc?
Thank you in advance
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No one can guess the extent of modifications required to make this change without seeing the source code. This is a typical consequence of using extensions supported by only a few compilers.
At the point of the definition you would simply replace the special gcc data type by one of those present in xmmintrin.h .
#if defined(__INTEL_COMPILER) && defined(__SSE2__)
#include "xmmintrin.h"
__m128 definitions
#elif defined(__GNUC__)
int128_t definitions
#else
take care of other platforms
#endif
xmmintrin.h should be supported by your gcc as well, since you are compiling for x86_64 (you would need -march=pentium4 or such for it to work in 32-bit mode).
I would hate to maintain code which makes a wholesale replacement of int types by compiler-dependent types. icc should support int64_t, in case that helps.
At the point of the definition you would simply replace the special gcc data type by one of those present in xmmintrin.h .
#if defined(__INTEL_COMPILER) && defined(__SSE2__)
#include "xmmintrin.h"
__m128 definitions
#elif defined(__GNUC__)
int128_t definitions
#else
take care of other platforms
#endif
xmmintrin.h should be supported by your gcc as well, since you are compiling for x86_64 (you would need -march=pentium4 or such for it to work in 32-bit mode).
I would hate to maintain code which makes a wholesale replacement of int types by compiler-dependent types. icc should support int64_t, in case that helps.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Until you get a better answer, I think icc supports only the __m128 and __u128 data types for 128-bit objects. I suppose the __INTEL_COMPILER and __SSE2__ predefined macros might be used for conditional compilation to decide which syntax to use. I noticed that __SSE2__ is available in gcc and Open64 C compilers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't mind to assume SSE2 and 64bits.
Could you tell me how would you rewrite those lines to use those data types?
I wasn't the one who coded this part and I really don't know much about this kind of stuff.
Could you tell me how would you rewrite those lines to use those data types?
I wasn't the one who coded this part and I really don't know much about this kind of stuff.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No one can guess the extent of modifications required to make this change without seeing the source code. This is a typical consequence of using extensions supported by only a few compilers.
At the point of the definition you would simply replace the special gcc data type by one of those present in xmmintrin.h .
#if defined(__INTEL_COMPILER) && defined(__SSE2__)
#include "xmmintrin.h"
__m128 definitions
#elif defined(__GNUC__)
int128_t definitions
#else
take care of other platforms
#endif
xmmintrin.h should be supported by your gcc as well, since you are compiling for x86_64 (you would need -march=pentium4 or such for it to work in 32-bit mode).
I would hate to maintain code which makes a wholesale replacement of int types by compiler-dependent types. icc should support int64_t, in case that helps.
At the point of the definition you would simply replace the special gcc data type by one of those present in xmmintrin.h .
#if defined(__INTEL_COMPILER) && defined(__SSE2__)
#include "xmmintrin.h"
__m128 definitions
#elif defined(__GNUC__)
int128_t definitions
#else
take care of other platforms
#endif
xmmintrin.h should be supported by your gcc as well, since you are compiling for x86_64 (you would need -march=pentium4 or such for it to work in 32-bit mode).
I would hate to maintain code which makes a wholesale replacement of int types by compiler-dependent types. icc should support int64_t, in case that helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page