Changeset b8c1307


Ignore:
Timestamp:
Apr 22, 2020, 5:29:28 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
8962722, 93ace83
Parents:
185efe6 (diff), 6d5b85a (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:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/io/readv.cfa

    r185efe6 rb8c1307  
    1717#include <time.hfa>
    1818
     19extern bool traceHeapOn();
    1920extern ssize_t async_preadv2(int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags);
    2021
     
    3839}
    3940
    40 Time now(void);
    41 
    4241int main(int argc, char * argv[]) {
    4342        double duration   = 5.0;
     
    4544        unsigned long int nprocs   = 1;
    4645
     46        printf("Setting local\n");
    4747        setlocale(LC_NUMERIC, "");
     48
    4849
    4950        arg_loop:
     
    7677                        case 't':
    7778                                nthreads = strtoul(arg, &end, 10);
    78                                 if(*end != '\0') {
     79                                if(*end != '\0' || nthreads < 1) {
    7980                                        fprintf(stderr, "Number of threads must be a positive integer, was %s\n", arg);
    8081                                        goto usage;
     
    8384                        case 'p':
    8485                                nprocs = strtoul(arg, &end, 10);
    85                                 if(*end != '\0') {
     86                                if(*end != '\0' || nprocs < 1) {
    8687                                        fprintf(stderr, "Number of processors must be a positive integer, was %s\n", arg);
    8788                                        goto usage;
     
    119120        Time start, end;
    120121        {
    121                 processor procs[nprocs];
     122                processor procs[nprocs - 1];
    122123                {
    123124                        Reader threads[nthreads];
     
    134135                }
    135136        }
    136         printf("Done\n");
    137137        printf("Took %ld ms\n", (end - start)`ms);
    138138        printf("Total reads:      %'zu\n", count);
     
    140140
    141141        close(fd);
     142        printf("Done\n");
    142143}
Note: See TracChangeset for help on using the changeset viewer.