úÎT/NÅB      !"#$%&'()*+,-./0123456789:;<=>?@A non-portable experimental jed@59A2.org>)Hack so that norms have a sensible type. JAbsolutely equivalent representation, but used for the mutable interface. The immutable array type. 1The pointer to the array contents is obtained by  .  The idea is similar to B (used internally here). 9 The pointer should be used only during execution of the CD action / retured by the function passed as argument to  . 2If you want to use it afterwards, ensure that you   touchCArray$ after the last use of the pointer, & so the array is not freed too early. O(1) Construct a   from an arbitrary B . It is  the caller'$s responsibility to ensure that the B points to 8 an area of memory sufficient for the specified bounds. O(1) Construct a   from an arbitrary B . It is  the caller'$s responsibility to ensure that the B points to 8 an area of memory sufficient for the specified bounds. O(1)# Extract ForeignPtr from a CArray. O(1): Turn a CArray into a ByteString. Unsafe because it uses  E' and thus is not platform independent. O(1): Turn a ByteString into a CArray. Unsafe because it uses  E0 and thus is not platform independent. Returns F if O the range specified is larger than the size of the ByteString or the start of K the ByteString does not fulfil the alignment requirement of the resulting 1 CArray (as specified by the Storable instance). 9Hackish way to get the zero element for a Storable type. IO(1) reshape an array. The number of elements in the new shape must not L exceed the number in the old shape. The elements are in C-style ordering. 2O(1) make a rank 1 array from an arbitrary shape.  It has the property that '&reshape (0, size a - 1) a == flatten a'. !EGeneric slice and map. This takes the new range, the inverse map on L indices, and function to produce the next element. It is the most general  operation in its class. "Less polymorphic version. #EPerform an operation on the elements, independent of their location. $Less polymorphic version. %More polymorphic version of G. &/More friendly sub-arrays with element mapping. 'Less polymorphic version. (+Strided sub-array without element mapping. )Less polymorphic version. *+Contiguous sub-array with element mapping. +Less polymorphic version. ,.Contiguous sub-array without element mapping. -Less polymorphic version. .+In-place map on CArray. Note that this is IN PLACE so you should not I retain any reference to the original. It flagrantly breaks referential  transparency! /01234&p-norm on the array taken as a vector 5D2-norm on the array taken as a vector (Frobenius norm for matrices) 6(Sup norm on the array taken as a vector 7Polymorphic version of amap. 80Equivalent to amap. Here for consistency only. 9Polymorphic 2-array lift. :Less polymorphic version. ;Polymorphic 3-array lift. <Less polymorphic version. =This variant of H is quite mind-bogglingly unsafe. It M unstitches the dependency chain that holds the IO monad together and breaks K all your ordinary intuitions about IO, sequencing and side effects. Avoid / it unless you really know what you are doing. BIt is only safe for operations which are genuinely pure (not just E externally pure) for example reading from an immutable foreign data H structure. In particular, you should do no memory allocation inside an  =4 block. This is because an allocation is a constant M and is likely to be floated out and shared. More generally, any part of any G IO action that does not depend on a function argument is likely to be 6 floated to the top level and have its result shared. <It is more efficient because in addition to the checks that  unsafeDupablePerformIO/ omits, we also inline. Additionally we do not K pretend that the body is lazy which allows the strictness analyser to see E the strictness in the body. In turn this allows some re-ordering of 0 operations and any corresponding side-effects. GWith GHC it compiles to essentially no code and it exposes the body to  further inlining. >NAllocate an array which is 16-byte aligned. Essential for SIMD instructions. ?FAllocate memory which is 16-byte aligned. This is essential for SIMD O instructions. We know that mallocPlainForeignPtrBytes will give word-aligned L memory, so we pad enough to be able to return the desired amount of memory  after aligning our pointer. @%Make a new CArray with an IO action. A>  !"#$%&'()*+,-./0123456789:;<=>?@A>   !"#$%&'()*+,-./0123456789:;<=>?@A>  !"#$%&'()*+,-./0123456789:;<=>?@A non-portable experimental jed@59A2.orgIJKLMNOPQRSTUVWXYZ[\   non-portable experimental jed@59A2.org7IJKLMG]^_`abcdefghi  !"#$%&'()*+,-456789:;<@$ !"#$%&'()*+,-789:;<456 @j        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKIJKFGLFMNOPQFRSFTUFTVFTWFTXFTYOPZOP[OP\OP]OP^OP_OP`OPaOPbOPcOPdOPeOPfOPgOPhOPiOPjOPkOPlOPmOPnOPoOPpOPqOPrOPsOPtFTuv carray-0.1.4Data.Array.CArrayData.Array.CArray.BaseData.Array.IOCArrayix-shapable-0.1.0Data.Ix.ShapablesizeshaperankShapableAbsabs_IOCArrayCArray withCArray withIOCArray touchIOCArrayunsafeForeignPtrToCArrayunsafeForeignPtrToIOCArray toForeignPtrunsafeCArrayToByteStringunsafeByteStringToCArraycopyfreezeIOCArrayunsafeFreezeIOCArray thawIOCArrayunsafeThawIOCArrayzeroElemunsafeArrayCArrayunsafeReplaceCArrayunsafeAccumCArrayunsafeAccumArrayCArrayeqCArray cmpCArray cmpIntCArrayreshapeflatten ixmapWithIndP ixmapWithInd ixmapWithP ixmapWithixmapPsliceStrideWithPsliceStrideWith sliceStrideP sliceStride sliceWithP sliceWithslicePslicemapCArrayInPlaceindexesoffsetShapeFromThenTooffsetShapeFromTooffsetShapeFromTo'offsetsnormpnorm2normSup liftArrayP liftArray liftArray2P liftArray2 liftArray3P liftArray3unsafeInlinePerformIOmallocForeignPtrArrayAlignedmallocForeignPtrBytesAligned createCArrayunsafeCreateCArraybaseGHC.ForeignPtr ForeignPtrghc-prim GHC.TypesIOcastForeignPtr Data.MaybeNothing array-0.3.0.1Data.Array.BaseixmapGHC.IOunsafePerformIOGHC.ArrIxrangeindexinRange rangeSize unsafeThawthaw unsafeFreezefreeze mapIndicesmapArray getAssocsgetElems writeArray readArray newListArray newArray_newArray getBoundsMArrayamapaccum// accumArrayassocselemsindices! listArrayarrayboundsIArrayArray