gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::VecPredRegContainer< NumBits, Packed > Class Template Reference

Generic predicate register container. More...

#include <vec_pred_reg.hh>

Public Types

using Container = std::array<bool, NumBits>
 

Public Member Functions

 VecPredRegContainer ()
 
 VecPredRegContainer (const VecPredRegContainer &)=default
 
MyClassoperator= (const MyClass &that)
 
MyClassoperator= (const std::vector< uint8_t > &that)
 Required for de-serialization.
 
void reset ()
 Resets the predicate register to an all-false register.
 
void set ()
 Sets the predicate register to an all-true value.
 
template<size_t N2, bool P2>
bool operator== (const VecPredRegContainer< N2, P2 > &that) const
 Equality operator, required to compare thread contexts.
 
template<size_t N2, bool P2>
bool operator!= (const VecPredRegContainer< N2, P2 > &that) const
 Inequality operator, required to compare thread contexts.
 
bool & operator[] (size_t idx)
 Returns a reference to a specific element of the internal container.
 
const bool & operator[] (size_t idx) const
 Returns a const reference to a specific element of the internal container.
 
uint8_t getBits (size_t idx, uint8_t nbits) const
 Returns a subset of bits starting from a specific element in the container.
 
void setBits (size_t idx, uint8_t nbits, uint8_t bval)
 Set a subset of bits starting from a specific element in the container.
 
template<typename VecElem >
auto as () const
 Create a view of this container.
 
template<typename VecElem >
auto as ()
 

Public Attributes

friend ShowParam< VecPredRegContainer< NumBits, Packed > >
 

Static Public Attributes

static constexpr size_t NUM_BITS = NumBits
 

Private Types

using MyClass = VecPredRegContainer<NumBits, Packed>
 

Private Attributes

Container container
 

Friends

std::ostream & operator<< (std::ostream &os, const MyClass &p)
 

Detailed Description

template<size_t NumBits, bool Packed>
class gem5::VecPredRegContainer< NumBits, Packed >

Generic predicate register container.

This generic class implements the Model in an MVC pattern, similarly to

See also
VecRegContainer.
Template Parameters
NumBitsSize of the container in bits.
PackedSee @VecRegT.

Definition at line 231 of file vec_pred_reg.hh.

Member Typedef Documentation

◆ Container

template<size_t NumBits, bool Packed>
using gem5::VecPredRegContainer< NumBits, Packed >::Container = std::array<bool, NumBits>

Definition at line 238 of file vec_pred_reg.hh.

◆ MyClass

template<size_t NumBits, bool Packed>
using gem5::VecPredRegContainer< NumBits, Packed >::MyClass = VecPredRegContainer<NumBits, Packed>
private

Definition at line 243 of file vec_pred_reg.hh.

Constructor & Destructor Documentation

◆ VecPredRegContainer() [1/2]

template<size_t NumBits, bool Packed>
gem5::VecPredRegContainer< NumBits, Packed >::VecPredRegContainer ( )
inline

Definition at line 246 of file vec_pred_reg.hh.

◆ VecPredRegContainer() [2/2]

template<size_t NumBits, bool Packed>
gem5::VecPredRegContainer< NumBits, Packed >::VecPredRegContainer ( const VecPredRegContainer< NumBits, Packed > & )
default

Member Function Documentation

◆ as() [1/2]

template<size_t NumBits, bool Packed>
template<typename VecElem >
auto gem5::VecPredRegContainer< NumBits, Packed >::as ( )
inline

Definition at line 360 of file vec_pred_reg.hh.

◆ as() [2/2]

template<size_t NumBits, bool Packed>
template<typename VecElem >
auto gem5::VecPredRegContainer< NumBits, Packed >::as ( ) const
inline

Create a view of this container.

Template Parameters
VecElemType of the vector elements.

Definition at line 349 of file vec_pred_reg.hh.

◆ getBits()

template<size_t NumBits, bool Packed>
uint8_t gem5::VecPredRegContainer< NumBits, Packed >::getBits ( size_t idx,
uint8_t nbits ) const
inline

Returns a subset of bits starting from a specific element in the container.

Definition at line 307 of file vec_pred_reg.hh.

References gem5::VecPredRegContainer< NumBits, Packed >::container, gem5::ArmISA::i, and gem5::ArmISA::v.

◆ operator!=()

template<size_t NumBits, bool Packed>
template<size_t N2, bool P2>
bool gem5::VecPredRegContainer< NumBits, Packed >::operator!= ( const VecPredRegContainer< N2, P2 > & that) const
inline

Inequality operator, required to compare thread contexts.

Definition at line 292 of file vec_pred_reg.hh.

References gem5::VecPredRegContainer< NumBits, Packed >::operator==().

◆ operator=() [1/2]

template<size_t NumBits, bool Packed>
MyClass & gem5::VecPredRegContainer< NumBits, Packed >::operator= ( const MyClass & that)
inline

◆ operator=() [2/2]

template<size_t NumBits, bool Packed>
MyClass & gem5::VecPredRegContainer< NumBits, Packed >::operator= ( const std::vector< uint8_t > & that)
inline

◆ operator==()

template<size_t NumBits, bool Packed>
template<size_t N2, bool P2>
bool gem5::VecPredRegContainer< NumBits, Packed >::operator== ( const VecPredRegContainer< N2, P2 > & that) const
inline

Equality operator, required to compare thread contexts.

Definition at line 284 of file vec_pred_reg.hh.

References gem5::VecPredRegContainer< NumBits, Packed >::container.

Referenced by gem5::VecPredRegContainer< NumBits, Packed >::operator!=().

◆ operator[]() [1/2]

template<size_t NumBits, bool Packed>
bool & gem5::VecPredRegContainer< NumBits, Packed >::operator[] ( size_t idx)
inline

Returns a reference to a specific element of the internal container.

Definition at line 298 of file vec_pred_reg.hh.

References gem5::VecPredRegContainer< NumBits, Packed >::container.

◆ operator[]() [2/2]

template<size_t NumBits, bool Packed>
const bool & gem5::VecPredRegContainer< NumBits, Packed >::operator[] ( size_t idx) const
inline

Returns a const reference to a specific element of the internal container.

Definition at line 302 of file vec_pred_reg.hh.

References gem5::VecPredRegContainer< NumBits, Packed >::container.

◆ reset()

template<size_t NumBits, bool Packed>
void gem5::VecPredRegContainer< NumBits, Packed >::reset ( )
inline

Resets the predicate register to an all-false register.

Definition at line 269 of file vec_pred_reg.hh.

References gem5::VecPredRegContainer< NumBits, Packed >::container.

Referenced by TEST().

◆ set()

template<size_t NumBits, bool Packed>
void gem5::VecPredRegContainer< NumBits, Packed >::set ( )
inline

Sets the predicate register to an all-true value.

Definition at line 276 of file vec_pred_reg.hh.

References gem5::VecPredRegContainer< NumBits, Packed >::container.

Referenced by TEST().

◆ setBits()

template<size_t NumBits, bool Packed>
void gem5::VecPredRegContainer< NumBits, Packed >::setBits ( size_t idx,
uint8_t nbits,
uint8_t bval )
inline

Set a subset of bits starting from a specific element in the container.

Definition at line 322 of file vec_pred_reg.hh.

References gem5::VecPredRegContainer< NumBits, Packed >::container, and gem5::ArmISA::i.

Friends And Related Symbol Documentation

◆ operator<<

template<size_t NumBits, bool Packed>
std::ostream & operator<< ( std::ostream & os,
const MyClass & p )
friend

Definition at line 331 of file vec_pred_reg.hh.

Member Data Documentation

◆ container

◆ NUM_BITS

template<size_t NumBits, bool Packed>
size_t gem5::VecPredRegContainer< NumBits, Packed >::NUM_BITS = NumBits
staticconstexpr

◆ ShowParam< VecPredRegContainer< NumBits, Packed > >

template<size_t NumBits, bool Packed>
friend gem5::VecPredRegContainer< NumBits, Packed >::ShowParam< VecPredRegContainer< NumBits, Packed > >

Definition at line 341 of file vec_pred_reg.hh.


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

Generated on Tue Jun 18 2024 16:24:15 for gem5 by doxygen 1.11.0