aboutsummaryrefslogtreecommitdiffstats
path: root/src/opts.h
blob: 465c3b8d7e01c57e932d8312415e30627478436c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* ==========================================================================
    Licensed under BSD 2clause license. See LICENSE file for more information
    Author: Michał Łyszczek <michal.lyszczek@bofc.pl>
   ========================================================================== */


#ifndef OPTS_H
#define OPTS_H 1

#include <stddef.h>

#include "config.h"

enum clock
{
#if HAVE_CLOCK_GETTIME
    CLK_REALTIME,
#endif
    CLK_CLOCK
};

enum method
{
    METHOD_MEMCPY,
    METHOD_BBB
};

struct opts
{
    size_t block_size;
    size_t cache_size;
    unsigned long num_intvl;
    float report_intvl;
    enum clock clock;
    enum method method;
};

extern struct opts opts;
int opts_parse(int argc, char *argv[]);

#endif