G0v      ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N OPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST U V W!X!Y!Z![!\!]!^"_"`"a#b#c#d#e#f#g#h#i#j$k$l%m%n%o%p&q&r&s&t&u&0 experimental%Patrick Perry <patperry@stanford.edu>vwx experimental%Patrick Perry <patperry@stanford.edu>yz experimental%Patrick Perry <patperry@stanford.edu>{ experimental%Patrick Perry <patperry@stanford.edu>A class for scalable tensors. #Scale a tensor by the given value.  experimental%Patrick Perry <patperry@stanford.edu>8The base class for tensors (i.e. Vector, Matrix, etc.). AGet the shape of the tensor. For vectors this is the dimension. # For matrices, this will be a pair (m,n) of the number of rows  and columns. .Get the range of valid indices in the tensor.    experimental%Patrick Perry <patperry@stanford.edu> GGets the value at the specified index after checking that the argument  is in bounds. %Class for mutable read-only tensors. 1Get the number of elements stored in the tensor. Get a copy of the tensor. 9Get the value at the specified index, without doing any  range-checking. 4Returns a lazy list of the indices in the tensor. B Because of the laziness, this function should be used with care. 5Returns a lazy list of the elements in the tensor. B Because of the laziness, this function should be used with care. AReturns a lazy list of the elements-index pairs in the tensor. B Because of the laziness, this function should be used with care.     experimental%Patrick Perry <patperry@stanford.edu>+Class for mutable dense read-only tensors. <Creates a new tensor with elements all initialized to zero. ;Creates a new tensor with elements all initialized to the  given value.  experimental%Patrick Perry <patperry@stanford.edu> 1Set the value of the element at the given index. 4Update the value of the element at the given index. &Class for modifiable mutable tensors. EGet the maximum number of elements that can be stored in the tensor. "Sets all stored elements to zero. -Sets all stored elements to the given value. 2True if the value at a given index can be changed CSet the value of the element at the given index, without doing any  range checking. BModify the value of the element at the given index, without doing  any range checking. 1Replace each element by a function applied to it    experimental%Patrick Perry <patperry@stanford.edu> !"#$%&'()*+,-. !"#$%&'(+,-.)*  experimental%Patrick Perry <patperry@stanford.edu>3Multiplication side 6Diagonal storage 9"Lower or upper triangular storage <Transpose type ?Matrix element storage order /0123456789:;<=>?@A?@A<=>9:;678345/012  experimental%Patrick Perry <patperry@stanford.edu>BThe base class for elements. C8Take the complex conjugate of a value. For real values  this is equal to id. DGet the magnitude of a value. EGet the l1 norm of a value. FConvert a double to an element GCoerce an element to a double BCDEFGBCDEFG  experimental%Patrick Perry <patperry@stanford.edu>HA base class for matrices. I"The number of rows in the matrix. J%The number of columns in the matrix. K>Creates a new matrix view that conjugates and transposes the  given matrix. HIJKHIJK  experimental%Patrick Perry <patperry@stanford.edu>LA class for vectors. M!Get the dimension of the vector. N?Returns a view into an existing vector that takes the complex D conjugate of every element. For real vectors, this should compile  to a no-op. LMNLMN experimental%Patrick Perry <patperry@stanford.edu>OPQRSTUVWXYZ[\]^_`abccba`_OPRSTVWYZ\]QUX[^' experimental%Patrick Perry <patperry@stanford.edu>|}~|}~( experimental%Patrick Perry <patperry@stanford.edu>   experimental%Patrick Perry <patperry@stanford.edu>p#conjugate all elements of a vector q Replaces y with alpha (conj x) + y defghijklmnopqdefghijklmnopq experimental%Patrick Perry <patperry@stanford.edu> rstuvwxyz{|}~ rstuvwxyz{|}~ experimental%Patrick Perry <patperry@stanford.edu>  ) experimental%Patrick Perry <patperry@stanford.edu> BCDEFGdr experimental%Patrick Perry <patperry@stanford.edu> >Get the value at the given index. Range-checks the argument. A class for immutable tensors. 0Get the numer of elements stored in the tensor. AGet a new tensor by replacing the elements at the given indices. EGet the value at the given index, without doing any bounds-checking. Same as '()' but doesn't do any bounds-checking. 6Get the indices of the elements stored in the tensor. 'Get the elements stored in the tensor. Get the list of (index, element) pairs stored in the tensor. *Apply a function elementwise to a tensor. ?Apply a function to pairs of elements of tensors that are the  same shape.  experimental%Patrick Perry <patperry@stanford.edu>#Class for immutable dense tensors. &Get a zero tensor of the given shape. .Get a new constant tensor of the given shape. * experimental%Patrick Perry <patperry@stanford.edu>+ experimental%Patrick Perry <patperry@stanford.edu>( , experimental%Patrick Perry <patperry@stanford.edu>:OPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ experimental%Patrick Perry <patperry@stanford.edu>Tag for immutable types. Tag for mutable types.  experimental%Patrick Perry <patperry@stanford.edu>Cast the phantom length type. &Gets the pointer to the storage block Gets the stride of the vector. ?Indicates whether or not the vector has been conjugated. For % newly-created vectors, this will be False.  fromForeignPtr fptr offset n inc creates a vector view of a D region in memory starting at the given offset and having dimension n,  with a stride of inc. Gets the tuple (fptr,offset,n,inc), where n is the dimension and  incB is the stride of the vector. Note that this does not return the A conjugacy information of the vector. For that information, use isConj. subvector x o n creates a subvector view of x starting at index o  and having length n. Same as & but arguments are not range-checked. subvectorWithStride s x o n creates a subvector view of x starting  at index o, having length n and stride s. Same as & but arguments are not range-checked. ACreates a new vector of the given length. The elements will be  uninitialized. ECreates a new vector of the given dimension with the given elements. F If the list has length less than the passed-in dimenson, the tail of # the vector will be uninitialized. listVector n es is equivalent to vector n (zip [0..(n-1)] es) , except ! that the result is undefined if  length es is less than n. CCreates a new vector with the given association list. Unspecified ' indices will get initialized to zero. Same as $ but indices are not range-checked.  newBasis n i creates a vector of length n that is all zero except for  at position i, where it equal to one.  setBasis x i sets the ith coordinate of x to 1, and all other  coordinates to 06. If the vector has been scaled, it is possible that  readVector x i will not return exactly 1. See setElem. DEvaluate a function with a pointer to the value stored at the given J index. Note that the value may need to conjugated before using it. See  . Cast the access type to Imm. Cast the access type to Mut. A dense vector. t is a type that will usually be Imm or Mut.  n8 is a phantom type for the dimension of the vector, and e is the  element type. A DVector x stores dim x elements. Indices into  the vector are 0-based.  a pointer to the storage region Han offset (in elements, not bytes) to the first element in the vector. the length of the vector 6the stride (in elements, not bytes) between elements. E MN experimental%Patrick Perry <patperry@stanford.edu>"copyVector dst src replaces the elements in dst with the values from src. ) This may result in a loss of precision. Same as 5 but does not check the dimensions of the arguments. swapVectors x y replaces the elements in x with the values from y, and  replaces the elements in y with the values from x. This may result in  a loss of precision. Same as swap5 but does not check the dimensions of the arguments. ;Gets the sum of the absolute values of the vector entries. Gets the 2-norm of a vector. RGets the index and norm of the element with maximum magnitude. This is undefined  if any of the elements are NaN&. It will throw an exception if the  dimension of the vector is 0. )Computes the dot product of two vectors. DCreate a new vector by adding a value to every element in a vector. :Create a new vector by scaling every element by a value. scale'k x  is equal to newCopy' (scale k x). :Create a new vector by dividing every element by a value. !Computes the sum of two vectors. (Computes the difference of two vectors. 1Computes the elementwise product of two vectors. /Computes the elementwise ratio of two vectors. <Replace every element with its complex conjugate. See also N . *Add a value to every element in a vector. HScale every element in the vector by the given value, and return a view ! to the scaled vector. See also . !Divide every element by a value. y += x replaces y by y + x. y -= x replaces y by y - x. y *= x replaces y by x * y, the elementwise product. y = x replaces y by y / x, the elementwise ratio. =Compute the sum of absolute values of entries in the vector.  Compute the 2-norm of a vector. FGet the index and norm of the element with absulte value. Not valid " if any of the vector entries are NaN. Raises an exception if the  vector has length 0. (Compute the dot product of two vectors. *Add a value to every element in a vector. (Scale every element by the given value. !Divide every element by a value. Sum of two vectors. Difference of vectors. Elementwise vector product. Elementwise vector ratio. $$ experimental%Patrick Perry <patperry@stanford.edu>ECreate a vector with the given dimension and elements. The elements G given in the association list must all have unique indices, otherwise  the result is undefined. Same as (, but does not range-check the indices. ACreate a vector of the given dimension with elements initialized  to the values from the list.  basis n i creates a vector of dimension n with zeros everywhere but  position i, where there is a one. %Convert a vector to a list. Same as elems. Convert a list to a vector. 'fromList xs = listVector (length xs) xs. ( MN experimental%Patrick Perry <patperry@stanford.edu>  experimental%Patrick Perry <patperry@stanford.edu>$8Coerce the phantom shape type from one type to another. fromForeignPtr f o mn l. creates a matrix view of the data pointed to  by f starting at offset o and having shape mn and lda l. LConvert a dense matrix to a pointer, offset, size, and lda. Note that this  does not give the conjugacy/&transpose information. For that, use . MGet the lda of a matrix, defined as the number of elements in the underlying M array that separate two consecutive elements in the same row of the matrix. )Get the storage order of the matrix. If isTrans is true, this  will be A . Otherwise, it will be @ . <Get whether or not the matrix is transposed and conjugated. KCreate a new matrix of the given size and initialize the given elements to @ the given values. All other elements get initialized to zero. Same as $ but do not do any bounds-checking. HCreate a new matrix of given shape, but do not initialize the elements. CCreate a new matrix with the given elements in column-major order. @Create a new matrix with the given elements in row-major order. FCreate a new matrix of the given shape with ones along the diagonal,  and zeros everywhere else. ;Set the diagonal to ones, and set everywhere else to zero. -Form a matrix from a list of column vectors. *Form a matrix from a list of row vectors. FEvaluate a function with a pointer to the raw storage for the element N at the given index. It may be necessary to conjugate or scale values before - reading or writing to or from the location. 0Get a vector view of the given row in a matrix. 6Get a list of vector views of the rows of the matrix. 9Get a list of vector views of the columns of the matrix. 3Get a vector view of the given column in a matrix. Same as ', but does not do any bounds checking. Same as ', but does not do any bounds checking. diag a 0, gets a vector view of the main diagonal of a. diag a k for  k positive gets a view of the kth superdiagonal. For k negative, it  gets a view of the (-k)th subdiagonal. Same as ', but does not do any bounds checking. submatrix a ij mn$ returns a view of the submatrix of a with element (0,0)  being element ij in a, and having shape mn. Same as & but does not do any bounds checking. =Create a matrix view of a row vector. This will fail if the  stride is not 1 and the vector is conjugated. BPossibly create a matrix view of a column vector. This will fail $ if the stride of the vector is not 1# and the vector is not conjugated. ;Modify each element in-place by applying a function to it. A modifyWith :: (Elem e) => (e -> e) -> IOMatrix (m,n) e -> IO () TTake a unary elementwise vector operation and apply it to the elements of a matrix.  RTake a binary elementwise vector operation and apply it to the elements of a pair  of matrices.  FThe mutable dense matrix data type. It can either store elements in G column-major order, or provide a view into another matrix. The view 2 transposes and conjugates the underlying matrix.  a pointer to the storage region Han offset (in elements, not bytes) to the first element in the matrix. !the number of rows in the matrix $the number of columns in the matrix )the leading dimension size of the matrix U IJK     *      experimental%Patrick Perry <patperry@stanford.edu># copy dst src< copies the elements from the second argument to the first. swap a b0 exchanges the elements stored in two matrices. Multiply a matrix by a vector. &Multiply a scaled matrix by a vector. Multiply a matrix by a matrix. &Multiply a scaled matrix by a matrix. BForm a new matrix by adding a value to every element in a matrix. ;Form a new matrix by multiplying every element by a value. 8Form a new matrix by dividing every element by a value. CCreate a new matrix by taking the elementwise sum of two matrices. JCreate a new matrix by taking the elementwise difference of two matrices. GCreate a new matrix by taking the elementwise product of two matrices.  ECreate a new matrix by taking the elementwise ratio of two matrices. !%Conjugate every element in a matrix. "4Scale every element in a matrix by the given value. #(Scale every element by the given value. $)Divide every element by the given value. &In-place elementwise add. 'In-place elementwise subtract. (In-place elementwise product. )In-place elementwise divide. *gemv alpha a x beta y replaces y := alpha a * x + beta y +gemm alpha a b beta c replaces c := alpha a * b + beta c. ,Multiply a matrix by a vector. -&Multiply a scaled matrix by a vector. .&Multiply a scaled matrix by a matrix. /Multiply a matrix by a matrix. 0BCreate a new matrix by scaling another matrix by the given value. 1BForm a new matrix by adding a value to every element in a matrix. 28Form a new matrix by dividing every element by a value. 3CCreate a new matrix by taking the elementwise sum of two matrices. 4CCreate a new matrix by taking the elementwise sum of two matrices. 5JCreate a new matrix by taking the elementwise difference of two matrices. 6GCreate a new matrix by taking the elementwise product of two matrices. 7ECreate a new matrix by taking the elementwise ratio of two matrices. $ !"#$%&'()*+,-./01234567$,/-.10234567 !#"$%&'()*+ experimental%Patrick Perry <patperry@stanford.edu>9Apply to a vector :Apply to a matrix 89:89: experimental%Patrick Perry <patperry@stanford.edu><Apply to a vector =Apply to a matrix ;<=;<= experimental%Patrick Perry <patperry@stanford.edu>>KCreate a new matrix of the given size and initialize the given elements to 8 the given values. All other elements get set to zero. ?Same as >& but does not do any bounds checking. @:Create a matrix of the given shape from a list of columns A7Create a matrix of the given shape from a list of rows BEGet a new matrix of the given shape with ones along the diagonal and  zeroes everywhere else. C Get a matrix from a row vector. D#Get a matrix from a column vector. 4 IJK ,-./01289:>?@ABCD >@AB,/-.102CD? experimental%Patrick Perry <patperry@stanford.edu>FSolve for a vector GSolve for a matrix EFGEFG experimental%Patrick Perry <patperry@stanford.edu>HIJKLMNOPQRS HIJKLMNOPQRS- experimental%Patrick Perry <patperry@stanford.edu>] IJK     !"#$%&'()012;<=(    . experimental%Patrick Perry <patperry@stanford.edu>L MN  experimental%Patrick Perry <patperry@stanford.edu>USolve for a vector VSolve for a matrix TUVTUV/ experimental%Patrick Perry <patperry@stanford.edu>EFGTUV0 experimental%Patrick Perry <patperry@stanford.edu>HIJK89:;<=EFGTUV! experimental%Patrick Perry <patperry@stanford.edu> 9:;WXYZ[\] \]9:;XYWZ[" experimental%Patrick Perry <patperry@stanford.edu>^_`^_`# experimental%Patrick Perry <patperry@stanford.edu>6789:;abcdefghihi9:;678bcadefg$ experimental%Patrick Perry <patperry@stanford.edu>9:;89:;<=WXYZ[\]jkjk% experimental%Patrick Perry <patperry@stanford.edu>6789:;89:;<=EFGTUVabcdefghilmnolnmo& experimental%Patrick Perry <patperry@stanford.edu> pqrstupqrstu1231456789:;<=>?@ABCDEFGHIJKLMNO P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } s~s|      !"#$%&'()*+,-./x0123456789:;<=>?@ABC8:DEFGHIJKLMNOPQRSTUVWXY Z [ \!]!^!_!`!a!b!b"c"d"e#f#^#_##g##h#i#i$$%%%%&j&k&l&m&n&o123145'p'q'r's't'u'v'w'x'y'z'{'|'}'~''''''''''''''((((((((((((((((((((((((((((((((RSTUWXY"d"e&k&l&m&n&oblas-0.4Test.QuickCheck.VectorTest.QuickCheck.MatrixTest.QuickCheck.ComplexBLAS.Tensor.ScalableBLAS.Tensor.BaseBLAS.Tensor.ReadOnlyBLAS.Tensor.Dense.ReadOnlyBLAS.Tensor.Mutable BLAS.Internal BLAS.TypesBLAS.Elem.BaseBLAS.Matrix.Base BLAS.Vector BLAS.C.Types BLAS.C.Level1 BLAS.C.Level2 BLAS.C.Level3BLAS.Tensor.ImmutableBLAS.Tensor.Dense.Immutable BLAS.AccessData.Vector.Dense.InternalData.Vector.Dense.OperationsData.Vector.DenseTest.QuickCheck.Vector.DenseData.Matrix.Dense.InternalData.Matrix.Dense.OperationsBLAS.Matrix.ImmutableBLAS.Matrix.ReadOnlyData.Matrix.DenseBLAS.Matrix.Solve.ImmutableTest.QuickCheck.Matrix.DenseBLAS.Matrix.Solve.ReadOnlyData.Matrix.Herm!Test.QuickCheck.Matrix.Herm.DenseData.Matrix.TriData.Matrix.Herm.DenseData.Matrix.Tri.Dense Test.QuickCheck.Matrix.Tri.Dense BLAS.C.DoubleBLAS.C.Zomplex BLAS.ElemBLAS.Tensor.Dense BLAS.TensorBLAS.CData.Matrix.Dense.IOData.Vector.Dense.IOBLAS.Matrix.Solve BLAS.MatrixAssocsBasisIndex IndexPair TestComplexScalable*>TensorshapeboundsreadElemRTensorgetSizenewCopyunsafeReadElem getIndicesgetElems getAssocsRDTensornewZero newConstant writeElem modifyElemMTensor getMaxSizesetZero setConstant canModifyElemunsafeWriteElemunsafeModifyElem modifyWith clearArraybzeroinlinePerformIOcheckedSubvectorcheckedSubvectorWithStride checkVecVecOp checkedRow checkedCol checkedDiag diagStartdiagLencheckedSubmatrix checkMatMatOpcheckMatVecMultcheckMatMatMult flipOrder flipTransflipUpLoflipSideSide RightSideLeftSideDiagNonUnitUnitUpLoLowerUpperTrans ConjTransNoTransOrderColMajorRowMajorElemconjnormnorm1fromRealtoRealMatrixnumRowsnumColshermVectordimrowMajorcolMajor cblasOrdernoTranstrans conjTrans cblasTransupperlower cblasUpLononUnitunit cblasDiagleftSide rightSide cblasSide CBLASSide CBLASDiag CBLASUpLo CBLASTrans CBLASOrderBLAS1dotudotcnrm2asumiamaxscalswapcopyaxpyrotgrotacxpyBLAS2gemvgbmvtrmvtbmvtrsvtbsvhemvhbmvgerugercherher2BLAS3gemmsymmhemmtrmmtrsmsyrksyr2kherkher2k!ITensorsize//unsafeAt unsafeReplaceindiceselemsassocsamapazipWithIDTensorzeroconstantImmMut coerceVectorstrideOfisConjfromForeignPtr toForeignPtr subvectorunsafeSubvectorsubvectorWithStrideunsafeSubvectorWithStride newVector_ newListVector newVectorunsafeNewVectornewBasissetBasisunsafeWithElemPtr unsafeFreeze unsafeThawIOVectorDVectorCDVfptroffsetlenstride copyVectorunsafeCopyVector swapVectorsunsafeSwapVectors getSumAbsgetNorm2getWhichMaxAbsgetDot getShifted getScaled getInvScaledgetSumgetDiff getProductgetRatiodoConjshiftByscaleBy invScaleBy+=-=*=//=sumAbsnorm2 whichMaxAbs<.>shiftscaleinvScaleaddplusminustimesdividevector unsafeVector listVectorbasistoListfromListdvector rawVector conjVector subVector VectorTripleTriple VectorPairPair SubVector TestVector coerceMatrixldaOfisHerm newMatrixunsafeNewMatrix newMatrix_ newListMatrix listMatrix newIdentity setIdentity newColsMatrix newRowsMatrixrowrowscolscol unsafeRow unsafeColdiag unsafeDiag submatrixunsafeSubmatrix maybeFromRow maybeFromCol maybeToVectorliftVliftV2IOMatrixDMatrixHDMsize1size2lda copyMatrix swapMatricesgetApply getSApply getApplyMat getSApplyMatapplysapply sapplyMatapplyMatIMatrix<*><**>RMatrixmatrix unsafeMatrixfromColsfromRowsidentityfromRowfromColISolve<\><\\>dmatrix rawMatrix hermedMatrix subMatrix MultMMPairMultMM MultMVPairMultMV MatrixPairMatAt SubMatrix TestMatrixRSolvegetSolve getSolveMatmapHermfromBasetoBasehermLhermUHerm hermMatrix HermMatrixMM HermMatrixMVmapTrilowerUupperUTri triMatrix TriMatrixSM TriMatrixSV TriMatrixMM TriMatrixMV TriMatrixdsyr2kdsyrkdtrsmdtrmmdsymmdgemmdsyr2dsyrdgerdsbmvdsymvdtbsvdtrsvdtbmvdtrmvdgbmvdgemvdrotmdrotmgdrotdrotgdaxpydcopydswapdscalidamaxdasumdnrm2ddotzher2kzherkzsyr2kzsyrkztrsmztrmmzhemmzsymmzgemmzher2zherzgerczgeruzhbmvzhemvztbsvztrsvztbmvztrmvzgbmvzgemvzdrotzrotgzaxpyzcopyzswapzscalizamaxzasumznrm2 zdotc_sub zdotu_sub storageOforderOf