Go to the documentation of this file.
29 #ifndef __BASE_TIMEBUF_HH__
30 #define __BASE_TIMEBUF_HH__
116 return wire(
this,
i);
129 return wire(
this,
i);
143 for (
unsigned i = 0;
i <
size;
i++) {
145 std::memset(ptr, 0,
sizeof(T));
160 for (
unsigned i = 0;
i <
size; ++
i)
161 (
reinterpret_cast<T *
>(
index[
i]))->~T();
182 if (ptr >= (
int)
size)
184 (
reinterpret_cast<T *
>(
index[ptr]))->~T();
185 std::memset(
index[ptr], 0,
sizeof(T));
197 int vector_index = idx +
base;
198 if (vector_index >= (
int)
size) {
199 vector_index -=
size;
200 }
else if (vector_index < 0) {
201 vector_index +=
size;
212 return reinterpret_cast<T *
>(
index[vector_index]);
219 return reinterpret_cast<T &
>(*
index[vector_index]);
226 return reinterpret_cast<const T &
>(*
index[vector_index]);
233 return wire(
this, idx);
238 return wire(
this, 0);
247 #endif // __BASE_TIMEBUF_HH__
const wire & operator-=(int offset)
int calculateVectorIndex(int idx) const
const wire & operator+=(int offset)
wire(TimeBuffer< T > *buf, int i)
void valid(int idx) const
const wire & operator=(const wire &i)
const wire & operator=(int idx)
std::vector< char * > index
Generated on Wed Sep 30 2020 14:02:10 for gem5 by doxygen 1.8.17