Ignore:
Timestamp:
May 1, 2023, 4:19:09 PM (20 months ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, master
Children:
c083c3d
Parents:
a50fdfb (diff), 985b624 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

resolved merge conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/mike_brooks_MMath/benchmarks/list/_classic.c

    ra50fdfb r6e1e2d0  
    171171#endif
    172172
    173 
    174 #define Repeat( op ) for ( volatile unsigned int i = 0; i < NoOfNodes; i += 1 ) { op; }
     173volatile unsigned int t = 0;
     174volatile unsigned int i_official = 0;
     175
     176#define Repeat( op ) for ( unsigned int i = 0; (i_official = i, i < NoOfNodes); i += 1 ) { op; }
    175177
    176178int main() {
     
    192194        TAILQ_INIT(&lst);
    193195        start = clock();
    194         for ( volatile unsigned int t = 0; t < Times; t += 1 ) {
     196        for ( t = 0; t < Times; t += 1 ) {
    195197                Repeat( TAILQ_INSERT_TAIL( &lst, &s[i], x ) );
    196198                Repeat( TAILQ_REMOVE( &lst, TAILQ_FIRST( &lst ), x ) );
     
    204206        std::list<S *> lst;
    205207        start = clock();
    206         for ( volatile unsigned int t = 0; t < Times; t += 1 ) {
     208        for ( t = 0; t < Times; t += 1 ) {
    207209                Repeat( lst.push_back( &s[i] ) );
    208210                Repeat( lst.pop_front() );
     
    216218        uSequence<S> lst;
    217219        start = clock();
    218         for ( volatile unsigned int t = 0; t < Times; t += 1 ) {
     220        for ( t = 0; t < Times; t += 1 ) {
    219221                Repeat( lst.addTail( &s[i] ) );
    220222                Repeat( lst.dropHead() );
     
    228230        dlist(S) lst;
    229231        start = clock();
    230         for ( volatile unsigned int t = 0; t < Times; t += 1 ) {
     232        for ( t = 0; t < Times; t += 1 ) {
    231233                Repeat( insert_last( lst, s[i] ) );
    232234                Repeat( remove( lst`first ) );
     
    240242        Sequence(S) lst;
    241243        start = clock();
    242         for ( volatile unsigned int t = 0; t < Times; t += 1 ) {
     244        for ( t = 0; t < Times; t += 1 ) {
    243245                Repeat( addHead( lst, s[i] ) );
    244246                Repeat( dropTail( lst ) );
Note: See TracChangeset for help on using the changeset viewer.