gem5  v21.1.0.2
Public Types | Public Member Functions | Private Attributes | List of all members
gem5::ruby::WriteMask Class Reference

#include <WriteMask.hh>

Public Types

typedef std::vector< std::pair< int, AtomicOpFunctor * > > AtomicOpVector
 

Public Member Functions

 WriteMask ()
 
 WriteMask (int size)
 
 WriteMask (int size, std::vector< bool > &mask)
 
 WriteMask (int size, std::vector< bool > &mask, AtomicOpVector atomicOp)
 
 ~WriteMask ()
 
void clear ()
 
bool test (int offset) const
 
void setMask (int offset, int len, bool val=true)
 
void fillMask ()
 
bool getMask (int offset, int len) const
 
bool isOverlap (const WriteMask &readMask) const
 
bool containsMask (const WriteMask &readMask) const
 
bool isEmpty () const
 
bool isFull () const
 
void andMask (const WriteMask &writeMask)
 
void orMask (const WriteMask &writeMask)
 
void setInvertedMask (const WriteMask &writeMask)
 
int firstBitSet (bool val, int offset=0) const
 
int count (int offset=0) const
 
void print (std::ostream &out) const
 
void performAtomic (uint8_t *p) const
 
void performAtomic (DataBlock &blk) const
 
const AtomicOpVectorgetAtomicOps () const
 
void setAtomicOps (const AtomicOpVector &atomicOps)
 

Private Attributes

int mSize
 
std::vector< bool > mMask
 
bool mAtomic
 
AtomicOpVector mAtomicOp
 

Detailed Description

Definition at line 59 of file WriteMask.hh.

Member Typedef Documentation

◆ AtomicOpVector

Definition at line 62 of file WriteMask.hh.

Constructor & Destructor Documentation

◆ WriteMask() [1/4]

gem5::ruby::WriteMask::WriteMask ( )

Definition at line 41 of file WriteMask.cc.

◆ WriteMask() [2/4]

gem5::ruby::WriteMask::WriteMask ( int  size)
inline

Definition at line 66 of file WriteMask.hh.

◆ WriteMask() [3/4]

gem5::ruby::WriteMask::WriteMask ( int  size,
std::vector< bool > &  mask 
)
inline

Definition at line 70 of file WriteMask.hh.

◆ WriteMask() [4/4]

gem5::ruby::WriteMask::WriteMask ( int  size,
std::vector< bool > &  mask,
AtomicOpVector  atomicOp 
)
inline

Definition at line 74 of file WriteMask.hh.

◆ ~WriteMask()

gem5::ruby::WriteMask::~WriteMask ( )
inline

Definition at line 78 of file WriteMask.hh.

Member Function Documentation

◆ andMask()

void gem5::ruby::WriteMask::andMask ( const WriteMask writeMask)
inline

Definition at line 169 of file WriteMask.hh.

References gem5::ArmISA::i, mAtomic, mAtomicOp, mMask, and mSize.

◆ clear()

void gem5::ruby::WriteMask::clear ( )
inline

Definition at line 82 of file WriteMask.hh.

References mMask, and mSize.

◆ containsMask()

bool gem5::ruby::WriteMask::containsMask ( const WriteMask readMask) const
inline

Definition at line 135 of file WriteMask.hh.

References gem5::ArmISA::i, mMask, and mSize.

◆ count()

int gem5::ruby::WriteMask::count ( int  offset = 0) const
inline

Definition at line 215 of file WriteMask.hh.

References gem5::ArmISA::i, mMask, mSize, and gem5::ArmISA::offset.

◆ fillMask()

void gem5::ruby::WriteMask::fillMask ( )
inline

Definition at line 103 of file WriteMask.hh.

References gem5::ArmISA::i, mMask, and mSize.

◆ firstBitSet()

int gem5::ruby::WriteMask::firstBitSet ( bool  val,
int  offset = 0 
) const
inline

Definition at line 206 of file WriteMask.hh.

References gem5::ArmISA::i, mMask, mSize, gem5::ArmISA::offset, and gem5::X86ISA::val.

◆ getAtomicOps()

const AtomicOpVector& gem5::ruby::WriteMask::getAtomicOps ( ) const
inline

Definition at line 247 of file WriteMask.hh.

References mAtomicOp.

◆ getMask()

bool gem5::ruby::WriteMask::getMask ( int  offset,
int  len 
) const
inline

Definition at line 111 of file WriteMask.hh.

References gem5::ArmISA::i, gem5::ArmISA::len, mMask, mSize, and gem5::ArmISA::offset.

◆ isEmpty()

bool gem5::ruby::WriteMask::isEmpty ( ) const
inline

Definition at line 147 of file WriteMask.hh.

References gem5::ArmISA::i, mMask, and mSize.

◆ isFull()

bool gem5::ruby::WriteMask::isFull ( ) const
inline

Definition at line 158 of file WriteMask.hh.

References gem5::ArmISA::i, mMask, and mSize.

◆ isOverlap()

bool gem5::ruby::WriteMask::isOverlap ( const WriteMask readMask) const
inline

Definition at line 122 of file WriteMask.hh.

References gem5::ArmISA::i, mMask, and mSize.

◆ orMask()

void gem5::ruby::WriteMask::orMask ( const WriteMask writeMask)
inline

Definition at line 183 of file WriteMask.hh.

References gem5::ArmISA::i, mAtomic, mAtomicOp, mMask, and mSize.

◆ performAtomic() [1/2]

void gem5::ruby::WriteMask::performAtomic ( DataBlock blk) const
inline

◆ performAtomic() [2/2]

void gem5::ruby::WriteMask::performAtomic ( uint8_t *  p) const
inline

Definition at line 226 of file WriteMask.hh.

References gem5::ArmISA::i, mAtomicOp, gem5::ArmISA::offset, and gem5::MipsISA::p.

◆ print()

void gem5::ruby::WriteMask::print ( std::ostream &  out) const

Definition at line 47 of file WriteMask.cc.

References gem5::ArmISA::i, mMask, and mSize.

Referenced by gem5::ruby::operator<<().

◆ setAtomicOps()

void gem5::ruby::WriteMask::setAtomicOps ( const AtomicOpVector atomicOps)
inline

Definition at line 253 of file WriteMask.hh.

References mAtomic, and mAtomicOp.

◆ setInvertedMask()

void gem5::ruby::WriteMask::setInvertedMask ( const WriteMask writeMask)
inline

Definition at line 197 of file WriteMask.hh.

References gem5::ArmISA::i, mMask, and mSize.

◆ setMask()

void gem5::ruby::WriteMask::setMask ( int  offset,
int  len,
bool  val = true 
)
inline

◆ test()

bool gem5::ruby::WriteMask::test ( int  offset) const
inline

Definition at line 88 of file WriteMask.hh.

References mMask, mSize, and gem5::ArmISA::offset.

Member Data Documentation

◆ mAtomic

bool gem5::ruby::WriteMask::mAtomic
private

Definition at line 262 of file WriteMask.hh.

Referenced by andMask(), orMask(), and setAtomicOps().

◆ mAtomicOp

AtomicOpVector gem5::ruby::WriteMask::mAtomicOp
private

Definition at line 263 of file WriteMask.hh.

Referenced by andMask(), getAtomicOps(), orMask(), performAtomic(), and setAtomicOps().

◆ mMask

std::vector<bool> gem5::ruby::WriteMask::mMask
private

◆ mSize

int gem5::ruby::WriteMask::mSize
private

The documentation for this class was generated from the following files:

Generated on Tue Sep 21 2021 12:32:10 for gem5 by doxygen 1.8.17