Integer Arithmetic Instructions Instructions
15 PTX instructions in this category - click any row for encoding, pseudocode, and full documentation.
| Mnemonic | Syntax | PTX Version | Summary |
|---|---|---|---|
| bfe | bfe.type d, a, b, c; | PTX ISA 2.0 | Extract bit field from a and place the zero or sign-extended result in d. |
| bfi | bfi.type f, a, b, c, d; | PTX ISA 2.0 | Align and insert a bit field from a into b, and place the result in f. |
| bfind | bfind.type d, a; | PTX ISA 2.0 | Find the bit position of the most significant non-sign bit in a and place the result in d. |
| bmsk | bmsk.mode.b32 d, a, b; | PTX ISA 7.6 | Generates a 32-bit mask starting from the bit position specified in operand a, and of the width specified in operand b. |
| brev | brev.type d, a; | PTX ISA 2.0 | Perform bitwise reversal of input. |
| clmad | clmad.mode.u64 d, a, b, c; | PTX ISA 9.3 | Performs a carryless multiplication of a and b, followed by a carryless addition of c, and writes the result into destination register d. |
| clz | clz.type d, a; | PTX ISA 2.0 | Count the number of leading zero bits in an integer operand. |
| dp2a | dp2a.mode.atype.btype d, a, b, c; | PTX ISA 5.0 | Two-way 16-bit to 8-bit dot product which is accumulated in 32-bit result. |
| dp4a | dp4a.atype.btype d, a, b, c; | PTX ISA 5.0 | Four-way byte dot product which is accumulated in 32-bit result. |
| fns | fns.b32 d, mask, base, offset; | PTX ISA 6.0 | Given a 32-bit value mask and an integer value base (between 0 and 31), find the n-th (given by offset) set bit in mask from the base bit, and store the bit position in d. |
| mad24 | mad24.mode.type d, a, b, c; | PTX ISA 1.0 | Compute the product of two 24-bit integer values held in 32-bit source registers, and add a third, 32-bit value to either the high or low 32-bits of the 48-bit result. |
| mul24 | mul24.mode.type d, a, b; | PTX ISA 1.0 | Compute the product of two 24-bit integer values held in 32-bit source registers, and return either the high or low 32-bits of the 48-bit result. |
| popc | popc.type d, a; | PTX ISA 2.0 | Count the number of set bits in an integer operand. |
| sad | sad.type d, a, b, c; | PTX ISA 1.0 | Adds the absolute value of a-b to c and writes the resulting value into d. |
| szext | szext.mode.type d, a, b; | PTX ISA 7.6 | Sign-extends or zero-extends an N-bit value from operand a where N is specified in operand b. |