Ignore:
Timestamp:
Oct 29, 2020, 3:33:45 PM (15 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
93068e53
Parents:
b35ab2d
Message:

Fixed the cycle benchmark, and implemented go equivalent

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/readyQ/rq_bench.hfa

    rb35ab2d r0b84b15  
    1717volatile unsigned long long threads_left;
    1818
    19 #define thread_loop for(this.count = 0; this.count < stop_count && !stop; this.count++)
     19#define thread_loop for(this.count = 0;; this.count++)
    2020
    2121#define BENCH_OPT \
     
    3636                        clock_mode = true; \
    3737                        stop_count = 0xFFFFFFFFFFFFFFFF; \
     38                        printf("Running for %lf seconds\n", duration); \
    3839                } else if(stop_count > 0) { \
    3940                        clock_mode = false; \
     41                        printf("Running for %lu iterations\n", stop_count); \
    4042                } else { \
    4143                        duration = 5; clock_mode = true;\
     44                        printf("Running for %lf seconds\n", duration); \
    4245                } \
    4346        }
     
    6770}
    6871
    69 void wait(Time & start, Time & end, bool is_tty) {
     72void wait(const Time & start, bool is_tty) {
    7073        for() {
    7174                sleep(100`ms);
    72                 end = getTimeNsec();
     75                Time end = getTimeNsec();
    7376                Duration delta = end - start;
    7477                if(is_tty) {
Note: See TracChangeset for help on using the changeset viewer.