14 EraseAt(
const Vector *vector,
const size_t idx)
23 if (next_.load() !=
reinterpret_cast<helper_t *
>(0x1)) {
24 result = next_.load()->rvalue;
39 return completeShift< EraseAt<T> >(
this,
vector_, pos);
43 return is_complete_.load();
49 helper_t *parent = next;
50 helper_t *helper = parent->next.load();
53 for (i =
idx_+1; helper != NULL; i++) {
54 ArrayElement *spot = vec->getSpot(i);
55 T current = spot->load();
59 if (current == unmark_helper) {
60 if (helper->next.load() == NULL) {
61 spot->compare_exchange_strong(current, Vector::c_not_value_);
63 spot->compare_exchange_strong(current, helper->next.load()->rvalue);
67 helper = helper->next.load();
__thread void * tl_control_word
void cleanup()
Definition: earaseat_op.h:48
const Vector< T > * vector_
Definition: earaseat_op.h:9
Definition: shift_helper.h:7
void execute()
Definition: earaseat_op.h:31
EraseAt(const Vector *vector, const size_t idx)
Definition: earaseat_op.h:14
bool complete(int pos)
Definition: earaseat_op.h:38
tervel::util::Descriptor * unmark_first(void *descr)
This returns an unbitmarked reference.
Definition: descriptor_util.h:178
const size_t idx_
Definition: earaseat_op.h:8
bool is_complete()
Definition: earaseat_op.h:42
std::atomic< bool > is_complete_
Definition: earaseat_op.h:10
bool begin(const T &result)
Definition: earaseat_op.h:20
Definition: earaseat_op.h:4
std::atomic< helper_t * > next_
Definition: earaseat_op.h:11