!B0&      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgh i j k l m n o p q r s t u v w x y z { | } ~        !"#$%'None07;<=>?CDEFOSTV&repaGeneric version of touch'repaGeneric version of zero(repaGeneric version of gonerepaDElement types that can be used with the blockwise filling functions.(This class is mainly used to define the  method. This is used internally in the imeplementation of Repa to prevent let-binding from being floated inappropriately by the GHC simplifier. Doing a )k sometimes isn't enough, because the GHC simplifier can erase these, and still move around the bindings.repaEPlace a demand on a value at a particular point in an IO computation.repa*Generic zero value, helpful for debugging.repa)Generic one value, helpful for debugging.None0;<=>?CEFOTVHrepaA < is a group of threads that execute arbitrary work requests.*repaNumber of threads in the gang.+repa*Workers listen for requests on these vars.,repa(Workers put their results in these vars.-repa Indicates that the gang is busy..repaThe .B type encapsulates work requests for individual members of a gang./repa,Instruct the worker to run the given action.0repaTell the worker that we're shutting the gang down. The worker should signal that it's receieved the request by writing to its result var before returning to the caller (forkGang).repa`This globally shared gang is auto-initialised at startup and shared by all Repa computations.kIn a data parallel setting, it does not help to have multiple gangs running at the same time. This is because a single data parallel computation should already be able to keep all threads busy. If we had multiple gangs running at the same time, then the system as a whole would run slower as the gangs would contend for cache and thrash the scheduler.If, due to laziness or otherwise, you try to start multiple parallel Repa computations at the same time, then you will get the following warning on stderr at runtime: eData.Array.Repa: Performing nested parallel computation sequentially. You've probably called the compute or copy function while another instance was already running. This can happen if the second version was suspended due to lazy evaluation. Use  deepSeqArray= to ensure that each array is fully evaluated before you compute the next one. repa)O(1). Yield the number of threads in the .repaFork a / with the given number of threads (at least 1).1repaThe worker thread of a ?. The threads blocks on the MVar waiting for a work request.2repaFinaliser for worker threads. We want to shutdown the corresponding thread when it's MVar becomes unreachable. Without this Repa programs can complain about "Blocked indefinitely on an MVar" because worker threads are still blocked on the request MVars when the program ends. Whether the finalizer is called or not is very racey. It happens about 1 in 10 runs when for the repa-edgedetect benchmark, and less often with the others.We're relying on the comment in System.Mem.Weak that says "If there are no other threads to run, the runtime system will check for runnablefinalizers before declaring the system to be deadlocked."If we were creating and destroying the gang cleanly we wouldn't need this, but theGang is created with a top-level unsafePerformIO. Hacks beget hacks beget hacks... repaIssue work requests for the  and wait until they complete.4If the gang is already busy then print a warning to 3C and just run the actions sequentially in the requesting thread.4repa'Run an action on the gang sequentially.5repa&Run an action on the gang in parallel. repaSame as   but in the 6 monad.  None0;<=>?CDEFOTVM repaFill something in parallel.FThe array is split into linear chunks and each thread fills one chunk. repaNumber of elements.repa,Update function to write into result buffer.repa%Fn to get the value at a given index. None0;<=>?CDEFOTVlf7repaOSequential reduction of a multidimensional array along the innermost dimension.8repaParallel reduction of a multidimensional array along the innermost dimension. Each output value is computed by a single thread, with the output values distributed evenly amongst the available threads.9repa5Sequential reduction of all the elements in an array.:repaParallel tree reduction of an array to a single value. Each thread takes an equally sized chunk of the data and computes a partial sum. The main thread then reduces the array of partial sums to the final result.We don't require that the initial value be a neutral element, so each thread computes a fold1 on its chunk of the data, and the seed element is only applied in the final reduction step.;repaThis is the primitive reduction function. We use manual specialisations and rewrite rules to avoid the result being boxed up in the final iteration.<repa4Sequentially reduce values between the given indices7repavector to write elements intorepa/function to get an element from the given indexrepa'binary associative combination functionrepa&starting value (typically an identity)repa%inner dimension (length to fold over)8repavector to write elements intorepa/function to get an element from the given indexrepa(binary associative combination operator repaDstarting value. Must be neutral with respect ^ to the operator. eg  0 + a = a.repa%inner dimension (length to fold over)9repa/function to get an element from the given indexrepa%binary associative combining functionrepastarting valuerepanumber of elements:repa/function to get an element from the given indexrepa%binary associative combining functionrepastarting valuerepanumber of elements;repaGet data from the array.repaFunction to combine elements.repaStarting value.repaStarting index in array.repaEnding index in array.repaResult.789:Safe0;<=>?CEFOQTV repa<Class of types that can be used as array shapes and indices.repa(Get the number of dimensions in a shape.repaEThe shape of an array of size zero, with a particular dimensionality.repaFThe shape of an array with size one, with a particular dimensionality.repa'Compute the intersection of two shapes.repa/Add the coordinates of two shapes componentwiserepa=Get the total number of elements in an array with this shape.repa]Check whether this shape is small enough so that its flat indices an be represented as =. If this returns >L then your array is too big. Mostly used for writing QuickCheck tests.repaEConvert an index into its equivalent flat, linear, row-major version.repa Inverse of .repa/Check whether an index is within a given shape.repa,Convert a shape into its list of dimensions.repa'Convert a list of dimensions to a shaperepa,Ensure that a shape is completely evaluated.repa2Check whether an index is a part of a given shape.repa!Nicely format a shape as a stringrepaShape of the array.repaIndex into the array.repaShape of the array.repa!Index into linear representation.repaStart index for range.repaFinal index for range.repaIndex to check for.repaShape of the array.repaIndex.  0None0;<=>?CEFOSTV#repa1Our index type, used for both shapes and indices.%repaAn index of dimension zero'repaHelper for index construction./Use this instead of explicit constructors like (Z :. (x :: Int))1. The this is sometimes needed to ensure that x is constrained to be in Int. !"#$%&'()*+%&#$"! '()*+#3$3None0;<=>?CDEFOTV>6repaFill something sequentially.4The array is filled linearly from start to finish. 7repa-Fill a block in a rank-2 array, sequentially.YBlockwise filling can be more cache-efficient than linear filling for rank-2 arrays.:The block is filled in row major order from top to bottom.8repaFill something in parallel.UThe array is split into linear chunks, and each thread linearly fills one chunk.9repaGFill something in parallel, using a separate IO action for each thread.UThe array is split into linear chunks, and each thread linearly fills one chunk.6repaNumber of elements.repa,Update function to write into result buffer.repa%Fn to get the value at a given index.7repa,Update function to write into result buffer.repa'Fn to get the value at the given index.repaWidth of the whole array.repa&x0 lower left corner of block to fill.repay0repaw0 width of block to fillrepah0 height of block to fill8repaNumber of elements.repa,Update function to write into result buffer.repa%Fn to get the value at a given index.9repaNumber of elements.repa&Update fn to write into result buffer.repa<Create a fn to get the value at a given index. The first =G is the thread number, so you can do some per-thread initialisation.6789None0;<=>?CEFOTV:repa$Select indices matching a predicate.=This primitive can be useful for writing filtering functions.;repa1Select indices matching a predicate, in parallel.=This primitive can be useful for writing filtering functions.VThe array is split into linear chunks, with one chunk being given to each thread.lThe number of elements in the result array depends on how many threads you're running the program with.:repa%Update function to write into result.repaSee if this predicate matches.repa%.. and apply fn to the matching indexrepa(Extent of indices to apply to predicate.repa0Number of elements written to destination array.;repaSee if this predicate matches.:; None0;<=>?CDEFOTV<repa+Fill a block in a rank-2 array in parallel.XBlockwise filling can be more cache-efficient than linear filling for rank-2 arrays.7Coordinates given are of the filled edges of the block.EWe divide the block into columns, and give one column to each thread.<Each column is filled in row major order from top to bottom.=repa+Fill a block in a rank-2 array in parallel.TBlockwise filling can be more cache-efficient than linear filling for rank-2 arrays.rUsing cursor functions can help to expose inter-element indexing computations to the GHC and LLVM optimisers.7Coordinates given are of the filled edges of the block.EWe divide the block into columns, and give one column to each thread.<Each column is filled in row major order from top to bottom.>repa-Fill a block in a rank-2 array, sequentially.TBlockwise filling can be more cache-efficient than linear filling for rank-2 arrays.rUsing cursor functions can help to expose inter-element indexing computations to the GHC and LLVM optimisers.7Coordinates given are of the filled edges of the block.:The block is filled in row major order from top to bottom.<repa,Update function to write into result buffer.repa-Function to evaluate the element at an index.repaWidth of the whole array.repa%x0 lower left corner of block to fillrepay0 repaw0 width of block to fill.repah0 height of block to fill.= repa,Update function to write into result buffer.repa&Make a cursor to a particular element.repaShift the cursor by an offset.repa-Function to evaluate the element at an index.repaWidth of the whole array.repa%x0 lower left corner of block to fillrepay0repaw0 width of block to fillrepah0 height of block to fill> repa,Update function to write into result buffer.repa&Make a cursor to a particular element.repaShift the cursor by an offset.repa3Function to evaluate an element at the given index.repaWidth of the whole array.repa&x0 lower left corner of block to fill.repay0repaw0 width of block to fillrepah0 height of block to fill<=>!Safe0;<=>?CEFOTVѹ ?repa>Class of array representations that we can read elements from.Arepa)O(1). Take the extent (size) of an array.Brepa!O(1). Shape polymorphic indexing.Crepa!O(1). Shape polymorphic indexing.DrepaGO(1). Linear indexing into underlying, row-major, array representation.ErepaGO(1). Linear indexing into underlying, row-major, array representation.Frepa4Ensure an array's data structure is fully evaluated.GrepaO(1). Alias for BHrepa!O(n). Convert an array to a list.IrepaApply F to up to four arrays. ?@BCFADEGHI"None0;<=>?CEFOTVJrepaLClass of manifest array representations that can be constructed in parallel.Krepa&Mutable version of the representation.Lrepa/Allocate a new mutable array of the given size.Mrepa(Write an element into the mutable array.Nrepa6Freeze the mutable array into an immutable Repa array.Orepa:Ensure the strucure of a mutable array is fully evaluated.PrepapEnsure the array is still live at this point. Needed when the mutable array is a ForeignPtr with a finalizer.Qrepa-O(n). Construct a manifest array from a list.JKLMNOPQ#None0;<=>?CEFOTVpRrepa_Compute a range of elements defined by an array and write them to a fillable representation.Srepa&Fill a range of an array sequentially.Trepa%Fill a range of an array in parallel.Urepa_Compute all elements defined by an array and write them to a manifest target representation.^Note that instances require that the source array to have a delayed representation such as D or CI. If you want to use a pre-existing manifest array as the source then delay it first.Vrepa"Fill an entire array sequentially.Wrepa!Fill an entire array in parallel.RSTUVWNone0;<=>?CEFOTVCXrepaHints that evaluating this array is only a small amount of work. It will be evaluated sequentially in the main thread, instead of in parallel on the gang. This avoids the associated scheduling overhead.Zrepa$Wrap an array with a smallness hint.@YXZX@YZNone0;<=>?CDEFOTV7`repaLDelayed arrays are represented as functions from the index to element value.YEvery time you index into a delayed array the element at that position is recomputed.brepa)O(1). Wrap a function as a delayed array.crepaYO(1). Produce the extent of an array, and a function to retrieve an arbitrary element.drepaO(1). Delay an array. This wraps the internal representation to be a function from indices to elements, so consumers don't need to worry about what the previous representation was.erepa.Compute a range of elements in a rank-2 array.frepa!Compute all elements in an array.grepa$Compute elements of a delayed array.@a`bcd`@abcd None0;<=>?CEFOTVhrepa~Hints that computing this array will be an unbalanced workload and evaluation should be interleaved between the processors.jrepa*Wrap an array with a unbalanced-ness hint.@aihjh@aij None0;<=>?CEFOTVeorepa4Arrays represented as foreign buffers in the C heap.qrepa O(1). Wrap a ? as an array.rrepaO(1). Unpack a ? from an array.srepaCompute an array sequentially and write the elements into a foreign buffer without intermediate copying. If you want to copy a pre-existing manifest array to a foreign buffer then d it first.trepaCompute an array in parallel and write the elements into a foreign buffer without intermediate copying. If you want to copy a pre-existing manifest array to a foreign buffer then d it first.urepaFilling foreign buffers.vrepa$Read elements from a foreign buffer.@apoqrsto@apqrst None0;<=>?CEFOTV6wrepaHStrict ByteStrings arrays are represented as ForeignPtr buffers of Word8yrepa O(1). Wrap a @ as an array.zrepaO(1). Unpack a @ from an array.{repaRead elements from a @.@axwyzw@axyz None0;<=>?CEFOTVT~repaUnstructured traversal.repaUnstructured traversal.repa/Unstructured traversal over two arrays at once.repa/Unstructured traversal over two arrays at once.repa1Unstructured traversal over three arrays at once.repa1Unstructured traversal over three arrays at once.repa0Unstructured traversal over four arrays at once.repa0Unstructured traversal over four arrays at once.~repa Source array.repa-Function to produce the extent of the result.repalFunction to produce elements of the result. It is passed a lookup function to get elements of the source.repa Source array.repa-Function to produce the extent of the result.repalFunction to produce elements of the result. It is passed a lookup function to get elements of the source.repaFirst source array.repaSecond source array.repa-Function to produce the extent of the result.repauFunction to produce elements of the result. It is passed lookup functions to get elements of the source arrays.repaFirst source array.repaSecond source array.repa-Function to produce the extent of the result.repauFunction to produce elements of the result. It is passed lookup functions to get elements of the source arrays.~~ None0;<=>?CEFOSTV repa_Interleave the elements of two arrays. All the input arrays must have the same extent, else AN. The lowest dimension of the result array is twice the size of the inputs. X interleave2 a1 a2 b1 b2 => a1 b1 a2 b2 a3 a4 b3 b4 a3 b3 a4 b4 repa(Interleave the elements of three arrays.repa'Interleave the elements of four arrays.None0;<=>?CEFOTV6repa'Parallel computation of array elements.9The source array must have a delayed representation like `, C or P6, and the result a manifest representation like U or F.GIf you want to copy data between manifest representations then use  instead.WIf you want to convert a manifest array back to a delayed representation then use d instead.repa)Sequential computation of array elements.repa1Suspended parallel computation of array elements.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 F and N to ensure that each array is evaluated before proceeding to the next one. ,If unsure then just use the monadic version K. This one ensures that each array is fully evaluated before continuing.repaParallel copying of arrays.6This is a wrapper that delays an array before calling . ?You can use it to copy manifest arrays between representations.repaSequential copying of arrays.repa*Suspended parallel copy of array elements.repaMonadic version of F. `Forces an suspended array computation to be completed at this point in a monadic computation. Q do let arr2 = suspendedComputeP arr1 ... arr3 <- now $ arr2 ... # 6789:;<=>JKLMNOPQRSTUVW#JKLMNOPUVWRSTQ689 <7>=:;None0;<=>?CEFOTVBrepa$Arrays represented as boxed vectors.RThis representation should only be used when your element type doesn't have an Unbox- instsance. If it does, then use the Unboxed U" representation will be faster.repa)Sequential computation of array elements.This is an alias for compute with a more specific type.repa'Parallel computation of array elements.repa-O(n). Convert a list to a boxed vector array.This is an alias for Q with a more specific type.repa&O(1). Wrap a boxed vector as an array.repa*O(1). Unpack a boxed vector from an array.repaFilling of boxed vector arrays.repa(Read elements from a boxed vector array.@@None0;<=>?CEFOTVGrepa!An array with undefined elements.This is normally used as the last representation in a partitioned array, as the previous partitions are expected to provide full coverage.repa1Undefined array elements. Inspecting them yields A.@@None0;<=>?CDEFOTVUdrepaCursored Arrays. These are produced by Repa's stencil functions, and help the fusion framework to share index compuations between array elements.The basic idea is described in ``Efficient Parallel Stencil Convolution'', Ben Lippmeier and Gabriele Keller, Haskell 2011 -- though the underlying array representation has changed since this paper was published.repa&Make a cursor to a particular element.repa9Shift the cursor by an offset, to get to another element.repa-Load/compute the element at the given cursor.repaDefine a new cursored array.repa.Compute a range of elements in a rank-2 array.repa)Compute all elements in an rank-2 array. repa%Compute elements of a cursored array.repaCreate a cursor for an index.repaShift a cursor by an offset.repa"Compute the element at the cursor. @a @aNone0;<=>?CEFOTVm/repa2Unboxed arrays are represented as unboxed vectors.The implementation uses Data.Vector.Unboxed which is based on type families and picks an efficient, specialised representation for every element type. In particular, unboxed vectors of pairs are represented as pairs of unboxed vectors. This is the most efficient representation for numerical data.repa*Sequential computation of array elements..This is an alias for  with a more specific type.repa'Parallel computation of array elements.This is an alias for  with a more specific type.repa0O(n). Convert a list to an unboxed vector array.This is an alias for Q with a more specific type.repa)O(1). Wrap an unboxed vector as an array.repa-O(1). Unpack an unboxed vector from an array.repaJO(1). Zip some unboxed arrays. The shapes must be identical else A.repaJO(1). Zip some unboxed arrays. The shapes must be identical else A.repaJO(1). Zip some unboxed arrays. The shapes must be identical else A.repaJO(1). Zip some unboxed arrays. The shapes must be identical else A.repaJO(1). Zip some unboxed arrays. The shapes must be identical else A.repaO(1). Unzip an unboxed array.repaO(1). Unzip an unboxed array.repaO(1). Unzip an unboxed array.repaO(1). Unzip an unboxed array.repaO(1). Unzip an unboxed array.repa!Filling of unboxed vector arrays.repa+Read elements from an unboxed vector array.@a@aNone0;<=>?CEFOTVv repaProduce an array by applying a predicate to a range of integers. If the predicate matches, then use the second function to generate the element.UThis is a low-level function helpful for writing filtering operations on arrays.=Use the integer as the index into the array you're filtering.repa"If the Int matches this predicate,repa.... then pass it to this fn to produce a valuerepa!Range between 0 and this maximum.repa!Array containing produced values.None0;<=>?CEFOTV~repa8Partitioned arrays. The last partition takes priorityThese are produced by Repa's support functions and allow arrays to be defined using a different element function for each partition.The basic idea is described in ``Efficient Parallel Stencil Convolution'', Ben Lippmeier and Gabriele Keller, Haskell 2011 -- though the underlying array representation has changed since this paper was published.repa1Check whether an index is within the given range.repa'Read elements from a partitioned array.@a@aNone0;<=>?ACEFOTVcrepaStructured versions of map and zipWithI that preserve the representation of cursored and partitioned arrays. For cursored (C9) arrays, the cursoring of the source array is preserved.For partitioned (P) arrays, the worker function is fused with each array partition separately, instead of treating the whole array as a single bulk object. Preserving the cursored and/or paritioned representation of an array is will make follow-on computation more efficient than if the array was converted to a vanilla Delayed (D) array as with plain  and .8If the source array is not cursored or partitioned then  and & are identical to the plain functions.repa!The target result representation.repa Structured map.repa Structured zipWithq. If you have a cursored or partitioned source array then use that as the third argument (corresponding to r1 here)repacApply a worker function to each element of an array, yielding a new array with the same extent.repaCombine two arrays, element-wise, with a binary operator. If the extent of the two array arguments differ, then the resulting array's extent is their intersection. 6677None0;<=>?CDEFOSTV repaKSequential reduction of the innermost dimension of an arbitrary rank array.Combine this with  transpose to fold any other dimension.Elements are reduced in the order of their indices, from lowest to highest. Applications of the operator are associatied arbitrarily.#let c 0 x = x; c x 0 = x; c x y = yPlet a = fromListUnboxed (Z :. 2 :. 2) [1,2,3,4] :: Array U (Z :. Int :. Int) Int foldS c 0 a"AUnboxed (Z :. 2) (fromList [2,4])repaHParallel reduction of the innermost dimension of an arbitray rank array.The first argument needs to be an associative sequential operator. The starting element must be neutral with respect to the operator, for example 0 is neutral with respect to (+) as  0 + a = a. These restrictions are required to support parallel evaluation, as the starting element may be used multiple times depending on the number of threads.Elements are reduced in the order of their indices, from lowest to highest. Applications of the operator are associatied arbitrarily.#let c 0 x = x; c x 0 = x; c x y = yPlet a = fromListUnboxed (Z :. 2 :. 2) [1,2,3,4] :: Array U (Z :. Int :. Int) Int foldP c 0 a"AUnboxed (Z :. 2) (fromList [2,4])repaLSequential reduction of an array of arbitrary rank to a single scalar value.dElements are reduced in row-major order. Applications of the operator are associated arbitrarily.repaJParallel reduction of an array of arbitrary rank to a single scalar value.The first argument needs to be an associative sequential operator. The starting element must be neutral with respect to the operator, for example 0 is neutral with respect to (+) as  0 + a = a. These restrictions are required to support parallel evaluation, as the starting element may be used multiple times depending on the number of threads.dElements are reduced in row-major order. Applications of the operator are associated arbitrarily.repa3Sequential sum the innermost dimension of an array.repa1Parallel sum the innermost dimension of an array.repa/Sequential sum of all the elements of an array.repa*Parallel sum all the elements of an array.repaXCheck whether two arrays have the same shape and contain equal elements, in parallel.repaYCheck whether two arrays have the same shape and contain equal elements, sequentially. None0;<=>?CEFOSTVNrepa1Generates a random unboxed array of a given shaperepa/Generates a random boxed array of a given shapeBreparConvenience functions for writing tests on 2-,3-,4-tuples of arrays of the same size (or just of a fixed size.)These are helper functions:repa=Property tested for unboxed random arrays with a given shape.repaEProperty tested for pair of unboxed random arrays with a given shape.repaGProperty tested for triple of unboxed random arrays with a given shape.repaJProperty tested for quadruple of unboxed random arrays with a given shape.repaHProperty tested for 5-tuple of unboxed random arrays with a given shape.repa=Property tested for unboxed random arrays with a given shape.repaEProperty tested for pair of unboxed random arrays with a given shape.repaGProperty tested for triple of unboxed random arrays with a given shape.repaJProperty tested for quadruple of unboxed random arrays with a given shape.repaHProperty tested for 5-tuple of unboxed random arrays with a given shape.repa!This module exports instances of  Arbitrary and  CoArbitrary for unboxed Repa arrays. None0;<=>?CEFOSTVVrepa,Class of index types that can map to slices.repa9Map an index of a full shape onto an index of some slice.repa8Map an index of a slice onto an index of the full shape.repaRMap the type of an index in the slice, to the type of the index in the full shape.repaQMap a type of the index in the full shape, to the type of the index in the slice.repa$Place holder for any possible shape.repa)Select all indices at a certain position.  None0;<=>?CEFOSTV> repanImpose a new shape on the elements of an array. The new extent must be the same size as the original, else A.repaAppend two arrays.repaAppend two arrays. repafTranspose the lowest two dimensions of an array. Transposing an array twice yields the original. repa.Extract a sub-range of elements from an array. repa-Backwards permutation of an array's elements. repa-Backwards permutation of an array's elements. repaTDefault backwards permutation of an array's elements. If the function returns CE then the value at that index is taken from the default array (arrDft)repaTDefault backwards permutation of an array's elements. If the function returns CE then the value at that index is taken from the default array (arrDft)repa:Extend an array, according to a given slice specification.AFor example, to replicate the rows of an array use the following: #extend (Any :. (5::Int) :. All) arrrepa:Extend an array, according to a given slice specification.AFor example, to replicate the rows of an array use the following: #extend (Any :. (5::Int) :. All) arrrepa?Take a slice from an array, according to a given specification.;For example, to take a row from a matrix use the following: "slice arr (Any :. (5::Int) :. All)To take a column use: slice arr (Any :. (5::Int))repa?Take a slice from an array, according to a given specification.;For example, to take a row from a matrix use the following: "slice arr (Any :. (5::Int) :. All)To take a column use: slice arr (Any :. (5::Int)) repaStarting index.repaSize of result. repaExtent of result array.repaVFunction mapping each index in the result array to an index of the source array.repa Source array. repaExtent of result array.repaVFunction mapping each index in the result array to an index of the source array.repa Source array. repaDefault values (arrDft)repaVFunction mapping each index in the result array to an index in the source array.repa Source array.repaDefault values (arrDft)repaVFunction mapping each index in the result array to an index in the source array.repa Source array.            None0;<=>?CEFOTV\u  !"#$%&'()*+?@BCFADE@YaipxGHI`bcd~    >?@BCFADEGHI`bcd    ~None0;<=>?CEFOTV HrepaACheck if an index lies inside the given extent. As opposed to  from Data.Array.Repa.IndexL, this is a short-circuited test that checks that lowest dimension first.repaBCheck if an index lies outside the given extent. As opposed to  from Data.Array.Repa.IndexK, this is a short-circuited test that checks the lowest dimension first.repaGiven the extent of an array, clamp the components of an index so they lie within the given array. Outlying indices are clamped to the index of the nearest border element.repaMake a 2D partitioned array from two others, one to produce the elements in the internal region, and one to produce elements in the border region. The two arrays must have the same extent. The border must be the same width on all sides.repaExtent of array.repaIndex to check.repaExtent of array.repaIndex to check.repaExtent of array.repaIndex to clamp.repaExtent of array.repaWidth of border.repaArray for internal elements.repaArray for border elements.$None0;<=>?CEFOTVyrepawRepresents a convolution stencil that we can apply to array. Only statically known stencils are supported right now.repaWStatic stencils are used when the coefficients are fixed, and known at compile time.repaFHow to handle the case when the stencil lies partly outside the array.repa%Use a fixed value for border regions.repa:Treat points outside the array as having a constant value.repa9Clamp points outside to the same value as the edge pixel. repaCMake a stencil from a function yielding coefficients at each index.!repa Wrapper for   that requires a DIM2 stencil. repaExtent of stencil.repa"Get the coefficient at this index.!repaextent of stencilrepa"Get the coefficient at this index.  !%Safe0;<=>?CEFOTVKDrepaA region in the 2d plane.Erepa!Size of a region in the 2d plane.FrepaAn offset in the 2d plane.Grepa&Create a new region of the given size.HrepaOffset a region.IrepaGPartition a region into inner and border regions for the given stencil.Irepa Size of arrayrepaSize of stencilrepaFocus of stencil DJKLMNEOFPI&None0;<=>?CEFHOTV%""repa5QuasiQuoter for producing a static stencil defintion.A definition like G [stencil2| 0 1 0 1 0 1 0 1 0 |] Is converted to:  makeStencil2 (Z:.3:.3) (\ix -> case ix of Z :. -1 :. 0 -> Just 1 Z :. 0 :. -1 -> Just 1 Z :. 0 :. 1 -> Just 1 Z :. 1 :. 0 -> Just 1 _ -> Nothing) Qrepa;Parse a stencil definition. TODO: make this more robust."None0;<=>?CDEFOTV-RrepaOA index into the flat array. Should be abstract outside the stencil modules.$repaLike %! but with the parameters flipped.%repa/Apply a stencil to every element of a 2D array.SrepaMLike above, but treat elements outside the array has having a constant value.TrepaKLike above, but clamp out of bounds array values to the closest real value.Urepa%Data template for stencils up to 7x7.%repa(How to handle the boundary of the array.repaStencil to apply.repaArray to apply stencil to.!"#$%!"#%$None0;<=>?CDEFHOSTV.   'None0;<=>?CEFOTV/  V()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMMNNOPQRSTUVWXYZ[\]^_`abc d e f!g!h!i!j!k!l!m!n!o!p!q"r"s"t"u"v"w"x"y#z#{#|#}#~#             !"#$%&'()*+,-./01$2$3$4$5$6$7$8$9$:$;$<&=>?@ABCDEFGHIJKLMNOPQRSTPUVWXDYZDY[P\]^_`PabcPde%f%g%h%i%j%k%f%l%m%n%o%g%h&pqrstu"repa-3.4.1.4-LZgKV1VI9RR3L3SjpuKPHData.Array.Repa.Repr.UnboxedData.Array.Repa.EvalData.Array.Repa.Eval.GangData.Array.Repa.ShapeData.Array.Repa.IndexData.Array.RepaData.Array.Repa.Repr.HintSmallData.Array.Repa.Repr.Delayed#Data.Array.Repa.Repr.HintInterleaveData.Array.Repa.Repr.ForeignPtrData.Array.Repa.Repr.ByteString#Data.Array.Repa.Operators.Traversal$Data.Array.Repa.Operators.InterleaveData.Array.Repa.Repr.VectorData.Array.Repa.Repr.UndefinedData.Array.Repa.Repr.Cursored#Data.Array.Repa.Operators.Selection Data.Array.Repa.Repr.Partitioned!Data.Array.Repa.Operators.Mapping#Data.Array.Repa.Operators.ReductionData.Array.Repa.ArbitraryData.Array.Repa.Slice$Data.Array.Repa.Operators.IndexSpace Data.Array.Repa.Specialised.Dim2Data.Array.Repa.StencilData.Array.Repa.Stencil.Dim2Data.Array.Repa.Eval.Elt Data.Array.Repa.Eval.InterleavedData.Array.Repa.Eval.ReductionData.Array.Repa.Eval.ChunkedData.Array.Repa.Eval.SelectionData.Array.Repa.Eval.CursoredData.Array.Repa.BaseData.Array.Repa.Eval.TargetData.Array.Repa.Eval.LoadData.Array.Repa.Stencil.Base!Data.Array.Repa.Stencil.Partition Data.Array.Repa.Stencil.TemplateData.Array.Repa.Unsafe&vector-0.12.0.1-GC2xzdMF0QQGz7ZCcRBJRLData.Vector.Unboxed.BaseUnboxElttouchzerooneGangtheGanggangSizeforkGanggangIOgangST $fShowGangfillInterleavedPShaperankzeroDimunitDim intersectDimaddDimsize sizeIsValidtoIndex fromIndex inShapeRange listOfShape shapeOfListdeepSeqinShape showShapeDIM5DIM4DIM3DIM2DIM1DIM0:.Zix1ix2ix3ix4ix5$fShapeZ $fShape:.$fShowZ$fReadZ$fEqZ$fOrdZ$fShow:.$fRead:.$fEq:.$fOrd:. fillLinearS fillBlock2S fillChunkedPfillChunkedIOPselectChunkedSselectChunkedP fillBlock2PfillCursoredBlock2PfillCursoredBlock2SSourceArrayextentindex unsafeIndex linearIndexunsafeLinearIndex deepSeqArray!toList deepSeqArraysTargetMVecnewMVecunsafeWriteMVecunsafeFreezeMVec deepSeqMVec touchMVecfromList LoadRange loadRangeS loadRangePLoadloadSloadPSASmall hintSmall$fLoadRangeSshe $fLoadSshe $fSourceSa $fReadArray $fShowArrayDADelayed fromFunction toFunctiondelay$fLoadRangeD:.e $fLoadDshe $fSourceDaI AInterleavehintInterleave $fLoadIshe $fSourceIaF AForeignPtrfromForeignPtr toForeignPtr computeIntoS computeIntoP $fTargetFe $fSourceFaB AByteStringfromByteString toByteString$fSourceBWord8traverseunsafeTraverse traverse2unsafeTraverse2 traverse3unsafeTraverse3 traverse4unsafeTraverse4 interleave2 interleave3 interleave4computePcomputeSsuspendedComputePcopyPcopySsuspendedCopyPnowVAVectorcomputeVectorScomputeVectorPfromListVector fromVectortoVector $fTargetVe $fSourceVaX AUndefined $fLoadXshe $fSourceXeC ACursoredcursoredExtent makeCursor shiftCursor loadCursor makeCursored$fLoadRangeC:.e $fLoadC:.e $fSourceCaUAUnboxedcomputeUnboxedScomputeUnboxedPfromListUnboxed fromUnboxed toUnboxedzipzip3zip4zip5zip6unzipunzip3unzip4unzip5unzip6 $fTargetUe $fSourceUaselectPRangePAPartinRange $fLoadPshe $fSourcePe StructuredTRsmapszipWithmapzipWith+^-^*^/^$fStructuredXab$fStructuredUab$fStructuredIab$fStructuredSab$fStructuredPab$fStructuredFab$fStructuredDab$fStructuredCab$fStructuredBWord8bfoldSfoldPfoldAllSfoldAllPsumSsumPsumAllSsumAllPequalsPequalsS $fEqArrayarbitraryUShapedarbitraryVShaped forAllUShapedforAll2UShapedforAll3UShapedforAll4UShapedforAll5UShaped forAllVShapedforAll2VShapedforAll3VShapedforAll4VShapedforAll5VShaped$fCoArbitraryArray$fCoArbitrary:.$fCoArbitraryZ$fArbitraryArray$fArbitraryArray0 $fArbitrary:. $fArbitraryZSlice sliceOfFull fullOfSlice SliceShape FullShapeAnyAll $fSlice:. $fSlice:.0 $fSliceAny$fSliceZreshapeappend++ transposeextract backpermuteunsafeBackpermutebackpermuteDftunsafeBackpermuteDftextend unsafeExtendslice unsafeSlice isInside2 isOutside2clampToBorder2 makeBordered2Stencil StencilStatic stencilExtent stencilZero stencilAccBoundary BoundFixed BoundConst BoundClamp makeStencil makeStencil2stencil2PC5 forStencil2 mapStencil2gtouchgzerogoneghc-primGHC.Primseq _gangThreads_gangRequestVars_gangResultVars _gangBusyReqReqDo ReqShutdown gangWorkerfinaliseWorkerbaseGHC.IO.Handle.FDstderrseqIOparIOGHC.STSTreduce reduceAny GHC.TypesIntFalseGHC.ForeignPtr ForeignPtrbytestring-0.10.8.2Data.ByteString.Internal ByteStringGHC.ErrerrorforAll2GHC.BaseNothingRegionSizeOffset regionOfSize offsetRegionpartitionForStencilregionXregionY regionWidth regionHeight parseStencil2CursorunsafeAppStencilCursor2_constunsafeAppStencilCursor2_clamp template7x7