source: doc/theses/mike_brooks_MMath/benchmarks/list/fx-cpp-stlref.h@ 6c58850

Last change on this file since 6c58850 was 6c58850, checked in by Michael Brooks <mlbrooks@…>, 6 weeks ago

Revise data in linked-list plots with streamlined harness and data from runs on swift.

No change to text discussing the plots, so some of that discussion is now stale.

Harness changes allow more ifdef feature disabling and eliminate side-array usage, keeping all per-node harness state inside the list nodes.

Completely disable the interleaving experiment, which was not giving discernable data.

  • Property mode set to 100644
File size: 1.3 KB
Line 
1#include <list>
2using namespace std;
3
4#define BFX_INTRUSION(S)
5#define BFX_EXTRUSION_DECL(S)
6#define BFX_EXTRUSION_FOLLOWUP(S)
7#define BFX_LIST_HEAD_T(S) list<S*>
8#define BFX_LISTED_ELEM_T(S) list<S*>::iterator
9
10#define BFX_INSERT_FIRST(S, lst, item) (lst.push_front(&item), lst.begin())
11#define BFX_INSERT_LAST(S, lst, item) (lst.push_back(&item), BFX_GET_BEFORE(S, lst, lst.end()))
12#define BFX_REMOVE_FIRST(S, lst) lst.pop_front()
13#define BFX_REMOVE_LAST(S, lst) lst.pop_back()
14#define BFX_INSERT_BEFORE(S, lst, item, refIter) lst.insert(refIter, &item)
15#define BFX_INSERT_AFTER(S, lst, item, refIter) lst.insert(BFX_GET_AFTER(S, lst, refIter), &item)
16#define BFX_REMOVE_HERE(S, lst, refIter) lst.erase(refIter)
17#define BFX_INIT(S, lst)
18
19#define BFX_GET_FIRST(S, lst) ((lst).begin())
20#define BFX_GET_AFTER(S, lst, iter) ({ list<S*>::iterator answer = (iter); answer++; answer;})
21#define BFX_GET_BEFORE(S, lst, iter) ({ list<S*>::iterator answer = (iter); if ((answer) == lst.begin()) { answer = lst.end(); } else { answer--; } answer; })
22#define BFX_IS_VALID_POS(S, lst, iter) ((iter)!=lst.end())
23#define BFX_DEREF_POS(S, lst, iter) (*iter)
Note: See TracBrowser for help on using the repository browser.