3 ms·
I don’t know why authors of GCC invented that non-standard extended C dialect, you better ask them. In Visual C++, the prototype of that intrinsic is valid C99
by Const-me 10y ago
I don’t know why authors of GCC invented that non-standard extended C dialect, you better ask them.
In Visual C++, the prototype of that intrinsic is valid C99 code:
extern __m256d __cdecl _mm256_permute2f128_pd(__m256d, __m256d, int);
- the_why_of_y 10y agoWhich library contains the definition of "_mm256_permute2f128_pd"? The likely answer is "none", as these are built-in to Visual C++ in a similar way to GCC, with only superficial differences such as an apparent lack of indirection to some __builtin_foo. https://msdn.microsoft.com/en-us/library/26td21ds(v=vs.100).aspx https://msdn.microsoft.com/en-us/library/26td21ds(v=vs.100).... "An intrinsic is a function known by the compiler that directly maps to a sequence of one or more assembly language instructions. Intrinsic functions are inherently more efficient than called functions because no calling linkage is required." https://msdn.microsoft.com/en-us/library/y0dh78ez(v=vs.100).aspx https://msdn.microsoft.com/en-us/library/y0dh78ez(v=vs.100).... "The use of intrinsics affects the portability of code, because intrinsics that are available in Visual C++ might not be available if the code is compiled with other compilers and some intrinsics that might be available for some target architectures are not available for all architectures."
- Const-me 10y agoI know how intrinsic work, thanks. Use them a lot in C++. C99 language spec says nothing about the things you’re talking about. It only specifies the language, not how C compilers implement various features. From the programmer’s point of view (except when the programmer works on the compiler itself), intrinsics are just C library functions, only inline, and very performant if done right. Fully compliant with C99 and C++ language specs.