- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
I am wondering if there is any way (flag, compiler option?) to force the Intel compiler to assume that all integers in a code are 64-bit integers. Is there any way? I would be thankful.
Regards,
Dan
I am wondering if there is any way (flag, compiler option?) to force the Intel compiler to assume that all integers in a code are 64-bit integers. Is there any way? I would be thankful.
Regards,
Dan
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No such supported compiler option in C or C++ (check the docs for equivalent ifort option). Usual way is to define such variables with a local type, e.g. MYINT64,MYUINT64 and use e.g.
#include
typedef int_64t MYINT64
typedef uint_64t MYUINT64
Apparently, the relevant standard headers may not be supported for 32-bit Windows (where you must make appropriate change to your typedef), but should be present in 64-bit VS2010 as well as many years of linux.
#include
typedef int_64t MYINT64
typedef uint_64t MYUINT64
Apparently, the relevant standard headers may not be supported for 32-bit Windows (where you must make appropriate change to your typedef), but should be present in 64-bit VS2010 as well as many years of linux.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting Om Sachan (Intel)
If you set the architecture x64 in Windows then all integers are set to 64 bit length.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm adding some information to Tim's first reply:
The best and standards conform (C99) solution is to use stdint.h. In your case you'd like to use types int_64t & uint_64t.
Older versions of Visual Studio (before 2010) don't have such a header.
However, the Intel compiler comes with this header included and hence you won't need to define your own types if you use it.
Thus using stdint.h with Intel compiler should be easy, reliable and even portable (e.g. from Windows to Linux). You only need to take care when using another compiler instead (depends on how this compiler conforms to C99 then).
Best Regards,
Georg
I'm adding some information to Tim's first reply:
The best and standards conform (C99) solution is to use stdint.h. In your case you'd like to use types int_64t & uint_64t.
Older versions of Visual Studio (before 2010) don't have such a header.
However, the Intel compiler comes with this header included and hence you won't need to define your own types if you use it.
Thus using stdint.h with Intel compiler should be easy, reliable and even portable (e.g. from Windows to Linux). You only need to take care when using another compiler instead (depends on how this compiler conforms to C99 then).
Best Regards,
Georg


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