Skip to content

Commit

Permalink
build based on bc0318c
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Sep 11, 2023
1 parent de51d5d commit 9767f98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dev/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Home · Polyester.jl</title><script data-outdated-warner src="assets/warner.js"></script><link rel="canonical" href="https://JuliaSIMD.github.io/Polyester.jl/"/><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="assets/documenter.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit"><a href>Polyester.jl</a></span></div><form class="docs-search" action="search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li class="is-active"><a class="tocitem" href>Home</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Home</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Home</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/JuliaSIMD/Polyester.jl/blob/master/docs/src/index.md#" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Polyester"><a class="docs-heading-anchor" href="#Polyester">Polyester</a><a id="Polyester-1"></a><a class="docs-heading-anchor-permalink" href="#Polyester" title="Permalink"></a></h1><ul><li><a href="#Polyester.reset_threads!-Tuple{}"><code>Polyester.reset_threads!</code></a></li><li><a href="#Polyester.@batch-Tuple{Any}"><code>Polyester.@batch</code></a></li></ul><article class="docstring"><header><a class="docstring-binding" id="Polyester.reset_threads!-Tuple{}" href="#Polyester.reset_threads!-Tuple{}"><code>Polyester.reset_threads!</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">Polyester.reset_threads!()</code></pre><p>Resets the threads used by <a href="https://github.com/JuliaSIMD/Polyester.jl">Polyester.jl</a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaSIMD/Polyester.jl/blob/2ded7bd1af910e3cf7da441c1f50d52203e649ff/src/Polyester.jl#L31-L35">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Polyester.@batch-Tuple{Any}" href="#Polyester.@batch-Tuple{Any}"><code>Polyester.@batch</code></a><span class="docstring-category">Macro</span></header><section><div><pre><code class="language-julia hljs">@batch for i in Iter; ...; end</code></pre><p>Evaluate the loop on multiple threads.</p><pre><code class="nohighlight hljs">@batch minbatch=N for i in Iter; ...; end</code></pre><p>Create a thread-local storage used in the loop.</p><pre><code class="nohighlight hljs">@batch threadlocal=init() for i in Iter; ...; end</code></pre><p>The <code>init</code> function will be called at the start at each thread. <code>threadlocal</code> will refer to storage local for the thread. At the end of the loop, a <code>threadlocal</code> vector containing all the thread-local values will be available. A type can be specified with <code>threadlocal=init()::Type</code>.</p><p>Evaluate at least N iterations per thread. Will use at most <code>length(Iter) ÷ N</code> threads.</p><pre><code class="nohighlight hljs">@batch per=core for i in Iter; ...; end
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Home · Polyester.jl</title><script data-outdated-warner src="assets/warner.js"></script><link rel="canonical" href="https://JuliaSIMD.github.io/Polyester.jl/"/><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="assets/documenter.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit"><a href>Polyester.jl</a></span></div><form class="docs-search" action="search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li class="is-active"><a class="tocitem" href>Home</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Home</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Home</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/JuliaSIMD/Polyester.jl/blob/master/docs/src/index.md#" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Polyester"><a class="docs-heading-anchor" href="#Polyester">Polyester</a><a id="Polyester-1"></a><a class="docs-heading-anchor-permalink" href="#Polyester" title="Permalink"></a></h1><ul><li><a href="#Polyester.reset_threads!-Tuple{}"><code>Polyester.reset_threads!</code></a></li><li><a href="#Polyester.@batch-Tuple{Any}"><code>Polyester.@batch</code></a></li></ul><article class="docstring"><header><a class="docstring-binding" id="Polyester.reset_threads!-Tuple{}" href="#Polyester.reset_threads!-Tuple{}"><code>Polyester.reset_threads!</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">Polyester.reset_threads!()</code></pre><p>Resets the threads used by <a href="https://github.com/JuliaSIMD/Polyester.jl">Polyester.jl</a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaSIMD/Polyester.jl/blob/bc0318ceafdff295e3717eb2bfa669b601e4bb2f/src/Polyester.jl#L31-L35">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Polyester.@batch-Tuple{Any}" href="#Polyester.@batch-Tuple{Any}"><code>Polyester.@batch</code></a><span class="docstring-category">Macro</span></header><section><div><pre><code class="language-julia hljs">@batch for i in Iter; ...; end</code></pre><p>Evaluate the loop on multiple threads.</p><pre><code class="nohighlight hljs">@batch minbatch=N for i in Iter; ...; end</code></pre><p>Create a thread-local storage used in the loop.</p><pre><code class="nohighlight hljs">@batch threadlocal=init() for i in Iter; ...; end</code></pre><p>The <code>init</code> function will be called at the start at each thread. <code>threadlocal</code> will refer to storage local for the thread. At the end of the loop, a <code>threadlocal</code> vector containing all the thread-local values will be available. A type can be specified with <code>threadlocal=init()::Type</code>.</p><p>Evaluate at least N iterations per thread. Will use at most <code>length(Iter) ÷ N</code> threads.</p><pre><code class="nohighlight hljs">@batch per=core for i in Iter; ...; end
@batch per=thread for i in Iter; ...; end</code></pre><p>Use at most 1 thread per physical core, or 1 thread per CPU thread, respectively. One thread per core will mean less threads competing for the cache, while (for example) if there are two hardware threads per physical core, then using each thread means that there are two independent instruction streams feeding the CPU&#39;s execution units. When one of these streams isn&#39;t enough to make the most of out of order execution, this could increase total throughput.</p><p>Which performs better will depend on the workload, so if you&#39;re not sure it may be worth benchmarking both.</p><p>LoopVectorization.jl currently only uses up to 1 thread per physical core. Because there is some overhead to switching the number of threads used, <code>per=core</code> is <code>@batch</code>&#39;s default, so that <code>Polyester.@batch</code> and <code>LoopVectorization.@tturbo</code> work well together by default.</p><p>Threads are not pinned to a given CPU core and the total number of available threads is still governed by <code>--threads</code> or <code>JULIA_NUM_THREADS</code>.</p><p>You can pass both <code>per=(core/thread)</code> and <code>minbatch=N</code> options at the same time, e.g.</p><pre><code class="nohighlight hljs">@batch per=thread minbatch=2000 for i in Iter; ...; end
@batch minbatch=5000 per=core for i in Iter; ...; end</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaSIMD/Polyester.jl/blob/2ded7bd1af910e3cf7da441c1f50d52203e649ff/src/closure.jl#L434-L476">source</a></section></article></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Saturday 22 July 2023 18:19">Saturday 22 July 2023</span>. Using Julia version 1.9.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
@batch minbatch=5000 per=core for i in Iter; ...; end</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaSIMD/Polyester.jl/blob/bc0318ceafdff295e3717eb2bfa669b601e4bb2f/src/closure.jl#L434-L476">source</a></section></article></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Monday 11 September 2023 01:03">Monday 11 September 2023</span>. Using Julia version 1.9.3.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit 9767f98

Please sign in to comment.