Skip to content

Commit

Permalink
deploy: 5abea74
Browse files Browse the repository at this point in the history
  • Loading branch information
jfalcou committed Dec 17, 2023
1 parent 857495a commit a2b740d
Show file tree
Hide file tree
Showing 84 changed files with 483 additions and 679 deletions.
16 changes: 8 additions & 8 deletions algo_rationale.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
</div><!--header-->
<div class="contents">
<div class="textblock"><p><a class="anchor" id="md____w_eve_eve_doc_internals_algo"></a></p>
<h1><a class="anchor" id="autotoc_md81"></a>
<h1><a class="anchor" id="autotoc_md79"></a>
General Principles</h1>
<p>SIMD algorithms are complex to design, implement and tests as a lot of care has to be put into details like correct tail handling, alignment handling or unrolling.</p>
<p><b>EVE</b>'s algorithms and views module is designed to simplify such design while:</p>
Expand All @@ -137,24 +137,24 @@ <h1><a class="anchor" id="autotoc_md81"></a>
</ul>
<p>All those features are usable through generic interfaces to allow for reuse of similar loops structure at the cost of some idiosyncrasies.</p>
<p>For a in-depth discussion about those issues, you can take a look at the Algorithms section of our <a href="https://www.youtube.com/embed/WZGNCPBMInI?t=1412">CppCon talk</a>.</p>
<h1><a class="anchor" id="autotoc_md82"></a>
<h1><a class="anchor" id="autotoc_md80"></a>
Basic Components</h1>
<h2><a class="anchor" id="autotoc_md83"></a>
<h2><a class="anchor" id="autotoc_md81"></a>
Reusable loops</h2>
<p>Many algorithms require some form of <code>while(f != l)</code> loop. However, with SIMD, even this simple operation is non trivial. <b>EVE</b> algorithm building-blocks provide implementation for the most frequent loop structure. Those loops can then customized and reused without having to care about the actual range type used. For example, eve::mismatch is implemented as a customized call to eve::find.</p>
<h2><a class="anchor" id="autotoc_md84"></a>
<h2><a class="anchor" id="autotoc_md82"></a>
Ranges or Iterators</h2>
<h3><a class="anchor" id="autotoc_md85"></a>
<h3><a class="anchor" id="autotoc_md83"></a>
General concepts</h3>
<p>Iterators are more fundamental than ranges. However, ranges can have some extra information like, for example, that instead of <code>begin()</code> it has <code>aligned_begin()</code> and the algorithm can use that. So the interfaces are <code>range</code> based. We don't generally accept <code>iterator</code> in interfaces just because it increases the maintenance. The eve::algo::as_range can be used to turn iterators pair into a <b>EVE</b> compatible range.</p>
<p>One case where it can be very awkward to use ranges instead of iterators is in multi-range algorithms , like <code>transform_to</code>. In this case, unless we have some reason no to, we allow for passing anything that zips to <code>range</code>, i.e. <code>range</code>, <code>iterator</code> or <code>iterator</code>,<code>range</code>. Exceptions are documented and have <code>static_assert</code>s that will tell you it's not supported.</p>
<h3><a class="anchor" id="autotoc_md86"></a>
<h3><a class="anchor" id="autotoc_md84"></a>
Relaxed concepts</h3>
<p>Many things that we want to accept in the interfaces as <code>range</code> and/or <code>iterator</code> are not ideal for writing code against. We also need to strip things like <code>vector::iterator</code> to pointers. What also we want is to associate a <code>cardinal</code> with <code>iterator</code>.</p>
<p>This is why we have two layers: <code><a class="el" href="structrelaxed__range.html" title="Any class that has begin/end and end is a relaxed_sentinel_for begin. User can customize preprocess_r...">relaxed_range</a></code>/<code><a class="el" href="structrelaxed__iterator.html" title="anything that can be reasonably converted to an iterator: std::contigious_iterator,...">relaxed_iterator</a></code> and <code>iterator</code>. There are a few things that <code>relaxed_*</code> should be able to do but the main one is <code>preprocess_range(traits, f, l)</code> which returns enhanced <code>traits</code> and <code>iterator</code> pair.</p>
<h1><a class="anchor" id="autotoc_md87"></a>
<h1><a class="anchor" id="autotoc_md85"></a>
Customization</h1>
<h2><a class="anchor" id="autotoc_md88"></a>
<h2><a class="anchor" id="autotoc_md86"></a>
Algorithms traits</h2>
<p><b>EVE</b> allows to customize algorithms with traits. Traits are passed via <code>[]</code> and can be combined.</p>
<p>The more common ones are:</p>
Expand Down
36 changes: 18 additions & 18 deletions changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,24 +125,24 @@
</div><!--header-->
<div class="contents">
<div class="textblock"><p><a class="anchor" id="md____w_eve_eve_doc_page10_changelog"></a></p>
<h1><a class="anchor" id="autotoc_md118"></a>
<h1><a class="anchor" id="autotoc_md116"></a>
Version 2023.02.15</h1>
<p>Codename: <a href="https://en.wikipedia.org/wiki/Perdita_(The_Winter%27s_Tale)">Perdita Quiescent</a></p>
<h2><a class="anchor" id="autotoc_md119"></a>
<h2><a class="anchor" id="autotoc_md117"></a>
What's Changed</h2>
<h3><a class="anchor" id="autotoc_md120"></a>
<h3><a class="anchor" id="autotoc_md118"></a>
Removal and Depreciation</h3>
<ul>
<li>The proba module as been removed. (See #1490) It will be reworked as a separate project later on with a proper API.</li>
</ul>
<h3><a class="anchor" id="autotoc_md121"></a>
<h3><a class="anchor" id="autotoc_md119"></a>
Architectures/Compilers Support &amp; Fixes</h3>
<h4><a class="anchor" id="autotoc_md122"></a>
<h4><a class="anchor" id="autotoc_md120"></a>
The One Big News for this release: SVE</h4>
<ul>
<li>SVE with fixed size, power of 2 cardinal is now supported for most of our API. Some more optimizations are on the way but the support is functional. (See #1432, #1435, #1436, #1437, #1438, #1448, #1453, #1455, #1456, #1463, #1464, #1472, #1473, #1474,#1487, #1489, #1491, #1494, #1533, #1556)</li>
</ul>
<h4><a class="anchor" id="autotoc_md123"></a>
<h4><a class="anchor" id="autotoc_md121"></a>
Other Fixes</h4>
<ul>
<li><b>EVE</b> now compiles on ARM M1 with Homebrew g++. (See #1471)</li>
Expand All @@ -152,7 +152,7 @@ <h4><a class="anchor" id="autotoc_md123"></a>
<li>Integral sign/signnz functions are now more efficient on x86 (See #1499)</li>
<li>Implementation for X86 AVX2/AVX512 gather and masked gather are now optimized. (See #1526)</li>
</ul>
<h3><a class="anchor" id="autotoc_md124"></a>
<h3><a class="anchor" id="autotoc_md122"></a>
Features</h3>
<ul>
<li><b>jtlap</b> implemented a large amount of new functions for <code>eve::complex</code>.</li>
Expand All @@ -161,7 +161,7 @@ <h3><a class="anchor" id="autotoc_md124"></a>
<li>The minmax function is now available. (See #1507)</li>
<li><b>DenisYaroshevskiy</b> implemented new traits for algorithms to take care of costly kernels, no alignment and to support fused operations. (See #1535, #1543)</li>
</ul>
<h3><a class="anchor" id="autotoc_md125"></a>
<h3><a class="anchor" id="autotoc_md123"></a>
Bug Fixes</h3>
<ul>
<li>Convert is now more efficient and don't generate piecewise evaluation in some scenario involving logicals. (See #1447, #1428)</li>
Expand All @@ -171,15 +171,15 @@ <h3><a class="anchor" id="autotoc_md125"></a>
<li>Fix issue with dynamic SIMD extension detection that were broken by accident. (See #1504)</li>
</ul>
<p><b>Full Changelog</b>: <a href="https://github.com/jfalcou/eve/compare/v2022.09.1...2023.02.15">https://github.com/jfalcou/eve/compare/v2022.09.1...2023.02.15</a></p>
<h1><a class="anchor" id="autotoc_md126"></a>
<h1><a class="anchor" id="autotoc_md124"></a>
Version 2022.09.1</h1>
<p>Codename: <a href="https://en.wikipedia.org/wiki/Rosalind_(As_You_Like_It)">Rosalind Serendipitous</a></p>
<p>This is a patch release that fix some issue with the versioning of EVE installation and some documentation issue.</p>
<p><b>Full Changelog</b>: <a href="https://github.com/jfalcou/eve/compare/v2022.09.0...2022.09.1">https://github.com/jfalcou/eve/compare/v2022.09.0...2022.09.1</a></p>
<h1><a class="anchor" id="autotoc_md127"></a>
<h1><a class="anchor" id="autotoc_md125"></a>
Version 2022.09.0</h1>
<p>Codename: <a href="https://en.wikipedia.org/wiki/Rosalind_(As_You_Like_It)">Rosalind Serendipitous</a></p>
<h2><a class="anchor" id="autotoc_md128"></a>
<h2><a class="anchor" id="autotoc_md126"></a>
What's Changed</h2>
<p>A lot. The main non-code changes is our move from MIT License to the BOOST SOFTWARE License. Next to that, support for more algorithms and complex numbers has been added.</p>
<p>Starting this fall, we will also try to provide more regular release.</p>
Expand Down Expand Up @@ -242,17 +242,17 @@ <h2><a class="anchor" id="autotoc_md128"></a>
</ul>
</li>
</ul>
<h2><a class="anchor" id="autotoc_md129"></a>
<h2><a class="anchor" id="autotoc_md127"></a>
New Contributors</h2>
<p>Thanks to all our new contributor for this release!</p>
<ul>
<li><b>Simran-B</b> made their first contribution in (See #1303)</li>
<li><b>justend29</b> made their first contribution in (See #1338)</li>
</ul>
<h1><a class="anchor" id="autotoc_md130"></a>
<h1><a class="anchor" id="autotoc_md128"></a>
Version 2022.03.0</h1>
<p>Codename: <a href="https://en.wikipedia.org/wiki/Miranda_(The_Tempest)">Miranda Numinous</a></p>
<h2><a class="anchor" id="autotoc_md131"></a>
<h2><a class="anchor" id="autotoc_md129"></a>
What's Changed</h2>
<p><b>This release is an API/ABI breaking changes release.</b></p>
<p>A lot of improvements in QoL, QoI, and API have been made. Some more breaking ABI changes are planned, including a passive move toward an include file layout more amenable to future modularization.</p>
Expand Down Expand Up @@ -345,7 +345,7 @@ <h2><a class="anchor" id="autotoc_md131"></a>
</ul>
</li>
</ul>
<h2><a class="anchor" id="autotoc_md132"></a>
<h2><a class="anchor" id="autotoc_md130"></a>
New Contributors</h2>
<p>Thanks to all our new contributor for this release!</p>
<ul>
Expand All @@ -355,10 +355,10 @@ <h2><a class="anchor" id="autotoc_md132"></a>
<li><code>**the-moisrex**</code> made their first contribution in <a href="https://github.com/jfalcou/eve/pull/1025">https://github.com/jfalcou/eve/pull/1025</a></li>
<li><code>**toughengineer**</code> made their first contribution in <a href="https://github.com/jfalcou/eve/pull/1182">https://github.com/jfalcou/eve/pull/1182</a></li>
</ul>
<h1><a class="anchor" id="autotoc_md133"></a>
<h1><a class="anchor" id="autotoc_md131"></a>
Version 2021.10.0</h1>
<p>Codename: <a href="https://en.wikipedia.org/wiki/Titania_(A_Midsummer_Night%27s_Dream)">Titania Unleashed</a></p>
<h2><a class="anchor" id="autotoc_md134"></a>
<h2><a class="anchor" id="autotoc_md132"></a>
What's Changed</h2>
<ul>
<li>First tagged release for <b>EVE</b> which includes:<ul>
Expand All @@ -370,7 +370,7 @@ <h2><a class="anchor" id="autotoc_md134"></a>
</ul>
</li>
</ul>
<h1><a class="anchor" id="autotoc_md135"></a>
<h1><a class="anchor" id="autotoc_md133"></a>
Version beta.2020.09</h1>
<p>Initial beta release </p>
</div></div><!-- contents -->
Expand Down
12 changes: 6 additions & 6 deletions conditional.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
<div class="contents">
<div class="textblock"><p>When you call a function on one or more <a href="../reference/concepts/simd_value.html#simd_value">SIMD values</a>, you expect the computation to be performed on every elements of its parameters. Sometimes, you may want to make the application of a given function dependent on some condition.</p>
<p>Let's explore the functionalities <b>EVE</b> provides for achieving those results.</p>
<h1><a class="anchor" id="autotoc_md136"></a>
<h1><a class="anchor" id="autotoc_md134"></a>
Explicit Selection</h1>
<p>Let's say the function we want to write computes the product of two values <code>a</code> and <code>b</code> if <code>a</code> is equal to <code>b</code> and their difference otherwise.</p>
<p>The scalar code is looking like:</p>
Expand Down Expand Up @@ -169,7 +169,7 @@ <h1><a class="anchor" id="autotoc_md136"></a>
<div class="line">(0, 4, -7, 0)</div>
<div class="line">(1, 4, -7, 16)</div>
</div><!-- fragment --><dl class="section warning"><dt>Warning</dt><dd>Contrary to a <code>if ... else</code> statement, <a class="el" href="group__core__logical_ga74b9090a23d420d6382270233e66f7ac.html#ga74b9090a23d420d6382270233e66f7ac" title="Computes the results of a choice under condition.">eve::if_else</a> will evaluates all its arguments before performing its selection even if potential short-cut can be applied later on.</dd></dl>
<h1><a class="anchor" id="autotoc_md137"></a>
<h1><a class="anchor" id="autotoc_md135"></a>
Conditional Function Syntax</h1>
<p>Let's define a <code>sqrt_positive</code> function that computes the square root of its argument if it's positive or returns it unchanged otherwise. One can write:</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;eve/module/core.hpp&gt;</span></div>
Expand Down Expand Up @@ -226,10 +226,10 @@ <h1><a class="anchor" id="autotoc_md137"></a>
<div class="line"> <span class="keyword">auto</span> <span class="keyword">const</span> f = <a class="code hl_variable" href="group__core__arithmetic_ga6745422ee3727af1a6e34182e8efbcb7.html#ga6745422ee3727af1a6e34182e8efbcb7">eve::sqrt</a>[a &gt;= 0];</div>
<div class="line"> <span class="keywordflow">return</span> f(a);</div>
<div class="line">}</div>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md138"></a>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md136"></a>
Conditional Expressions</h1>
<p>If passing a simple logical expression is the most common use-case of the conditional syntax, one may requires more flexibility. To do so, <b>EVE</b> provides various objects to express more elaborated conditions.</p>
<h2><a class="anchor" id="autotoc_md139"></a>
<h2><a class="anchor" id="autotoc_md137"></a>
Mask with alternative</h2>
<p>One may want to use the conditional syntax to call a function but instead of returning the first argument if the condition is false, one may want to return an arbitrary value. This use case is handled by the <a class="el" href="structeve_1_1if__.html" title="Extensible wrapper for SIMD conditional.">eve::if_</a> helper by wrapping logical expression so that an alternative value can be specified.</p>
<p>Let's modify <code>sqrt_positive</code> so that, if the argument is not positive, 0 is returned instead.</p>
Expand Down Expand Up @@ -261,7 +261,7 @@ <h2><a class="anchor" id="autotoc_md139"></a>
</div><!-- fragment --><p>The output is then:</p>
<div class="fragment"><div class="line">(1, -2, 3.16228, -3.5)</div>
<div class="line">(1, 0, 3.16228, 0)</div>
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md140"></a>
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md138"></a>
Context-sensitive mask</h2>
<p>Some algorithms require conditional function calls but use logical expression relative to the element index inside a <a class="el" href="concepteve_1_1simd__value.html" title="Specifies that a type a SIMD type.">eve::simd_value</a> rather than its value. One may want for example to not compute an expression on the first and last element of such <a class="el" href="concepteve_1_1simd__value.html" title="Specifies that a type a SIMD type.">eve::simd_value</a>.</p>
<p>A frequent example is trying to load data from memory while ignoring trailing garbage or out of bounds values:</p>
Expand Down Expand Up @@ -335,7 +335,7 @@ <h2><a class="anchor" id="autotoc_md139"></a>
<div class="line">}</div>
</div><!-- fragment --><p>The output is the same obviously:</p>
<div class="fragment"><div class="line">(-6.3, 1, 2, -6.3)</div>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md141"></a>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md139"></a>
Conclusion</h1>
<p>Conditional operations on <a href="../reference/concepts/simd_value.html#simd_value">SIMD values</a> is a good way to keep a high level code over some complex computations. <b>EVE</b> provides different levels of abstraction for such operations as well as various helpers to specify how the conditions can be computed based either on values or indexes. </p>
</div></div><!-- contents -->
Expand Down
6 changes: 3 additions & 3 deletions dev_cmake.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
<div class="contents">
<div class="textblock"><p><a class="anchor" id="md____w_eve_eve_doc_internals_dev_cmake"></a></p>
<p>From now on, we make the assumption your Docker instance is running and that you're logged into its interactive shell as per <a class="el" href="dev_environment.html">the protocol previously defined</a>. In this tutorial, we will go over the process to configure the tests and run them properly.</p>
<h1><a class="anchor" id="autotoc_md89"></a>
<h1><a class="anchor" id="autotoc_md87"></a>
CMake setup</h1>
<p>First, you'd need to create a build directory and cd into it</p>
<pre class="fragment">mkdir build_arch &amp;&amp; cd build_arch
Expand Down Expand Up @@ -167,7 +167,7 @@ <h1><a class="anchor" id="autotoc_md89"></a>
<td class="markdownTableBodyNone">Arm (sve-512) </td><td class="markdownTableBodyNone">cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain/gcc.sve512.cmake </td></tr>
</table>
<p>Once run, your build folder should contain all the necessary artifact to compile and run <b>EVE</b> test suite.</p>
<h1><a class="anchor" id="autotoc_md90"></a>
<h1><a class="anchor" id="autotoc_md88"></a>
Compiling EVE Unit Tests</h1>
<p><b>EVE</b> provides a large number of test targets that are grouped by theme. Each of these themes and tests with a theme can be compiled with a proper target.</p>
<p>In term of options, we encourage you to use the <code>-DEVE_NO_FORCEINLINE</code> macro that prevents costly optimization to be used during the compilation of tests.</p>
Expand Down Expand Up @@ -223,7 +223,7 @@ <h1><a class="anchor" id="autotoc_md90"></a>
</pre><p>Once compiled, the test executable are located in the <code>unit</code> folder and can be run via:</p>
<pre class="fragment">./unit/unit.core.abs.exe
</pre><p>The <code>unit.exe</code> target is very large and requires a comfortable amount of CPUs to be compiled in parallel.</p>
<h1><a class="anchor" id="autotoc_md91"></a>
<h1><a class="anchor" id="autotoc_md89"></a>
Compiling EVE Random Tests</h1>
<p>Random tests run a given function over a samples of random values to test its relative precision. The following table list the main high-level random target.</p>
<table class="markdownTable">
Expand Down
Loading

0 comments on commit a2b740d

Please sign in to comment.