51 #ifndef ETISS_ERRORDEFINITION_H_
52 #define ETISS_ERRORDEFINITION_H_
58 #if defined(__GXX_EXPERIMENTAL_CXX0X) || __cplusplus >= 201103L
59 #define ETISS_USE_CPP11 1
61 #define ETISS_USE_CPP11 0
86 Error(
bool persistent,
int id = -1,
const std::string &name =
"");
102 template <
typename iterateableT>
103 BitFlip(
const iterateableT &positions,
int id = -1,
const std::string &name =
"") :
Error(
false, id, name)
107 for (
typename iterateableT::const_iterator iter = positions.begin(); iter != positions.end(); ++iter)
110 flip |= 1 << (*iter);
116 template <
typename T>
119 var = (T)(var ^
flip);
132 template <
typename iterateableT>
133 StuckHigh(
const iterateableT &positions,
int id = -1,
const std::string &name =
"") :
Error(
true, id, name)
137 for (
typename iterateableT::const_iterator iter = positions.begin(); iter != positions.end(); ++iter)
140 high |= 1 << (*iter);
146 template <
typename T>
149 var = (T)(var |
high);
162 template <
typename iterateableT>
163 StuckLow(
const iterateableT &positions,
int id = -1,
const std::string &name =
"") :
Error(
true, id, name)
167 for (
typename iterateableT::const_iterator iter = positions.begin(); iter != positions.end(); ++iter)
177 template <
typename T>
180 var = (T)(var &
low);
general configuration and logging
static __inline__ uint32_t
static __inline__ uint64_t
static __inline__ uint8_t
static __inline__ uint16_t
virtual const std::vector< unsigned > affectedBits()
std::vector< unsigned > flipped_positions
BitFlip(const iterateableT &positions, int id=-1, const std::string &name="")
virtual void apply(uint64_t &var)
base error class for simple handling of errors
Error(bool persistent, int id=-1, const std::string &name="")
virtual const std::vector< unsigned > affectedBits()=0
virtual void apply(uint64_t &var)=0
std::vector< unsigned > high_positions
virtual void apply(uint64_t &var)
virtual const std::vector< unsigned > affectedBits()
StuckHigh(const iterateableT &positions, int id=-1, const std::string &name="")
virtual void apply(uint64_t &var)
std::vector< unsigned > low_positions
virtual const std::vector< unsigned > affectedBits()
StuckLow(const iterateableT &positions, int id=-1, const std::string &name="")
Page Table Entry (PTE) defines the composition of Page Frame Number (PFN) and relavant flags.