gem5
v19.0.0.0
|
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, Sz > |
Public Member Functions | |
VecRegContainer () | |
VecRegContainer (const VecRegContainer &)=default | |
VecRegContainer (const std::vector< uint8_t > &that) | |
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... | |
const std::string | print () const |
template<typename Ret > | |
const Ret * | raw_ptr () const |
Get pointer to bytes. More... | |
template<typename Ret > | |
Ret * | raw_ptr () |
MyClass & | operator= (const MyClass &that) |
Assignment operators. More... | |
MyClass & | operator= (const Container &that) |
From appropriately sized uint8_t[]. More... | |
MyClass & | operator= (const std::vector< uint8_t > &that) |
From vector<uint8_t>. More... | |
void | copyTo (Container &dst) const |
Copy the contents into the input buffer. More... | |
void | copyTo (std::vector< uint8_t > &dst) const |
To vector<uint8_t> This is required for serialisation. More... | |
template<typename VecElem , size_t NumElems = SIZE/sizeof(VecElem)> | |
VecRegT< VecElem, NumElems, true > | as () const |
View interposers. More... | |
template<typename VecElem , size_t NumElems = SIZE/sizeof(VecElem)> | |
VecRegT< VecElem, NumElems, false > | as () |
template<typename VecElem , int LaneIdx> | |
VecLaneT< VecElem, false > | laneView () |
View as the Nth lane of type VecElem. More... | |
template<typename VecElem , int LaneIdx> | |
VecLaneT< VecElem, true > | laneView () const |
View as the const Nth lane of type VecElem. More... | |
template<typename VecElem > | |
VecLaneT< VecElem, false > | laneView (int laneIdx) |
View as the Nth lane of type VecElem. More... | |
template<typename VecElem > | |
VecLaneT< VecElem, true > | laneView (int laneIdx) const |
View as the const Nth lane of type VecElem. More... | |
Static Public Attributes | |
static constexpr size_t | SIZE = Sz |
Private Types | |
using | MyClass = VecRegContainer< SIZE > |
Private Attributes | |
Container | container |
Friends | |
std::ostream & | operator<< (std::ostream &os, const MyClass &v) |
Output operator. More... | |
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
Sz | Size of the container in bytes. |
Definition at line 160 of file vec_reg.hh.
using VecRegContainer< Sz >::Container = std::array<uint8_t,Sz> |
Definition at line 280 of file vec_reg.hh.
|
private |
Definition at line 283 of file vec_reg.hh.
|
inline |
Definition at line 286 of file vec_reg.hh.
|
default |
|
inline |
Definition at line 289 of file vec_reg.hh.
|
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.
VecElem | Type of each element of the vector for the view. |
NumElem | Amount of elements in the view. |
Definition at line 385 of file vec_reg.hh.
Referenced by Trace::ArmNativeTrace::ThreadState::update(), ArmV8KvmCPU::updateKvmState(), ArmV8KvmCPU::updateThreadContext(), Trace::TarmacTracerRecordV8::TraceRegEntryV8::updateVec(), and ArmISA::ISA::zeroSveVecRegUpperPart().
|
inline |
Definition at line 395 of file vec_reg.hh.
|
inline |
Copy the contents into the input buffer.
To appropriately sized uint8_t[]
Definition at line 330 of file vec_reg.hh.
|
inline |
To vector<uint8_t> This is required for serialisation.
Definition at line 338 of file vec_reg.hh.
VecLaneT< VecElem, false > VecRegContainer< Sz >::laneView | ( | ) |
View as the Nth lane of type VecElem.
Definition at line 595 of file vec_reg.hh.
Referenced by PhysRegFile::readVecLane().
VecLaneT< VecElem, true > VecRegContainer< Sz >::laneView | ( | ) | const |
View as the const Nth lane of type VecElem.
Definition at line 604 of file vec_reg.hh.
VecLaneT< VecElem, false > VecRegContainer< Sz >::laneView | ( | int | laneIdx | ) |
View as the Nth lane of type VecElem.
Definition at line 613 of file vec_reg.hh.
VecLaneT< VecElem, true > VecRegContainer< Sz >::laneView | ( | int | laneIdx | ) | const |
View as the const Nth lane of type VecElem.
Definition at line 622 of file vec_reg.hh.
|
inline |
Inequality operator.
Required to compare thread contexts.
Definition at line 360 of file vec_reg.hh.
|
inline |
|
inline |
From appropriately sized uint8_t[].
Definition at line 310 of file vec_reg.hh.
|
inline |
From vector<uint8_t>.
This is required for de-serialisation.
Definition at line 319 of file vec_reg.hh.
|
inline |
|
inline |
Definition at line 365 of file vec_reg.hh.
Referenced by SimpleThread::getWritableVecReg(), SimpleThread::readVecReg(), PhysRegFile::setVecReg(), and SimpleThread::setVecReg().
|
inline |
Get pointer to bytes.
Definition at line 368 of file vec_reg.hh.
Definition at line 371 of file vec_reg.hh.
|
inline |
Zero the container.
Definition at line 296 of file vec_reg.hh.
|
friend |
|
private |
Definition at line 282 of file vec_reg.hh.
Referenced by VecRegContainer< TheISA::VecRegSizeBytes >::operator=(), and VecRegContainer< TheISA::VecRegSizeBytes >::operator==().
|
static |
Definition at line 279 of file vec_reg.hh.