Skip to content

Commit

Permalink
deploy: 4e4a3ed
Browse files Browse the repository at this point in the history
  • Loading branch information
jfalcou committed Aug 30, 2024
1 parent 221522d commit a6e02b1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
12 changes: 9 additions & 3 deletions group__api_ga45f64b82d4939d55865b0e6a311b2dde.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ <h2 class="groupheader">SIMD Instructions Sets </h2>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone"><b>ARM SVE</b> </td><td class="markdownTableBodyNone"><code>spy::sve_</code>,<code>spy::sve128_</code>, <code>spy::sve256_</code>, <code>spy::sve512_</code>, <code>spy::sve1024_</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone"><b>WASM</b> </td><td class="markdownTableBodyNone"><code>spy::simd128_</code> </td></tr>
<td class="markdownTableBodyNone"><b>WASM</b> </td><td class="markdownTableBodyNone"><code>spy::simd128_</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone"><b>RISC-V</b> </td><td class="markdownTableBodyNone"><code>spy::rvv_</code>` </td></tr>
</table>
<p>Complete set of comparison operators is provided for those sets. Order of instructions sets are built so that if an instructions set supersedes another, it is considered greater than. For example, <code>spy::avx_</code> is greater than <code>spy::sse41_</code> as the former is a super-set of the later. Comparing SIMD descriptors across architecture is undefined behavior.</p>
<p>Moreover, the <code><a class="el" href="group__api_ga45f64b82d4939d55865b0e6a311b2dde.html#ga45f64b82d4939d55865b0e6a311b2dde" title="SIMD extensions set reporting value.">spy::simd_instruction_set</a></code> object exposes a constexpr <code>width</code> static field that contains the size in bits of the current SIMD instructions set registers.</p>
Expand All @@ -169,6 +171,8 @@ <h3 class="groupheader">Example - SIMD Instructions Sets </h3>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main()</div>
<div class="line">{</div>
<div class="line"> std::cout &lt;&lt; <a class="code hl_variable" href="group__api_ga45f64b82d4939d55865b0e6a311b2dde.html#ga45f64b82d4939d55865b0e6a311b2dde">spy::simd_instruction_set</a> &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>;</div>
<div class="line"> </div>
<div class="line"> <span class="keywordflow">if</span> <span class="keyword">constexpr</span>( <a class="code hl_variable" href="group__api_ga45f64b82d4939d55865b0e6a311b2dde.html#ga45f64b82d4939d55865b0e6a311b2dde">spy::simd_instruction_set</a> == spy::avx_ )</div>
<div class="line"> {</div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;This code has been compiled with AVX instructions set.\n&quot;</span>;</div>
Expand All @@ -186,7 +190,7 @@ <h3 class="groupheader">Example - SIMD Instructions Sets </h3>
<div class="line"> </div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;This code can use &quot;</span> &lt;&lt; <a class="code hl_variable" href="group__api_ga45f64b82d4939d55865b0e6a311b2dde.html#ga45f64b82d4939d55865b0e6a311b2dde">spy::simd_instruction_set</a>.width &lt;&lt; <span class="stringliteral">&quot; bits register.\n&quot;</span>;</div>
<div class="line">}</div>
<div class="ttc" id="agroup__api_ga45f64b82d4939d55865b0e6a311b2dde_html_ga45f64b82d4939d55865b0e6a311b2dde"><div class="ttname"><a href="group__api_ga45f64b82d4939d55865b0e6a311b2dde.html#ga45f64b82d4939d55865b0e6a311b2dde">spy::simd_instruction_set</a></div><div class="ttdeci">constexpr auto simd_instruction_set</div><div class="ttdoc">SIMD extensions set reporting value.</div><div class="ttdef"><b>Definition:</b> simd.hpp:217</div></div>
<div class="ttc" id="agroup__api_ga45f64b82d4939d55865b0e6a311b2dde_html_ga45f64b82d4939d55865b0e6a311b2dde"><div class="ttname"><a href="group__api_ga45f64b82d4939d55865b0e6a311b2dde.html#ga45f64b82d4939d55865b0e6a311b2dde">spy::simd_instruction_set</a></div><div class="ttdeci">constexpr auto simd_instruction_set</div><div class="ttdoc">SIMD extensions set reporting value.</div><div class="ttdef"><b>Definition:</b> simd.hpp:245</div></div>
</div><!-- fragment --><h2 class="groupheader">SIMD Architectures </h2>
<p>One can also simply asks if a given family of instructions set is available.</p>
<table class="markdownTable">
Expand All @@ -199,7 +203,9 @@ <h3 class="groupheader">Example - SIMD Instructions Sets </h3>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone"><b>ARM</b> </td><td class="markdownTableBodyNone"><code>spy::arm_simd_</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone"><b>WASM</b> </td><td class="markdownTableBodyNone"><code>spy::wasm_simd_</code> </td></tr>
<td class="markdownTableBodyNone"><b>WASM</b> </td><td class="markdownTableBodyNone"><code>spy::wasm_simd_</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone"><b>RISC-V</b> </td><td class="markdownTableBodyNone"><code>spy::riscv_simd_</code> </td></tr>
</table>
<h3 class="groupheader">Example - SIMD Architectures </h3>
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;spy/spy.hpp&gt;</span></div>
Expand Down
8 changes: 6 additions & 2 deletions group__api_gaad5f2aa34188a02b894a0d8c7e402d6e.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,10 @@ <h2 class="groupheader">Supported Value </h2>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone"><code>spy::ppc</code> </td><td class="markdownTableBodyNone">PowerPC. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone"><code>spy::wasm</code> </td><td class="markdownTableBodyNone">WASM pseudo-architecture. </td></tr>
<td class="markdownTableBodyNone"><code>spy::riscv</code> </td><td class="markdownTableBodyNone">RISC-V. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone"><code>spy::wasm</code> </td><td class="markdownTableBodyNone">WASM pseudo-architecture. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone"><code>spy::x86</code> </td><td class="markdownTableBodyNone">Intel X86. </td></tr>
</table>
<h2 class="groupheader">Example </h2>
Expand All @@ -169,14 +171,16 @@ <h2 class="groupheader">Example </h2>
<div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span>( <a class="code hl_variable" href="group__api_gaad5f2aa34188a02b894a0d8c7e402d6e.html#gaad5f2aa34188a02b894a0d8c7e402d6e">spy::architecture</a> == spy::amd64_ ) std::cout &lt;&lt; <span class="stringliteral">&quot;This code is compiled for X86-64.\n&quot;</span>;</div>
<div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span>( <a class="code hl_variable" href="group__api_gaad5f2aa34188a02b894a0d8c7e402d6e.html#gaad5f2aa34188a02b894a0d8c7e402d6e">spy::architecture</a> == spy::ppc_ ) std::cout &lt;&lt; <span class="stringliteral">&quot;This code is compiled for PowerPC.\n&quot;</span>;</div>
<div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span>( <a class="code hl_variable" href="group__api_gaad5f2aa34188a02b894a0d8c7e402d6e.html#gaad5f2aa34188a02b894a0d8c7e402d6e">spy::architecture</a> == spy::arm_ ) std::cout &lt;&lt; <span class="stringliteral">&quot;This code is compiled for ARM.\n&quot;</span>;</div>
<div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span>( <a class="code hl_variable" href="group__api_gaad5f2aa34188a02b894a0d8c7e402d6e.html#gaad5f2aa34188a02b894a0d8c7e402d6e">spy::architecture</a> == spy::riscv_ ) std::cout &lt;&lt; <span class="stringliteral">&quot;This code is compiled for RISC-V.\n&quot;</span>;</div>
<div class="line"> </div>
<div class="line"> <span class="comment">// Direct test</span></div>
<div class="line"> <span class="keywordflow">if</span> <span class="keyword">constexpr</span>( spy::x86_ ) std::cout &lt;&lt; <span class="stringliteral">&quot;This code is compiled for X86.\n&quot;</span>;</div>
<div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span>( spy::amd64_ ) std::cout &lt;&lt; <span class="stringliteral">&quot;This code is compiled for X86-64.\n&quot;</span>;</div>
<div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span>( spy::ppc_ ) std::cout &lt;&lt; <span class="stringliteral">&quot;This code is compiled for PowerPC.\n&quot;</span>;</div>
<div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span>( spy::arm_ ) std::cout &lt;&lt; <span class="stringliteral">&quot;This code is compiled for ARM.\n&quot;</span>;</div>
<div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span>( spy::riscv_ ) std::cout &lt;&lt; <span class="stringliteral">&quot;This code is compiled for RISC-V.\n&quot;</span>;</div>
<div class="line">}</div>
<div class="ttc" id="agroup__api_gaad5f2aa34188a02b894a0d8c7e402d6e_html_gaad5f2aa34188a02b894a0d8c7e402d6e"><div class="ttname"><a href="group__api_gaad5f2aa34188a02b894a0d8c7e402d6e.html#gaad5f2aa34188a02b894a0d8c7e402d6e">spy::architecture</a></div><div class="ttdeci">constexpr arch_type architecture</div><div class="ttdoc">Architecture reporting value.</div><div class="ttdef"><b>Definition:</b> arch.hpp:95</div></div>
<div class="ttc" id="agroup__api_gaad5f2aa34188a02b894a0d8c7e402d6e_html_gaad5f2aa34188a02b894a0d8c7e402d6e"><div class="ttname"><a href="group__api_gaad5f2aa34188a02b894a0d8c7e402d6e.html#gaad5f2aa34188a02b894a0d8c7e402d6e">spy::architecture</a></div><div class="ttdeci">constexpr arch_type architecture</div><div class="ttdoc">Architecture reporting value.</div><div class="ttdef"><b>Definition:</b> arch.hpp:101</div></div>
</div><!-- fragment -->
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ <h1><a class="anchor" id="autotoc_md20"></a>
<div class="line">}</div>
<div class="ttc" id="agroup__api_ga03dc3f2a9b02b025902f9df3b2db53ab_html_ga03dc3f2a9b02b025902f9df3b2db53ab"><div class="ttname"><a href="group__api_ga03dc3f2a9b02b025902f9df3b2db53ab.html#ga03dc3f2a9b02b025902f9df3b2db53ab">spy::libc</a></div><div class="ttdeci">constexpr auto libc</div><div class="ttdoc">LIBC version reporting value.</div><div class="ttdef"><b>Definition:</b> libc.hpp:112</div></div>
<div class="ttc" id="agroup__api_ga2d96c18fea5b9a06ac37487ab570599d_html_ga2d96c18fea5b9a06ac37487ab570599d"><div class="ttname"><a href="group__api_ga2d96c18fea5b9a06ac37487ab570599d.html#ga2d96c18fea5b9a06ac37487ab570599d">spy::compiler</a></div><div class="ttdeci">constexpr compiler_type compiler</div><div class="ttdoc">Compiler reporting value.</div><div class="ttdef"><b>Definition:</b> compiler.hpp:125</div></div>
<div class="ttc" id="agroup__api_ga45f64b82d4939d55865b0e6a311b2dde_html_ga45f64b82d4939d55865b0e6a311b2dde"><div class="ttname"><a href="group__api_ga45f64b82d4939d55865b0e6a311b2dde.html#ga45f64b82d4939d55865b0e6a311b2dde">spy::simd_instruction_set</a></div><div class="ttdeci">constexpr auto simd_instruction_set</div><div class="ttdoc">SIMD extensions set reporting value.</div><div class="ttdef"><b>Definition:</b> simd.hpp:217</div></div>
<div class="ttc" id="agroup__api_gaad5f2aa34188a02b894a0d8c7e402d6e_html_gaad5f2aa34188a02b894a0d8c7e402d6e"><div class="ttname"><a href="group__api_gaad5f2aa34188a02b894a0d8c7e402d6e.html#gaad5f2aa34188a02b894a0d8c7e402d6e">spy::architecture</a></div><div class="ttdeci">constexpr arch_type architecture</div><div class="ttdoc">Architecture reporting value.</div><div class="ttdef"><b>Definition:</b> arch.hpp:95</div></div>
<div class="ttc" id="agroup__api_ga45f64b82d4939d55865b0e6a311b2dde_html_ga45f64b82d4939d55865b0e6a311b2dde"><div class="ttname"><a href="group__api_ga45f64b82d4939d55865b0e6a311b2dde.html#ga45f64b82d4939d55865b0e6a311b2dde">spy::simd_instruction_set</a></div><div class="ttdeci">constexpr auto simd_instruction_set</div><div class="ttdoc">SIMD extensions set reporting value.</div><div class="ttdef"><b>Definition:</b> simd.hpp:245</div></div>
<div class="ttc" id="agroup__api_gaad5f2aa34188a02b894a0d8c7e402d6e_html_gaad5f2aa34188a02b894a0d8c7e402d6e"><div class="ttname"><a href="group__api_gaad5f2aa34188a02b894a0d8c7e402d6e.html#gaad5f2aa34188a02b894a0d8c7e402d6e">spy::architecture</a></div><div class="ttdeci">constexpr arch_type architecture</div><div class="ttdoc">Architecture reporting value.</div><div class="ttdef"><b>Definition:</b> arch.hpp:101</div></div>
<div class="ttc" id="agroup__api_gadb7c5be967e00cff21ae5b98cc12a7dc_html_gadb7c5be967e00cff21ae5b98cc12a7dc"><div class="ttname"><a href="group__api_gadb7c5be967e00cff21ae5b98cc12a7dc.html#gadb7c5be967e00cff21ae5b98cc12a7dc">spy::operating_system</a></div><div class="ttdeci">constexpr os_type operating_system</div><div class="ttdoc">OS reporting value.</div><div class="ttdef"><b>Definition:</b> os.hpp:106</div></div>
<div class="ttc" id="agroup__api_gafe99b815db524eacf659ba8348ca2e0d_html_gafe99b815db524eacf659ba8348ca2e0d"><div class="ttname"><a href="group__api_gafe99b815db524eacf659ba8348ca2e0d.html#gafe99b815db524eacf659ba8348ca2e0d">spy::stdlib</a></div><div class="ttdeci">constexpr auto stdlib</div><div class="ttdoc">C++ Standard Library version reporting value.</div><div class="ttdef"><b>Definition:</b> stdlib.hpp:85</div></div>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md21"></a>
Expand Down

0 comments on commit a6e02b1

Please sign in to comment.