Skip to content

Commit a0cad84

Browse files
Fix some typos (#78)
* Fix some typos * Fix some more typos (#77 follow-up) * Add/Fix link to Bench::context
1 parent 92d1822 commit a0cad84

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/docs/tutorial.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ output:
342342
:language: c++
343343
:linenos:
344344

345-
Nanobench allows to specify further context information, which may be accessed using ``{{context(name)}}`` where ``name`` names a variable defined in ``Bench::context()``.
345+
Nanobench allows to specify further context information, which may be accessed using ``{{context(name)}}`` where ``name`` names a variable defined via :cpp:func:`Bench::context() <ankerl::nanobench::Bench::context()>`.
346346

347347
.. literalinclude:: ../test/tutorial_context.cpp
348348
:language: c++

src/include/nanobench.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class BigO;
149149
*
150150
* * `{{name}}` Benchmark name, usually directly provided with Bench::run(), but can also be set with Bench::name().
151151
*
152-
* * `{{unit}}` Unit, e.g. `byte`. Defaults to `op`, see Bench::title().
152+
* * `{{unit}}` Unit, e.g. `byte`. Defaults to `op`, see Bench::unit().
153153
*
154154
* * `{{batch}}` Batch size, see Bench::batch().
155155
*
@@ -178,7 +178,7 @@ class BigO;
178178
*
179179
* * `{{relative}}` True or false, depending on the setting you have used. See Bench::relative().
180180
*
181-
* * `{{context(variableName)}} See Bench::context().
181+
* * `{{context(variableName)}}` See Bench::context().
182182
*
183183
* Apart from these tags, it is also possible to use some mathematical operations on the measurement data. The operations
184184
* are of the form `{{command(name)}}`. Currently `name` can be one of `elapsed`, `iterations`. If performance counters
@@ -204,7 +204,7 @@ class BigO;
204204
* This measurement is a bit hard to interpret, but it is very robust against outliers. E.g. a value of 5% means that half of the
205205
* measurements deviate less than 5% from the median, and the other deviate more than 5% from the median.
206206
*
207-
* * `{{sum(<name>)}}` Sums of all the measurements. E.g. `{{sum(iterations)}}` will give you the total number of iterations
207+
* * `{{sum(<name>)}}` Sum of all the measurements. E.g. `{{sum(iterations)}}` will give you the total number of iterations
208208
* measured in this benchmark.
209209
*
210210
* * `{{minimum(<name>)}}` Minimum of all measurements.
@@ -247,21 +247,21 @@ class BigO;
247247
* For the layer tags *result* and *measurement* you additionally can use these special markers:
248248
*
249249
* * ``{{#-first}}`` - Begin marker of a template that will be instantiated *only for the first* entry in the layer. Use is only
250-
* allowed between the begin and end marker of the layer allowed. So between ``{{#result}}`` and ``{{/result}}``, or between
250+
* allowed between the begin and end marker of the layer. So between ``{{#result}}`` and ``{{/result}}``, or between
251251
* ``{{#measurement}}`` and ``{{/measurement}}``. Finish the template with ``{{/-first}}``.
252252
*
253253
* * ``{{^-first}}`` - Begin marker of a template that will be instantiated *for each except the first* entry in the layer. This,
254-
* this is basically the inversion of ``{{#-first}}``. Use is only allowed between the begin and end marker of the layer allowed.
254+
* this is basically the inversion of ``{{#-first}}``. Use is only allowed between the begin and end marker of the layer.
255255
* So between ``{{#result}}`` and ``{{/result}}``, or between ``{{#measurement}}`` and ``{{/measurement}}``.
256256
*
257257
* * ``{{/-first}}`` - End marker for either ``{{#-first}}`` or ``{{^-first}}``.
258258
*
259259
* * ``{{#-last}}`` - Begin marker of a template that will be instantiated *only for the last* entry in the layer. Use is only
260-
* allowed between the begin and end marker of the layer allowed. So between ``{{#result}}`` and ``{{/result}}``, or between
260+
* allowed between the begin and end marker of the layer. So between ``{{#result}}`` and ``{{/result}}``, or between
261261
* ``{{#measurement}}`` and ``{{/measurement}}``. Finish the template with ``{{/-last}}``.
262262
*
263263
* * ``{{^-last}}`` - Begin marker of a template that will be instantiated *for each except the last* entry in the layer. This,
264-
* this is basically the inversion of ``{{#-last}}``. Use is only allowed between the begin and end marker of the layer allowed.
264+
* this is basically the inversion of ``{{#-last}}``. Use is only allowed between the begin and end marker of the layer.
265265
* So between ``{{#result}}`` and ``{{/result}}``, or between ``{{#measurement}}`` and ``{{/measurement}}``.
266266
*
267267
* * ``{{/-last}}`` - End marker for either ``{{#-last}}`` or ``{{^-last}}``.
@@ -698,7 +698,7 @@ class Bench {
698698
/**
699699
* @brief Reset context information.
700700
*
701-
* This may be improve efficiency when using many context entries,
701+
* This may improve efficiency when using many context entries,
702702
* or improve robustness by removing spurious context entries.
703703
*
704704
* @see context()

0 commit comments

Comments
 (0)