QuickCppLib 0.10
Eliminate all the tedious hassle when making state-of-the-art C++ 14 - 23 libraries!
Loading...
Searching...
No Matches
secded_ecc.hpp File Reference
#include "../config.hpp"
#include <stdexcept>
#include "../cpp_feature.h"

Classes

class  quickcpplib::_xxx::algorithm::secded_ecc::secded_ecc< blocksize >
 Calculates the single error correcting double error detecting (SECDED) Hamming Error Correcting Code for a blocksize block of bytes. For example, a secdec_ecc<8> would be the very common 72,64 Hamming code used in ECC RAM, or secdec_ecc<4096> would be for a 32784,32768 Hamming code. More...
 

Namespaces

namespace  quickcpplib
 The QuickCppLib namespace.
 
namespace  quickcpplib::_xxx
 Per commit unique namespace to prevent different git submodule versions clashing.
 
namespace  quickcpplib::_xxx::algorithm
 
namespace  quickcpplib::_xxx::algorithm::secded_ecc
 

Macros

#define QUICKCPPLIB_SECDED_INTRINSICS   0
 
#define QUICKCPPLIB_SECDED_ROUND(n)
 

Macro Definition Documentation

◆ QUICKCPPLIB_SECDED_INTRINSICS

#define QUICKCPPLIB_SECDED_INTRINSICS   0

◆ QUICKCPPLIB_SECDED_ROUND

#define QUICKCPPLIB_SECDED_ROUND (   n)
Value:
prefetch[0] = ecc_table[(i + 0) * 8 + n]; \
prefetch[1] = ecc_table[(i + 1) * 8 + n]; \
prefetch[2] = ecc_table[(i + 2) * 8 + n]; \
prefetch[3] = ecc_table[(i + 3) * 8 + n]; \
prefetch[4] = ecc_table[(i + 4) * 8 + n]; \
prefetch[5] = ecc_table[(i + 5) * 8 + n]; \
prefetch[6] = ecc_table[(i + 6) * 8 + n]; \
prefetch[7] = ecc_table[(i + 7) * 8 + n]; \
if(c[0] & ((unit_type) 1 << n)) \
ecc ^= prefetch[0]; \
if(c[1] & ((unit_type) 1 << n)) \
ecc ^= prefetch[1]; \
if(c[2] & ((unit_type) 1 << n)) \
ecc ^= prefetch[2]; \
if(c[3] & ((unit_type) 1 << n)) \
ecc ^= prefetch[3]; \
if(c[4] & ((unit_type) 1 << n)) \
ecc ^= prefetch[4]; \
if(c[5] & ((unit_type) 1 << n)) \
ecc ^= prefetch[5]; \
if(c[6] & ((unit_type) 1 << n)) \
ecc ^= prefetch[6]; \
if(c[7] & ((unit_type) 1 << n)) \
ecc ^= prefetch[7];