ADT
arm-eh
ast-experimental
enum
forall-pointer-decay
jacob/cs343-translation
jenkins-sandbox
new-ast
new-ast-unique-expr
pthread-emulation
qualifiedEnum
|
Last change
on this file since 9421f3d8 was 9421f3d8, checked in by Thierry Delisle <tdelisle@…>, 6 years ago |
|
Adding some of the implemented code. Current state: relaxed list is achieves at least 6M ops/sec total
|
-
Property mode
set to
100644
|
|
File size:
385 bytes
|
| Line | |
|---|
| 1 | #define NO_IO
|
|---|
| 2 | #define NDEBUG
|
|---|
| 3 | #include "relaxed_list.hpp"
|
|---|
| 4 |
|
|---|
| 5 | struct __attribute__((aligned(64))) Node {
|
|---|
| 6 | static std::atomic_size_t creates;
|
|---|
| 7 | static std::atomic_size_t destroys;
|
|---|
| 8 |
|
|---|
| 9 | _LinksFields_t<Node> _links;
|
|---|
| 10 |
|
|---|
| 11 | int value;
|
|---|
| 12 | Node(int value): value(value) {
|
|---|
| 13 | creates++;
|
|---|
| 14 | }
|
|---|
| 15 |
|
|---|
| 16 | ~Node() {
|
|---|
| 17 | destroys++;
|
|---|
| 18 | }
|
|---|
| 19 | };
|
|---|
| 20 |
|
|---|
| 21 | int main() {
|
|---|
| 22 | return sizeof(relaxed_list<Node>) + relaxed_list<Node>::sizeof_queue;
|
|---|
| 23 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.