Intrinsic function

Intrinsic function

In compiler theory, an intrinsic function is a function available in a given language 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 requested optimization, 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 and multiprocessor-aware operations during compilation. The compiler parses the intrinsic functions and converts them into vector math or multiprocessing object 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). In the latest version of the Microsoft compiler (VC2005 as well as VC2008) inline assembly is not available when compiling for 64 bit Windows, therefore intrinsics are necessary. 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).

See also

Intrinsic object


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Intrinsic and extrinsic properties — The term intrinsic denotes a characteristic or property of some thing or action which is essential and specific to that thing or action, and which is wholly independent of any other object, action or consequence. A characteristic which is not… …   Wikipedia

  • Intrinsic finality — is the idea that there is a natural good for all beings, and that all beings have a natural tendency to pursue their own good. It is an underlying principle of both teleology and moral objectivism. The concept of intrinsic finality was summarized …   Wikipedia

  • Intrinsic dimension — In signal processing of multidimensional signals, for example in computer vision, the intrinsic dimension of the signal describes how many variables are needed to represent the signal. For a signal of N variables, its intrinsic dimension M… …   Wikipedia

  • Physically Unclonable Function — In practical cryptography, a PUF or Physical Unclonable Function is a function that is embodied in a physical structure, that is easy to evaluate but hard to characterize.The physical structure that contains the PUF consists of many random… …   Wikipedia

  • Dehn function — In the mathematical subject of geometric group theory, a Dehn function, named after Max Dehn, is an optimal function associated to a finite group presentation which bounds the area of a relation in that group (that is a freely reduced word in the …   Wikipedia

  • User-defined function — A User Defined Function, or UDF, is a function provided by the user of a program or environment, in a context where the usual assumption is that functions are built into the program or environment.BASIC languageIn some old implementations of the… …   Wikipedia

  • Tensor (intrinsic definition) — For an introduction to the nature and significance of tensors in a broad context, see Tensor. In mathematics, the modern component free approach to the theory of a tensor views a tensor as an abstract object, expressing some definite type of… …   Wikipedia

  • Generalized function — In mathematics, generalized functions are objects generalizing the notion of functions. There is more than one recognised theory. Generalized functions are especially useful in making discontinuous functions more like smooth functions, and (going …   Wikipedia

  • Describing function — The Describing function (DF) method of Nikolay Mitrofanovich Krylov and Nikolay Bogolyubov is an approximate procedure for analyzing certain nonlinear control problems. It is based on quasi linearization, which is the approximation of the non… …   Wikipedia

  • trigonometric function — Math. 1. Also called circular function. a function of an angle, as sine or cosine, expressed as the ratio of the sides of a right triangle. 2. any function involving only trigonometric functions and constants. 3. the generalization of these to… …   Universalium

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”