úÎQ`Gæ”      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“None… NGenerate a new array given its length and a function to compute each element. CApply a worker function to corresponding elements of three arrays. BApply a worker function to corresponding elements of four arrays. BApply a worker function to corresponding elements of five arrays. AApply a worker function to corresponding elements of six arrays. CApply a worker function to corresponding elements of seven arrays. AApply a worker function to corresponding elements of six arrays. 'Undirected fold over virtual segments. %The physical segments defined by the  are folded individually, E and these results are replicated according to the virtual segment  id table of the 0. The result contains as many elements as there  virtual segments. Same preconditions as D. Like =, but using the first element of each segment to initialise  the state of that segment. Same preconditions as H. Same as  fold_s (+) 0 Same as  fold_ss (+) 0 ICount the number of elements in array that are equal to the given value. Segmented count. Scattered segmented count. NNOTE: This is a transitory interface, and will be removed in future versions. O(length result). B Select the elements of an array that have a corresponding tag. packByTag [12, 24, 42, 93] [1, 0, 0, 1] 0 = [24, 42]ICompute an array of flags indicating which elements match a given value. pick [4, 5, 3, 6, 5, 2, 5] 5 = [F, T, F, F, T, F, T],O(n). Compute a selector from a tags array. #O(max(segs, threads) . log segs).  Construct a # from an array of segment lengths. #O(max(segs, threads) . log segs). A Add the lengths of corresponding segments in two descriptors. plusSegd [lens: 2 3 1] [lens: 3 1 1] = [lens: 5 4 2]+O(1). Construct an array with no elements. %O(length result). Append two arrays. $O(length result). Segmented append. !O(length result). C Construct a new array by replicating a single element the given  number of times. "'O(length result). Segmented replicate. FElements of the array are replicated according to the lengths of the  segments defined by the . #/O(length result). Regular segmented replicate. Like "9, but all segments are assumed to have the given length. $LO(length result). Construct an array by copying a portion of another array. %?O(length result). Tag each element of an array with its index. indexed [42, 93, 13] = [(0, 42), (1, 93), (2, 13)]&&O(length result). Segmented indices. EConstruct an array containing containing the segments defined by the  given . 'Each segment will contain the elements  [0..len-1] where len is the  length of that segment. +(Convert an array to a list of elements. ,(Convert a list of elements to an array. -0O(1). Yield the number of elements in an array. .1O(1). Retrieve a numbered element from an array. JThe first argument gives a source-code location for out-of-bounds errors. /3O(length result). Scattered indexing from a single . This is an alias for 8. 0/O(length result). Scattered indexing through a . HThe index array contains pairs of segment id and the index within that  segment.  We use the + to map the pairs to 2D indices within the , 2 and return an array of the resulting elements. 1@O(length result). Extract a subrange of elements from an array. extract [23, 42, 93, 50, 27] 1 3 = [42, 93, 50]20O(length result). Extract segments defined by a  from a vector of arrays. NNOTE: This is a transitory interface, and will be removed in future versions.  Use 3 instead. 30O(length result). Extract segments defined by a . (Extract all the segments defined by the  from the , * returning them concatenated in a fresh . 40O(length result). Extract segments defined by a . (Extract all the segments defined by the  from the , * returning them concatenated in a fresh . 5=O(length result). Drop elements from the front of an array, ' returning the latter portion. 6O(length result). R Copy the source array while replacing some elements by new ones in the result. 7:O(length result). Forwards permutation of array elements. 8;O(length result). Backwards permutation of array elements. bpermute [50, 60, 20, 30] [0, 3, 2] = [50, 30, 20]9!Combination of map and bpermute. ;The advantage of using this combined version is that we don't need > to apply the parameter function to source elements that don' t appear  in the result. :Default backwards permutation. IThe values of the index-value pairs are written into the position in the > result array that is indicated by the corresponding index. GAll positions not covered by the index-value pairs will have the value C determined by the initialiser function for that index position. ;-O(1). Zip two arrays into an array of pairs. M If one array is short, excess elements of the longer array are discarded. <1O(1). Zip three arrays into an array of triples. N If one array is short, excess elements of the longer arrays are discarded. =5O(1). Unzip an array of pairs into a pair of arrays. >9O(1). Unzip an array of triples into a triple of arrays. ?4O(1). Take the first elements of an array of pairs. @5O(1). Take the second elements of an array of pairs. AKApply a worker function to each element of an array, yielding a new array. B@Apply a worker function to correponding elements of two arrays. C Similar to foldl; but return an array of the intermediate states, including ' the final state that is computed by foldl. DUndirected fold over an array. * The worker function must be associative. K The provided starting element must be neutral with respect to the worker. @ For example 0 is neutral wrt (+) and 1 is neutral wrt (*). EUndirected segmented fold. BAll segments are folded individually, and the result contains one  element for each segment. Same preconditions as D. F%Undirected scattered segmented fold. Like E/, but the segments can be scattered through an . Same preconditions as D. GRegular segmented fold. %All segements have the given length. Same preconditions as D. HBUndirected fold, using the first element to initialise the state. * The worker function must be associative. K The provided starting element must be neutral with respect to the worker. @ For example 0 is neutral wrt (+) and 1 is neutral wrt (*). + If the array contains no elements then you'll get a bounds check error. ILike E<, but using the first element of each segment to initialise  the state of that segment. Same preconditions as H. JLike F<, but using the first element of each segment to intialise  the state of that segment. Same preconditions as H. KSame as  fold (+) 0 LSame as  fold_r (+) 0 MNO(length source). Compute the conjunction of all elements in a boolean array. NO(length result). C Extract elements of an array where the associated flag is true. OCExtract the elements from an array that match the given predicate. PCombine two arrays, C using a flags array to tell us where to get each element from. combine [T, F, F, T, T, F] [1, 2, 3] [4, 5, 6] = [1, 4, 5, 2, 3, 6]QLike P:, but use a precomputed selector to speed up the process. See the description of S for how this works. R'Interleave the elements of two arrays. interleave [1, 2, 3] [4, 5, 6] = [1, 4, 2, 5, 3, 6]SO(1). Construct a selector. 0A selector is a description of how to perform a P operation. 4Suppose we are evaluating the following expression:  combine [F,F,T,F,T,T] [1,2,3] [4,5,6] = [4,5,1,6,2,3]FThis is difficult to parallelise. For each element in the result, the N source array we get this element from depends on the tag values associated  with all previous elements. However, if we going to apply P+ several times with the same flags array, J we can precompute a selector that tells us where to get each element. Q The selector contains the original flags, as well as the source index telling 6 us where to get each element for the result array.  For example:  tagsToIndices2 [F,F,T,F,T,T] -- tags  = [0,1,0,2,1,2] -- indices CThis says get the first element from index 0 in the second array, , then from index 1 in the second array, ) then index 0 in the first array ... 'The selector then consists of both the tag and indices arrays. T*O(1). Yield the tags array of a selector. U-O(1). Yield the indices array of a selector. VLO(1). Yield the number of elements that will be taken from the first array. WMO(1). Yield the number of elements that will be taken from the second array. X7O(1). Yield the parallel representation of a selector. Y4O(n). Construct a parallel selector representation. A 2 describes how to distribute the two data vectors  corresponding to a  across several PEs. )Suppose we want to perform the following P operation:    combine [F,F,T,T,F,T,F,F,T] [A0,A1,A2,A3,A4] [B0,B1,B2,B3]  = [A0,A1,B0,B1,A2,B2,A3,A4,B3] JThe first array is the flags array, that says which of the data arrays to ( get each successive element from. As P is difficult to compute J in parallel, if we are going to perform several combines with the same M flags array, we can precompute a selector that tells us where to get each L element. The selector contains the original flags, as well as the source D index telling us where to get each element for the result array.    flags: [F,F,T,T,F,T,F,F,T]  indices: [0,1,0,1,2,2,3,4,3] DSuppose we want to distribute the combine operation across 3 PEs. It's & easy to split the selector like so:   5 PE0 PE1 PE2  flags: [F,F,T] [T,F,T] [F,F,T]  indices: [0,1,0] [1,2,2] [3,4,3] KWe now need to split the two data arrays. Each PE needs slices of the data M arrays that correspond to the parts of the selector that were given to it. " For the current example we get:   5 PE0 PE1 PE2  data_A: [A0,A1] [A2] [A3,A4]  data_B: [B0] [B1,B2] [B3] The < contains the starting index and length of each of of these  slices:  5 PE0 PE1 PE2 < ((0, 0), (2, 1)) ((2, 1), (1, 2)) ((3, 3), (2, 1)) : indices lens indices lens indices lens ZO(1). Take the indices field from a . [AO(1). Yield the number of elements to take from the first array. \BO(1). Yield the number of elements to take from the second array. ]BO(max(segs, threads) . log segs). Construct a segment descriptor. LA segment desciptor defines an irregular 2D array based on a flat, 1D array M of elements. The defined array is a nested array of segments, where every = segment covers some of the elements from the flat array. ' The starting indices must be equal to init (scanl (+) 0 lengths)  If you don';t want to cover all the elements from the flat arrary then  use a  instead.  Example:  $ flat array data: [1 2 3 4 5 6 7 8] % (segmentation) --- ----- - ---  segd lengths: [2, 3, 1, 2]  indices: [0, 2, 5, 6]  elements: 8 ^O(1). Construct an empty . _O(1). Construct a 2 containing a single segment of the given length. `Check whether a  is well formed. aO(1). Yield the length of a . b%O(1). Yield the segment lengths of a . c.O(1). Yield the segment starting indices of a . d6O(1). Yield the total number of elements defined by a . e*Construct a Scattered Segment Descriptor. A  is an extension of a % that that allows the segments to be + scattered through multiple flat arrays. AEach segment is associated with a source id that indicates what J flat array it is in, along with the starting index in that flat array. 4 The segments need not cover the entire flat array. 4 Different segments may point to the same elements. fCheck whether a  is well formed. gO(1). Construct an empty . hO(1). Construct a 2 containing a single segment of the given length. iO(segs). Promote a  to a , F assuming all segments are contiguous and come from a single array. jO(1). True when a % has been constructed by promoting a . >In this case all the data elements are in one contiguous flat A array, and consumers can avoid looking at the real starts and  sources fields. kO(1). Yield the length of a . l%O(1). Yield the segment lengths of a . m#O(1). Yield the indices field of a . n"O(1). Yield the starts field of a . o#O(1). Yield the sources field of a . pQO(1). Get the length, segment index, starting index, and source id of a segment. qHProduce a segment descriptor that describes the result of appending two  segmented arrays. r(Construct a Virtual Segment Descriptor. A  is an extension of a & that allows data from the underlying R flat array to be shared between segments. For example, you can define an array J of 10 virtual segments that all have the same length and elements as a  single physical segment. I Internally we maintain the invariant that all physical segments must be Q reachable by some virtual segment. This is needed to ensure that operations  such as F, segmented fold have the right complexity.  If you don'9t need the invariant then you can sidestep the code that O maintains it by using the redundant versions of the following operators, $ and sometimes get faster code. sCheck whether a  is well formed. tO(1). Construct an empty . uO(1). Construct a 2 containing a single segment of the given length. vO(len). Construct a , that describes an array where all virtual 0 segments point to the same physical segment. wO(segs). Promote a plain  to a . CThe result contains one virtual segment for every physical segment  the provided . xO(segs). Promote a plain  to a . CThe result contains one virtual segment for every physical segment  the provided . yO(1). If true then the starts field is identical to the indices field ' and the sourceids are all 0s. IIn this case all the data elements are in one contiguous flat array, and F consumers can avoid looking at the real starts and sources fields. z:O(1). If true then the segments are all unshared, and the vsegids field  be just  [0..len-1]. 6Consumers can check this field to avoid demanding the vsegids field. I This can avoid the need for it to be constructed in the first place,  due to lazy evaluation. {O(1). Yield the length of a . |O(1). Yield the vsegids of a . }O(1). Yield the vsegids of a  , but don't require that every physical 2 segment is referenced by some virtual segment. If you'#re just performing indexing and don't need the invariant that all L physical segments are reachable from some virtual segment, then use this  version as it'@s faster. This sidesteps the code that maintains the invariant. IThe stated O(1) complexity assumes that the array has already been fully M evalauted. If this is not the case then we can avoid demanding the result ! of a prior computation on the vsegids$, thus reducing the cost attributed  to that prior computation. ~O(1). Yield the  of a . O(1). Yield the  of a  , but don't require that every physical 2 segment is referenced by some virtual segment. See the note in }. €%O(1). Yield the segment lengths of a . BO(1). Get the length, starting index, and source id of a segment. ‚ O(segs).  Yield a " that describes each segment of a  individually. ?By doing this we lose information about which virtual segments - correspond to the same physical segments. WARNING: Trying to take the ! of a nested array that has been H constructed with replication can cause index space overflow. This is I because the virtual size of the corresponding flat data can be larger B than physical memory. If this happens then indices fields and 0 element count in the result will be invalid. ƒO(segs). Yield a " that describes each segment of a  individually. ?By doing this we lose information about which virtual segments - correspond to the same physical segments. See the warning in ‚. „ Update the vsegids of a , and then cull the physical G segment descriptor so that all physical segments are reachable from  some virtual segment. … Update the vsegids of $, where the result is guaranteed to  cover all physical segments. )Using this version avoids performing the cull operation which + discards unreachable physical segments. 9 The resulting vsegids must cover all physical segments. G If they do not then there will be physical segments that are not D reachable from some virtual segment, and subsequent operations  like fold_ss& will have the wrong work complexity. †CProduce a virtual segment descriptor that describes the result of # appending two segmented arrays. ‡)Combine two virtual segment descriptors. ˆO(1). Construct an empty  with no elements. ‰O(1). Yield the number of  in an . ŠO(1). Construct an  consisting of a single . ‹O(1). Take one of the outer  from an . Œ(O(1). Retrieve a single element from an , + given the outer and inner indices. O(n). Append two (, using work proportional to the length  of the outer array. ŽO(number of inner arrays).  Convert a boxed vector of  to an . O(number of inner arrays).  Convert an  to a boxed vector of . <Generate an array of the given length full of random data.  Good for testing. ‘;Generate an array of the given length full of random data.  Good for testing. ’Write an array to a file. “Read an array from a file. º”•–—˜™š›œžŸ ¡¢£ €  data values  tag values the tag of values to select data values that had that tag ¥Š§š%Segment descriptor of result aarray. #Segment descriptor of first array. Data of first array. $Segment descriptor of second array. Data of second array. %Segment descriptor of result aarray. #Segment descriptor of first array. Data of first array. $Segment descriptor of second array. Data of second array. !"#$&Number of times to repeat the source. 8Length of source (can be less than the provided array). Array elements to repeat. %&'()*©+,ª«-./0 Irregular 2D array of elements. (Maps (segment id, segment index) pairs  to 2D indices in the  &Pairs of (segment id, segment index). 1Source array.  Starting index in source array. Length of result array. 23! defining the slices to extract. Source arrays. 4! defining the slices to extract. Source arrays. 56Source array. !Index and value of new elements. 7Source array. 0Indices in the destination to copy elements to. 8Source array. -Indices in the source to copy elements from. 9:;<=>?@ABCDEFGHIJKLMNOPQRS Tags array. Indices array. 2Number of elements taken from first source array. 3Number of elements taken from second source array. "Parallel selector representation. TUVWXYZ[\](lengths) Segment lengths. (indices) Segment indices. Total number of elements. ^_`abcde@(starts) Starting index of each segment within its flat array. =(sources) Source id of flat array to get each segment from. ,Plain segment descriptor giving the lengths  of the segments. fghijklmnopqr5(vsegids) Mapping from virtual to physical segments. +Scattered Segment descriptor defining the  physical segments. stuvLength of segment. Number of times replicated. wxyz{|}~€‚ƒ„…†Descriptor of first array. 5Number of flat physical arrays for first descriptor. Descriptor of second array. 6Number of flat physical arrays for second descriptor. ‡$Selector for the combine operation. Descriptor of first array. 5Number of flat physical arrays for first descriptor. Descriptor of second array. 6Number of flat physical arrays for second descriptor. ˆ‰Š‹ŒŽ‘’“¬­®¯°±²³Žµ¶·ž¹”  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”  !"#$% &'()*-./0123456789:;<=>?@AB CDEFGHIJKLMNOPQRSTUVWXYZ[\]`^_abcdefghijklmnopqrstuvwxzy{|}~€‚ƒ„…†‡ˆŠ‰‹ŒŽ‘“’+,ª”•–—˜™š›œžŸ ¡¢£ € ¥Š§š !"#$%&'()*©+,ª«-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“¬­®¯°±²³Žµ¶·ž¹º      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œ žŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ždph-prim-interface-0.7.0.1Data.Array.Parallel.UnliftedIOEltArraysEltsVSegdSSegdSegdSelRep2Sel2ArrayEltgeneratezipWith3zipWith4zipWith5zipWith6zipWith7zipWith8fold_vsfold1_vssum_ssum_sscountcount_scount_ss packByTagpick tagsToSel2 lengthsToSegdplusSegdempty+:+append_s append_vs replicate replicate_s replicate_rsrepeatindexed indices_s enumFromToenumFromThenToenumFromStepLenenumFromStepLenEachtoListfromListlengthindexindexs indexs_avsextract extracts_nss extracts_ass extracts_avsdropupdatepermutebpermute mbpermute bpermuteDftzipzip3unzipunzip3fstssndsmapzipWithscanfoldfold_sfold_ssfold_rfold1fold1_sfold1_sssumsum_randpackfiltercombinecombine2 interleavemkSel2tagsSel2 indicesSel2elementsSel2_0elementsSel2_1repSel2 mkSelRep2indicesSelRep2elementsSelRep2_0elementsSelRep2_1mkSegd emptySegd singletonSegd validSegd lengthSegd lengthsSegd indicesSegd elementsSegdmkSSegd validSSegd emptySSegdsingletonSSegdpromoteSegdToSSegdisContiguousSSegd lengthOfSSegdlengthsOfSSegdindicesOfSSegd startsOfSSegdsourcesOfSSegd getSegOfSSegd appendSSegdmkVSegd validVSegd emptyVSegdsingletonVSegdreplicatedVSegdpromoteSegdToVSegdpromoteSSegdToVSegdisContiguousVSegdisManifestVSegd lengthOfVSegdtakeVSegidsOfVSegdtakeVSegidsRedundantOfVSegdtakeSSegdOfVSegdtakeSSegdRedundantOfVSegdtakeLengthsOfVSegd getSegOfVSegdunsafeDemoteToSSegdOfVSegdunsafeDemoteToSegdOfVSegdupdateVSegsOfVSegdupdateVSegsReachableOfVSegd appendVSegd combine2VSegdemptyslengths singletons unsafeIndexs unsafeIndex2sappends fromVectors toVectorsrandomsrandomRshPuthGet vsegd_vsegids vsegd_ssegd ssegd_starts ssegd_sources ssegd_segd segd_lengths segd_indices segd_elements sel2_tags sel2_indicessel2_elements0sel2_elements1generate_cheap dph_mod_indexdph_plus tagZeroesnotImplementednesttoList_s fromList_s$fElt[] $fIOElt(,) $fIOEltDouble $fIOEltInt $fEltsDouble $fEltsFloat $fEltsWord8 $fEltsInt$fElt(,) $fEltDouble $fEltFloat $fEltBool $fEltWord8$fEltInt