mpd/src/util/BitReverse.cxx
2023-03-06 14:59:48 +01:00

16 lines
385 B
C++

// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project
#include "BitReverse.hxx"
static constexpr BitReverseTable
GenerateBitReverseTable() noexcept
{
BitReverseTable table{};
for (unsigned i = 0; i < 256; ++i)
table.data[i] = BitReverseMultiplyModulus(i);
return table;
}
const BitReverseTable bit_reverse_table = GenerateBitReverseTable();