|
noexcept |
Increments an arbitrary precision integer specified by a vector of bytes in the Little-Endian order, writes the result to a separate memory buffer and returns the carry flag.
[out] | pDest | A pointer to a destination buffer to receive the result of the increment. The capacity of the buffer must be at least cbData bytes. |
[in] | pSrc | A pointer to the integer to increment. The buffer containing the integer may not overlap with the destination buffer pointed to by pDest . |
cbData | A size of the input integer in bytes and the capacity of the output buffer. |
The function considers the input vector to specify the integer in the Little-Endian byte order. That is, given that \(V_X = \{x_0, \dots, x_n\}\) is the input vector pointed to by pSrc
, such that \(x_0\) is the first byte in memory of the vector, \(x_n\) is the last byte and n = cbData - 1
, the input value for the operation is \(X = \sum_{i=0}^{n}x_i\cdot b^i\), where b = 2CHAR_BIT
is a number of values that can be represented with one byte. To increment Big-Endian integers use memincr_BE_copy.
The buffers pointed to by pDest
and pSrc
may not overlap. To increment an integral value in place use memincr_LE_inplace. The memincr_LE function, which also allows buffers of differing sizes, can increment an integer in place or with copying to a separate buffer.