gem5 v24.0.0.0
Loading...
Searching...
No Matches
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.
 
template<size_t S2>
bool operator== (const VecRegContainer< S2 > &that) const
 Equality operator.
 
template<size_t S2>
bool operator!= (const VecRegContainer< S2 > &that) const
 Inequality operator.
 
VecRegContainer< SIZE > & operator= (const VecRegContainer< SIZE > &that)
 Assignment operators.
 

Static Public Member Functions

static constexpr size_t size ()
 

Public Attributes

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

Private Attributes

Container container
 
template<typename VecElem >
VecElemas ()
 View interposers.
 
template<typename VecElem >
const VecElemas () const
 
std::string getString (const uint64_t &size) 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 125 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 134 of file vec_reg.hh.

Constructor & Destructor Documentation

◆ VecRegContainer() [1/2]

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

Definition at line 140 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 191 of file vec_reg.hh.

References gem5::VecRegContainer< SIZE >::container, and gem5::SIZE.

Referenced by gem5::RiscvISA::VlSegDeIntrlvMicroInst::execute(), gem5::RiscvISA::VMaskMergeMicroInst::execute(), gem5::RiscvISA::VsSegIntrlvMicroInst::execute(), gem5::guest_abi::Argument< Aapcs64, Float, typename std::enable_if_t< std::is_floating_point_v< Float >||IsAapcs64ShortVectorV< Float > > >::get(), gem5::ArmISA::RemoteGDB::AArch64GdbRegCache::getRegs(), gem5::trace::TarmacParserRecord::TarmacParserRecordEvent::process(), gem5::ArmISA::RemoteGDB::AArch64GdbRegCache::setRegs(), TwoDifferentVecRegs::SetUp(), TEST(), gem5::trace::ArmNativeTrace::ThreadState::update(), gem5::ArmV8KvmCPU::updateKvmState(), gem5::ArmV8KvmCPU::updateThreadContext(), 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 200 of file vec_reg.hh.

References gem5::VecRegContainer< SIZE >::container, and gem5::SIZE.

◆ getString()

template<size_t SIZE>
std::string gem5::VecRegContainer< SIZE >::getString ( const uint64_t & size) const
inline

◆ 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 173 of file vec_reg.hh.

References gem5::VecRegContainer< SIZE >::operator==().

◆ operator=()

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

Assignment operators.

From VecRegContainer

Definition at line 150 of file vec_reg.hh.

References gem5::VecRegContainer< SIZE >::container, and gem5::SIZE.

◆ 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 163 of file vec_reg.hh.

References gem5::VecRegContainer< SIZE >::container, and gem5::SIZE.

Referenced by gem5::VecRegContainer< SIZE >::operator!=().

◆ size()

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

Definition at line 133 of file vec_reg.hh.

References gem5::SIZE.

Referenced by gem5::VecRegContainer< SIZE >::getString(), and TwoDifferentVecRegs::SetUp().

◆ zero()

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

Zero the container.

Definition at line 144 of file vec_reg.hh.

References gem5::VecRegContainer< SIZE >::container, and gem5::SIZE.

Referenced by gem5::Iris::ThreadContext::readVecReg().

Friends And Related Symbol Documentation

◆ operator<<

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

Definition at line 207 of file vec_reg.hh.

Member Data Documentation

◆ container

◆ ShowParam< VecRegContainer< SIZE > >

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

Used for serialization.

Definition at line 245 of file vec_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