AtomicOpAnd(T _a) : a(_a) { }
void execute(T *b) { *b &= a; }
+ AtomicOpFunctor* clone () { return new AtomicOpAnd(a); }
};
template<typename T>
T a;
AtomicOpOr(T _a) : a(_a) { }
void execute(T *b) { *b |= a; }
+ AtomicOpFunctor* clone () { return new AtomicOpOr(a); }
};
template<typename T>
T a;
AtomicOpXor(T _a) : a(_a) {}
void execute(T *b) { *b ^= a; }
+ AtomicOpFunctor* clone () { return new AtomicOpXor(a); }
};
template<typename T>
computeUnit->xactCasLoadMap.clear();
}
}
+ AtomicOpFunctor* clone () { return new AtomicOpCAS(c, s, computeUnit); }
};
template<typename T>
T a;
AtomicOpExch(T _a) : a(_a) { }
void execute(T *b) { *b = a; }
+ AtomicOpFunctor* clone () { return new AtomicOpExch(a); }
};
template<typename T>
T a;
AtomicOpAdd(T _a) : a(_a) { }
void execute(T *b) { *b += a; }
+ AtomicOpFunctor* clone () { return new AtomicOpAdd(a); }
};
template<typename T>
T a;
AtomicOpSub(T _a) : a(_a) { }
void execute(T *b) { *b -= a; }
+ AtomicOpFunctor* clone () { return new AtomicOpSub(a); }
};
template<typename T>
public:
AtomicOpInc() { }
void execute(T *b) { *b += 1; }
+ AtomicOpFunctor* clone () { return new AtomicOpInc(); }
};
template<typename T>
public:
AtomicOpDec() {}
void execute(T *b) { *b -= 1; }
+ AtomicOpFunctor* clone () { return new AtomicOpDec(); }
};
template<typename T>
if (a > *b)
*b = a;
}
+ AtomicOpFunctor* clone () { return new AtomicOpMax(a); }
};
template<typename T>
if (a < *b)
*b = a;
}
+ AtomicOpFunctor* clone () { return new AtomicOpMin(a); }
};
typedef enum