Atomic operations benchmark
#include <atomic>
template <typename T>
class AtomicFixture
{
protected:
std::atomic<T> x;
T y;
T z;
};
{
x.compare_exchange_strong(y, z, std::memory_order_acq_rel);
}
{
x.compare_exchange_strong(y, z, std::memory_order_acq_rel);
}
{
x.fetch_add(y, std::memory_order_acq_rel);
}
{
x.fetch_add(y, std::memory_order_acq_rel);
}
CppBenchmark definitions.
#define BENCHMARK_FIXTURE(fixture,...)
Benchmark with fixture register macro.
#define BENCHMARK_MAIN()
Benchmark main entry point macro.