#include <pointer_block.h>
|
typedef Stack::Block | Block |
|
template<typename Stack>
class dart::BlockWorkList< Stack >
Definition at line 158 of file pointer_block.h.
◆ Block
template<typename Stack >
◆ BlockWorkList()
template<typename Stack >
Definition at line 162 of file pointer_block.h.
162 : stack_(stack) {
163 local_output_ = stack_->PopEmptyBlock();
164 local_input_ = stack_->PopEmptyBlock();
165 }
◆ ~BlockWorkList()
template<typename Stack >
◆ AbandonWork()
template<typename Stack >
Definition at line 237 of file pointer_block.h.
237 {
238 stack_->PushBlock(local_output_);
239 local_output_ = nullptr;
240 stack_->PushBlock(local_input_);
241 local_input_ = nullptr;
242 stack_ = nullptr;
243 }
◆ Finalize()
template<typename Stack >
Definition at line 226 of file pointer_block.h.
226 {
227 ASSERT(local_output_->IsEmpty());
228 stack_->PushBlock(local_output_);
229 local_output_ = nullptr;
230 ASSERT(local_input_->IsEmpty());
231 stack_->PushBlock(local_input_);
232 local_input_ = nullptr;
233
234 stack_ = nullptr;
235 }
◆ Flush()
template<typename Stack >
Definition at line 204 of file pointer_block.h.
204 {
205 if (!local_output_->IsEmpty()) {
206 stack_->PushBlock(local_output_);
207 local_output_ = stack_->PopEmptyBlock();
208 }
209 if (!local_input_->IsEmpty()) {
210 stack_->PushBlock(local_input_);
211 local_input_ = stack_->PopEmptyBlock();
212 }
213 }
◆ IsEmpty()
template<typename Stack >
◆ IsLocalEmpty()
template<typename Stack >
Definition at line 245 of file pointer_block.h.
245 {
246 if (!local_input_->IsEmpty()) {
247 return false;
248 }
249 if (!local_output_->IsEmpty()) {
250 return false;
251 }
252 return true;
253 }
◆ Pop()
template<typename Stack >
Definition at line 174 of file pointer_block.h.
174 {
175 ASSERT(local_input_ !=
nullptr);
176 if (
UNLIKELY(local_input_->IsEmpty())) {
177 if (!local_output_->IsEmpty()) {
178 auto temp = local_output_;
179 local_output_ = local_input_;
180 local_input_ = temp;
181 } else {
182 Block* new_work = stack_->PopNonEmptyBlock();
183 if (new_work == nullptr) {
184 return false;
185 }
186 stack_->PushBlock(local_input_);
187 local_input_ = new_work;
188
190 }
191 }
192 *object = local_input_->Pop();
193 return true;
194 }
#define MSAN_UNPOISON(ptr, len)
◆ Push()
template<typename Stack >
Definition at line 196 of file pointer_block.h.
196 {
197 if (
UNLIKELY(local_output_->IsFull())) {
198 stack_->PushBlock(local_output_);
199 local_output_ = stack_->PopEmptyBlock();
200 }
201 local_output_->Push(raw_obj);
202 }
◆ WaitForWork()
template<typename Stack >
Definition at line 215 of file pointer_block.h.
215 {
216 ASSERT(local_input_->IsEmpty() || abort);
217 Block* new_work = stack_->WaitForWork(num_busy, abort);
218 if (new_work == nullptr) {
219 return false;
220 }
221 stack_->PushBlock(local_input_);
222 local_input_ = new_work;
223 return true;
224 }
The documentation for this class was generated from the following file: