Developer Guide and Reference

Contents

Miscellaneous Intrinsics

The following tables list and describe intrinsics that you can use across all Intel® architectures, except where noted. These intrinsics are available for both Intel® and non-Intel microprocessors but they may perform additional optimizations for Intel® microprocessors than they perform for non-Intel microprocessors.
Note support for casting functions for various
INT
and
FP
types for use across Intel® architectures intrinsic functions only change the type, do
not
convert between integer and floating point values.
Intrinsic
Description
Intrinsics for all Supported Intel® Architectures
__cpuid
Queries the processor for information about processor type and supported features. The Intel® C++ Compiler supports the Microsoft* implementation of this intrinsic. See the Microsoft documentation for details.
void *_alloca(int)
Allocates memory in the local stack frame. The memory is automatically freed upon return from the function.
int _bit_scan_forward(int
x
)
Returns the bit index of the least significant set bit of
x
. If
x
is 0, the result is undefined.
int _bit_scan_reverse(int)
Returns the bit index of the most significant set bit of
x
. If
x
is 0, the result is undefined.
unsigned char _BitScanForward(unsigned __int32 *p, unsigned __int32 b);
and for Intel® 64 architecture only:
unsigned char _BitScanForward64(unsigned __int32 *p, unsigned __int64 b);
Sets
*p
to the bit index of