Document that bit_reversal_permutation does not work for n==1 (#224)

This commit is contained in:
Gottfried Herold 2023-03-17 21:30:47 +01:00 committed by GitHub
parent 6d75c674ab
commit 20ad6fca5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -590,11 +590,12 @@ static uint32_t reverse_bits(uint32_t n) {
* @param[in,out] values The array, which is re-ordered in-place * @param[in,out] values The array, which is re-ordered in-place
* @param[in] size The size in bytes of an element of the array * @param[in] size The size in bytes of an element of the array
* @param[in] n The length of the array, must be a power of two * @param[in] n The length of the array, must be a power of two
* less that 2^32 * strictly greater than 1 and less than 2^32.
*/ */
static C_KZG_RET bit_reversal_permutation( static C_KZG_RET bit_reversal_permutation(
void *values, size_t size, uint64_t n void *values, size_t size, uint64_t n
) { ) {
CHECK(n != 0);
CHECK(n >> 32 == 0); CHECK(n >> 32 == 0);
CHECK(is_power_of_two(n)); CHECK(is_power_of_two(n));
CHECK(log2_pow2(n) != 0); CHECK(log2_pow2(n) != 0);