gem5  v21.1.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 121 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 130 of file vec_reg.hh.

Constructor & Destructor Documentation

◆ VecRegContainer() [1/2]

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

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

Referenced by gem5::Trace::TarmacParserRecord::TarmacParserRecordEvent::process().

◆ as() [2/2]

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

Definition at line 196 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 169 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 146 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 159 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 129 of file vec_reg.hh.

Referenced by gem5::ParseParam< VecRegContainer< Sz > >::parse().

◆ zero()

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

Zero the container.

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


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

Generated on Tue Sep 21 2021 12:28:20 for gem5 by doxygen 1.8.17