B &      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcd e f g h i jklmnopqrstuvwxyz{|}~       NoneFWorkaround for slice-wise currined filling functions inlining issues.  See comment to  for details. None  None  !"  !"  !"None!"#$%&'(!"#$%&'(None*#$)%&'*()*++,-./0,123456-789:;<=.>?@ABCDE/101#$23%&'45()*+67,-./089123456:;789:;<=<=>?@ABCDE*#$)%&'*()*++,-./0,123456-789:;<=.>?@ABCDE/NoneGWell-known missed in Data.List.Split function. F$Number of chunks to split range on (n) Start of range  End of range Split index function GList to split Number of chuncks (n) Exactly n! even chunks of the initial list FGFGFGNoneH!Generalizes right to left folds. &To be passed to fold combinators from Data.Yarr.Work module. I!Generalizes left to right folds. &To be passed to fold combinators from Data.Yarr.Work module. J9Generalizes both partially applied left and right folds, $ as well as works on mutable state. "To be passed to fold runners from Data.Yarr.Work module. K<Alias to frequently used get-write-from-to arguments combo. %To be passed as 1st parameter of all  ing functions  from Data.Yarr.Eval module. LGeneralizes interval works: Ks, Js. To be passed to functions from Data.Yarr.Utils.Fork module  and called directly. HGeneralized right reduce Curried result stateful work IGeneralized left reduce Curried result stateful work JInitial state Indexing function #Curried result function -- worker,  emits final state KIndexing function Writing function "Curried result function -- worker LStart (lower index) End (higher index) Result HIJKLHIJKLNoneN Version of M which discards results. M)Number of threads to parallelize work on !Per-thread work producer, passed  thread number  [0..threads-1] Results N)Number of threads to parallelize work on !Per-thread work producer, passed  thread number  [0..threads-1] MNMNMNNone>?OPQRSTUVWXY@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi jkl m !"01#$23%&'45()*+67,-./089123456:;789:;<=<=>?@ABCDEOPQRSTUVWXY@ STUVWXY !"OPQR$#'&%+*)(0/.-,654321=<;:987EDCBA@?>>?OPQRSTUVWXY@ANone Z2GHC simplifier tends to float numeric comparsions > as high in execution graph as possible, which in conjunction = with loop unrolling sometimes leads to dramatic code bloat. I' m not sure -M functions work at all, < but strict versions defenitely keep comparsions unfloated. [Maybe sequential n. \Definetely sequential n. ]Maybe sequential o. ^Definetely sequential o. _Maybe sequential clamp. `Definetely sequential clamp. a9Mainly used to fight against GHC simplifier, which gives C no chance to LLVM to perform Global Value Numbering optimization.  Copied from repa, see   [http://hackage.haskell.org/packages/archive/repa/3.2.3.1/doc/html/Data-Array-Repa-Eval.html b4The function intented to be passed as 3rd parameter  to  unrolled- functions in  class  and . 8If your loading operation is strictly local by elements  (in most cases), use c instead of this function. c Alias to (\_ -> return ()). Z[\]^_ Min bound  Max bound Value to clamp Value in bounds ` Min bound  Max bound Value to clamp Value in bounds abcpqrstuvwxyz{|}~ Z[\]^_`abc abcZ[\]^_`Z[\]^_`abcpqrstuvwxyz{|}~ NonedefghidefghidefghidefghiNoneNonemFor internal use. TODO: implement for j and merge with p class p9Class for column-major, regular composite array indices. q0, (0, 0),  (0, 0, 0) rl size is , size (3, 5) == 15 s  (1, 2, 3) `plus` (0, 0, 1) == (1, 2, 4)t (1, 2) `minus` (1, 0) == (0, 2)u  offset ==  tv=Converts linear, memory index of shaped array to shape index  without bound checks. fromLinear (3, 4) 5 == (1, 1)w Opposite to v!, converts composite array index  to linear, "memory" index without bounds checks.  for l shapes. toLinear (5, 5) (3, 0) == 15x4Component-wise minimum, returns maximum legal index  for all given array extents y Component-wise maximum, used in Data.Yarr.Convolution implementation. ~&Standard left fold wothout unrolling. *This one and 5 following functions shouldn't be called directly, 2 they are intented to be passed as first argument  to   and functions from  Data.Yarr.Work module. 3Standard right folding function without unrolling. !Standard fill without unrolling. + To avoid premature optimization just type fill  each time you want to   array  to manifest representation. Mainly for internal use. 5 Abstracts top-left -- bottom-right pair of indices. ,2D-unrolled filling to maximize profit from  "Global value numbering" LLVM optimization.  Example: blurred <-   (   (dim2BlockFill   b)) delayedBlurred!jklmno Outer block  Inner block  Shavings pqrstuvExtent of array  Linear index  Shape index wExtent of array  Shape index  Linear index xSeveral array extents Maximum common shape index yz{|}~Unroll factor b or c Result curried function # to be passed to working functions Unroll factor b or c Result curried function # to be passed to working functions Unroll factor b or c Result curried function # to by passed to loading functions Block size by x. Use  - " values. Block size by y b or c Result curried function & to be passed to loading functions. !HIJKLjklmnopqrstuvwxyz{|}~!LKJIHpqrstuvwxyz{|}~mnolkj jklmnopqrstuvwxyz{|}~ None"Number of threads to fork work on Start End  Slice works 4Thread work, returns piece of result for each slice "Number of threads to fork work on (start, end) for each slice  Slice works (Thread work, returns pieces of results:  [(slice number, result)] "Number of threads to fork work on Start End Work  Thread work None%Class for mutable arrays of vectors.  The class doesn'.t need to define functions, it just gathers it's dependencies. Counterpart for "simple" arrays: . )Class for arrays which could be created. C It combines a pair of representations: freezed and mutable (raw). 6 This segregation is lifted from Boxed representation 9 and, in the final, from GHC system of primitive arrays.  Parameters:  r! - freezed array representation.  mr% - mutable, raw array representation  l4 - load type index, common for both representations  sh - shape of arrays  a - element type O(1)7 Creates and returns mutable array of the given shape. O(1)A Freezes mutable array and returns array which could be indexed. O(1)2 Thaws freezed array and returns mutable version. Class for mutable arrays. Just like for , it's function are unsafe  and require calling  after the last call. Minimum complete defenition:  or . #Counterpart for arrays of vectors:   Shape, genuine monadic writing. Default implementation:  #write tarr sh = linearWrite tarr $ w ( tarr) sh AFast (usually), linear indexing. Intented to be used internally. Default implementation:  "linearWrite tarr i = write tarr $ v ( tarr) i PThis class abstracts pair of array types, which could be (preferably should be)  mapped (fused)& one to another. Injective version of  class.  Parameters:  rE - source array representation. It determines result representation.  frB (fused repr) - result (fused) array representation. Result array  isn'3t indeed presented in memory, finally it should be   d or  ed to   representation.  l1 - load type, common for source and fused arrays EAll functions are already defined, using non-injective versions from  class. The class doesn't have vector counterpart, it' s role play top-level functions  from Data.Yarr.Repr.Separate module. O(1) Pure element mapping.  Main basic "map" in Yarr. O(1) Monadic element mapping. O(1)7 Zipping 2 arrays of the same type indexes and shapes.  Example:  & let productArr = dzip2 (*) arr1 arr2 O(1) Monadic version of  function. O(1)7 Zipping 3 arrays of the same type indexes and shapes. O(1) Monadic version of  function. O(1)1 Generalized element zipping with pure function.  Zipper function is wrapped in   for injectivity. O(1) Monadic version of  function. &Generalized, non-injective version of . Used internally. Minimum complete defenition: , ,  and . The class doesn't have vector counterpart, it' s role play top-level functions  from Data.Yarr.Repr.Separate module. 4Class for arrays of vectors which could be indexed.  The class doesn'.t need to define functions, it just gathers it's dependencies. Counterpart for "simple" arrays: . )Class for arrays which could be indexed. It's functions are unsafe: you must call  after the last call. ? Fortunately, you will hardly ever need to call them manually. Minimum complete defenition:  or . #Counterpart for arrays of vectors:  !Shape, genuine monadic indexing. In Yarr arrays are always q(-indexed and multidimensionally square.  Maximum index is  (extent arr). Default implementation:  !index arr sh = linearIndex arr $ w ( arr) sh " Surrogate" linear index.  For l arrays index == linearIndex. Default implementation:   linearIndex arr i = index arr $ v ( arr) i Class for arrays of vectors.  Paramenters:  r - (entire) representation. , Associated array type for this class is  r sh (v e).  slr - slice representation  l - load type  sh - shape  v - vector type  e - vector (not array) element type. ) Array element type is entire vector: (v e). Counterpart for "simple" arrays: . O(1)' Array of vectors -> vector of arrays. & Think about this function as shallow !" from Prelude.  Slices are views of an underlying array.  Example:   let css = slices coords  xs = css Z 0  ys = css Z 1 This class generalizes  and .  Paramenters:  r - representation,  l - load type,  sh - shape,  a - element type. #Counterpart for arrays of vectors: . !Returns the extent an the array. (Calling this function on foreign array (#) $ ensures it is still alive (GC haven't picked it). < In other manifest representations, the function defined as  return ().  + is lifted to top level in class hierarchy E because in fact foreign representation is the heart of the library. O(1) Ensures that array "and all it's real manifest sources  are fully evaluated. : This function is not for people, it is for GHC compiler. Default implementation: force arr = arr `deepseq` return () %Element mapper function  Source array  Result array  Monadic element mapper function  Source array  Result array Pure element zipper function 1st source array 2nd source array Fused result array  Monadic element zipper function 1st source array 2nd source array  Result array Pure element zipper function 1st source array 2nd source array 3rd source array  Result array  Monadic element zipper function 1st source array 2nd source array 3rd source array Fused result array Wrapped function positionally % accepts elements from source arrays # and emits element for fused array Source arrays  Result array Wrapped monadic zipper Source arrays  Result array . . . . . . . . p.p   NoneGeneral shape load type index. s with  load type index  specialize  and  and leave  and   functions defined by default. Type-level distinction between  inear and  aped arrays > is aimed to avoid integral division operations while looping  through composite (k, j ) indices. CIntegral division is very expensive operation even on modern CPUs. Linear load type index. s with  load type index  define  and  and leave  and   functions defined by default. This class extends  just like  extends . 8 It abstracts slice-wise loading from one array type to  another in specified range. O(n)E Loads vectors from source to target in specified range, slice-wise,  in parallel. O(n): Sequentially loads vector elements from source to target % in specified range, slice by slice. Class abstracts separated in time and space loading  of one array type . to another. Result of running functions with -Slices- infix  is always identical2 to result of running corresponding function from   class.  and  are just about performance. + If target representation is separate (ex. ($ #)),  using  may be faster than  because of per-thread memory  locality.  Parameters:   r - source representation  slr - source slice representation  l - source load type  tr - target representation  tslr - target slice representation  tl - target load type  sh - shape of arrays  v - source vector type  v2 - target vector type  e< - vector element type, common for source and target arrays O(n); Entirely, slice-wise loads vectors from source to target  in parallel.  Example:  ? -- blurred and delayedBlurred are arrays of color components.  loadSlicesP   delayedBlurred blurred O(n)C Sequentially loads vectors from source to target, slice by slice. 8Class abstracts pair of arrays which could be loaded in " just specified range of indices. "Range" is a multidimensional  segment: segment for l arrays, square for k arrays and  cube for j,. Thus, it is specified by pair of indices:  "top-left" (minimum is q) and " bottom-right" (maximum is  ( arr tarr) ) corners. O(n)9 Loads elements from source to target in specified range  in parallel.  Example:   let ext = extent convolved  res < - new ext  rangeLoadP   convolved res (5, 5) (ext `minus` (5, 5)) O(n)G Sequentially loads elements from source to target in specified range. *This class abstracts pair of array types, ' which could be loaded one to another.  Parameters:  r& - source representation. Instance of  class. 2 Typically one of fused representations:  %, ($ %) or  &'.  l - source load type  tr& - target representation. Instance of  class.  tl - target load type  sh - shape of arrays  a - array element type #Counterpart for arrays of vectors: . TODO:1 this class seems to be overengineered, normally # it should have only 3 parameters:  Load l tl sh.  But Convoluted (&') representation is  tightly connected with it' s load type. Used in fill parameter function. , There are two options for this type to be: sh itself or Int.  Don't confuse this type with load type indexes: r and l. ( There are 2 different meanings of word "index": data type index 1 (haskell term) and array index (linear, shape). O(n). Entirely loads source to target in parallel. -First parameter is used to parameterize loop $ unrolling to maximize performance.  Default choice is " -- vanilla not unrolled looping.  Examples:   tarr <-  ( arr)  loadP   arr tarr  loadP (   b) ( 2) arr tarr O(n) Sequential analog of  function.  Loads source to target ly.  Example: loadS (  c)  arr tarrInternal implementation class. Internal implementation class. (There are 2 common ways to parameterize  parallelism: a) to say "split this work between n threads"  or b) to say "+split this work between maximum reasonable  number of threads" , that is  capabilities. Since  * function is monadic, we need always pass  IO Int5 as thread number parameter in order not to multiply B number of functions in this module (there are already too many).  Alias to .  Alias to . O(n)9 This function simplifies the most common way of loading  arrays.  Instead of    mTarget <-  (extent source)     source mTarget  target <-  mTarget You can write just target < - compute (  ) source!Most common parallel use case of .  dComputeP =  (  )#Most common sequential use case of .  dComputeS =  ( ).Determines maximum common range of 2 arrays -  x ion of their s. 0Fill function to work  on slices ,Number of threads to parallelize loading on Source array of vectors Target array of vectors  Top-left *and bottom-right corners of range to load Fill function to work  on slices Source array of vectors Target array of vectors  Top-left *and bottom-right corners of range to load Fill function to work  on slices ,Number of threads to parallelize loading on Source array of vectors Target array of vectors Fill function to work  on slices Source array of vectors Target array of vectors Filling (real worker) function ,Number of threads to parallelize loading on  Source array  Target array  Top-left *and bottom-right corners of range to load Filling (real worker) function  Source array  Target array  Top-left *and bottom-right corners of range to load Filling (real worker) function ,Number of threads to parallelize loading on  Source array  Target array Filling (real worker) function  Source array  Target array Loading function  Source array !Entirely loaded from the source,  d manifest target array KK$ NoneIn opposite to .elayed (source) Delayed Target holds abstract writing  function: (sh -> a -> IO ())/. It may be used to perform arbitrarily tricky 4 things, because no one obliges you to indeed write % an element inside wrapped function. EDelayed representation is a wrapper for arbitrary indexing function.  D  sh a instance holds linear getter ( (Int -> IO a)),  and  D  sh a - shaped, "true"  (sh -> IO a) index, respectively. D@elayed arrays are most common recipients for fusion operations. 3Load type preserving wrapping arbirtary array into elayed representation. 4Wrap indexing function into delayed representation.  Use this function carefully, don'!t implement through it something M that has specialized implementation in the library (mapping, zipping, etc). /Suitable to obtain arrays of constant element,  of indices (fromFunction sh ), and so on. Wraps ( arr)2 into Delayed representation. Normally you shouldn't need D to use this function. It may be dangerous for performance, because  preferred %ing type of source array is ignored. Extent of array Indexing function  Result array   None ?SEparate meta array representation. Internally SEparate arrays  hold vector of it's slices (so,  is just getter for them). Mostly useful for:  Separate in memory manifest #oreign arrays ("Unboxed" arrays  in vector/repa libraries terms). 0 Element-wise vector array fusion (see group of  functions).  Group of  f-...-Elems-( functions is used internally to define   d-...-Elems- functions. O(1)* Injective element-wise fusion (mapping).  Example:    let domainHSVImage =  dmapElems (Q (* 360) (* 100) (* 100)) " normedHSVImage  Also, used internally to define ( function. O(1) Monadic vesion of  function. O(1)@ Generalized element-wise zipping of several arrays of vectors. O(1)G Generalized monadic element-wise zipping of several arrays of vectors O(1)' Glues several arrays of the same type % into one separate array of vectors. / All source arrays must be of the same extent.  Example: !let separateCoords = fromSlices (Q xs ys zs)O(depends on mapper function)  Maps slices of separate array "entirely". :This function is useful when operation over slices is not + element-wise (in that case you should use ():  -let blurredImage = unsafeMapSlices blur image'The function is unsafe because it doesn't check that slice mapper 3 translates extents uniformly (though it is pure). O(0)B Converts separate vector between vector types of the same arity.  Example:   -- floatPairs ::  ( #) l (   Float)  let cs ::  ( #) l ()* Float)  cs = convert floatPairs . . . . . . . . Vector of mapper functions Source array of vectors  Fused array &Elemen-wise vector of monadic mappers Source array of vectors  Result array . . . . Vector of wrapped m-ary element-wise zippers #Vector of source arrays of vectors Fused result array Vector of wrapped m-ary  element-wise monadic zippers #Vector of source arrays of vectors  Result array "Slice mapper without restrictions Source separate array Result separate array NoneO(1) Function from repa. O(1)0 Function for in-place zipping vector elements.  Always true:  zipElems f arr ==  (  f) ( arr) Example: let s = zipElems ( ) coordsO(1). Maps elements of vectors in array uniformly.  Don't confuse with #, which accepts a vector of mapper  for each slice. %Typical use case -- type conversion:  ' let floatImage :: UArray F Dim2 Float  floatImage = mapElems  word8Image O(1) Monadic version of  function.  Don't confuse with .  Example: let domained = mapElemsM (+ 0.0 1.0) floatImageO(1)" Generalized zipping of 2 arrays.  Main basic "zipWith" in Yarr. AAlthough sighature of this function has extremely big predicate,  it is more permissible than $ counterpart, because source arrays  shouldn't be of the same type. Implemented by means of $ function (source arrays are simply  delayed before zipping). O(1)/ Generalized zipping of 3 arrays, which shouldn't be " of the same representation type. "Function to produce result extent  from source extent. .Function to produce elements of result array.  Passed a lookup function  to get elements of the source. Source array itself  Result array  Unwrapped n-ary zipper function Source array of vectors  Result array !Mapper function for all elements Source array of vectors Fused array of vectors 'Monadic mapper for all vector elements Source array of vectors Fused array of vectors Pure zipping function 1st source array 2nd source array Fused result array Pure zipping function 1st source array 2nd source array 3rd source array  Result array NoneForeign Slice representation, view slice representation  for oreign arrays. To understand Foreign Slices,  suppose you have standard image array of    k (   Word8) type. It')s layout in memory (with array indices):    r g b | r g b | r g b | ...  (0, 0) (0, 1) (0, 2) ...   " let (VecList [reds, greens, blues]) =  image 0 -- reds, greens, blues :: UArray FS Dim2 Word8 Now blues5 just indexes each third byte on the same underlying  memory block:   ... b | ... b | ... b | ...  (0, 0) (0, 1) (0, 2)... 7Foreign representation is the heart of Yarr framework. !Internally it holds raw pointer (), which makes indexing # foreign arrays not slower than GHC's built-in primitive arrays,  but without freeze/thaw boilerplate. @Foreign arrays are very permissible, for example you can easily " use them as source and target of  ing operation simultaneously,  achieving old good in-place C-style array modifying:      (  arr) arr(Foreign arrays are intented to hold all  types and = vectors of them (because there is a conditional instance of Storalbe  class for s of s too). O(1)+ allocates zero-initialized foreign array. Needed because common ( function allocates array with garbage. O(1); Returns pointer to memory block used by the given foreign  array. (May be useful to reuse memory if you don't longer need the given array  in the program:   brandNewData <-   ext ( (toForeignPtr arr)) O(1)' Wraps foreign ptr into foreign array. ,The function is unsafe because it simply don' t (and can't) 5 check anything about correctness of produced array. ,NoneNoneO(0) O(0) O(0) O(0) O(0) O(0) Version of , accepts mutating function ( which additionaly accepts array index. O(n) Run non-indexed stateful work.  Example: - = work (  (:)) (return [])O(n) Run indexed stateful work.  Example: res < - iwork (~ (\#s i a -> ...)) foldZero sourceArrayO(n)2 Run stateful work in specified range of indices. O(n)8 Run associative non-indexed stateful work in parallel. <Example -- associative image histogram filling in the test:   Fhttps://github.com/leventov/yarr/blob/master/tests/lum-equalization.hs O(n)4 Run associative indexed stateful work in parallel. O(n)? Run associative stateful work in specified range in parallel. O(n)D Run non-indexed stateful work over each slice of array of vectors. O(n)@ Run indexed stateful work over each slice of array of vectors. O(n)& Run stateful work in specified range & over each slice of array of vectors. O(n)+ Run associative non-indexed stateful work . over slices of array of vectors in parallel. O(n)' Run associative indexed stateful work . over slices of array of vectors in parallel. O(n)2 Run associative stateful work in specified range . over slices of array of vectors in parallel. ~ or curried  Monadic left reduce "Result stateful work to be passed  to work runners ~ or curried  Pure left reduce "Result stateful work to be passed  to work runners  or curried  Monadic right reduce "Result stateful work to be passed  to work runners  or curried  Pure right reduce "Result stateful work to be passed  to work runners  or curried .  If mutating is associative,   is also acceptable. 0(state -> array element -> (state has changed))  -- State mutating function "Result stateful work to be passed  to work runners  or curried .  If mutating is associative,   is also acceptable.  Indexed state mutating function "Result stateful work to be passed  to work runners Stateful working function #Monadic initial state (fold zero).  Wrap pure state in .  Source array Final state (fold result) Stateful working function #Monadic initial state (fold zero).  Wrap pure state in .  Source array Final state (fold result) Stateful working function #Monadic initial state (fold zero).  Wrap pure state in .  Source array  Top-left -and bottom-right corners of range to work in Final state (fold result) )Number of threads to parallelize work on &Associative stateful working function Monadic zero state.  Wrap pure state in . +Associative monadic state joining function  Source array Gathered state (fold result) )Number of threads to parallelize work on &Associative stateful working function Monadic zero state.  Wrap pure state in . +Associative monadic state joining function  Source array Gathered state (fold result) )Number of threads to parallelize work on &Associative stateful working function Monadic zero state.  Wrap pure state in . +Associative monadic state joining function  Source array  Top-left -and bottom-right corners of range to work in Gathered state (fold result) %Stateful slice-wise working function #Monadic initial state (fold zero).  Wrap pure state in . Source array of vectors &Vector of final states (fold results) %Stateful slice-wise working function #Monadic initial state (fold zero).  Wrap pure state in . Source array of vectors &Vector of final states (fold results) %Stateful slice-wise working function #Monadic initial state (fold zero).  Wrap pure state in . Source array of vectors  Top-left -and bottom-right corners of range to work in &Vector of final states (fold results) )Number of threads to parallelize work on %Stateful slice-wise working function Monadic zero state.  Wrap pure state in . +Associative monadic state joining function Source array of vectors %Vector of gathered per slice results )Number of threads to parallelize work on %Stateful slice-wise working function Monadic zero state.  Wrap pure state in . +Associative monadic state joining function Source array of vectors %Vector of gathered per slice results )Number of threads to parallelize work on %Stateful slice-wise working function Monadic zero state.  Wrap pure state in . +Associative monadic state joining function Source array of vectors  Top-left -and bottom-right corners of range to work in %Vector of gathered per slice results HIJJIHNoneYarr something to stderr. Yarr something as  message.  NoneMutable Boxed is a wrapper for . %oxed representation is a wrapper for   from  primitive0 package. It may be used to operate with arrays C of variable-lengths or multiconstructor ADTs, for example, lists. For ./$ element types you would better use  #oreign arrays. TODO:/ test this representation at least one time...  &None ConVolution  0 type is specialized to load convoluted arrays.  It loads  with % and borders outside the center with   separately. JIt is even able to distribute quite expensive border loads evenly between ( available threads while parallel load. +Element-wise Loading convoluted arrays wasn't inlined propely  with unrolled King (, ).  However, with simple  performance was OK. For details see   chttp://stackoverflow.com/questions/14748900/ghc-doesnt-perform-2-stage-partial-application-inlining ALMOST SOLVED:9 you just need to support unrolled filling function with INLINE pragma,  see  :https://github.com/leventov/yarr/blob/master/tests/blur.hs,  ffill function. EConvolution fused representation internally keeps 2 element getters:  slow  border get0, which checks every index from applied stencil 5 to lay inside extent of underlying source array.  fast  center get , which doesn't worry about bound checks and  . 0Retreives fast center get from convoluted array  and wraps it into elayed array. ;Remember that array indexing in Yarr is always zero-based, C so indices in result array are shifted by top-level corner offset  of given convoluted array. 0None            1NoneGeneralized static k stencil.  )Stencil values, packed in nested vectors  Generalized reduce function   Reduce zero Generalized static l stencil. Generalized reduce function  Reduce zero 5QuasiQuoter for producing typical numeric convolving l stencil, 6 which effectively skips unnecessary multiplications.  [dim1St| 1 4 6 4 1 |] Produces      (   [\ acc a -> return (acc + a),  \& acc a -> (return $ (acc + (4 * a))),  \& acc a -> (return $ (acc + (6 * a))),  \& acc a -> (return $ (acc + (4 * a))),  \ acc a -> return (acc + a)])  (\ acc a reduce -> reduce acc a)  (return 0)  Most useful k stencil producer. Typing    [dim2St| 1 2 1  0 0 0  -1 -2 -1 |]  Results to         (   [   [\ acc a -> return (acc + a),  \& acc a -> (return $ (acc + (2 * a))),  \ acc a -> return (acc + a)],     [\ acc _ -> return acc,  \ acc _ -> return acc,  \ acc _ -> return acc],     [\ acc a -> return (acc - a),  \' acc a -> (return $ (acc + (-2 * a))),  \ acc a -> return (acc - a)]])  (\ acc a reduce -> reducej acc a)  (return 0) Curried version of  3 with border get clamping indices out of bounds to  0 or ( source).  Convolves l array with static stencil. Clamps k7 index out of bounds to the nearest one inside bounds.  Defined as  #dConvolveShDim2WithStaticStencil =    Example:  let gradientX = - dConvolveLinearDim2WithStaticStencil  [ | -1 0 1  -2 0 2  -1 0 1 |]  image  Convolves k array with $aped load type with static stencil.  Analog of   to convolve arrays with inear load index.  Analog of   to convolve arrays with inear load index.      Convolution stencil  Source array Fused convolved result array )(Source array -> Extent of this array -> 2 Index (may be out of bounds) -> Result value): 2 Border index (to treat indices near to bounds) Convolution stencil  Source array Fused convolved result array Convolution stencil  Source array Fused convolved result array )(Source array -> Extent of this array -> 2 Index (may be out of bounds) -> Result value): 2 Border index (to treat indices near to bounds) Convolution stencil  Source array Fused convolved result array Convolution stencil  Source array Fused convolved result array )(Source array -> Extent of this array -> 2 Index (may be out of bounds) -> Result value): 2 Border index (to treat indices near to bounds) Convolution stencil  Source array Fused convolved result array           None$          NoneO(n) Covert array to flat list. < Multidimentional arrays are flatten in column-major order: [5(elem at (0, .., 0, 1)), (elem at (0, .., 0, 2)), ...] O(n)1 Loads manifest array into memory, with elements  from flatten list. :Use this function in the last resort, there are plenty of  methods to  array, from %elayed array for example. Extent of array Flatten elements Result manifest array Nonee Kjklplkj  23/4564574589:;9:<9:=9:>9:?9:?9@A9@B9@B9@C9@D9@E9@F9@G9@HIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~+               % $                (# !"#$%&'()*+,-./&&'&011111213141516171718191:1;1<1=1>1?1@1A1B1C1D-EFFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcddef9:E9:-9:9:g9:h9:i9:j9:k9:l9:m9:n9:o9:p9:q9:r9:s9:t9:u9:v9:w9:x9:y9:z9:9:{9:|9:}9:~9:9:9:9:9:9:9:9:9:9:9:9:9@9@9@9@2222                                                   22222,,,,,,,,2      &!&"&#&$&%&&&&'&(&)&*&+0,0-0.0/000102030415161718191:1;< yarr-1.2.3Data.Yarr.Repr.ForeignData.Yarr.Base Data.YarrData.Yarr.Utils.FixedVectorData.Yarr.Utils.SplitData.Yarr.ShapeData.Yarr.Utils.ParallelData.Yarr.Utils.PrimitiveData.Yarr.Utils.LowLevelFlowData.Yarr.Utils.ForkData.Yarr.EvalData.Yarr.Repr.DelayedData.Yarr.Repr.SeparateData.Yarr.FlowData.Yarr.Work Debug.YarrData.Yarr.Repr.BoxedData.Yarr.ConvolutionData.Yarr.IO.List*Data.Yarr.Utils.FixedVector.InlinableArityCVL$Data.Yarr.Utils.FixedVector.VecTuple!Data.Yarr.Utils.FixedVector.Arity3Data.Yarr.Utils.FixedVector.InlinableArityInstances-Data.Yarr.Utils.FixedVector.VecTupleInstancesData.Yarr.WorkTypesLoadShape dim2BlockFillData.Yarr.Utils.StorablecomputeloadSPreludeunzipFSEDData.Yarr.Convolution.ReprCVmapElems Data.ComplexComplexclampMData.Yarr.Work.InternaltoListForeignStorableData.Yarr.Convolution.Eval$Data.Yarr.Convolution.StaticStencilsbaseForeign.Storabledeepseq-1.3.0.1Control.DeepSeqdeepseqrnfNFDatafixed-vector-0.1.2.1Data.Vector.FixedN1N2N3N4VecListData.Vector.Fixed.InternalFnFunarityArityDiminspect constructVectorInlinableArityinlinableZipWith inlinableMapmakeInlinableArityInstanceVecTuplemakeVecTupleInstanceN8N7n1n2n3n4n5n6n7n8sel_2_1sel_2_2sel_3_1sel_3_2sel_3_3sel_4_1sel_4_2sel_4_3sel_4_4sel_5_1sel_5_2sel_5_3sel_5_4sel_5_5sel_6_1sel_6_2sel_6_3sel_6_4sel_6_5sel_6_6sel_7_1sel_7_2sel_7_3sel_7_4sel_7_5sel_7_6sel_7_7sel_8_1sel_8_2sel_8_3sel_8_4sel_8_5sel_8_6sel_8_7sel_8_8makeSplitIndex evenChunksFoldrFoldl StatefulWorkFillWorkparallel parallel_vl_1vl_2vl_3vl_4zipWith3 zipWithM_applyallanyiifoldliifoldM PrimitiveOrdminMminM'maxMmaxM'clampM' TouchabletouchnoTouchfill# unrolledFill#foldl#unrolledFoldl#foldr#unrolledFoldr#Dim3Dim2Dim1 BlockShape BorderCount clipBlockzerosizeplusminusoffset fromLineartoLinear intersect complementintersectBlocks blockSize insideBlockmakeChunkRangefoldl unrolledFoldlfoldr unrolledFoldrfill unrolledFillBlockmakeForkEachSlicemakeForkSlicesOncemakeFork UVecTargetManifestnewfreezethawUTargetwrite linearWrite DefaultFusiondmapdmapMdzip2dzip2Mdzip3dzip3MdzipdzipMFusionfmapfmapMfzip2fzip2Mfzip3fzip3MfzipfzipM UVecSourceUSourceindex linearIndex VecRegularslicesRegularUArrayextent touchArrayforceSHL RangeVecLoadrangeLoadSlicesPrangeLoadSlicesSVecLoad loadSlicesP loadSlicesS RangeLoad rangeLoadP rangeLoadS LoadIndexloadPPreferredWorkIndex WorkIndexgindexgwritegsizeThreadscapsthreads dComputeP dComputeSentireDTdelay fromFunction delayShaped fmapElems fmapElemsM fzipElems2 fzipElems2M fzipElems3 fzipElems3M fzipElems fzipElemsM dmapElems dmapElemsM dzipElems2 dzipElems2M dzipElems3 dzipElems3M dzipElems dzipElemsM fromSlicesunsafeMapSlicesconverttraversezipElems mapElemsMdzipWith dzipWith3FSnewEmpty toForeignPtrunsafeFromForeignPtr reduceLeftMreduceL reduceRightMreduceRmutateimutateworkiwork rangeWorkworkPiworkP rangeWorkPworkOnSlicesSeparateiworkOnSlicesSeparaterangeWorkOnSlicesSeparateworkOnSlicesSeparatePiworkOnSlicesSeparatePrangeWorkOnSlicesSeparatePCHKyarryerrMBB justCenter Dim2Stencildim2StencilSizeXdim2StencilSizeYdim2StencilValuesdim2StencilReducedim2StencilZero Dim1Stencildim1StencilSizedim1StencilValuesdim1StencilReducedim1StencilZerodim1Stdim2StdConvolveDim1WithStaticStencilconvolveDim1WithStaticStencil dim2OutClamp dConvolveShDim2WithStaticStencilconvolveShDim2WithStaticStencil$dConvolveLinearDim2WithStaticStencil#convolveLinearDim2WithStaticStencilfromListfunD'$fInlinableArityS$fInlinableArityS0$fInlinableArityS1$fInlinableArityS2$fInlinableArityS3$fInlinableArityS4$fInlinableArityS5$fInlinableArityS6$fVectorVecTuplee$fVectorVecTuplee0$fVectorVecTuplee1$fVectorVecTuplee2$fVectorVecTuplee3$fVectorVecTuplee4$fVectorVecTuplee5VT_2 toTuple_2VT_3 toTuple_3VT_4 toTuple_4VT_5 toTuple_5VT_6 toTuple_6VT_7 toTuple_7VT_8 toTuple_8T_ifoldlgifoldlF$fNFDataVecList izipWithMizipWithzipWithMzipWithimapM_imapMimapmapM_mapM sequence_sequencemapeqminimummaximumsumifoldMifoldlfoldl1foldM!tailWithtailhead generateMgeneratebasis replicateM replicate|>convecconvertContinuationN5N6NewlengthZSVectorNghc-prim GHC.Classesminmax$fPrimitiveOrdFloat$fPrimitiveOrdDouble$fPrimitiveOrdWord$fPrimitiveOrdChar$fPrimitiveOrdInt $fTouchablev$fTouchableDouble$fTouchableFloat$fTouchableWord64$fTouchableWord32$fTouchableWord16$fTouchableWord8$fTouchableWord$fTouchableInt64$fTouchableInt32$fTouchableInt16$fTouchableInt8$fTouchableInt$fTouchableBool $fStorablevGHC.Baseidflip $fShape(,,)$fBlockShape(,) $fShape(,)$fBlockShapeInt $fShapeInt GHC.Conc.SyncgetNumCapabilitiesreturn"$fRangeVecLoadrslrSHtrtslrSHshvv2e$fVecLoadrslrSHtrtslrSHshvv2e$fRangeLoadrSHtrSHsha$fLoadrSHtrSHsha!$fRangeVecLoadrslrLtrtslrSHshvv2e$fVecLoadrslrLtrtslrSHshvv2e$fRangeLoadrLtrSHsha$fLoadrLtrSHsha!$fRangeVecLoadrslrSHtrtslrLshvv2e$fVecLoadrslrSHtrtslrLshvv2e$fRangeLoadrSHtrLsha$fLoadrSHtrLsha$fPreferredWorkIndexSHshsh $fRangeVecLoadrslrLtrtslrLshvv2e$fVecLoadrslrLtrtslrLshvv2e$fRangeLoadrLtrLsha$fLoadrLtrLsha$fPreferredWorkIndexLshInt$fWorkIndex(,,)Int$fWorkIndex(,)Int$fWorkIndexshsh$fUTargetDTSHsha$fNFDataUArray$fRegularDTSHsha$fDefaultFusionDDSH $fFusionrDSH$fUVecSourceDDSHshve$fVecRegularDDSHshve$fUSourceDSHsha$fNFDataUArray0$fRegularDSHsha$fDefaultFusionDDL $fFusionrDL$fUVecSourceDDLshve$fVecRegularDDLshve$fUSourceDLsha$fNFDataUArray1$fRegularDLshaShapeDelayedTarget ShapeDelayed LinearDelayed$fUVecTargetSEtrtlshve$fManifestSESElshv$fUTargetSEtlshv$fDefaultFusionSEDl$fUVecSourceSErlshve$fUSourceSElshv$fVecRegularSErlshve$fRegularSElshvSeparate GHC.Floatatan2GHC.Real fromIntegralGHC.PtrPtrsqrtGHC.ForeignPtrcastForeignPtr internalNew$fUVecTargetFFSLshve$fUTargetFSLshe$fManifestFFLsha$fUTargetFLsha$fUVecSourceSEFLshve$fUVecSourceFFSLshve$fVecRegularFFSLshve$fDefaultFusionFSDL$fUSourceFSLshe$fRegularFSLshe$fDefaultFusionFDL$fUSourceFLsha$fRegularFLsha ForeignSlice ForeignArrayanyWork anyRangeWorkanyWorkP anyRangeWorkPanyWorkOnSlicesSeparateanyRangeWorkOnSlicesSeparateanyWorkOnSlicesSeparatePanyRangeWorkOnSlicesSeparatePGHC.Errerror$fUVecTargetCHKCHKlshve$fManifestCHKCHKlsha$fUTargetCHKtlsha$fUVecSourceCHKCHKlshve$fUSourceCHKlsha$fVecRegularCHKCHKlshve$fRegularCHKlshaChecked uncheckedprimitive-0.5.0.1Data.Primitive.Array MutableArrayArray uninitialized$fManifestBMBLsha$fUTargetMBLsha$fUVecSourceSEMBLshve$fDefaultFusionMBDL$fUSourceMBLsha$fRegularMBLsha$fUVecSourceSEBLshve$fDefaultFusionBDL$fUSourceBLsha$fRegularBLsha MutableBoxedBoxedcenter centerGet borderGet$fDefaultFusionCVCVCVL$fFusionCVCVCVL$fUSourceCVCVLsha$fRegularCVCVLsha Convoluted getExtentgetTouchinheritedForcecvLoadPcvLoadS cvLoadSlicesP cvLoadSlicesS#$fRangeVecLoadSECVCVLtrtslrtlshvv2e$fVecLoadSECVCVLtrtslrtlshvv2e$fRangeLoadCVCVLtrtlsha$fLoadCVCVLtrtlsha$fPreferredWorkIndexCVLshshStencilOffsetsparseDim1StencilparseDim2Stencil justNonZero$fStencilOffsetsSSS$fStencilOffsetsSZS$fStencilOffsetsSZZ