gem5
v20.1.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, SIZE > |
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 Member Functions | |
static constexpr size_t | size () |
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 156 of file vec_reg.hh.
using VecRegContainer< SIZE >::Container = std::array<uint8_t, SIZE> |
Definition at line 280 of file vec_reg.hh.
|
private |
Definition at line 284 of file vec_reg.hh.
|
inline |
Definition at line 287 of file vec_reg.hh.
|
default |
|
inline |
Definition at line 290 of file vec_reg.hh.
|
inline |
Definition at line 396 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 386 of file vec_reg.hh.
Referenced by ArmV8KvmCPU::updateKvmState(), ArmV8KvmCPU::updateThreadContext(), Trace::TarmacTracerRecordV8::TraceRegEntryV8::updateVec(), and ArmISA::ISA::zeroSveVecRegUpperPart().
|
inline |
Copy the contents into the input buffer.
To appropriately sized uint8_t[]
Definition at line 331 of file vec_reg.hh.
|
inline |
To vector<uint8_t> This is required for serialisation.
Definition at line 339 of file vec_reg.hh.
VecLaneT< VecElem, false > VecRegContainer< Sz >::laneView |
View as the Nth lane of type VecElem.
Definition at line 596 of file vec_reg.hh.
Referenced by PhysRegFile::readVecLane().
VecLaneT< VecElem, true > VecRegContainer< Sz >::laneView |
View as the const Nth lane of type VecElem.
Definition at line 605 of file vec_reg.hh.
VecLaneT< VecElem, false > VecRegContainer< Sz >::laneView | ( | int | laneIdx | ) |
View as the Nth lane of type VecElem.
Definition at line 614 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 623 of file vec_reg.hh.
|
inline |
Inequality operator.
Required to compare thread contexts.
Definition at line 361 of file vec_reg.hh.
|
inline |
From appropriately sized uint8_t[].
Definition at line 311 of file vec_reg.hh.
|
inline |
|
inline |
From vector<uint8_t>.
This is required for de-serialisation.
Definition at line 320 of file vec_reg.hh.
|
inline |
Equality operator.
Required to compare thread contexts.
Definition at line 351 of file vec_reg.hh.
Referenced by VecRegContainer< TheISA::VecRegSizeBytes >::operator!=().
|
inline |
Definition at line 366 of file vec_reg.hh.
Referenced by SimpleThread::getWritableVecReg(), and SimpleThread::readVecReg().
Definition at line 372 of file vec_reg.hh.
|
inline |
Get pointer to bytes.
Definition at line 369 of file vec_reg.hh.
|
inlinestaticconstexpr |
Definition at line 279 of file vec_reg.hh.
|
inline |
Zero the container.
Definition at line 297 of file vec_reg.hh.
|
friend |
|
private |
Definition at line 283 of file vec_reg.hh.
Referenced by VecRegContainer< TheISA::VecRegSizeBytes >::copyTo(), VecRegContainer< TheISA::VecRegSizeBytes >::operator=(), VecRegContainer< TheISA::VecRegSizeBytes >::operator==(), VecRegContainer< TheISA::VecRegSizeBytes >::raw_ptr(), VecRegContainer< TheISA::VecRegSizeBytes >::VecRegContainer(), and VecRegContainer< TheISA::VecRegSizeBytes >::zero().