- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was sure that this is supported in older version but whenever I use a sincos function now (sincos(float v,float *sinv,float *cosv)), I get an undefined function error by the compiler.
Is it really dropped?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It may be worth knowing that the Intel compiler will automatically generate __svml_sincosf8..() when a sin() and cos() is used on the same value. This optimization happens on O2 and O3 and does not need to be explicitly programmed in the source.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm guessing that you are using a linux or MAC compiler and relying on C++ support in glibc or MSVC library. Your man page on sincos and sincosf ought to discuss the supported ways of calling the function directly.
If I'm guessing wrong, a little more information from you would be helpful, such as the exact wording of the error.
I think standard compliant use of cosf() and sinf() may be more reliable, Compilers look for opportunities to combine them into a single sincos call, possibly a short vector version.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nop, I am talking about Visual Studio + XE Composer 15. I thought that sincosf was a library function (not coming from MSVC library, it is not available there) since I had this working with older compiler (11.1 series). But... I may be wrong and had it somewhere defined myself that I overlooked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
MSDN describes sincosf but C++11 has changed implementation of some forms of mixed data type math functions, so it's probably better to adhere strictly to what is described in documents. I wouldn't count on not specifying /Qstd=c++11 as a way of retaining the older interpretation of math functions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great, thank you for the explanation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As described in MSDN sincos is part of DirectX HLSL intrinsic functions.
- 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
It may be worth knowing that the Intel compiler will automatically generate __svml_sincosf8..() when a sin() and cos() is used on the same value. This optimization happens on O2 and O3 and does not need to be explicitly programmed in the source.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
RICHARD A. (Intel) wrote:
It may be worth knowing that the Intel compiler with automatically generate __svml_sincosf8..() when a sin() and cos() is used on the same value. This optimization happens on O2 and O3 and does not need to be explicated programed in the source.
I alluded to this in #2, without specifically mentioning the ICL options. If options such as /fp:source are set, /Qfast-transcendentals would need to be set as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you all for the clarifications.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page