stack.hpp (315B)
1 #ifndef STACK_HPP 2 #define STACK_HPP 3 4 #include <atomic> 5 #include <cstddef> 6 #include <cstdint> 7 8 #include "benchmark.h" 9 10 namespace lf { 11 12 template <typename T> 13 struct stack { 14 15 private: 16 T *buffer; 17 size_t cap, cur; 18 }; 19 20 struct benchmark 21 stack_benchmark(void) 22 { 23 return {"Lock-free Stack"}; 24 } 25 26 }; 27 28 #endif /* STACK_HPP */