Intrinsic function

转载 2012年03月26日 18:20:30

Intrinsic function

From Wikipedia, the free encyclopedia
Jump to: navigation,search

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]

相关文章推荐

在llvm的clang中添加新的后端和Intrinsic function

本文记录一下如何在llvm的clang源码中添加一种新的后端(暂时命名为cpu0),并在其中添加Intrinsic function。涉及到的文件列表:./src/include/llvm/IR/In...

跨平台使用Intrinsic函数

一、问题背景   最初,我们只能使用汇编语言来编写SIMD代码。不仅写起来很麻烦,而且易读性、可维护性、移植性都较差。   不久,VC、GCC等编译器相继支持了Intrinsic函数,使我们可...

hardware intrinsic security

  • 2015-04-15 22:48
  • 5.29MB
  • 下载

Intrinsic geometry of surfaces

  • 2008-02-14 08:44
  • 2.85MB
  • 下载

Cognition & The Intrinsic User Experience

转载出处:http://uxmag.com/articles/cognition-the-intrinsic-user-experience Cognition & The Intrin...

HLSL固有函数 【Intrinsic Functions (DirectX HLSL)】

Intrinsic Functions (DirectX HLSL) The following table lists the intrinsic functions available in H...

GCC中x86架构下simd intrinsic函数的实现的分析

intel提供了多种寄存器和指令来支持单指令多数据(simd)操作,按时间先后顺序包括MMX系列(支持128位寄存器),SSE系列(支持256位寄存器)和AVX系列(支持512位寄存器)。本文以AVX...

Intrinsic Locks & Synchronized Statements

Java的同步建立在intrinsic lock(也称为monitor lock)的基础之上,intrinsic lock用于保证对指定对象状态的排他性访问及建立happens-before关系。每一...

在C/C++代码中使用SSE等指令集的指令(4)SSE指令集Intrinsic函数使用

http://blog.csdn.net/gengshenghong/article/details/7010615 在http://blog.csdn.net/gengshenghong/ar...

使用RAMP理解内在动机 Understanding Intrinsic Motivation with RAMP

使用RAMP理解内在动机 原文地址 关于Gamification中的外在奖励和内在动机我们讨论了很多了。这种讨论总是像在讨论好的和坏的方式。我对于之前这样讨论常常感到内疚!其实最好...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)