NumCpp
2.12.1
A Templatized Header Only C++ Implementation of the Python NumPy Library
|
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <numeric>
#include <stdexcept>
#include <type_traits>
#include <vector>
#include "boost/dynamic_bitset.hpp"
#include "NumCpp/Core/Internal/TypeTraits.hpp"
Go to the source code of this file.
Namespaces | |
namespace | nc |
namespace | nc::edac |
namespace | nc::edac::detail |
Functions | |
bool | nc::edac::detail::calculateParity (const boost::dynamic_bitset<> &data) noexcept |
template<std::size_t DataBits> | |
constexpr bool | nc::edac::detail::calculateParity (const std::bitset< DataBits > &data) noexcept |
template<std::size_t DataBits, typename IntType , std::enable_if_t< std::is_integral_v< IntType >, int > = 0> | |
bool | nc::edac::detail::calculateParity (const std::bitset< DataBits > &data, IntType parityBit) |
template<std::size_t DataBits, std::size_t EncodedBits, std::enable_if_t< greaterThan_v< EncodedBits, DataBits >, int > = 0> | |
std::size_t | nc::edac::detail::checkBitsConsistent () |
template<typename IntType1 , typename IntType2 , std::enable_if_t< std::is_integral_v< IntType1 >, int > = 0, std::enable_if_t< std::is_integral_v< IntType2 >, int > = 0> | |
std::vector< std::size_t > | nc::edac::detail::dataBitsCovered (IntType1 numDataBits, IntType2 parityBit) |
template<std::size_t DataBits, std::size_t EncodedBits, std::enable_if_t< greaterThan_v< EncodedBits, DataBits >, int > = 0> | |
int | nc::edac::decode (std::bitset< EncodedBits > encodedBits, std::bitset< DataBits > &decodedBits) |
template<std::size_t DataBits> | |
boost::dynamic_bitset | nc::edac::encode (const std::bitset< DataBits > &dataBits) |
template<std::size_t DataBits, std::size_t EncodedBits, std::enable_if_t< greaterThan_v< EncodedBits, DataBits >, int > = 0> | |
std::bitset< DataBits > | nc::edac::detail::extractData (const std::bitset< EncodedBits > &encodedBits) noexcept |
template<typename IntType , std::enable_if_t< std::is_integral_v< IntType >, int > = 0> | |
constexpr bool | nc::edac::detail::isPowerOfTwo (IntType n) noexcept |
Tests if value is a power of two. More... | |
template<typename IntType , std::enable_if_t< std::is_integral_v< IntType >, int > = 0> | |
std::size_t | nc::edac::detail::nextPowerOfTwo (IntType n) |
template<typename IntType , std::enable_if_t< std::is_integral_v< IntType >, int > = 0> | |
std::size_t | nc::edac::detail::numSecdedParityBitsNeeded (IntType numDataBits) |
template<typename IntType , std::enable_if_t< std::is_integral_v< IntType >, int > = 0> | |
std::vector< std::size_t > | nc::edac::detail::powersOfTwo (IntType n) |
License Copyright 2018-2023 David Pilger
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions :
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Description Hamming EDAC encoding https://en.wikipedia.org/wiki/Hamming_code