I have never heard of internal functions for many c ++ students, and I have heard of them for the first time. What is an internal function? The English language is intrinsic function. This is a special function of the compiler. Its behavior is similar to that of the C ++ inline function. However, because it is provided by the compiler, the compiler is more familiar with it and is more conducive to optimization. For example, memcpy is an internal function. If the compiler chooses/optimization, the compiler inserts the running Code directly when generating the code instead of calling the function. This is similar to the inline function, but as mentioned above, the compiler has a better understanding of this optimization.
In VC ++, abnormaltermination is also an internal function.
The following is an introduction to Wikipedia:
This article is about compiler intrinsic functions. For X toolkit, see intrinsics.
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 specified ages.
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 ages 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, sse4 ). 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 ).