Lines Matching refs:offset

52   // Load value of type `T` at `offset`.  The memory address corresponding
53 // to `offset` should be word-aligned (on ARM, this is a requirement).
55 ALWAYS_INLINE T Load(uintptr_t offset) const {
56 T* address = ComputeInternalPointer<T>(offset);
61 // Store `value` (of type `T`) at `offset`. The memory address
62 // corresponding to `offset` should be word-aligned (on ARM, this is
65 ALWAYS_INLINE void Store(uintptr_t offset, T value) const {
66 T* address = ComputeInternalPointer<T>(offset);
71 // Load value of type `T` at `offset`. The memory address corresponding
72 // to `offset` does not need to be word-aligned.
74 ALWAYS_INLINE T LoadUnaligned(uintptr_t offset) const {
81 *ComputeInternalPointer<uint8_t>(offset + i) << (i * kBitsPerByte);
86 // Store `value` (of type `T`) at `offset`. The memory address
87 // corresponding to `offset` does not need to be word-aligned.
89 ALWAYS_INLINE void StoreUnaligned(uintptr_t offset, T value) const {
95 *ComputeInternalPointer<uint8_t>(offset + i) =
101 ALWAYS_INLINE T* PointerTo(uintptr_t offset) const {
102 return ComputeInternalPointer<T>(offset);
105 // Load a single bit in the region. The bit at offset 0 is the least
123 // Load `length` bits from the region starting at bit offset `bit_offset`.
124 // The bit at the smallest offset is the least significant bit in the
136 // Store `value` on `length` bits in the region starting at bit offset
137 // `bit_offset`. The bit at the smallest offset is the least significant
148 void CopyFrom(size_t offset, const MemoryRegion& from) const;
151 MemoryRegion Subregion(uintptr_t offset, uintptr_t size_in) const {
153 CHECK_LE(offset, this->size() - size_in);
154 return MemoryRegion(reinterpret_cast<void*>(start() + offset), size_in);
165 ALWAYS_INLINE T* ComputeInternalPointer(size_t offset) const {
167 CHECK_LE(offset, size() - sizeof(T));
168 return reinterpret_cast<T*>(start() + offset);
171 // Locate the bit with the given offset. Returns a pointer to the byte