source: doc/theses/mike_brooks_MMath/benchmarks/list/fx-upp-upp.h @ ab2b352

ADTast-experimental
Last change on this file since ab2b352 was 0b66ef9, checked in by Michael Brooks <mlbrooks@…>, 19 months ago

Add linked list performance experiment

  • Property mode set to 100644
File size: 1.0 KB
Line 
1#include <uC++.h>
2#include <uSequence.h>
3
4#define BFX_INTRUSION(S)
5#define BFX_EXTRUSION_DECL(S)                    : public uSeqable
6#define BFX_EXTRUSION_FOLLOWUP(S)
7#define BFX_LIST_HEAD_T(S)                       uSequence<S>
8#define BFX_LISTED_ELEM_T(S)                     S*
9
10#define BFX_INSERT_FIRST(S, lst, item)           lst.addHead(&item)
11#define BFX_INSERT_LAST(S, lst, item)            lst.addTail(&item)
12#define BFX_REMOVE_FIRST(S, lst)                 lst.dropHead()
13#define BFX_REMOVE_LAST(S, lst)                  lst.dropTail()
14#define BFX_INSERT_BEFORE(S, lst, item, refIter) lst.insertBef(&item, refIter)
15#define BFX_INSERT_AFTER(S, lst, item, refIter)  lst.insertAft(refIter, &item)
16#define BFX_REMOVE_HERE(S, lst, refIter)         lst.remove(refIter)
17#define BFX_INIT(S, lst)
18
19#define BFX_GET_AFTER(S, lst, iter)              lst.succ(iter)
20#define BFX_GET_BEFORE(S, lst, iter)             lst.pred(iter)
21#define BFX_IS_VALID_POS(S, lst, iter)           ((iter)!=NULL)
22#define BFX_DEREF_POS(S, lst, iter)              (iter)
Note: See TracBrowser for help on using the repository browser.