diff --git a/projects/hip/docs/markdown/hip_kernel_language.md b/projects/hip/docs/markdown/hip_kernel_language.md index 582cb8788a..87215e2369 100644 --- a/projects/hip/docs/markdown/hip_kernel_language.md +++ b/projects/hip/docs/markdown/hip_kernel_language.md @@ -363,27 +363,27 @@ Following is the list of supported double precision mathematical functions. [1] __RETURN_TYPE is dependent on compiler. It is usually 'int' for C compilers and 'bool' for C++ compilers. [↩](#a2) ### Integer Intrinsics -Following is the list of supported integer intrinsics. +Following is the list of supported integer intrinsics. Note that intrinsics are supported on device only. -| **Function** | **Supported on Host** | **Supported on Device** | -| --- | --- | --- | -| unsigned int __brev ( unsigned int x )
Reverse the bit order of a 32 bit unsigned integer. | ✓ | ✓ | -| unsigned long long int __brevll ( unsigned long long int x )
Reverse the bit order of a 64 bit unsigned integer. | ✓ | ✓ | -| int __clz ( int x )
Return the number of consecutive high-order zero bits in a 32 bit integer. | ✓ | ✓ | -| unsigned int __clz(unsigned int x)
Return the number of consecutive high-order zero bits in 32 bit unsigned integer. | ✓ | ✗ | -| int __clzll ( long long int x )
Count the number of consecutive high-order zero bits in a 64 bit integer. | ✓ | ✓ | -| unsigned int __clzll(long long int x)
Return the number of consecutive high-order zero bits in 64 bit signed integer. | ✓ | ✗ | -| unsigned int __ffs(unsigned int x)
Find the position of least signigicant bit set to 1 in a 32 bit unsigned integer.[1](#f3) | ✓ | ✓| -| unsigned int __ffs(int x)
Find the position of least signigicant bit set to 1 in a 32 bit signed integer. | ✗ | ✓ | -| unsigned int __ffsll(unsigned long long int x)
Find the position of least signigicant bit set to 1 in a 64 bit unsigned integer.[1](#f3) | ✓ | ✓ | -| unsigned int __ffsll(long long int x)
Find the position of least signigicant bit set to 1 in a 64 bit signed integer. | ✗ | ✓ | -| unsigned int __popc ( unsigned int x )
Count the number of bits that are set to 1 in a 32 bit integer. | ✓ | ✓ | -| int __popcll ( unsigned long long int x )
Count the number of bits that are set to 1 in a 64 bit integer. | ✓ | ✓ | +| **Function** | +| --- | +| unsigned int __brev ( unsigned int x )
Reverse the bit order of a 32 bit unsigned integer. | +| unsigned long long int __brevll ( unsigned long long int x )
Reverse the bit order of a 64 bit unsigned integer. | +| int __clz ( int x )
Return the number of consecutive high-order zero bits in a 32 bit integer. | +| unsigned int __clz(unsigned int x)
Return the number of consecutive high-order zero bits in 32 bit unsigned integer. | +| int __clzll ( long long int x )
Count the number of consecutive high-order zero bits in a 64 bit integer. | +| unsigned int __clzll(long long int x)
Return the number of consecutive high-order zero bits in 64 bit signed integer. | +| unsigned int __ffs(unsigned int x)
Find the position of least signigicant bit set to 1 in a 32 bit unsigned integer.[1](#f3) | +| unsigned int __ffs(int x)
Find the position of least signigicant bit set to 1 in a 32 bit signed integer. | +| unsigned int __ffsll(unsigned long long int x)
Find the position of least signigicant bit set to 1 in a 64 bit unsigned integer.[1](#f3) | +| unsigned int __ffsll(long long int x)
Find the position of least signigicant bit set to 1 in a 64 bit signed integer. | +| unsigned int __popc ( unsigned int x )
Count the number of bits that are set to 1 in a 32 bit integer. | +| int __popcll ( unsigned long long int x )
Count the number of bits that are set to 1 in a 64 bit integer. | [1] The hcc implementation of __ffs() and __ffsll() contains code to add a constant +1 to produce the ffs result format. For the cases where this overhead is not acceptable and programmer is willing to specialize for the platform, hcc provides hc::__lastbit_u32_u32(unsigned int input) and hc::__lastbit_u32_u64(unsigned long long int input). -The index returned by __lastbit_ instructions starts at 0, while for ffs the index starts at 1. +The index returned by __lastbit_ instructions starts at -1, while for ffs the index starts at 0. ## Texture Functions