gem5  v22.0.0.2
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes | List of all members
gem5::VecRegContainer< SIZE > Class Template Reference

Vector Register Abstraction This generic class is the model in a particularization of MVC, to vector registers. More...

#include <vec_reg.hh>

Public Types

using Container = std::array< uint8_t, SIZE >
 

Public Member Functions

 VecRegContainer ()
 
 VecRegContainer (const VecRegContainer &)=default
 
void zero ()
 Zero the container. More...
 
template<size_t S2>
bool operator== (const VecRegContainer< S2 > &that) const
 Equality operator. More...
 
template<size_t S2>
bool operator!= (const VecRegContainer< S2 > &that) const
 Inequality operator. More...
 
VecRegContainer< SIZE > & operator= (const VecRegContainer< SIZE > &that)
 Assignment operators. More...
 

Static Public Member Functions

static constexpr size_t size ()
 

Public Attributes

friend ShowParam< VecRegContainer< SIZE > >
 Used for serialization. More...
 

Private Attributes

Container container
 
template<typename VecElem >
VecElemas ()
 View interposers. More...
 
template<typename VecElem >
const VecElemas () const
 
std::ostream & operator<< (std::ostream &os, const VecRegContainer< SIZE > &v)
 

Detailed Description

template<size_t SIZE>
class gem5::VecRegContainer< SIZE >

Vector Register Abstraction This generic class is the model in a particularization of MVC, to vector registers.

The model has functionality to create views of itself, or a portion through the method 'as

Template Parameters
SzSize of the container in bytes.

Definition at line 123 of file vec_reg.hh.

Member Typedef Documentation

◆ Container

template<size_t SIZE>
using gem5::VecRegContainer< SIZE >::Container = std::array<uint8_t, SIZE>

Definition at line 132 of file vec_reg.hh.

Constructor & Destructor Documentation

◆ VecRegContainer() [1/2]

template<size_t SIZE>
gem5::VecRegContainer< SIZE >::VecRegContainer ( )
inline

Definition at line 138 of file vec_reg.hh.

◆ VecRegContainer() [2/2]

template<size_t SIZE>
gem5::VecRegContainer< SIZE >::VecRegContainer ( const VecRegContainer< SIZE > &  )
default

Member Function Documentation

◆ as() [1/2]

template<size_t SIZE>
template<typename VecElem >
VecElem* gem5::VecRegContainer< SIZE >::as ( )
inline

View interposers.

Create a view of this container as a vector of VecElems with an optional amount of elements. If the amount of elements is provided, the size of the container is checked, to test bounds. If it is not provided, the length is inferred from the container size and the element size.

Template Parameters
VecElemType of each element of the vector for the view.
NumElemAmount of elements in the view.

Definition at line 189 of file vec_reg.hh.

Referenced by gem5::ArmISA::RemoteGDB::AArch64GdbRegCache::getRegs(), gem5::Trace::TarmacParserRecord::TarmacParserRecordEvent::process(), TwoDifferentVecRegs::SetUp(), gem5::Trace::ArmNativeTrace::ThreadState::update(), gem5::ArmV8KvmCPU::updateKvmState(), and gem5::Trace::TarmacTracerRecordV8::TraceRegEntryV8::updateVec().

◆ as() [2/2]

template<size_t SIZE>
template<typename VecElem >
const VecElem* gem5::VecRegContainer< SIZE >::as ( ) const
inline

Definition at line 198 of file vec_reg.hh.

◆ operator!=()

template<size_t SIZE>
template<size_t S2>
bool gem5::VecRegContainer< SIZE >::operator!= ( const VecRegContainer< S2 > &  that) const
inline

Inequality operator.

Required to compare thread contexts.

Definition at line 171 of file vec_reg.hh.

◆ operator=()

template<size_t SIZE>
VecRegContainer<SIZE>& gem5::VecRegContainer< SIZE >::operator= ( const VecRegContainer< SIZE > &  that)
inline

Assignment operators.

From VecRegContainer

Definition at line 148 of file vec_reg.hh.

◆ operator==()

template<size_t SIZE>
template<size_t S2>
bool gem5::VecRegContainer< SIZE >::operator== ( const VecRegContainer< S2 > &  that) const
inline

Equality operator.

Required to compare thread contexts.

Definition at line 161 of file vec_reg.hh.

Referenced by gem5::VecRegContainer< sizeof(DataType) *NumVecElemPerVecReg >::operator!=().

◆ size()

template<size_t SIZE>
static constexpr size_t gem5::VecRegContainer< SIZE >::size ( )
inlinestaticconstexpr

Definition at line 131 of file vec_reg.hh.

Referenced by TwoDifferentVecRegs::SetUp().

◆ zero()

template<size_t SIZE>
void gem5::VecRegContainer< SIZE >::zero ( )
inline

Zero the container.

Definition at line 142 of file vec_reg.hh.

Friends And Related Function Documentation

◆ operator<<

template<size_t SIZE>
std::ostream& operator<< ( std::ostream &  os,
const VecRegContainer< SIZE > &  v 
)
friend

Definition at line 206 of file vec_reg.hh.

Member Data Documentation

◆ container

template<size_t SIZE>
Container gem5::VecRegContainer< SIZE >::container
private

◆ ShowParam< VecRegContainer< SIZE > >

template<size_t SIZE>
friend gem5::VecRegContainer< SIZE >::ShowParam< VecRegContainer< SIZE > >

Used for serialization.

Definition at line 225 of file vec_reg.hh.


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

Generated on Thu Jul 28 2022 13:33:17 for gem5 by doxygen 1.8.17