1

Specifics says:

__m128d _mm_sin_pd (__m128d a)
#include <immintrin.h>
CPUID Flags: SSE
Description
Compute the sine of packed double-precision (64-bit) floating-point elements in a expressed in radians, and store the results in dst.

But it seems it is not defined?

markzzz
  • 47,390
  • 120
  • 299
  • 507
  • That's not a normal intrinsic. It's part of the MKL. – Mysticial Jan 07 '19 at 16:25
  • @Mysticial: and why its listed as `CPUID Flags: SSE`? – markzzz Jan 07 '19 at 16:25
  • Sorry, I meant the SVML, not the MKL. Though they tend to come together as part of Intel's libraries. The CPUID flag only means that the hardware needs to support that ISA before you can call it. It doesn't say anything about it's availability to the compiler. – Mysticial Jan 07 '19 at 16:28

1 Answers1

3

This symbol has a blue header, that means it's part of SVML. Link against it to get the symbol, as the documentation requires it.

SVML will then dispatch the call to the most adequate implementation for your architecture.

Matthieu Brucher
  • 21,634
  • 7
  • 38
  • 62
  • And differs for accuracy I guess ;) Where can I download it? its part of... which Intel library? – markzzz Jan 07 '19 at 16:34
  • It's part of the Intel compiler. And yes, there different variations for accuracy and reproducibility, with less flags than for MKL. – Matthieu Brucher Jan 07 '19 at 16:35
  • Out of curiosity - when you mention 'blue header', what are you referring to? – SergeyA Jan 07 '19 at 16:35
  • The blue header of the row in the documentation. – Matthieu Brucher Jan 07 '19 at 16:35
  • I think you can also get SVML support with non-Intel compilers for free by installing the CPU-only SDK for OpenCL. – Paul R Jan 07 '19 at 16:43
  • Probably. I just know SVML for the Intel compiler, seems like there is also a GNU implementation from libmvec. – Matthieu Brucher Jan 07 '19 at 16:44
  • I'm not using G++, neither ICC. Is there a similar library which will works (and be almost accurate) for MSVC? Maybe, with also the support of function like `exp`... – markzzz Jan 07 '19 at 16:48
  • There is [sse_mathfun](http://gruntthepeon.free.fr/ssemath/) but I think that only supports single precision floats (which or may not be useful for your use case - do you have a good reason to use `double` rather than `float` ?). – Paul R Jan 08 '19 at 14:43
  • @Paul R yes, sometimes I need more precision, for some biquad filters – markzzz Jan 08 '19 at 20:05