Skip to content

Commit

Permalink
regenerated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
martinus committed Aug 1, 2020
1 parent c7cb601 commit c387ca4
Show file tree
Hide file tree
Showing 11 changed files with 161 additions and 73 deletions.
4 changes: 2 additions & 2 deletions docs/CODE_OF_CONDUCT.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>

<script type="text/javascript" src="_static/js/theme.js"></script>

Expand Down Expand Up @@ -65,7 +65,7 @@


<div class="version">
4.0.0
4.0.2
</div>


Expand Down
141 changes: 114 additions & 27 deletions docs/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ div.clearer {
clear: both;
}

div.section::after {
display: block;
content: '';
clear: left;
}

/* -- relbar ---------------------------------------------------------------- */

div.related {
Expand Down Expand Up @@ -316,21 +322,27 @@ img.align-default, .figure.align-default {
div.sidebar {
margin: 0 0 0.5em 1em;
border: 1px solid #ddb;
padding: 7px 7px 0 7px;
padding: 7px;
background-color: #ffe;
width: 40%;
float: right;
clear: right;
overflow-x: auto;
}

p.sidebar-title {
font-weight: bold;
}

div.admonition, div.topic, blockquote {
clear: left;
}

/* -- topics ---------------------------------------------------------------- */

div.topic {
border: 1px solid #ccc;
padding: 7px 7px 0 7px;
padding: 7px;
margin: 10px 0 10px 0;
}

Expand All @@ -352,10 +364,6 @@ div.admonition dt {
font-weight: bold;
}

div.admonition dl {
margin-bottom: 0;
}

p.admonition-title {
margin: 0px 10px 5px 0px;
font-weight: bold;
Expand All @@ -366,9 +374,28 @@ div.body p.centered {
margin-top: 25px;
}

/* -- content of sidebars/topics/admonitions -------------------------------- */

div.sidebar > :last-child,
div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
}

div.sidebar::after,
div.topic::after,
div.admonition::after,
blockquote::after {
display: block;
content: '';
clear: both;
}

/* -- tables ---------------------------------------------------------------- */

table.docutils {
margin-top: 10px;
margin-bottom: 10px;
border: 0;
border-collapse: collapse;
}
Expand Down Expand Up @@ -416,13 +443,13 @@ table.citation td {
border-bottom: none;
}

th > p:first-child,
td > p:first-child {
th > :first-child,
td > :first-child {
margin-top: 0px;
}

th > p:last-child,
td > p:last-child {
th > :last-child,
td > :last-child {
margin-bottom: 0px;
}

Expand Down Expand Up @@ -468,6 +495,10 @@ table.field-list td, table.field-list th {

/* -- hlist styles ---------------------------------------------------------- */

table.hlist {
margin: 1em 0;
}

table.hlist td {
vertical-align: top;
}
Expand Down Expand Up @@ -495,17 +526,37 @@ ol.upperroman {
list-style: upper-roman;
}

li > p:first-child {
:not(li) > ol > li:first-child > :first-child,
:not(li) > ul > li:first-child > :first-child {
margin-top: 0px;
}

li > p:last-child {
:not(li) > ol > li:last-child > :last-child,
:not(li) > ul > li:last-child > :last-child {
margin-bottom: 0px;
}

ol.simple ol p,
ol.simple ul p,
ul.simple ol p,
ul.simple ul p {
margin-top: 0;
}

ol.simple > li:not(:first-child) > p,
ul.simple > li:not(:first-child) > p {
margin-top: 0;
}

ol.simple p,
ul.simple p {
margin-bottom: 0;
}

dl.footnote > dt,
dl.citation > dt {
float: left;
margin-right: 0.5em;
}

dl.footnote > dd,
Expand Down Expand Up @@ -546,7 +597,7 @@ dl {
margin-bottom: 15px;
}

dd > p:first-child {
dd > :first-child {
margin-top: 0px;
}

Expand All @@ -560,6 +611,11 @@ dd {
margin-left: 30px;
}

dl > dd:last-child,
dl > dd:last-child > :last-child {
margin-bottom: 0;
}

dt:target, span.highlighted {
background-color: #fbe54e;
}
Expand Down Expand Up @@ -637,29 +693,68 @@ pre {
overflow-y: hidden; /* fixes display issues on Chrome browsers */
}

pre, div[class|="highlight"] {
clear: both;
}

span.pre {
-moz-hyphens: none;
-ms-hyphens: none;
-webkit-hyphens: none;
hyphens: none;
}

div[class^="highlight-"] {
margin: 1em 0;
}

td.linenos pre {
padding: 5px 0px;
border: 0;
background-color: transparent;
color: #aaa;
}

table.highlighttable {
margin-left: 0.5em;
display: block;
}

table.highlighttable tbody {
display: block;
}

table.highlighttable tr {
display: flex;
}

table.highlighttable td {
padding: 0 0.5em 0 0.5em;
margin: 0;
padding: 0;
}

table.highlighttable td.linenos {
padding-right: 0.5em;
}

table.highlighttable td.code {
flex: 1;
overflow: hidden;
}

.highlight .hll {
display: block;
}

div.highlight pre,
table.highlighttable pre {
margin: 0;
}

div.code-block-caption + div {
margin-top: 0;
}

div.code-block-caption {
margin-top: 1em;
padding: 2px 5px;
font-size: small;
}
Expand All @@ -668,10 +763,7 @@ div.code-block-caption code {
background-color: transparent;
}

div.code-block-caption + div > div.highlight > pre {
margin-top: 0;
}

table.highlighttable td.linenos,
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
}
Expand All @@ -685,11 +777,7 @@ div.code-block-caption span.caption-text {
}

div.literal-block-wrapper {
padding: 1em 1em 0;
}

div.literal-block-wrapper div.highlight {
margin: 0;
margin: 1em 0;
}

code.descname {
Expand Down Expand Up @@ -740,8 +828,7 @@ span.eqno {
}

span.eqno a.headerlink {
position: relative;
left: 0px;
position: absolute;
z-index: 1;
}

Expand Down
60 changes: 31 additions & 29 deletions docs/comparison.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>

<script type="text/javascript" src="_static/js/theme.js"></script>

Expand Down Expand Up @@ -66,7 +66,7 @@


<div class="version">
4.0.0
4.0.2
</div>


Expand Down Expand Up @@ -984,7 +984,8 @@ <h3>Sourcecode<a class="headerlink" href="#id14" title="Permalink to this headli
36
37
38
39</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">#include</span> <span class="cpf">&quot;microbench.h&quot;</span><span class="cp"></span>
39
40</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="cp">#include</span> <span class="cpf">&quot;microbench.h&quot;</span><span class="cp"></span>

<span class="cp">#include</span> <span class="cpf">&lt;chrono&gt;</span><span class="cp"></span>
<span class="cp">#include</span> <span class="cpf">&lt;iostream&gt;</span><span class="cp"></span>
Expand All @@ -996,32 +997,33 @@ <h3>Sourcecode<a class="headerlink" href="#id14" title="Permalink to this headli
<span class="c1">// g++ microbench.o systemtime.o -o mb</span>

<span class="kt">int</span> <span class="nf">main</span><span class="p">(</span><span class="kt">int</span><span class="p">,</span> <span class="kt">char</span><span class="o">**</span><span class="p">)</span> <span class="p">{</span>
<span class="c1">// something fast</span>
<span class="kt">uint64_t</span> <span class="n">x</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
<span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="n">moodycamel</span><span class="o">::</span><span class="n">microbench</span><span class="p">(</span>
<span class="p">[</span><span class="o">&amp;</span><span class="p">]()</span> <span class="p">{</span>
<span class="n">x</span> <span class="o">+=</span> <span class="n">x</span><span class="p">;</span>
<span class="p">},</span>
<span class="mi">10000000</span><span class="p">,</span> <span class="mi">51</span><span class="p">)</span>
<span class="o">&lt;&lt;</span> <span class="s">&quot; sec x += x (x==&quot;</span> <span class="o">&lt;&lt;</span> <span class="n">x</span> <span class="o">&lt;&lt;</span> <span class="s">&quot;)&quot;</span> <span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>

<span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="n">moodycamel</span><span class="o">::</span><span class="n">microbench</span><span class="p">([</span><span class="o">&amp;</span><span class="p">]</span> <span class="p">{</span>
<span class="n">std</span><span class="o">::</span><span class="n">this_thread</span><span class="o">::</span><span class="n">sleep_for</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">chrono</span><span class="o">::</span><span class="n">milliseconds</span><span class="p">(</span><span class="mi">10</span><span class="p">));</span>
<span class="p">})</span> <span class="o">&lt;&lt;</span> <span class="s">&quot; sec sleep 10ms&quot;</span>
<span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>

<span class="n">std</span><span class="o">::</span><span class="n">random_device</span> <span class="n">dev</span><span class="p">;</span>
<span class="n">std</span><span class="o">::</span><span class="n">mt19937_64</span> <span class="n">rng</span><span class="p">(</span><span class="n">dev</span><span class="p">());</span>
<span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="n">moodycamel</span><span class="o">::</span><span class="n">microbench</span><span class="p">(</span>
<span class="p">[</span><span class="o">&amp;</span><span class="p">]</span> <span class="p">{</span>
<span class="c1">// each run, perform a random number of rng calls</span>
<span class="k">auto</span> <span class="n">iterations</span> <span class="o">=</span> <span class="n">rng</span><span class="p">()</span> <span class="o">&amp;</span> <span class="n">UINT64_C</span><span class="p">(</span><span class="mh">0xff</span><span class="p">);</span>
<span class="k">for</span> <span class="p">(</span><span class="kt">uint64_t</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="n">i</span> <span class="o">&lt;</span> <span class="n">iterations</span><span class="p">;</span> <span class="o">++</span><span class="n">i</span><span class="p">)</span> <span class="p">{</span>
<span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="n">rng</span><span class="p">();</span>
<span class="p">}</span>
<span class="p">},</span>
<span class="mi">1000</span><span class="p">,</span> <span class="mi">51</span><span class="p">)</span>
<span class="o">&lt;&lt;</span> <span class="s">&quot; sec random fluctuations&quot;</span> <span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
<span class="c1">// something fast</span>
<span class="kt">uint64_t</span> <span class="n">x</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
<span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="n">moodycamel</span><span class="o">::</span><span class="n">microbench</span><span class="p">(</span>
<span class="p">[</span><span class="o">&amp;</span><span class="p">]()</span> <span class="p">{</span>
<span class="n">x</span> <span class="o">+=</span> <span class="n">x</span><span class="p">;</span>
<span class="p">},</span>
<span class="mi">10000000</span><span class="p">,</span> <span class="mi">51</span><span class="p">)</span>
<span class="o">&lt;&lt;</span> <span class="s">&quot; sec x += x (x==&quot;</span> <span class="o">&lt;&lt;</span> <span class="n">x</span> <span class="o">&lt;&lt;</span> <span class="s">&quot;)&quot;</span> <span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>

<span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="n">moodycamel</span><span class="o">::</span><span class="n">microbench</span><span class="p">([</span><span class="o">&amp;</span><span class="p">]</span> <span class="p">{</span>
<span class="n">std</span><span class="o">::</span><span class="n">this_thread</span><span class="o">::</span><span class="n">sleep_for</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">chrono</span><span class="o">::</span><span class="n">milliseconds</span><span class="p">(</span><span class="mi">10</span><span class="p">));</span>
<span class="p">})</span> <span class="o">&lt;&lt;</span> <span class="s">&quot; sec sleep 10ms&quot;</span>
<span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>

<span class="n">std</span><span class="o">::</span><span class="n">random_device</span> <span class="n">dev</span><span class="p">;</span>
<span class="n">std</span><span class="o">::</span><span class="n">mt19937_64</span> <span class="n">rng</span><span class="p">(</span><span class="n">dev</span><span class="p">());</span>
<span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="n">moodycamel</span><span class="o">::</span><span class="n">microbench</span><span class="p">(</span>
<span class="p">[</span><span class="o">&amp;</span><span class="p">]</span> <span class="p">{</span>
<span class="c1">// each run, perform a random number of</span>
<span class="c1">// rng calls</span>
<span class="k">auto</span> <span class="n">iterations</span> <span class="o">=</span> <span class="n">rng</span><span class="p">()</span> <span class="o">&amp;</span> <span class="n">UINT64_C</span><span class="p">(</span><span class="mh">0xff</span><span class="p">);</span>
<span class="k">for</span> <span class="p">(</span><span class="kt">uint64_t</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="n">i</span> <span class="o">&lt;</span> <span class="n">iterations</span><span class="p">;</span> <span class="o">++</span><span class="n">i</span><span class="p">)</span> <span class="p">{</span>
<span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="n">rng</span><span class="p">();</span>
<span class="p">}</span>
<span class="p">},</span>
<span class="mi">1000</span><span class="p">,</span> <span class="mi">51</span><span class="p">)</span>
<span class="o">&lt;&lt;</span> <span class="s">&quot; sec random fluctuations&quot;</span> <span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</td></tr></table></div>
Expand Down
Loading

0 comments on commit c387ca4

Please sign in to comment.