/usr/share/doc/libghc-repa-doc/html/Data-Array-Repa-Eval-Gang.html is in libghc-repa-doc 3.2.3.3-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Data.Array.Repa.Eval.Gang</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Data-Array-Repa-Eval-Gang.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Array-Repa-Eval-Gang.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">repa-3.2.3.3: High performance, regular, shape polymorphic parallel arrays.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Data.Array.Repa.Eval.Gang</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Gang Primitives.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:theGang">theGang</a> :: <a href="Data-Array-Repa-Eval-Gang.html#t:Gang">Gang</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Gang">Gang</a> </li><li class="src short"><a href="#v:forkGang">forkGang</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="Data-Array-Repa-Eval-Gang.html#t:Gang">Gang</a></li><li class="src short"><a href="#v:gangSize">gangSize</a> :: <a href="Data-Array-Repa-Eval-Gang.html#t:Gang">Gang</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:gangIO">gangIO</a> :: <a href="Data-Array-Repa-Eval-Gang.html#t:Gang">Gang</a> -> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()) -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:gangST">gangST</a> :: <a href="Data-Array-Repa-Eval-Gang.html#t:Gang">Gang</a> -> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad-ST-Safe.html#t:ST">ST</a> s ()) -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad-ST-Safe.html#t:ST">ST</a> s ()</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:theGang" class="def">theGang</a> :: <a href="Data-Array-Repa-Eval-Gang.html#t:Gang">Gang</a><a href="src/Data-Array-Repa-Eval-Gang.html#theGang" class="link">Source</a></p><div class="doc"><p>This globally shared gang is auto-initialised at startup and shared by all
Repa computations.
</p><p>In a data parallel setting, it does not help to have multiple gangs
running at the same time. This is because a single data parallel
computation should already be able to keep all threads busy. If we had
multiple gangs running at the same time, then the system as a whole would
run slower as the gangs would contend for cache and thrash the scheduler.
</p><p>If, due to laziness or otherwise, you try to start multiple parallel
Repa computations at the same time, then you will get the following
warning on stderr at runtime:
</p><pre>Data.Array.Repa: Performing nested parallel computation sequentially.
You've probably called the <code>compute</code> or <code>copy</code> function while another
instance was already running. This can happen if the second version
was suspended due to lazy evaluation. Use <code>deepSeqArray</code> to ensure that
each array is fully evaluated before you <code>compute</code> the next one.
</pre></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Gang" class="def">Gang</a> <a href="src/Data-Array-Repa-Eval-Gang.html#Gang" class="link">Source</a></p><div class="doc"><p>A <code><a href="Data-Array-Repa-Eval-Gang.html#t:Gang">Gang</a></code> is a group of threads that execute arbitrary work requests.
</p></div><div class="subs instances"><p id="control.i:Gang" class="caption collapser" onclick="toggleSection('i:Gang')">Instances</p><div id="section.i:Gang" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Data-Array-Repa-Eval-Gang.html#t:Gang">Gang</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:forkGang" class="def">forkGang</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> <a href="Data-Array-Repa-Eval-Gang.html#t:Gang">Gang</a><a href="src/Data-Array-Repa-Eval-Gang.html#forkGang" class="link">Source</a></p><div class="doc"><p>Fork a <code><a href="Data-Array-Repa-Eval-Gang.html#t:Gang">Gang</a></code> with the given number of threads (at least 1).
</p></div></div><div class="top"><p class="src"><a name="v:gangSize" class="def">gangSize</a> :: <a href="Data-Array-Repa-Eval-Gang.html#t:Gang">Gang</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a><a href="src/Data-Array-Repa-Eval-Gang.html#gangSize" class="link">Source</a></p><div class="doc"><p>O(1). Yield the number of threads in the <code><a href="Data-Array-Repa-Eval-Gang.html#t:Gang">Gang</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:gangIO" class="def">gangIO</a> :: <a href="Data-Array-Repa-Eval-Gang.html#t:Gang">Gang</a> -> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()) -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()<a href="src/Data-Array-Repa-Eval-Gang.html#gangIO" class="link">Source</a></p><div class="doc"><p>Issue work requests for the <code><a href="Data-Array-Repa-Eval-Gang.html#t:Gang">Gang</a></code> and wait until they complete.
</p><p>If the gang is already busy then print a warning to <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/GHC-IO-Handle-FD.html#v:stderr">stderr</a></code> and just
run the actions sequentially in the requesting thread.
</p></div></div><div class="top"><p class="src"><a name="v:gangST" class="def">gangST</a> :: <a href="Data-Array-Repa-Eval-Gang.html#t:Gang">Gang</a> -> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad-ST-Safe.html#t:ST">ST</a> s ()) -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad-ST-Safe.html#t:ST">ST</a> s ()<a href="src/Data-Array-Repa-Eval-Gang.html#gangST" class="link">Source</a></p><div class="doc"><p>Same as <code><a href="Data-Array-Repa-Eval-Gang.html#v:gangIO">gangIO</a></code> but in the <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad-ST-Safe.html#t:ST">ST</a></code> monad.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>
|