using "long double" in Parallel studio?

using "long double" in Parallel studio?

Hi all,How can I use the "long double" (80-bit) or some other equivalent under Parallel Composer under Visual C++ IDE?I add the /Qlong-double the command line options, but it reports that option is not valid.Can _Quad be used under specified enviroment?Thanks in advance.

5 帖子 / 0 全新
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项

Quoting artemmikheevgmail.comHi all, How can I use the "long double" (80-bit) or some other equivalent under Parallel Composer under Visual C++ IDE?..

It looks like simply impossible to set an 80-bitprecisionforthe built-in data type'long double' without a "special support"
from aC/C++ compiler. A sizeof( long double ) is 8, that is 64 bits, and I think at least128 bits are needed.
Isn't that correct?

Take a look at a'float.h'header file and you will see a set of defines like:

...
#define MCW_PC _MCW_PC
#define PC_24 _PC_24
#define PC_53 _PC_53
#define PC_64 _PC_64
...

PC stands for Precision Control.

If the documentation for /Qlong-double and /Qpc80 have been dropped from your version, it seems the option may have been removed. These options were problematical, as they weren't supported correctly in the Microsoft run-time libraries.
The original Parallel Studio dropped a few features of the separate ICL; now, I'm looking in the .chm file for Parallel Studio and can't find anything about either of those options, while the major features seem to have been restored, possibly removing the distinctions about Parallel Studio compiler.

Quoting TimP (Intel)If the documentation for /Qlong-double and /Qpc64 have been dropped from your version, it seems the option may have been removed.
These options were problematical, as they weren't supported correctly in the Microsoft run-time libraries...

I've done a verificationfor MinGW,Borland C++ (BCC) and Turbo C++ (TCC) compilers. Here are results:

MinGW -> sizeof( long double ) = 12 ( 96-bits in total /can support 80-bit precision / 2 extra bytes for alignment purposes instead of 10 bytes like in BCC or TCC)

BCC -> sizeof( long double ) = 10( 80-bits in total / can support 80-bit precision)

TCC -> sizeof( long double ) = 10( 80-bits in total / can support 80-bit precision)

However, this is whata 'float.h' header file from MinGW installation has:

...
#define_PC_240x00020000
#define_PC_530x00010000
#define_PC_640x00000000
...

and I didn't see adefinition like _PC_80. I suppose that MinGW developers started some work related to 80-bit precisionbut
it is not clear why it is not completed. Is there anybody who uses 80-bit precision with some C/C++ compiler?

Long double primitive is not supported by the Windows C/C++ compiler.It is only kept as a backward compatibility with the 16-bit programs.

发表评论

登录添加评论。还不是成员?立即加入