36 #ifndef __VECTOR_REGISTER_STATE_HH__
37 #define __VECTOR_REGISTER_STATE_HH__
54 void init(uint32_t _size, uint32_t wf_size);
63 read(
int regIdx,
int threadId=0) {
65 assert(
sizeof(T) == 4 ||
sizeof(T) == 8);
67 p0 = (T*)(&
s_reg[regIdx][threadId]);
69 p0 = (T*)(&
d_reg[regIdx][threadId]);
77 write(
unsigned int regIdx, T value,
int threadId=0) {
79 assert(
sizeof(T) == 4 ||
sizeof(T) == 8);
81 p0 = (T*)(&
s_reg[regIdx][threadId]);
83 p0 = (T*)(&
d_reg[regIdx][threadId]);
101 #endif // __VECTOR_REGISTER_STATE_HH__
void init(uint32_t _size, uint32_t wf_size)
T read(int regIdx, int threadId=0)
void setParent(ComputeUnit *_computeUnit)
void write(unsigned int regIdx, T value, int threadId=0)
std::vector< std::vector< uint32_t > > s_reg
const std::string & name() const
std::vector< std::vector< uint64_t > > d_reg
ComputeUnit * computeUnit