Intrinsic function
来源:互联网 发布:php websocket server 编辑:程序博客网 时间:2024/06/11 06:33
Intrinsic function
In compiler theory, an intrinsic function is a function available for use in a givenlanguage whose implementation is handled specially by the compiler. Typically, it substitutes a sequence of automatically generated instructions for the original function call, similar to an inline function. Unlike an inline function though, the compiler has an intimate knowledge of the intrinsic function and can therefore better integrate it and optimize it for the situation. This is also called builtin function in many languages.
Compilers that implement intrinsic functions generally enable them only when the user has requestedoptimization, falling back to a default implementation provided by the language runtime environment otherwise.
Intrinsic functions are often used to explicitly implement vectorization and parallelization in languages which do not address such constructs. Altivec and OpenMP are examples of APIs which use intrinsic functions to declare, respectively, vectorizable andmultiprocessor-aware operations during compilation. The compiler parses the intrinsic functions and converts them into vector math or multiprocessingobject code appropriate for the target platform.
Microsoft and Intel's C/C++ compilers as well as GCC implement intrinsics that map directly to the x86 SIMD instructions (MMX,SSE,SSE2, SSE3,SSSE3, SSE4). In the latest version of the Microsft Visual Studio (VS2010), the Visual C++ compiler does not support inline assembler for X86-64[1] (neither VS2008[2] nor VS2005[3]). To compensate for the lack of inline assembly, new intrinsics have been added that map to standard assembly instructions that are not normally accessible through C/C++ (e.g.: bit scan).[4]
- ^ MSDN (VS2010). "Intrinsics and Inline Assembly". Microsoft. http://msdn.microsoft.com/en-us/library/wbk4z78b.aspx?ppud=4. Retrieved 2010-04-16.
- ^ MSDN (VS2008). "Intrinsics and Inline Assembly". Microsoft. http://msdn.microsoft.com/en-us/library/wbk4z78b(v=VS.90).aspx. Retrieved 2011-09-28.
- ^ MSDN (VS2005). "Intrinsics and Inline Assembly". Microsoft. http://msdn.microsoft.com/en-us/library/wbk4z78b(v=VS.80).aspx. Retrieved 2011-09-28.
- ^ MSDN (VS2010). "Intrinsics Available on All Architectures". Microsoft. http://msdn.microsoft.com/en-us/library/5704bbxw.aspx. Retrieved 2011-09-28.
参考:https://en.wikipedia.org/wiki/Intrinsic_function
- Intrinsic function
- Intrinsic function
- CUDA中使用Intrinsic Function
- 在llvm的clang中添加新的后端和Intrinsic function
- 介绍intrinsic
- intrinsic image decomposition
- Intrinsic 基础入门【1】
- Intrinsic Locks & Synchronized Statements
- GGC 编译Intrinsic
- Intrinsic image / video
- intrinsic image decomposition
- SSE intrinsic函数_优化
- UEFI #pragma intrinsic( function1 [, function2, ...] )
- Cognition & The Intrinsic User Experience
- SSE intrinsic函数_优化
- SSE intrinsic函数_优化
- 跨平台使用Intrinsic函数
- intrinsic parameters内参数求解
- URI编码与解码
- Wireshark初探之基本介绍和TCP 3次握手数据包捕捉分析
- 微信小程序UI组件、开发框架、实用库...
- AVL二叉平衡查找树
- 【LeetCode 7】Reverse Integer(Python)
- Intrinsic function
- 【opencv】opencv3.3的DNN模块调用caffe训练结果——【caffe学习五】
- 小程序ibeacon三点定位
- java定时调度实现
- QuartZ Cron表达式
- Linux Kernel数据结构:链表
- UVA 11809 Floating-point numbers
- WebGL:一、浏览器检测
- FTPClient上传文件时zip文件损坏的解决方法