25 #ifndef __TERVEL_CONTAINERS_WF_VECTOR_READ_OP_H
26 #define __TERVEL_CONTAINERS_WF_VECTOR_READ_OP_H
31 #include <tervel/containers/wf/vector/vector.hpp>
34 namespace containers {
48 if (idx_ < vec_->capacity()) {
49 std::atomic<T> *spot =
vec_->internal_array.get_spot(
idx_,
false);
51 while (
value_.load() == Vector<T>::c_not_value_) {
52 T cvalue = spot->load();
55 if (cvalue == Vector<T>::c_not_value_) {
58 }
else if (
vec_->internal_array.is_descriptor(cvalue, spot)) {
61 assert(
vec_->internal_array.is_valid(cvalue));
85 std::atomic<T>
value_ {Vector<T>::c_not_value_};
93 #endif //__TERVEL_CONTAINERS_WF_VECTOR_READ_OP_H
__thread void * tl_control_word
bool result(T &expected)
Definition: read_op.h:71
std::atomic< T > value_
Definition: read_op.h:85
static const T c_fail_value_
Definition: read_op.h:86
TODO(steven):
Definition: mcas.h:36
ReadOp(Vector< T > *vec, size_t idx)
Definition: read_op.h:42
void help_complete()
Implementations of this function that upon its return the operation described in the OpRecord has bee...
Definition: read_op.h:46
This class is used to create Operation Records.
Definition: progress_assurance.h:52
size_t idx_
Definition: read_op.h:84
Vector< T > * vec_
Definition: read_op.h:79