Commit | Line | Data |
---|---|---|
c4ccbbf9 MW |
1 | .\" -*-nroff-*- |
2 | .\" | |
3 | .\" Manual for bencharking with the test-vector framework | |
4 | .\" | |
5 | .\" (c) 2024 Straylight/Edgeware | |
6 | .\" | |
7 | . | |
8 | .\"----- Licensing notice --------------------------------------------------- | |
9 | .\" | |
10 | .\" This file is part of the mLib utilities library. | |
11 | .\" | |
12 | .\" mLib is free software: you can redistribute it and/or modify it under | |
13 | .\" the terms of the GNU Library General Public License as published by | |
14 | .\" the Free Software Foundation; either version 2 of the License, or (at | |
15 | .\" your option) any later version. | |
16 | .\" | |
17 | .\" mLib is distributed in the hope that it will be useful, but WITHOUT | |
18 | .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
19 | .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public | |
20 | .\" License for more details. | |
21 | .\" | |
22 | .\" You should have received a copy of the GNU Library General Public | |
23 | .\" License along with mLib. If not, write to the Free Software | |
24 | .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
25 | .\" USA. | |
26 | . | |
27 | .\"-------------------------------------------------------------------------- | |
28 | .so ../defs.man \" @@@PRE@@@ | |
29 | . | |
30 | .\"-------------------------------------------------------------------------- | |
31 | .TH tvec-bench 3mLib "11 March 2024" "Straylight/Edgeware" "mLib utilities library" | |
32 | .\" @TVEC_BENCHENV | |
33 | .\" @TVEC_BENCHINIT | |
b1a20bee MW |
34 | .\" @tvec_benchstate |
35 | .\" @tvec_benchoutputfallback | |
c4ccbbf9 MW |
36 | .\" @tvec_benchreport |
37 | . | |
38 | .\"-------------------------------------------------------------------------- | |
39 | .SH NAME | |
40 | tvec-bench \- benchmarking with the test vector framework | |
41 | . | |
42 | .\"-------------------------------------------------------------------------- | |
43 | .SH SYNOPSIS | |
44 | . | |
45 | .nf | |
b1a20bee | 46 | .B "#include <mLib/tvec-bench.h>" |
c4ccbbf9 MW |
47 | .PP |
48 | .ta 2n | |
49 | .B "struct tvec_benchenv {" | |
50 | .B " struct tvec_env _env;" | |
51 | .B " struct bench_state **bst;" | |
52 | .B " unsigned long niter;" | |
53 | .B " int riter, rbuf;" | |
54 | .B " const struct tvec_env *env;" | |
55 | .B "};" | |
c4ccbbf9 MW |
56 | .B "#define TVEC_BENCHENV ..." |
57 | .B "#define TVEC_BENCHINIT ..." | |
b1a20bee MW |
58 | .PP |
59 | .B "struct bench_state *tvec_benchstate;" | |
60 | .PP | |
61 | .B "#define TVEC_BENCHOUTEXT ""tvec-bench""" | |
c4ccbbf9 MW |
62 | .B "enum {" |
63 | .B " TVBU_OP = ...," | |
64 | .B " TVBU_BYTE = ...," | |
65 | .B " ...," | |
66 | .B " TVBU_LIMIT" | |
67 | .B "};" | |
b1a20bee MW |
68 | .B "struct tvec_benchoutops {" |
69 | .BI " void (*" bbench ")(struct tvec_output *" o ", unsigned " unit ); | |
70 | .ta 2n +\w'\fBvoid (*\,\fIebench\/\fB)('u | |
71 | .BI " void (*" ebench ")(struct tvec_output *" o ", unsigned " unit , | |
72 | .BI " const struct bench_timing *" tm ); | |
73 | .B "};" | |
74 | .B "extern const struct tvec_benchoutops tvec_benchoutputfallback;" | |
c4ccbbf9 MW |
75 | .PP |
76 | .ta \w'\fBvoid tvec_benchreport('u | |
77 | .BI "void tvec_benchreport(const struct gprintf_ops *" gops ", void *" go , | |
5c0f2e08 MW |
78 | .BI " unsigned " unit ", unsigned " style , |
79 | .BI " const struct bench_timing *" tm ); | |
c4ccbbf9 | 80 | .fi |