Integer Arithmetic Intrinsics

The following table lists and describes integer arithmetic intrinsics that you can use across all Intel architectures.

Intrinsic Description
int abs(int) Returns the absolute value of an integer.
long labs(long) Returns the absolute value of a long integer.
unsigned long _lrotl(unsigned long value, int shift) Rotates bits left for an unsigned long integer.
unsigned long _lrotr(unsigned long value, int shift) Rotates bits right for an unsigned long integer.
unsigned int _rotl(unsigned int value, int shift) Rotates bits left for an unsigned integer.
unsigned int _rotr(unsigned int value, int shift) Rotates bits right for an unsigned integer.

Note

Passing a constant shift value in the rotate intrinsics results in higher performance.