1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
|
\c\This file was generated using a tool\c\
\h1\func_integer methods\h1\
The following methods are all part of the \b\func_integer methods\b\.
It contains GLSL functions on integer types.
\h2\Table of contents\h2\
\ul\
\-\\url #bitcount-function\\b\bitCount\b\ function\url\
\-\\url #bitfieldextract-function\\b\bitfieldExtract\b\ function\url\
\-\\url #bitfieldinsert-function\\b\bitfieldInsert\b\ function\url\
\-\\url #bitfieldreverse-function\\b\bitfieldReverse\b\ function\url\
\-\\url #findlsb-function\\b\findLSB\b\ function\url\
\-\\url #findmsb-function\\b\findMSB\b\ function\url\
\-\\url #imulextended-function\\b\imulExtended\b\ function\url\
\-\\url #uaddcarry-function\\b\uaddCarry\b\ function\url\
\-\\url #umulextended-function\\b\umulExtended\b\ function\url\
\-\\url #usubborrow-function\\b\usubBorrow\b\ function\url\
\ul\
\h3\bitCount() function\h3\
\raw\#### <code>glm.<code>**bitCount**(**v**: *int*) -\\> *int*</code></code>\raw\
\raw\  \raw\Returns the number of bits set to \code\1\code\ in the binary representation of \code\value\code\.
\raw\#### <code>glm.<code>**bitCount**(**v**: *vecN*) -\\> *ivecN*</code></code>\raw\
\raw\  \raw\For every component \code\c\code\ of \code\v\code\:
\raw\  \raw\Returns the number of bits set to \code\1\code\ in the binary representation of \code\c\code\.
\h3\bitfieldExtract() function\h3\
\raw\#### <code>glm.<code>**bitfieldExtract**(**value**: *ctypes*, **offset**: *int*, **bits**: *int*) -\\> *int*</code></code>\raw\
\raw\  \raw\Extracts bits \code\[offset, offset + bits - 1]\code\ from value, returning them in the least
\raw\  \raw\significant bits of the result. For unsigned data types, the most significant bits of the
\raw\  \raw\result will be set to zero. For signed data types, the most significant bits will be set to
\raw\  \raw\the value of bit \code\offset + base - 1\code\. If \code\bits\code\ is zero, the result will be zero. The result
\raw\  \raw\will be undefined if \code\offset\code\ or \code\bits\code\ is negative, or if the sum of \code\offset\code\ and \code\bits\code\ is
\raw\  \raw\greater than the number of bits used to store the operand.
\raw\  \raw\You can use \code\int32\code\, \code\uint32\code\, \code\int64\code\ or \code\uint64\code\ types to specify the number of bits and the
\raw\  \raw\sign.
\raw\#### <code>glm.<code>**bitfieldExtract**(**value**: *vecN*, **offset**: *int*, **bits**: *int*) -\\> *vecN*</code></code>\raw\
\raw\  \raw\Returns \code\bitfieldExtract(c, offset, bits)\code\ for every component \code\c\code\ of \code\value\code\.
\h3\bitfieldInsert() function\h3\
\raw\#### <code>glm.<code>**bitfieldInsert**(**base**: *ctypes*, **insert**: *ctypes*, **offset**: *int*, **bits**: *int*) -\\> *int*</code></code>\raw\
\raw\  \raw\Returns the insertion the bits least-significant bits of insert into base. The result will
\raw\  \raw\have \code\bits[offset, offset + bits - 1]\code\ taken from \code\bits[0, bits - 1]\code\ of \code\insert\code\, and all other
\raw\  \raw\bits taken directly from the corresponding bits of \code\base\code\. If \code\bits\code\ is zero, the result will
\raw\  \raw\simply be \code\base\code\. The result will be undefined if \code\offset\code\ or \code\bits\code\ is negative, or if the sum of
\raw\  \raw\\code\offset\code\ and \code\bits\code\ is greater than the number of bits used to store the operand.
\raw\  \raw\You can use \code\int32\code\, \code\uint32\code\, \code\int64\code\ or \code\uint64\code\ types to specify the number of bits and the
\raw\  \raw\sign.
\raw\#### <code>glm.<code>**bitfieldInsert**(**base**: *vecN*, **insert**: *vecN*, **offset**: *int*, **bits**: *int*) -\\> *vecN*</code></code>\raw\
\raw\  \raw\Returns \code\bitfieldInsert(base[i], insert[i], offset, bits)\code\ for every index \code\i\code\.
\h3\bitfieldReverse() function\h3\
\raw\#### <code>glm.<code>**bitfieldReverse**(**value**: *ctypes*) -\\> *int*</code></code>\raw\
\raw\  \raw\Returns the reversal of the bits of \code\value\code\. The bit numbered \code\n\code\ of the result will be taken
\raw\  \raw\from \code\bit(bits - 1) - n\code\ of \code\value\code\, where \code\bits\code\ is the total number of bits used to represent
\raw\  \raw\\code\value\code\. You can use \code\int32\code\, \code\uint32\code\, \code\int64\code\ or \code\uint64\code\ types to specify the number of bits
\raw\  \raw\and the sign.
\raw\#### <code>glm.<code>**bitfieldReverse**(**value**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\  \raw\Returns the reversal of the bits of \code\value\code\. The bit numbered \code\n\code\ of the result will be taken
\raw\  \raw\from \code\bit(bits - 1) - n\code\ of \code\value\code\, where \code\bits\code\ is the total number of bits used to represent
\raw\  \raw\\code\value\code\.
\h3\findLSB() function\h3\
\raw\#### <code>glm.<code>**findLSB**(**value**: *int*) -\\> *int*</code></code>\raw\
\raw\  \raw\Returns the bit number of the least significant bit set to \code\1\code\ in the binary representation
\raw\  \raw\of \code\value\code\. If \code\value\code\ is zero, \code\-1\code\ will be returned.
\raw\#### <code>glm.<code>**findLSB**(**value**: *vecN*) -\\> *ivecN*</code></code>\raw\
\raw\  \raw\Returns the bit number of the least significant bit set to \code\1\code\ in the binary representation
\raw\  \raw\of \code\value\code\. If \code\value\code\ is zero, \code\-1\code\ will be returned.
\h3\findMSB() function\h3\
\raw\#### <code>glm.<code>**findMSB**(**value**: *int*) -\\> *int*</code></code>\raw\
\raw\  \raw\Returns the bit number of the most significant bit in the binary representation of \code\value\code\.
\raw\  \raw\For positive integers, the result will be the bit number of the most significant bit set to
\raw\  \raw\\code\1\code\. For negative integers, the result will be the bit number of the most significant bit set
\raw\  \raw\to \code\0\code\. For a value of zero or negative one, \code\-1\code\ will be returned.
\raw\#### <code>glm.<code>**findMSB**(**value**: *vecN*) -\\> *ivecN*</code></code>\raw\
\raw\  \raw\Returns the bit number of the least significant bit set to \code\1\code\ in the binary representation
\raw\  \raw\of \code\value\code\. If \code\value\code\ is zero, \code\-1\code\ will be returned.
\h3\imulExtended() function\h3\
\raw\#### <code>glm.<code>**imulExtended**(**x**: *int*, **y**: *int*) -\\> *(msb: int, lsb: int)*</code></code>\raw\
\raw\  \raw\Multiplies 32-bit integers \code\x\code\ and \code\y\code\, producing a 64-bit result. The 32 least-significant
\raw\  \raw\bits are returned in \code\lsb\code\. The 32 most-significant bits are returned in \code\msb\code\.
\raw\#### <code>glm.<code>**imulExtended**(**x**: *ivecN*, **y**: *ivecN*, **msb**: *ivecN*, **lsb**: *ivecN*) -\\> *ivecN*</code></code>\raw\
\raw\  \raw\Multiplies 32-bit integers \code\x\code\ and \code\y\code\, producing a 64-bit result. The 32 least-significant
\raw\  \raw\bits are returned in \code\lsb\code\. The 32 most-significant bits are returned in \code\msb\code\.
\h3\uaddCarry() function\h3\
\raw\#### <code>glm.<code>**uaddCarry**(**x**: *int*, **y**: *int*) -\\> *(result: int, carry: int)*</code></code>\raw\
\raw\  \raw\Adds 32-bit unsigned integer \code\x\code\ and \code\y\code\, returning the \code\sum\code\ modulo \code\pow(2, 32)\code\. The value carry
\raw\  \raw\is set to \code\0\code\ if the \code\sum\code\ was less than \code\pow(2, 32)\code\, or to \code\1\code\ otherwise.
\raw\#### <code>glm.<code>**uaddCarry**(**x**: *uvecN*, **y**: *uvecN*, **carry**: *uvecN*) -\\> *uvecN*</code></code>\raw\
\raw\  \raw\Adds 32-bit unsigned integer \code\x\code\ and \code\y\code\, returning the \code\sum\code\ modulo \code\pow(2, 32)\code\. The value carry
\raw\  \raw\is set to \code\0\code\ if the \code\sum\code\ was less than \code\pow(2, 32)\code\, or to \code\1\code\ otherwise.
\h3\umulExtended() function\h3\
\raw\#### <code>glm.<code>**umulExtended**(**x**: *int*, **y**: *int*) -\\> *(msb: int, lsb: int)*</code></code>\raw\
\raw\  \raw\Multiplies 32-bit integers \code\x\code\ and \code\y\code\, producing a 64-bit result. The 32 least-significant
\raw\  \raw\bits are returned in \code\lsb\code\. The 32 most-significant bits are returned in \code\msb\code\.
\raw\#### <code>glm.<code>**umulExtended**(**x**: *uvecN*, **y**: *uvecN*, **msb**: *uvecN*, **lsb**: *uvecN*) -\\> *uvecN*</code></code>\raw\
\raw\  \raw\Multiplies 32-bit integers \code\x\code\ and \code\y\code\, producing a 64-bit result. The 32 least-significant
\raw\  \raw\bits are returned in \code\lsb\code\. The 32 most-significant bits are returned in \code\msb\code\.
\h3\usubBorrow() function\h3\
\raw\#### <code>glm.<code>**usubBorrow**(**x**: *int*, **y**: *int*) -\\> *(result: int, borrow: int)*</code></code>\raw\
\raw\  \raw\Subtracts the 32-bit unsigned integer \code\y\code\ from \code\x\code\, returning the difference if non-negative,
\raw\  \raw\or \code\pow(2, 32)\code\ plus the difference otherwise. The value borrow is set to \code\0\code\ if \code\x >= y\code\, or to
\raw\  \raw\\code\1\code\ otherwise.
\raw\#### <code>glm.<code>**usubBorrow**(**x**: *uvecN*, **y**: *uvecN*, **borrow**: *uvecN*) -\\> *uvecN*</code></code>\raw\
\raw\  \raw\Subtracts the 32-bit unsigned integer \code\y\code\ from \code\x\code\, returning the difference if non-negative,
\raw\  \raw\or \code\pow(2, 32)\code\ plus the difference otherwise. The value borrow is set to \code\0\code\ if \code\x >= y\code\, or to
\raw\  \raw\\code\1\code\ otherwise.
|