This file is indexed.

/usr/share/doc/libghc-repa-doc/html/Data-Array-Repa-Eval.html is in libghc-repa-doc 3.4.0.2-1.

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
28
29
30
31
32
33
34
35
<!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</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.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Array-Repa-Eval.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.4.0.2: 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><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Data.Array.Repa.Eval</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Element types</a></li><li><a href="#g:2">Parallel array filling</a></li><li><a href="#g:3">Converting between representations</a></li><li><a href="#g:4">Chunked filling</a></li><li><a href="#g:5">Interleaved filling</a></li><li><a href="#g:6">Blockwise filling</a></li><li><a href="#g:7">Cursored blockwise filling</a></li><li><a href="#g:8">Chunked selection</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Low level interface to parallel array filling operators.</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"><span class="keyword">class</span> <a href="#t:Elt">Elt</a> a <span class="keyword">where</span><ul class="subs"><li><a href="#v:touch">touch</a> :: a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li><a href="#v:zero">zero</a> :: a</li><li><a href="#v:one">one</a> :: a</li></ul></li><li class="src short"><span class="keyword">class</span> <a href="#t:Target">Target</a> r e <span class="keyword">where</span><ul class="subs"><li><span class="keyword">data</span> <a href="#t:MVec">MVec</a> r e</li><li><a href="#v:newMVec">newMVec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> (<a href="Data-Array-Repa-Eval.html#t:MVec">MVec</a> r e)</li><li><a href="#v:unsafeWriteMVec">unsafeWriteMVec</a> :: <a href="Data-Array-Repa-Eval.html#t:MVec">MVec</a> r e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li><a href="#v:unsafeFreezeMVec">unsafeFreezeMVec</a> :: sh -&gt; <a href="Data-Array-Repa-Eval.html#t:MVec">MVec</a> r e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> (<a href="Data-Array-Repa.html#t:Array">Array</a> r sh e)</li><li><a href="#v:deepSeqMVec">deepSeqMVec</a> :: <a href="Data-Array-Repa-Eval.html#t:MVec">MVec</a> r e -&gt; a -&gt; a</li><li><a href="#v:touchMVec">touchMVec</a> :: <a href="Data-Array-Repa-Eval.html#t:MVec">MVec</a> r e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li></ul></li><li class="src short"><span class="keyword">class</span> (<a href="Data-Array-Repa.html#t:Source">Source</a> r1 e, <a href="Data-Array-Repa-Shape.html#t:Shape">Shape</a> sh) =&gt; <a href="#t:Load">Load</a> r1 sh e <span class="keyword">where</span><ul class="subs"><li><a href="#v:loadS">loadS</a> :: <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> r2 e =&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r1 sh e -&gt; <a href="Data-Array-Repa-Eval.html#t:MVec">MVec</a> r2 e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li><a href="#v:loadP">loadP</a> :: <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> r2 e =&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r1 sh e -&gt; <a href="Data-Array-Repa-Eval.html#t:MVec">MVec</a> r2 e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li></ul></li><li class="src short"><span class="keyword">class</span> (<a href="Data-Array-Repa.html#t:Source">Source</a> r1 e, <a href="Data-Array-Repa-Shape.html#t:Shape">Shape</a> sh) =&gt; <a href="#t:LoadRange">LoadRange</a> r1 sh e <span class="keyword">where</span><ul class="subs"><li><a href="#v:loadRangeS">loadRangeS</a> :: <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> r2 e =&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r1 sh e -&gt; <a href="Data-Array-Repa-Eval.html#t:MVec">MVec</a> r2 e -&gt; sh -&gt; sh -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li><a href="#v:loadRangeP">loadRangeP</a> :: <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> r2 e =&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r1 sh e -&gt; <a href="Data-Array-Repa-Eval.html#t:MVec">MVec</a> r2 e -&gt; sh -&gt; sh -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li></ul></li><li class="src short"><a href="#v:fromList">fromList</a> :: (<a href="Data-Array-Repa-Shape.html#t:Shape">Shape</a> sh, <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> r e) =&gt; sh -&gt; [e] -&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r sh e</li><li class="src short"><a href="#v:computeS">computeS</a> :: (<a href="Data-Array-Repa-Eval.html#t:Load">Load</a> r1 sh e, <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> r2 e) =&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r1 sh e -&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r2 sh e</li><li class="src short"><a href="#v:computeP">computeP</a> :: (<a href="Data-Array-Repa-Eval.html#t:Load">Load</a> r1 sh e, <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> r2 e, <a href="Data-Array-Repa.html#t:Source">Source</a> r2 e, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r1 sh e -&gt; m (<a href="Data-Array-Repa.html#t:Array">Array</a> r2 sh e)</li><li class="src short"><a href="#v:suspendedComputeP">suspendedComputeP</a> :: (<a href="Data-Array-Repa-Eval.html#t:Load">Load</a> r1 sh e, <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> r2 e) =&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r1 sh e -&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r2 sh e</li><li class="src short"><a href="#v:copyS">copyS</a> :: (<a href="Data-Array-Repa.html#t:Source">Source</a> r1 e, <a href="Data-Array-Repa-Eval.html#t:Load">Load</a> <a href="Data-Array-Repa-Repr-Delayed.html#t:D">D</a> sh e, <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> r2 e) =&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r1 sh e -&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r2 sh e</li><li class="src short"><a href="#v:copyP">copyP</a> :: (<a href="Data-Array-Repa.html#t:Source">Source</a> r1 e, <a href="Data-Array-Repa.html#t:Source">Source</a> r2 e, <a href="Data-Array-Repa-Eval.html#t:Load">Load</a> <a href="Data-Array-Repa-Repr-Delayed.html#t:D">D</a> sh e, <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> r2 e, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r1 sh e -&gt; m (<a href="Data-Array-Repa.html#t:Array">Array</a> r2 sh e)</li><li class="src short"><a href="#v:suspendedCopyP">suspendedCopyP</a> :: (<a href="Data-Array-Repa.html#t:Source">Source</a> r1 e, <a href="Data-Array-Repa-Eval.html#t:Load">Load</a> <a href="Data-Array-Repa-Repr-Delayed.html#t:D">D</a> sh e, <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> r2 e) =&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r1 sh e -&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r2 sh e</li><li class="src short"><a href="#v:now">now</a> :: (<a href="Data-Array-Repa-Shape.html#t:Shape">Shape</a> sh, <a href="Data-Array-Repa.html#t:Source">Source</a> r e, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r sh e -&gt; m (<a href="Data-Array-Repa.html#t:Array">Array</a> r sh e)</li><li class="src short"><a href="#v:fillLinearS">fillLinearS</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()) -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:fillChunkedP">fillChunkedP</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()) -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:fillChunkedIOP">fillChunkedIOP</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()) -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> a)) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:fillInterleavedP">fillInterleavedP</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()) -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:fillBlock2P">fillBlock2P</a> :: <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> a =&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()) -&gt; (<a href="Data-Array-Repa-Index.html#t:DIM2">DIM2</a> -&gt; a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:fillBlock2S">fillBlock2S</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()) -&gt; (<a href="Data-Array-Repa-Index.html#t:DIM2">DIM2</a> -&gt; a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:fillCursoredBlock2S">fillCursoredBlock2S</a> :: <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> a =&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()) -&gt; (<a href="Data-Array-Repa-Index.html#t:DIM2">DIM2</a> -&gt; cursor) -&gt; (<a href="Data-Array-Repa-Index.html#t:DIM2">DIM2</a> -&gt; cursor -&gt; cursor) -&gt; (cursor -&gt; a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:fillCursoredBlock2P">fillCursoredBlock2P</a> :: <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> a =&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()) -&gt; (<a href="Data-Array-Repa-Index.html#t:DIM2">DIM2</a> -&gt; cursor) -&gt; (<a href="Data-Array-Repa-Index.html#t:DIM2">DIM2</a> -&gt; cursor -&gt; cursor) -&gt; (cursor -&gt; a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:selectChunkedS">selectChunkedS</a> :: <a href="Data-Array-Repa-Shape.html#t:Shape">Shape</a> sh =&gt; (sh -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()) -&gt; (sh -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; (sh -&gt; a) -&gt; sh -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:selectChunkedP">selectChunkedP</a> :: <span class="keyword">forall</span> a. <a href="Data-Array-Repa-Repr-Unboxed.html#t:Unbox">Unbox</a> a =&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a) -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> [<a href="file:///usr/share/doc/libghc-vector-doc/html/Data-Vector-Unboxed-Mutable.html#t:IOVector">IOVector</a> a]</li></ul></div><div id="interface"><h1 id="g:1">Element types</h1><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:Elt" class="def">Elt</a> a <span class="keyword">where</span> <a href="src/Data-Array-Repa-Eval-Elt.html#Elt" class="link">Source</a></p><div class="doc"><p>Element types that can be used with the blockwise filling functions.</p><p>This class is mainly used to define the <code><a href="Data-Array-Repa-Eval.html#v:touch">touch</a></code> method. This is used internally
   in the imeplementation of Repa to prevent let-binding from being floated
   inappropriately by the GHC simplifier.  Doing a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#v:seq">seq</a></code> sometimes isn't enough,
   because the GHC simplifier can erase these, and still move around the bindings.</p></div><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src">Nothing</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:touch" class="def">touch</a> :: a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/Data-Array-Repa-Eval-Elt.html#touch" class="link">Source</a></p><div class="doc"><p>Place a demand on a value at a particular point in an IO computation.</p></div><p class="src"><a name="v:zero" class="def">zero</a> :: a <a href="src/Data-Array-Repa-Eval-Elt.html#zero" class="link">Source</a></p><div class="doc"><p>Generic zero value, helpful for debugging.</p></div><p class="src"><a name="v:one" class="def">one</a> :: a <a href="src/Data-Array-Repa-Eval-Elt.html#one" class="link">Source</a></p><div class="doc"><p>Generic one value, helpful for debugging.</p></div></div><div class="subs instances"><p id="control.i:Elt" class="caption collapser" onclick="toggleSection('i:Elt')">Instances</p><div id="section.i:Elt" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></span> <a href="src/Data-Array-Repa-Eval-Elt.html#line-112" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a></span> <a href="src/Data-Array-Repa-Eval-Elt.html#line-139" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Float">Float</a></span> <a href="src/Data-Array-Repa-Eval-Elt.html#line-126" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></span> <a href="src/Data-Array-Repa-Eval-Elt.html#line-153" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int8">Int8</a></span> <a href="src/Data-Array-Repa-Eval-Elt.html#line-165" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int16">Int16</a></span> <a href="src/Data-Array-Repa-Eval-Elt.html#line-178" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int32">Int32</a></span> <a href="src/Data-Array-Repa-Eval-Elt.html#line-191" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int64">Int64</a></span> <a href="src/Data-Array-Repa-Eval-Elt.html#line-204" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word">Word</a></span> <a href="src/Data-Array-Repa-Eval-Elt.html#line-218" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word8">Word8</a></span> <a href="src/Data-Array-Repa-Eval-Elt.html#line-231" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word16">Word16</a></span> <a href="src/Data-Array-Repa-Eval-Elt.html#line-244" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word32">Word32</a></span> <a href="src/Data-Array-Repa-Eval-Elt.html#line-257" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word64">Word64</a></span> <a href="src/Data-Array-Repa-Eval-Elt.html#line-270" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> a, <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> b) =&gt; <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> (a, b)</span> <a href="src/Data-Array-Repa-Eval-Elt.html#line-284" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> a, <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> b, <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> c) =&gt; <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> (a, b, c)</span> <a href="src/Data-Array-Repa-Eval-Elt.html#line-297" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> a, <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> b, <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> c, <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> d) =&gt; <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> (a, b, c, d)</span> <a href="src/Data-Array-Repa-Eval-Elt.html#line-311" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> a, <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> b, <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> c, <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> d, <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> e) =&gt; <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> (a, b, c, d, e)</span> <a href="src/Data-Array-Repa-Eval-Elt.html#line-326" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> a, <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> b, <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> c, <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> d, <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> e, <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> f) =&gt; <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> (a, b, c, d, e, f)</span> <a href="src/Data-Array-Repa-Eval-Elt.html#line-342" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:2">Parallel array filling</h1><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:Target" class="def">Target</a> r e <span class="keyword">where</span> <a href="src/Data-Array-Repa-Eval-Target.html#Target" class="link">Source</a></p><div class="doc"><p>Class of manifest array representations that can be constructed in parallel.</p></div><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">data</span> <a name="t:MVec" class="def">MVec</a> r e <a href="src/Data-Array-Repa-Eval-Target.html#MVec" class="link">Source</a></p><div class="doc"><p>Mutable version of the representation.</p></div></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:newMVec" class="def">newMVec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> (<a href="Data-Array-Repa-Eval.html#t:MVec">MVec</a> r e) <a href="src/Data-Array-Repa-Eval-Target.html#newMVec" class="link">Source</a></p><div class="doc"><p>Allocate a new mutable array of the given size.</p></div><p class="src"><a name="v:unsafeWriteMVec" class="def">unsafeWriteMVec</a> :: <a href="Data-Array-Repa-Eval.html#t:MVec">MVec</a> r e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/Data-Array-Repa-Eval-Target.html#unsafeWriteMVec" class="link">Source</a></p><div class="doc"><p>Write an element into the mutable array.</p></div><p class="src"><a name="v:unsafeFreezeMVec" class="def">unsafeFreezeMVec</a> :: sh -&gt; <a href="Data-Array-Repa-Eval.html#t:MVec">MVec</a> r e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> (<a href="Data-Array-Repa.html#t:Array">Array</a> r sh e) <a href="src/Data-Array-Repa-Eval-Target.html#unsafeFreezeMVec" class="link">Source</a></p><div class="doc"><p>Freeze the mutable array into an immutable Repa array.</p></div><p class="src"><a name="v:deepSeqMVec" class="def">deepSeqMVec</a> :: <a href="Data-Array-Repa-Eval.html#t:MVec">MVec</a> r e -&gt; a -&gt; a <a href="src/Data-Array-Repa-Eval-Target.html#deepSeqMVec" class="link">Source</a></p><div class="doc"><p>Ensure the strucure of a mutable array is fully evaluated.</p></div><p class="src"><a name="v:touchMVec" class="def">touchMVec</a> :: <a href="Data-Array-Repa-Eval.html#t:MVec">MVec</a> r e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/Data-Array-Repa-Eval-Target.html#touchMVec" class="link">Source</a></p><div class="doc"><p>Ensure the array is still live at this point.
   Needed when the mutable array is a ForeignPtr with a finalizer.</p></div></div><div class="subs instances"><p id="control.i:Target" class="caption collapser" onclick="toggleSection('i:Target')">Instances</p><div id="section.i:Target" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Foreign-Storable.html#t:Storable">Storable</a> e =&gt; <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> <a href="Data-Array-Repa-Repr-ForeignPtr.html#t:F">F</a> e</span> <a href="src/Data-Array-Repa-Eval-Target.html#line-53" class="link">Source</a></td><td class="doc"><p>Filling foreign buffers.</p></td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Data-Array-Repa-Repr-Unboxed.html#t:Unbox">Unbox</a> e =&gt; <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> <a href="Data-Array-Repa-Repr-Unboxed.html#t:U">U</a> e</span> <a href="src/Data-Array-Repa-Eval-Target.html#line-61" class="link">Source</a></td><td class="doc"><p>Filling of unboxed vector arrays.</p></td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Data-Array-Repa-Eval.html#t:Target">Target</a> <a href="Data-Array-Repa-Repr-Vector.html#t:V">V</a> e</span> <a href="src/Data-Array-Repa-Eval-Target.html#line-54" class="link">Source</a></td><td class="doc"><p>Filling of boxed vector arrays.</p></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> (<a href="Data-Array-Repa.html#t:Source">Source</a> r1 e, <a href="Data-Array-Repa-Shape.html#t:Shape">Shape</a> sh) =&gt; <a name="t:Load" class="def">Load</a> r1 sh e <span class="keyword">where</span> <a href="src/Data-Array-Repa-Eval-Load.html#Load" class="link">Source</a></p><div class="doc"><p>Compute all elements defined by an array and write them to a manifest
   target representation.</p><p>Note that instances require that the source array to have a delayed
   representation such as <code>D</code> or <code>C</code>. If you want to use a pre-existing
   manifest array as the source then <code>delay</code> it first.</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:loadS" class="def">loadS</a> :: <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> r2 e =&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r1 sh e -&gt; <a href="Data-Array-Repa-Eval.html#t:MVec">MVec</a> r2 e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/Data-Array-Repa-Eval-Load.html#loadS" class="link">Source</a></p><div class="doc"><p>Fill an entire array sequentially.</p></div><p class="src"><a name="v:loadP" class="def">loadP</a> :: <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> r2 e =&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r1 sh e -&gt; <a href="Data-Array-Repa-Eval.html#t:MVec">MVec</a> r2 e -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/Data-Array-Repa-Eval-Load.html#loadP" class="link">Source</a></p><div class="doc"><p>Fill an entire array in parallel.</p></div></div><div class="subs instances"><p id="control.i:Load" class="caption collapser" onclick="toggleSection('i:Load')">Instances</p><div id="section.i:Load" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="Data-Array-Repa-Shape.html#t:Shape">Shape</a> sh =&gt; <a href="Data-Array-Repa-Eval.html#t:Load">Load</a> <a href="Data-Array-Repa-Repr-Delayed.html#t:D">D</a> sh e</span> <a href="src/Data-Array-Repa-Eval-Load.html#line-48" class="link">Source</a></td><td class="doc"><p>Compute all elements in an array.</p></td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="Data-Array-Repa-Shape.html#t:Shape">Shape</a> sh, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Num">Num</a> e) =&gt; <a href="Data-Array-Repa-Eval.html#t:Load">Load</a> <a href="Data-Array-Repa-Repr-Undefined.html#t:X">X</a> sh e</span> <a href="src/Data-Array-Repa-Eval-Load.html#line-47" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> e =&gt; <a href="Data-Array-Repa-Eval.html#t:Load">Load</a> <a href="Data-Array-Repa-Repr-Cursored.html#t:C">C</a> <a href="Data-Array-Repa-Index.html#t:DIM2">DIM2</a> e</span> <a href="src/Data-Array-Repa-Eval-Load.html#line-67" class="link">Source</a></td><td class="doc"><p>Compute all elements in an rank-2 array. </p></td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="Data-Array-Repa-Shape.html#t:Shape">Shape</a> sh, <a href="Data-Array-Repa-Eval.html#t:Load">Load</a> r1 sh e) =&gt; <a href="Data-Array-Repa-Eval.html#t:Load">Load</a> (<a href="Data-Array-Repa-Repr-HintSmall.html#t:S">S</a> r1) sh e</span> <a href="src/Data-Array-Repa-Eval-Load.html#line-57" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="Data-Array-Repa-Shape.html#t:Shape">Shape</a> sh, <a href="Data-Array-Repa-Eval.html#t:Load">Load</a> <a href="Data-Array-Repa-Repr-Delayed.html#t:D">D</a> sh e) =&gt; <a href="Data-Array-Repa-Eval.html#t:Load">Load</a> (<a href="Data-Array-Repa-Repr-HintInterleave.html#t:I">I</a> <a href="Data-Array-Repa-Repr-Delayed.html#t:D">D</a>) sh e</span> <a href="src/Data-Array-Repa-Eval-Load.html#line-60" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="Data-Array-Repa-Eval.html#t:LoadRange">LoadRange</a> r1 sh e, <a href="Data-Array-Repa-Eval.html#t:Load">Load</a> r2 sh e) =&gt; <a href="Data-Array-Repa-Eval.html#t:Load">Load</a> (<a href="Data-Array-Repa-Repr-Partitioned.html#t:P">P</a> r1 r2) sh e</span> <a href="src/Data-Array-Repa-Eval-Load.html#line-71" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> (<a href="Data-Array-Repa.html#t:Source">Source</a> r1 e, <a href="Data-Array-Repa-Shape.html#t:Shape">Shape</a> sh) =&gt; <a name="t:LoadRange" class="def">LoadRange</a> r1 sh e <span class="keyword">where</span> <a href="src/Data-Array-Repa-Eval-Load.html#LoadRange" class="link">Source</a></p><div class="doc"><p>Compute a range of elements defined by an array and write them to a fillable
   representation.</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:loadRangeS" class="def">loadRangeS</a> :: <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> r2 e =&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r1 sh e -&gt; <a href="Data-Array-Repa-Eval.html#t:MVec">MVec</a> r2 e -&gt; sh -&gt; sh -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/Data-Array-Repa-Eval-Load.html#loadRangeS" class="link">Source</a></p><div class="doc"><p>Fill a range of an array sequentially.</p></div><p class="src"><a name="v:loadRangeP" class="def">loadRangeP</a> :: <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> r2 e =&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r1 sh e -&gt; <a href="Data-Array-Repa-Eval.html#t:MVec">MVec</a> r2 e -&gt; sh -&gt; sh -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/Data-Array-Repa-Eval-Load.html#loadRangeP" class="link">Source</a></p><div class="doc"><p>Fill a range of an array in parallel.</p></div></div><div class="subs instances"><p id="control.i:LoadRange" class="caption collapser" onclick="toggleSection('i:LoadRange')">Instances</p><div id="section.i:LoadRange" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> e =&gt; <a href="Data-Array-Repa-Eval.html#t:LoadRange">LoadRange</a> <a href="Data-Array-Repa-Repr-Delayed.html#t:D">D</a> <a href="Data-Array-Repa-Index.html#t:DIM2">DIM2</a> e</span> <a href="src/Data-Array-Repa-Eval-Load.html#line-67" class="link">Source</a></td><td class="doc"><p>Compute a range of elements in a rank-2 array.</p></td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> e =&gt; <a href="Data-Array-Repa-Eval.html#t:LoadRange">LoadRange</a> <a href="Data-Array-Repa-Repr-Cursored.html#t:C">C</a> <a href="Data-Array-Repa-Index.html#t:DIM2">DIM2</a> e</span> <a href="src/Data-Array-Repa-Eval-Load.html#line-90" class="link">Source</a></td><td class="doc"><p>Compute a range of elements in a rank-2 array.</p></td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="Data-Array-Repa-Shape.html#t:Shape">Shape</a> sh, <a href="Data-Array-Repa-Eval.html#t:LoadRange">LoadRange</a> r1 sh e) =&gt; <a href="Data-Array-Repa-Eval.html#t:LoadRange">LoadRange</a> (<a href="Data-Array-Repa-Repr-HintSmall.html#t:S">S</a> r1) sh e</span> <a href="src/Data-Array-Repa-Eval-Load.html#line-69" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:fromList" class="def">fromList</a> :: (<a href="Data-Array-Repa-Shape.html#t:Shape">Shape</a> sh, <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> r e) =&gt; sh -&gt; [e] -&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r sh e <a href="src/Data-Array-Repa-Eval-Target.html#fromList" class="link">Source</a></p><div class="doc"><p>O(n). Construct a manifest array from a list.</p></div></div><h1 id="g:3">Converting between representations</h1><div class="top"><p class="src"><a name="v:computeS" class="def">computeS</a> :: (<a href="Data-Array-Repa-Eval.html#t:Load">Load</a> r1 sh e, <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> r2 e) =&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r1 sh e -&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r2 sh e <a href="src/Data-Array-Repa-Eval.html#computeS" class="link">Source</a></p><div class="doc"><p>Sequential computation of array elements.</p></div></div><div class="top"><p class="src"><a name="v:computeP" class="def">computeP</a> :: (<a href="Data-Array-Repa-Eval.html#t:Load">Load</a> r1 sh e, <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> r2 e, <a href="Data-Array-Repa.html#t:Source">Source</a> r2 e, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r1 sh e -&gt; m (<a href="Data-Array-Repa.html#t:Array">Array</a> r2 sh e) <a href="src/Data-Array-Repa-Eval.html#computeP" class="link">Source</a></p><div class="doc"><p>Parallel computation of array elements.</p><ul><li>The source array must have a delayed representation like <code><a href="Data-Array-Repa-Repr-Delayed.html#t:D">D</a></code>, <code>C</code> or <code>P</code>, 
     and the result a manifest representation like <code>U</code> or <code>F</code>.</li><li>If you want to copy data between manifest representations then use
    <code><a href="Data-Array-Repa-Eval.html#v:copyP">copyP</a></code> instead.</li><li>If you want to convert a manifest array back to a delayed representation
     then use <code><a href="Data-Array-Repa-Repr-Delayed.html#v:delay">delay</a></code> instead.</li></ul></div></div><div class="top"><p class="src"><a name="v:suspendedComputeP" class="def">suspendedComputeP</a> :: (<a href="Data-Array-Repa-Eval.html#t:Load">Load</a> r1 sh e, <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> r2 e) =&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r1 sh e -&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r2 sh e <a href="src/Data-Array-Repa-Eval.html#suspendedComputeP" class="link">Source</a></p><div class="doc"><p>Suspended parallel computation of array elements.</p><p>This version creates a thunk that will evaluate the array on demand.
   If you force it when another parallel computation is already running
   then you  will get a runtime warning and evaluation will be sequential. 
   Use <code><a href="Data-Array-Repa.html#v:deepSeqArray">deepSeqArray</a></code> and <code><a href="Data-Array-Repa-Eval.html#v:now">now</a></code> to ensure that each array is evaluated
   before proceeding to the next one. </p><p>If unsure then just use the monadic version <code><a href="Data-Array-Repa-Eval.html#v:computeP">computeP</a></code>. This one ensures
   that each array is fully evaluated before continuing.</p></div></div><div class="top"><p class="src"><a name="v:copyS" class="def">copyS</a> :: (<a href="Data-Array-Repa.html#t:Source">Source</a> r1 e, <a href="Data-Array-Repa-Eval.html#t:Load">Load</a> <a href="Data-Array-Repa-Repr-Delayed.html#t:D">D</a> sh e, <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> r2 e) =&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r1 sh e -&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r2 sh e <a href="src/Data-Array-Repa-Eval.html#copyS" class="link">Source</a></p><div class="doc"><p>Sequential copying of arrays.</p></div></div><div class="top"><p class="src"><a name="v:copyP" class="def">copyP</a> :: (<a href="Data-Array-Repa.html#t:Source">Source</a> r1 e, <a href="Data-Array-Repa.html#t:Source">Source</a> r2 e, <a href="Data-Array-Repa-Eval.html#t:Load">Load</a> <a href="Data-Array-Repa-Repr-Delayed.html#t:D">D</a> sh e, <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> r2 e, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r1 sh e -&gt; m (<a href="Data-Array-Repa.html#t:Array">Array</a> r2 sh e) <a href="src/Data-Array-Repa-Eval.html#copyP" class="link">Source</a></p><div class="doc"><p>Parallel copying of arrays.</p><ul><li>This is a wrapper that delays an array before calling <code><a href="Data-Array-Repa-Eval.html#v:computeP">computeP</a></code>. </li><li>You can use it to copy manifest arrays between representations.</li></ul></div></div><div class="top"><p class="src"><a name="v:suspendedCopyP" class="def">suspendedCopyP</a> :: (<a href="Data-Array-Repa.html#t:Source">Source</a> r1 e, <a href="Data-Array-Repa-Eval.html#t:Load">Load</a> <a href="Data-Array-Repa-Repr-Delayed.html#t:D">D</a> sh e, <a href="Data-Array-Repa-Eval.html#t:Target">Target</a> r2 e) =&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r1 sh e -&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r2 sh e <a href="src/Data-Array-Repa-Eval.html#suspendedCopyP" class="link">Source</a></p><div class="doc"><p>Suspended parallel copy of array elements.</p></div></div><div class="top"><p class="src"><a name="v:now" class="def">now</a> :: (<a href="Data-Array-Repa-Shape.html#t:Shape">Shape</a> sh, <a href="Data-Array-Repa.html#t:Source">Source</a> r e, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Data-Array-Repa.html#t:Array">Array</a> r sh e -&gt; m (<a href="Data-Array-Repa.html#t:Array">Array</a> r sh e) <a href="src/Data-Array-Repa-Eval.html#now" class="link">Source</a></p><div class="doc"><p>Monadic version of <code><a href="Data-Array-Repa.html#v:deepSeqArray">deepSeqArray</a></code>. </p><p>Forces an suspended array computation to be completed at this point
   in a monadic computation.</p><pre> do  let arr2 = suspendedComputeP arr1
     ...
     arr3 &lt;- now $ arr2
     ...
</pre></div></div><h1 id="g:4">Chunked filling</h1><div class="top"><p class="src"><a name="v:fillLinearS" class="def">fillLinearS</a> <a href="src/Data-Array-Repa-Eval-Chunked.html#fillLinearS" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Number of elements.</p></td></tr><tr><td class="src">-&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ())</td><td class="doc"><p>Update function to write into result buffer.</p></td></tr><tr><td class="src">-&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a)</td><td class="doc"><p>Fn to get the value at a given index.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Fill something sequentially.</p><ul><li>The array is filled linearly from start to finish.  </li></ul></div></div><div class="top"><p class="src"><a name="v:fillChunkedP" class="def">fillChunkedP</a> <a href="src/Data-Array-Repa-Eval-Chunked.html#fillChunkedP" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Number of elements.</p></td></tr><tr><td class="src">-&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ())</td><td class="doc"><p>Update function to write into result buffer.</p></td></tr><tr><td class="src">-&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a)</td><td class="doc"><p>Fn to get the value at a given index.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Fill something in parallel.</p><ul><li>The array is split into linear chunks,
     and each thread linearly fills one chunk.</li></ul></div></div><div class="top"><p class="src"><a name="v:fillChunkedIOP" class="def">fillChunkedIOP</a> <a href="src/Data-Array-Repa-Eval-Chunked.html#fillChunkedIOP" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Number of elements.</p></td></tr><tr><td class="src">-&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ())</td><td class="doc"><p>Update fn to write into result buffer.</p></td></tr><tr><td class="src">-&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> a))</td><td class="doc"><p>Create a fn to get the value at a given index.
   The first <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></code> is the thread number, so you can do some
   per-thread initialisation.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Fill something in parallel, using a separate IO action for each thread.</p><ul><li>The array is split into linear chunks,
     and each thread linearly fills one chunk.</li></ul></div></div><h1 id="g:5">Interleaved filling</h1><div class="top"><p class="src"><a name="v:fillInterleavedP" class="def">fillInterleavedP</a> <a href="src/Data-Array-Repa-Eval-Interleaved.html#fillInterleavedP" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Number of elements.</p></td></tr><tr><td class="src">-&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ())</td><td class="doc"><p>Update function to write into result buffer.</p></td></tr><tr><td class="src">-&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a)</td><td class="doc"><p>Fn to get the value at a given index.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Fill something in parallel.</p><ul><li>The array is split into linear chunks and each thread fills one chunk.</li></ul></div></div><h1 id="g:6">Blockwise filling</h1><div class="top"><p class="src"><a name="v:fillBlock2P" class="def">fillBlock2P</a> <a href="src/Data-Array-Repa-Eval-Cursored.html#fillBlock2P" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ())</td><td class="doc"><p>Update function to write into result buffer.</p></td></tr><tr><td class="src">-&gt; (<a href="Data-Array-Repa-Index.html#t:DIM2">DIM2</a> -&gt; a)</td><td class="doc"><p>Function to evaluate the element at an index.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a></td><td class="doc"><p>Width of the whole array.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a></td><td class="doc"><p>x0 lower left corner of block to fill</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a></td><td class="doc"><p>y0 </p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a></td><td class="doc"><p>w0 width of block to fill.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a></td><td class="doc"><p>h0 height of block to fill.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Fill a block in a rank-2 array in parallel.</p><ul><li>Blockwise filling can be more cache-efficient than linear filling for
    rank-2 arrays.</li><li>Coordinates given are of the filled edges of the block.</li><li>We divide the block into columns, and give one column to each thread.</li><li>Each column is filled in row major order from top to bottom.</li></ul></div></div><div class="top"><p class="src"><a name="v:fillBlock2S" class="def">fillBlock2S</a> <a href="src/Data-Array-Repa-Eval-Chunked.html#fillBlock2S" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ())</td><td class="doc"><p>Update function to write into result buffer.</p></td></tr><tr><td class="src">-&gt; (<a href="Data-Array-Repa-Index.html#t:DIM2">DIM2</a> -&gt; a)</td><td class="doc"><p>Fn to get the value at the given index.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a></td><td class="doc"><p>Width of the whole array.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a></td><td class="doc"><p>x0 lower left corner of block to fill.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a></td><td class="doc"><p>y0</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a></td><td class="doc"><p>w0 width of block to fill</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a></td><td class="doc"><p>h0 height of block to fill</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Fill a block in a rank-2 array, sequentially.</p><ul><li>Blockwise filling can be more cache-efficient than linear filling for
     rank-2 arrays.</li><li>The block is filled in row major order from top to bottom.</li></ul></div></div><h1 id="g:7">Cursored blockwise filling</h1><div class="top"><p class="src"><a name="v:fillCursoredBlock2S" class="def">fillCursoredBlock2S</a> <a href="src/Data-Array-Repa-Eval-Cursored.html#fillCursoredBlock2S" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ())</td><td class="doc"><p>Update function to write into result buffer.</p></td></tr><tr><td class="src">-&gt; (<a href="Data-Array-Repa-Index.html#t:DIM2">DIM2</a> -&gt; cursor)</td><td class="doc"><p>Make a cursor to a particular element.</p></td></tr><tr><td class="src">-&gt; (<a href="Data-Array-Repa-Index.html#t:DIM2">DIM2</a> -&gt; cursor -&gt; cursor)</td><td class="doc"><p>Shift the cursor by an offset.</p></td></tr><tr><td class="src">-&gt; (cursor -&gt; a)</td><td class="doc"><p>Function to evaluate an element at the given index.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a></td><td class="doc"><p>Width of the whole array.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a></td><td class="doc"><p>x0 lower left corner of block to fill.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a></td><td class="doc"><p>y0</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a></td><td class="doc"><p>w0 width of block to fill</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a></td><td class="doc"><p>h0 height of block to fill</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Fill a block in a rank-2 array, sequentially.</p><ul><li>Blockwise filling can be more cache-efficient than linear filling for rank-2 arrays.</li><li>Using cursor functions can help to expose inter-element indexing computations to
     the GHC and LLVM optimisers.</li><li>Coordinates given are of the filled edges of the block.</li><li>The block is filled in row major order from top to bottom.</li></ul></div></div><div class="top"><p class="src"><a name="v:fillCursoredBlock2P" class="def">fillCursoredBlock2P</a> <a href="src/Data-Array-Repa-Eval-Cursored.html#fillCursoredBlock2P" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Array-Repa-Eval.html#t:Elt">Elt</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ())</td><td class="doc"><p>Update function to write into result buffer.</p></td></tr><tr><td class="src">-&gt; (<a href="Data-Array-Repa-Index.html#t:DIM2">DIM2</a> -&gt; cursor)</td><td class="doc"><p>Make a cursor to a particular element.</p></td></tr><tr><td class="src">-&gt; (<a href="Data-Array-Repa-Index.html#t:DIM2">DIM2</a> -&gt; cursor -&gt; cursor)</td><td class="doc"><p>Shift the cursor by an offset.</p></td></tr><tr><td class="src">-&gt; (cursor -&gt; a)</td><td class="doc"><p>Function to evaluate the element at an index.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a></td><td class="doc"><p>Width of the whole array.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a></td><td class="doc"><p>x0 lower left corner of block to fill</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a></td><td class="doc"><p>y0</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a></td><td class="doc"><p>w0 width of block to fill</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.4.0.0/GHC-Prim.html#t:Int-35-">Int#</a></td><td class="doc"><p>h0 height of block to fill</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Fill a block in a rank-2 array in parallel.</p><ul><li>Blockwise filling can be more cache-efficient than linear filling for rank-2 arrays.</li><li>Using cursor functions can help to expose inter-element indexing computations to
     the GHC and LLVM optimisers.</li><li>Coordinates given are of the filled edges of the block.</li><li>We divide the block into columns, and give one column to each thread.</li><li>Each column is filled in row major order from top to bottom.</li></ul></div></div><h1 id="g:8">Chunked selection</h1><div class="top"><p class="src"><a name="v:selectChunkedS" class="def">selectChunkedS</a> <a href="src/Data-Array-Repa-Eval-Selection.html#selectChunkedS" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Array-Repa-Shape.html#t:Shape">Shape</a> sh</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; (sh -&gt; a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ())</td><td class="doc"><p>Update function to write into result.</p></td></tr><tr><td class="src">-&gt; (sh -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a>)</td><td class="doc"><p>See if this predicate matches.</p></td></tr><tr><td class="src">-&gt; (sh -&gt; a)</td><td class="doc"><p>.. and apply fn to the matching index</p></td></tr><tr><td class="src">-&gt; sh</td><td class="doc"><p>Extent of indices to apply to predicate.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Number of elements written to destination array.</p></td></tr></table></div><div class="doc"><p>Select indices matching a predicate.</p><ul><li>This primitive can be useful for writing filtering functions.</li></ul></div></div><div class="top"><p class="src"><a name="v:selectChunkedP" class="def">selectChunkedP</a> <a href="src/Data-Array-Repa-Eval-Selection.html#selectChunkedP" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Array-Repa-Repr-Unboxed.html#t:Unbox">Unbox</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a>)</td><td class="doc"><p>See if this predicate matches.</p></td></tr><tr><td class="src">-&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> [<a href="file:///usr/share/doc/libghc-vector-doc/html/Data-Vector-Unboxed-Mutable.html#t:IOVector">IOVector</a> a]</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Select indices matching a predicate, in parallel.</p><ul><li>This primitive can be useful for writing filtering functions.</li><li>The array is split into linear chunks, with one chunk being given to
     each thread.</li><li>The number of elements in the result array depends on how many threads
     you're running the program with.</li></ul></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>