Depricated.
Custom PyCULA allocation Object for mixed kernel/runtime code. See culart_gpuarray.
Checks pitch of array on device and returns pitch if pitched, and False if unpitched.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
Takes pointer to memory location of CULA GPU array, frees memory, and returns 0 is successful
Allocates memory on CULA GPU device.
Keyword arguments: mem – pointer to memory location of array pitch – pointer to pitch value of array rows – number of rows in array cols – number of columns in array elesize – bytesize of individual element of array
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
Frees internal CULA memory buffers
Returns number of GPU devices recognized by CULA
Takes GPU dev number, and returns device Info.
Returns c_int representing a CULA error.
Returns dev number of GPU device being used by CULA
Returns last status of CULA GPU device (default device 0).
Takes integer rows,cols,elementsize and returns CULA Optimal Pitch
Takes CULA error code and returns corresponding CULA string
“Initialize CULA on current device (default 0) and returns 0 if successful.
A ctype wrapped CULA function; Refer to CULA docs.
Selects CULA GPU device.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
Shutdown CULA on current device (default 0) and returns 0 if successful.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
A ctype wrapped CULA function; Refer to CULA docs.
Takes a numpy array, allocates memory and copies data, returning a cula_gpuarray in pitched column major (Fortran) storage for CULA.
Creates cula_Fpitched_gpuarray with In.shape and In.dtype, loaded with ones and padded with zeros.
Creates cula_Fpitched_gpuarray with In.shape and In.dtype, loaded with zeros.
Takes desired shape and dtype of array, allocates on GPU using pycuda.GPUarray objects with extensions for CULA.
Takes a numpy array, allocates memory and copies data, returning a cula_gpuarray. Non-pitched.
Takes tuple representing shape, and returns a cula_gpuarray filled with ones. Non-pitched.
Keyword arguments: shape – tuple representing shape of array,
eg. n for vector, or (m,n) for array
dtype – numpy dtype of array (default is numpy.float32)
Takes a numpy/gpuarray and returns optimal CULA pitch.
Takes tuple representing shape, and returns a cula_gpuarray filled with zeros. Non-pitched.
Keyword arguments: shape – tuple representing shape of array, eg. n for vector, or (m,n) for array dtype – numpy dtype of array (default is numpy.float32)
Depricated.
Included solely for completeness and debugging.
Takes desired shape and dtype of array, allocates on GPU using modified GPUarray, and returns CULARTAllocation object.
Use the pycuda based cula_gpuarray.
Takes shape of a 2 axis array, and returns shape in form (m,n)
Takes Ary_ on device, and returns leading dimension, or ldAry_ for use with CULA routines expecting pitched arrays.
Finds SVD of bidiagonal matrix B using the implicit zero-shift QR algorithm.
Returns numpy array of singular values.
Wraps CULA/LAPACK bdsqr routine. See CULA and LAPACK docs.
Keyword arguments: D – diagonal elements of B as numpy array E – off diagonal elements of bidiagonal matrix B as numpy array n – order of matrix B C – optionally computes Q_transposed*C, see CULA docs uplo – ‘U’ for upper bidiagonal, ‘L’ for lower (default == ‘U’)
Finds SVD of bidiagonal matrix B using the implicit zero-shift QR algorithm.
Returns tuple of numpy arrays. (D, U*Q)
Wraps CULA/LAPACK bdsqr routine. See CULA and LAPACK docs.
Keyword arguments: D – diagonal elements of B as numpy array E – off diagonal elements of bidiagonal matrix B as numpy array n – order of matrix B U – matrix U as numpy array, see CULA docs nru – number of rows of U uplo – ‘U’ for upper bidiagonal, ‘L’ for lower (default == ‘U’)
Finds SVD of bidiagonal matrix B using the implicit zero-shift QR algorithm.
Returns tuple of numpy arrays. (D, P^T * VT)
Wraps CULA/LAPACK bdsqr routine. See CULA and LAPACK docs.
Keyword arguments: D – diagonal elements of B as numpy array E – off diagonal elements of bidiagonal matrix B as numpy array n – order of matrix B C – optionally computes Q_transposed*C, see CULA docs VT – matrix VT as numpy array, see CULA docs uplo – ‘U’ for upper bidiagonal, ‘L’ for lower (default == ‘U’)
Finds SVD of bidiagonal matrix B using the implicit zero-shift QR algorithm.
Returns tuple of numpy arrays. (D, P^T * VT, U*Q)
Wraps CULA/LAPACK bdsqr routine. See CULA and LAPACK docs.
Keyword arguments: D – diagonal elements of B as numpy array E – off diagonal elements of bidiagonal matrix B as numpy array n – order of matrix B C – optionally computes Q_transposed*C, see CULA docs VT – matrix VT as numpy array, see CULA docs U – matrix U as numpy array, see CULA docs nru – number of rows of U uplo – ‘U’ for upper bidiagonal, ‘L’ for lower (default == ‘U’)
Finds SVD of bidiagonal matrix B using the implicit zero-shift QR algorithm.
dev wrapper takes GPUarrays, returns numpy array of singular values.
Wraps CULA/LAPACK bdsqr routine. See CULA and LAPACK docs.
Keyword arguments: D – diagonal elements of B as GPUarray E – off diagonal elements of bidiagonal matrix B as GPUarray n – order of matrix B C – optionally computes Q_transposed*C, see CULA docs uplo – ‘U’ for upper bidiagonal, ‘L’ for lower (default == ‘U’)
Finds SVD of bidiagonal matrix B using the implicit zero-shift QR algorithm.
Returns tuple of numpy arrays. (D, U*Q)
Wraps CULA/LAPACK bdsqr routine. See CULA and LAPACK docs.
Keyword arguments: D – diagonal elements of B as GPUarray E – off diagonal elements of bidiagonal matrix B as GPUarray n – order of matrix B C – optionally computes Q_transposed*C, see CULA docs U – matrix U as GPUarray, see CULA docs nru – number of rows of U uplo – ‘U’ for upper bidiagonal, ‘L’ for lower (default == ‘U’)
Finds SVD of bidiagonal matrix B using the implicit zero-shift QR algorithm.
Returns tuple of numpy arrays. (D, P^T * VT)
Wraps CULA/LAPACK bdsqr routine. See CULA and LAPACK docs.
Keyword arguments: D – diagonal elements of B as GPUarray E – off diagonal elements of bidiagonal matrix B as GPUarray n – order of matrix B C – optionally computes Q_transposed*C, see CULA docs VT – matrix VT as GPUarray, see CULA docs uplo – ‘U’ for upper bidiagonal, ‘L’ for lower (default == ‘U’)
Finds SVD of bidiagonal matrix B using the implicit zero-shift QR algorithm.
Returns tuple of numpy arrays. (D, P^T * VT, U*Q)
Wraps CULA/LAPACK bdsqr routine. See CULA and LAPACK docs.
Keyword arguments: D – diagonal elements of B as GPUarray E – off diagonal elements of bidiagonal matrix B as GPUarray n – order of matrix B C – optionally computes Q_transposed*C, see CULA docs VT – matrix VT as GPUarray, see CULA docs U – matrix U as GPUarray, see CULA docs nru – number of rows of U uplo – ‘U’ for upper bidiagonal, ‘L’ for lower (default == ‘U’)
Finds SVD of bidiagonal matrix B using the implicit zero-shift QR algorithm.
devdev wrapper takes GPUarrays, returns GPUarray of singular values.
Wraps CULA/LAPACK bdsqr routine. See CULA and LAPACK docs.
Keyword arguments: D – diagonal elements of B as GPUarray E – off diagonal elements of bidiagonal matrix B as GPUarray n – order of matrix B C – optionally computes Q_transposed*C, see CULA docs uplo – ‘U’ for upper bidiagonal, ‘L’ for lower (default == ‘U’)
Finds SVD of bidiagonal matrix B using the implicit zero-shift QR algorithm.
Returns tuple of numpy arrays. (D, U*Q)
Wraps CULA/LAPACK bdsqr routine. See CULA and LAPACK docs.
Keyword arguments: D – diagonal elements of B as GPUarray E – off diagonal elements of bidiagonal matrix B as GPUarray n – order of matrix B C – optionally computes Q_transposed*C, see CULA docs U – matrix U as GPUarray, see CULA docs nru – number of rows of U uplo – ‘U’ for upper bidiagonal, ‘L’ for lower (default == ‘U’)
Finds SVD of bidiagonal matrix B using the implicit zero-shift QR algorithm.
Returns tuple of GPUarrays. (D, P^T * VT)
Wraps CULA/LAPACK bdsqr routine. See CULA and LAPACK docs.
Keyword arguments: D – diagonal elements of B as GPUarray E – off diagonal elements of bidiagonal matrix B as GPUarray n – order of matrix B C – optionally computes Q_transposed*C, see CULA docs VT – matrix VT as GPUarray, see CULA docs uplo – ‘U’ for upper bidiagonal, ‘L’ for lower (default == ‘U’)
Finds SVD of bidiagonal matrix B using the implicit zero-shift QR algorithm.
Returns tuple of GPUarrays. (D, P^T * VT, U*Q)
Wraps CULA/LAPACK bdsqr routine. See CULA and LAPACK docs.
Keyword arguments: D – diagonal elements of B as GPUarray E – off diagonal elements of bidiagonal matrix B as GPUarray n – order of matrix B C – optionally computes Q_transposed*C, see CULA docs VT – matrix VT as GPUarray, see CULA docs U – matrix U as GPUarray, see CULA docs nru – number of rows of U uplo – ‘U’ for upper bidiagonal, ‘L’ for lower (default == ‘U’)
Takes general matrix A as GPUarray and returns eigenvalues of A as GPUarray.
Optionally, finds left or right eigenvectors.
Keyword arguments: left_vectors – find left eigenvectors (default == False) right_vectors – find right eigenvectors (default == False)
Refer to CULA docs regarding geev.
Takes a general real matrix A as GPUarray and reduces to upper or lower bidiagonal form, returning GPUarray.
Refer to CULA docs regarding gebrd.
Takes general matrix A as GPUarray and returns eigenvalues of A as GPUarray.
Optionally, finds left or right eigenvectors.
Keyword arguments: left_vectors – find left eigenvectors (default == False) right_vectors – find right eigenvectors (default == False)
Refer to CULA docs regarding geev.
Takes general matrix A as GPUarray and reduces to upper Hessenberg form H, returning GPUarray.
Keyword arguments: ilo_in – if not already upper triangular, ilo ihi_in – if not already upper triangular, ihi
Refer to CULA docs regarding gehrd for specific application if ilo and ihi if neccessary.
Takes general matrix A as GPUarray and returns LQ factorization as GPUarrays.
Refer to CULA docs regarding gelqf for specific application.
Takes matrices A, B as GPUarrays and solves under/over-determined real linear systems returning GPUarray.
Keyword arguments: A – input matrix A B – input solution matrix B trans – transpose, ‘T’ for transpose, default is ‘N’
Refer to CULA docs regard gels for specific application.
Takes GPUarray A and returns QL factorization as GPUarray.
Refer to CULA docs regarding geqlf for specific application.
Takes matrix A as GPUArray and returns QR factorization as GPUarrays.
Refer to CULA docs regarding geqrf for specific application.
Takes general matrix A, B and solvesn least squares problem min||A*X-B||.
Keyword arguments: A – input matrix A as numpy.array B – input matrix B as numpy.array
Refer to CULA docs regarding geqrs for specific application.
Takes matrix A as GPUarray and returns RQ factorization as GPUarrays.
Refer to CULA docs regarding gerqf for specific application.
Takes GPUarrays A, B and solves system A*X=B, returning tuple of GPUarrays (LUfactors,Pivots,X).
Refer to CULA docs regarding gesv for specific application.
See gpu_devdevsvd.
Takes a general matrix A as GPUarray, computes LU factorization and returns GPUarray.
Refer to CULA docs regarding getrf for specific application.
Takes general matrix A as GPUarray and returns the inverse and pivot matrix as GPUarray using LU factorization.
Refer to CULA docs regarding getri for specific application and alternative routine recomendations.
Takes GPUarray A and B from system A*X=B and solves using LU factorization.
Returns a tuple of (factors, Pivot matrix, Solution matrix X) as GPUarrays
Keyword arguments: A – input matrix A representing left hand side of system A*X=B B – input matrix B representing right hand side of system A*X=B trans – default == ‘N’; ‘T’ for transpose; ‘C’ for conjugate transpose
Refer to CULA docs regarding getrs for specific application.
Solves linear equality constrained least squares system:
minimize ||c-A*X||^2 subject to system B*X=D
given conditions for A an m by n matrix:
Rank(B)<=Rank(A)<=m+Rank(B)
Which imply existence and uniqueness to RQ factorization given by:
B = (0 R)*Q, A = Z*T*Q.
Keyword arguments: A – input array A as GPUarray B – input array B as GPUarray C – input array C as GPUarray D – input array D as GPUarray
Returns tuple (T, R, C, X) as np.arrays
T – output array as GPUarray contains the upper trapazoidal matrix T R – output array as GPUarray contains the upper triangular matrix R C – output array as GPUarray contains the residual sum of squares of input vector C X – output array as GPUarray is the solution matrix X
Refer to CULA docs regarding gglse for specific application. ...or LAPACK for more information regarding the algortithm
Computes a generalized RQ factorization for input matrices A, B given as GPUarrays.
Keyword arguments: A – input m x n matrix as GPUarray B – input p x n matrix as GPUarray
Returns a tuple (A,TAUA,B,TAUB): A – output contains upper triangular matrix R as GPUarray TAUA – output contains scalar factors of elementary reflectors of Q, as GPUarray B – output contains upper trapazoidal matrix T as GPUarray TAUB – output contains scalar factors of elementary reflectors of Z, AS GPUarray
Refer to CULA docs regarding ggrqf for specific applications.
Computes an orthogonal/unitary matrix Q or P^T.
Keyword arguments: A_ – input vectors returned by GEBRD as GPUarray vect – specifies required matrix
‘Q’ generate Q ‘P’ generate P^T
m – number of rows to be returned k – number or rows/columns in the original matrix when vect==’Q’/’P’ respectively
Returns: the matrix Q or P^T as GPUarray
See CULA docs regarding orgbr for specific application.
Computes a orthogoanl/unitary matrix Q following a call to GEHRD.
Keyword arguments: A_ – vectors which define the elementary reflectors, returned by GEHRD, as GPUarray ilo – ilo from call to GEHRD ihi – ihi from call to GEHRD TAU_ – respective scalar factors of elementary reflectors as returned by GEHRD, as GPUarray
Returns unitary matrix Q as GPUarray
See CULA docs regarding orghr for specific application.
Computes a real matrix Q with orthonormal rows following a call to GELQF.
Keyword arguments: A_ – input martix, as returned by GELQF, as GPUarray m – number of rows of Q TAU_ – scalar factors of elementary reflectors returned by GELQF, as GPUarray
Returns matrix Q_ as GPUarray
See CULA docs regarding orglq for specific application.
Computes a real/complex matrix Q with orthonormal columns following a call to GELQF.
Keyword arguments: A_ – input martix, as returned by GELQF, as GPUarray m – number of rows of Q TAU_ – scalar factors of elementary reflectors returned by GELQF, as GPUarray
Returns matrix Q_ as GPUarray
See CULA docs regarding orgql for specific application.
Computes a real/complex matrix Q with orthonormal columns following a call to GEQRF.
Keyword arguments: A_ – input martix, as returned by GEQRF, as GPUarray m – number of rows of Q TAU_ – scalar factors of elementary reflectors returned by GEQRF, as GPUarray
Returns matrix Q_ as GPUarray
See CULA docs regarding orgqr for specific application.
Computes an orthogonal/unitary matrix from a general matrix returned by GELQF.
Keyword arguments: side – which side to apply transformation; ‘L’ left; ‘R’ right A_ – input matrix as returned by GELQF, as GPUarray TAU_ – TAU matrix as returned by GELQF, as GPUarray C_ – input matrix C, as GPUarray trans – transpose (default ==’N’)
‘N’ for no transpose ‘T’ for transpose
SIDE = ‘L’ SIDE = ‘R’
TRANS = ‘N’ Q*C C*Q TRANS = ‘T’ QT * C C * QT
See CULA docs regarding ormlq for specific application.
Computes an orthogonal/unitary matrix from a general matrix returned by GELQF.
Keyword arguments: side – which side to apply transformation; ‘L’ left; ‘R’ right A_ – input matrix as returned by GELQF, as GPUarray TAU_ – TAU matrix as returned by GELQF, as GPUarray C_ – input matrix C, as GPUarray trans – transpose (default ==’N’)
‘N’ for no transpose, apply Q ‘C’ for transpose, apply Q**H
SIDE = ‘L’ SIDE = ‘R’
TRANS = ‘N’ Q*C C*Q TRANS = ‘C’ Q**H*C C * Q**H
See CULA docs regarding ormql for specific application.
Computes an orthogonal/unitary matrix from a general matrix returned by GEQRF.
Keyword arguments: side – which side to apply transformation; ‘L’ left; ‘R’ right A_ – input matrix as returned by GEQRF, as GPUarray TAU_ – TAU matrix as returned by GEQRF, as GPUarray C_ – input matrix C, as GPUarray trans – transpose (default ==’N’)
‘N’ for no transpose, apply Q ‘T’ for transpose, apply Q^T
SIDE = ‘L’ SIDE = ‘R’
TRANS = ‘N’ Q*C C*Q TRANS = ‘T’ Q^T * C C * Q^T
See CULA docs regarding ormqr for specific application.
Computes an orthogonal/unitary matrix from a general matrix returned by GEQRF.
Keyword arguments: side – which side to apply transformation; ‘L’ left; ‘R’ right A_ – input matrix as returned by GEQRF, as GPUarray TAU_ – TAU matrix as returned by GEQRF, as GPUarray C_ – input matrix C, as GPUarray trans – transpose (default ==’N’)
‘N’ for no transpose, apply Q ‘T’ for transpose, apply Q^T
SIDE = ‘L’ SIDE = ‘R’
TRANS = ‘N’ Q*C C*Q TRANS = ‘T’ Q^T * C C * Q^T
See CULA docs regarding ormrq for specific application.
Computes solution to system of linear equations A*X=B where A is symmetric positive definite.
Keyword arguments: A – input matrix A, symmetric postive definite, as GPUarray B – input matrix B, right hand side of system, as GPUarray uplo – refers to whether A is upper or lower half; default ==’U’ for Upper; use ‘L’ for Lower
Returns tuple (A,X): A – output matrix U or L from Cholesky factorization as GPUarray X – solution matrix X as GPUarray
Refer to CULA docs regarding posv for specific application.
Takes real symmetric positive definite matrix A as GPUarray, and returns Cholesky factorization as GPUarray.
Keyword arguments: A – input matrix A, symmetric positive definite, as GPUarray uplo – refers to whether upper or lower half of A contains data.
default == ‘U’ for upper; use ‘L’ for lower
Refer to CULA docs regarding potrf for specific application.
Computes solution to system A*X=B, where A is symmetric positive definite.
Keyword arguments: A – input matrix A, symmetric positive definite, as GPUarray B – input matrix B, solution matrix to the system of equations, as GPUarray uplo – refers to whether upper or lower half of A contains data.
default == ‘U’ for upper; use ‘L’ for lower
Returns tuple (A,X): A – output matrix U or L from Cholesky factorization as GPUarray X – solution matrix X as GPUarray
Refer to CULA docs regarding potrs for specific application.
Takes GPUarrays A, X, B and solves system A*X=B, using iteratively refined method.
Keyword argurements: A_ – input matrix A, GPUarray, np.float64 X_ – input matrix X, GPUarray, np.float64 B_ – input matrix B, GPUarray, np.float64
Returns tuple of four GPUarrays and an int (LUfactors,Pivots, B, X, it).
Refer to CULA docs regarding sgesv for specific application.
Computes eigenvalues (optionally eigenvectors) of a symmetric tridiagonal matrix A using implicit QL or QR method.
Keyword arguments: D – diagonal elements of A as GPUarray E – subdiagonal elements of A as GPUarray Z – used in conjuction with compz, see compz compz – job descriptor, takes ‘N’,’I’,’V’,
- ‘N’ – default, only compute eigenvalues,
- Z not referenced
- ‘V’ – compute eigenvalues and eigenvectors when A is a symmetric/Hermetian matrix,
- Z is unitary matrix used to reduce A to tridiagonal form, as GPUarray
- ‘I’ – compute eigenvalues and eigenvectors of a tridiagonal matrix A,
- Z is identity matrix as GPUarray
Refer to CULA docs regarding steqr for specific application.
Takes GPUarray A and computes the SVD, returns Singular Values (optionally left/right vectors) as GPUarray.
Keyword arguments: A – input matrix left_vectors – default == False; computes left singular vectors right_vectors – default == False; computes right singular vectors
Refer to CULA docs regarding gesvd for specific application.
Takes symetric matrix as GPUarray and returns eigenvalues (optionally eigenvectors) as GPUarray.
Keyword arguments: A – input matrix as GPUarray, symmetric vectors – default == False; use ‘True’ to compute vectors. uplo – Defines whether input array has data in Upper or Lower half using ‘U’ or ‘L’ respectively
default==’U’
Find all eigenvalues of symmetric matrix using iterative numerical method.
Keyword arguments: A – input matrix, symmetric, as GPUarray abstol – the tolerance of the eigenvalues, default==0
Note: for accuracy, set to twice the underflow threshhold.
vectors – default==False; use ‘True’ to compute and return tuple of (eigenvalues, eigenvectors) uplo – which half of matrix A contains data, default==’U’
Returns: vectors==False – eigenvalues as GPUarray vectors==True – tuple of (eigenvalues, eigenvectors) as GPUarrays
Refer to CULA docs regarding syevx for specific usage.
Find eigenvalues with specified indices of a symmetric matrix using iterative numerical method.
Keyword arguments: A – input matrix, symmetric, as GPUarray il – lower index of desired eigenavlues; default=1 iu – upper index of desired eigenvalues; default=1 abstol – the tolerance of the eigenvalues, default==0
Note: for accuracy, set to twice the underflow threshhold.
vectors – default==False; use ‘True’ to compute and return tuple of (eigenvalues, eigenvectors) uplo – which half of matrix A contains data, default==’U’
Returns: vectors==False – eigenvalues as GPUarray vectors==True – tuple of (eigenvalues, eigenvectors) as GPUarrays
Refer to CULA docs regarding syevx for specific usage.
Find eigenvalues in specified Range of symmetric matrix using iterative numerical method.
Keyword arguments: A – input matrix, symmetric, as GPUarray vl – lower range of desired eigenavlues; default=-1 vu – upper range of desired eigenvalues; default=1 abstol – the tolerance of the eigenvalues, default==0
Note: for accuracy, set to twice the underflow threshhold.
vectors – default==False; use ‘True’ to compute and return tuple of (eigenvalues, eigenvectors) uplo – which half of matrix A contains data, default==’U’
Returns: vectors==False – eigenvalues as GPUarray vectors==True – tuple of (eigenvalues, eigenvectors) as GPUarrays
Refer to CULA docs regarding syevx for specific usage.
Takes symmetric/hermetian matrix A and reduces to a symmetric tridiagonal form.
Keyword arguments: jobz – specifies computation and output
- ‘N’ – forms symmetrix tridiagonal matrix T,
- outputs banded matrix B and info needed to construct QsubB
- ‘V’ – forms symmetric tridiagonal matrix T,
- outputs Q
- ‘U’ – forms the symmetric tridiagonal matrix T,
- outputs banded matrix B, info needed to construct QsubB as A, and overwrites Z with Z*Q
A_ – input matrix, symmetric/Hermitian, as GPUarray kd – bandwidth of output matrix B Z_ – optional matrix as GPUarray, default==’False’;
Z is used with jobz==’U’, and outputs Z*Q
uplo – which half of input A_ contains data; default==’U’ for Upper; use ‘L’ for Lower
Returns: jobz==’U’ – Returns tuple (diagonal elements, offdiagonal elements, A, (Z*Q) ) as GPUarray jobz==’N’ – Returns tuple (diagonal elements, offdiagonal elements, B ) as GPUarray Jobz==’V’ – Returns tuple (diagonal elements, offdiagonal elements, Q ) as GPUarray
See CULA docs regarding syrdb for specific application.
Computes the invervse of a triangular matrix A given as GPUarray.
Keyword arguments: diag – ‘N’ for A non-unit triangular
‘U’ for A unit triangular
A – triangular input matrix as GPUarray uplo – which half of A contains data;
‘U’ upper (default) ‘L’ lower
Returns: inverse of A as GPUarray
Refer to CULA docs regarding trtri for specific application.
Computes soltution to system A*X=B where A is triangular.
Keyword arguments: diag – ‘N’ for A non-unit triangular
‘U’ for A unit triangular
A – input triangular matrix as GPUarray B – right hand side matrix(s) B as GPUarray uplo – which half of A contains data;
‘U’ upper (default) ‘L’ lower
Returns solution matrix X as GPUarray.
Note: May be used to solve multiple systems by inputing B where each column of B represents the righthand side of a system.
See CULA docs regarding trtrs for specific application.
Takes general matrix A as GPUarray and returns eigenvalues of A as numpy.array.
Optionally, finds left or right eigenvectors.
Keyword arguments: left_vectors – find left eigenvectors (default == False) right_vectors – find right eigenvectors (default == False)
Refer to CULA docs regarding geev.
Takes a general real matrix A as GPUarray and reduces to upper or lower bidiagonal form, returning numpy.array.
Refer to CULA docs regarding gebrd.
Takes general matrix A as GPUarray and returns eigenvalues of A as numpy.array.
Optionally, finds left or right eigenvectors.
Keyword arguments: left_vectors – find left eigenvectors (default == False) right_vectors – find right eigenvectors (default == False)
Refer to CULA docs regarding geev.
Takes general matrix A as GPUarray and reduces to upper Hessenberg form H, returning numpy.array.
Keyword arguments: ilo_in – if not already upper triangular, ilo ihi_in – if not already upper triangular, ihi
Refer to CULA docs regarding gehrd for specific application if ilo and ihi if neccessary.
Takes general matrix A as GPUarray and returns LQ factorization as numpy.arrays.
Refer to CULA docs regarding gelqf for specific application.
Takes matrices A, B as GPUarrays and solves under/over-determined real linear systems returning numpy.array.
Keyword arguments: A – input matrix A B – input solution matrix B trans – transpose, ‘T’ for transpose, default is ‘N’
Refer to CULA docs regard gels for specific application.
Takes GPUarray A and returns QL factorization as numpy.array.
Refer to CULA docs regarding geqlf for specific application.
Takes matrix A as GPUarray and returns QR factorization as numpy.arrays.
Refer to CULA docs regarding geqrf for specific application.
Takes general matrix A, B and solvesn least squares problem min||A*X-B||.
Keyword arguments: A – input matrix A as numpy.array B – input matrix B as numpy.array
Refer to CULA docs regarding geqrs for specific application.
Takes matrix A as GPUarray and returns RQ factorization as numpy.arrays.
Refer to CULA docs regarding gerqf for specific application.
Takes GPUarrays A, B and solves system A*X=B, returning tuple of np.arrays (LUfactors,Pivots,X).
Refer to CULA docs regarding gesv for specific application.
See gpu_devsvd.
Takes a general matrix A as GPUarray computes, LU factorization and returns np.array.
Refer to CULA docs regarding getrf for specific application.
Takes general matrix A as GPUarray and returns the inverse and pivot matrix as np.array using LU factorization.
Refer to CULA docs regarding getri for specific application and alternative routine recomendations.
Takes GPUarrays A and B from system A*X=B and solves using LU factorization.
Returns a tuple of (factors, Pivot matrix, Solution matrix X) as np.arrays
Keyword arguments: A – input matrix A representing left hand side of system A*X=B B – input matrix B representing right hand side of system A*X=B trans – default == ‘N’; ‘T’ for transpose; ‘C’ for conjugate transpose
Refer to CULA docs regarding getrs for specific application.
Solves linear equality constrained least squares system:
minimize ||c-A*X||^2 subject to system B*X=D
given conditions for A an m by n matrix:
Rank(B)<=Rank(A)<=m+Rank(B)
Which imply existence and uniqueness to RQ factorization given by:
B = (0 R)*Q, A = Z*T*Q.
Keyword arguments: A – input array A as GPUarray B – input array B as GPUarray C – input array C as GPUarray D – input array D as GPUarray
Returns tuple (T, R, C, X) as np.arrays
T – output array as np.array contains the upper trapazoidal matrix T R – output array as np.array contains the upper triangular matrix R C – output array as np.array contains the residual sum of squares of input vector C X – output array as np.array is the solution matrix X
Refer to CULA docs regarding gglse for specific application. ...or LAPACK for more information regarding the algortithm
Computes a generalized RQ factorization for input matrices A, B given as GPUarrays.
Keyword arguments: A – input m x n matrix as GPUarray B – input p x n matrix as GPUarray
Returns a tuple (A,TAUA,B,TAUB): A – output contains upper triangular matrix R as np.array TAUA – output contains scalar factors of elementary reflectors of Q, as np.array B – output contains upper trapazoidal matrix T as np.array TAUB – output contains scalar factors of elementary reflectors of Z, as np.array
Refer to CULA docs regarding ggrqf for specific applications.
Computes an orthogonal/unitary matrix Q or P^T.
Keyword arguments: A_ – input vectors returned by GEBRD as GPUarray vect – specifies required matrix
‘Q’ generate Q ‘P’ generate P^T
m – number of rows to be returned k – number or rows/columns in the original matrix when vect==’Q’/’P’ respectively
Returns: the matrix Q or P^T as np.array
See CULA docs regarding orgbr for specific application.
Computes a orthogoanl/unitary matrix Q following a call to GEHRD.
Keyword arguments: A_ – vectors which define the elementary reflectors, returned by GEHRD, as GPUarray ilo – ilo from call to GEHRD ihi – ihi from call to GEHRD TAU_ – respective scalar factors of elementary reflectors as returned by GEHRD, as GPUarray
Returns unitary matrix Q as np.array
See CULA docs regarding orghr for specific application.
Computes a real matrix Q with orthonormal rows following a call to GELQF.
Keyword arguments: A_ – input martix, as returned by GELQF, as GPUarray m – number of rows of Q TAU_ – scalar factors of elementary reflectors returned by GELQF, as GPUarray
Returns matrix Q as np.array
See CULA docs regarding orglq for specific application.
Computes a real/complex matrix Q with orthonormal columns following a call to GELQF.
Keyword arguments: A_ – input martix, as returned by GELQF, as GPUarray m – number of rows of Q TAU_ – scalar factors of elementary reflectors returned by GELQF, as GPUarray
Returns matrix Q as np.array
See CULA docs regarding orgql for specific application.
Computes a real/complex matrix Q with orthonormal columns following a call to GEQRF.
Keyword arguments: A_ – input martix, as returned by GEQRF, as GPUarray m – number of rows of Q TAU_ – scalar factors of elementary reflectors returned by GEQRF, as GPUarray
Returns matrix Q as np.array
See CULA docs regarding orgqr for specific application.
Computes an orthogonal/unitary matrix from a general matrix returned by GELQF.
Keyword arguments: side – which side to apply transformation; ‘L’ left; ‘R’ right A_ – input matrix as returned by GELQF, as GPUarray TAU_ – TAU matrix as returned by GELQF, as GPUarray C_ – input matrix C, as GPUarray trans – transpose (default ==’N’)
‘N’ for no transpose ‘T’ for transpose
SIDE = ‘L’ SIDE = ‘R’
TRANS = ‘N’ Q*C C*Q TRANS = ‘T’ QT * C C * QT
See CULA docs regarding ormlq for specific application.
Computes an orthogonal/unitary matrix from a general matrix returned by GELQF.
Keyword arguments: side – which side to apply transformation; ‘L’ left; ‘R’ right A_ – input matrix as returned by GELQF, as GPUarray TAU_ – TAU matrix as returned by GELQF, as GPUarray C_ – input matrix C, as GPUarray trans – transpose (default ==’N’)
‘N’ for no transpose, apply Q ‘C’ for transpose, apply Q**H
SIDE = ‘L’ SIDE = ‘R’
TRANS = ‘N’ Q*C C*Q TRANS = ‘C’ Q**H*C C * Q**H
See CULA docs regarding ormql for specific application.
Computes an orthogonal/unitary matrix from a general matrix returned by GEQRF.
Keyword arguments: side – which side to apply transformation; ‘L’ left; ‘R’ right A_ – input matrix as returned by GEQRF, as GPUarray TAU_ – TAU matrix as returned by GEQRF, as GPUarray C_ – input matrix C, as GPUarray trans – transpose (default ==’N’)
‘N’ for no transpose, apply Q ‘T’ for transpose, apply Q^T
SIDE = ‘L’ SIDE = ‘R’
TRANS = ‘N’ Q*C C*Q TRANS = ‘T’ Q^T * C C * Q^T
See CULA docs regarding ormqr for specific application.
Computes an orthogonal/unitary matrix from a general matrix returned by GEQRF.
Keyword arguments: side – which side to apply transformation; ‘L’ left; ‘R’ right A_ – input matrix as returned by GEQRF, as GPUarray TAU_ – TAU matrix as returned by GEQRF, as GPUarray C_ – input matrix C, as GPUarray trans – transpose (default ==’N’)
‘N’ for no transpose, apply Q ‘T’ for transpose, apply Q^T
SIDE = ‘L’ SIDE = ‘R’
TRANS = ‘N’ Q*C C*Q TRANS = ‘T’ Q^T * C C * Q^T
See CULA docs regarding ormrq for specific application.
Computes solution to system of linear equations A*X=B where A is symmetric positive definite.
Keyword arguments: A – input matrix A, symmetric postive definite, as GPUarray B – input matrix B, right hand side of system, as GPUarray uplo – refers to whether A is upper or lower half; default ==’U’ for Upper; use ‘L’ for Lower
Returns tuple (A,X): A – output matrix U or L from Cholesky factorization as np.array X – solution matrix X as np.array
Refer to CULA docs regarding posv for specific application.
Takes real symmetric positive definite matrix A as GPUarray, and returns Cholesky factorization as np.array.
Keyword arguments: A – input matrix A, symmetric positive definite, as GPUarray uplo – refers to whether upper or lower half of A contains data.
default == ‘U’ for upper; use ‘L’ for lower
Refer to CULA docs regarding potrf for specific application.
Computes solution to system A*X=B, where A is symmetric positive definite.
Keyword arguments: A – input matrix A, symmetric positive definite, as GPUarray B – input matrix B, solution matrix to the system of equations, as GPUarray uplo – refers to whether upper or lower half of A contains data.
default == ‘U’ for upper; use ‘L’ for lower
Returns tuple (A,X): A – output matrix U or L from Cholesky factorization as np.array X – solution matrix X as GPUarray
Refer to CULA docs regarding potrs for specific application.
Takes GPUarrays A, X, B and solves system A*X=B, using iteratively refined method.
Keyword argurements: A_ – input matrix A, GPUarray, np.float64 X_ – input matrix X, GPUarray, np.float64 B_ – input matrix B, GPUarray, np.float64
Returns tuple of four np.arrays and an int (LUfactors,Pivots, B, X, it).
Refer to CULA docs regarding sgesv for specific application.
Computes eigenvalues (optionally eigenvectors) of a symmetric tridiagonal matrix A using implicit QL or QR method.
Keyword arguments: D – diagonal elements of A as GPUarray E – subdiagonal elements of A as GPUarray Z – used in conjuction with compz, see compz compz – job descriptor, takes ‘N’,’I’,’V’,
- ‘N’ – default, only compute eigenvalues,
- Z not referenced
- ‘V’ – compute eigenvalues and eigenvectors when A is a symmetric/Hermetian matrix,
- Z is unitary matrix used to reduce A to tridiagonal form, as GPUarray
- ‘I’ – compute eigenvalues and eigenvectors of a tridiagonal matrix A,
- Z is identity matrix as GPUarray
Refer to CULA docs regarding steqr for specific application.
Takes GPUarray A and computes the SVD, returns Singular Values (optionally left/right vectors) as np.arrays.
Keyword arguments: A – input matrix left_vectors – default == False; computes left singular vectors right_vectors – default == False; computes right singular vectors
Refer to CULA docs regarding gesvd for specific application.
Takes symetric matrix as GPUarray and returns eigenvalues (optionally eigenvectors) as np.array.
Keyword arguments: A – input matrix as GPUarray, symmetric vectors – default == False; use ‘True’ to compute vectors. uplo – Defines whether input array has data in Upper or Lower half using ‘U’ or ‘L’ respectively
default==’U’
Find all eigenvalues of symmetric matrix using iterative numerical method.
Keyword arguments: A – input matrix, symmetric, as GPUarray abstol – the tolerance of the eigenvalues, default==0
Note: for accuracy, set to twice the underflow threshhold.
vectors – default==False; use ‘True’ to compute and return tuple of (eigenvalues, eigenvectors) uplo – which half of matrix A contains data, default==’U’
Returns: vectors==False – eigenvalues as np.array vectors==True – tuple of (eigenvalues, eigenvectors) as np.arrays
Refer to CULA docs regarding syevx for specific usage.
Find eigenvalues with specified indices of a symmetric matrix using iterative numerical method.
Keyword arguments: A – input matrix, symmetric, as GPUarray il – lower index of desired eigenavlues; default=1 iu – upper index of desired eigenvalues; default=1 abstol – the tolerance of the eigenvalues, default==0
Note: for accuracy, set to twice the underflow threshhold.
vectors – default==False; use ‘True’ to compute and return tuple of (eigenvalues, eigenvectors) uplo – which half of matrix A contains data, default==’U’
Returns: vectors==False – eigenvalues as np.array vectors==True – tuple of (eigenvalues, eigenvectors) as np.arrays
Refer to CULA docs regarding syevx for specific usage.
Find eigenvalues in specified Range of symmetric matrix using iterative numerical method.
Keyword arguments: A – input matrix, symmetric, as GPUarray vl – lower range of desired eigenavlues; default=-1 vu – upper range of desired eigenvalues; default=1 abstol – the tolerance of the eigenvalues, default==0
Note: for accuracy, set to twice the underflow threshhold.
vectors – default==False; use ‘True’ to compute and return tuple of (eigenvalues, eigenvectors) uplo – which half of matrix A contains data, default==’U’
Returns: vectors==False – eigenvalues as np.array vectors==True – tuple of (eigenvalues, eigenvectors) as np.arrays
Refer to CULA docs regarding syevx for specific usage.
Takes symmetric/hermetian matrix A and reduces to a symmetric tridiagonal form.
Keyword arguments: jobz – specifies computation and output
- ‘N’ – forms symmetrix tridiagonal matrix T,
- outputs banded matrix B and info needed to construct QsubB
- ‘V’ – forms symmetric tridiagonal matrix T,
- outputs Q
- ‘U’ – forms the symmetric tridiagonal matrix T,
- outputs banded matrix B, info needed to construct QsubB as A, and overwrites Z with Z*Q
A_ – input matrix, symmetric/Hermitian, as GPUarray kd – bandwidth of output matrix B Z_ – optional matrix as GPUarray, default==’False’;
Z is used with jobz==’U’, and outputs Z*Q
uplo – which half of input A_ contains data; default==’U’ for Upper; use ‘L’ for Lower
Returns: jobz==’U’ – Returns tuple (diagonal elements, offdiagonal elements, A, (Z*Q) ) as np.array jobz==’N’ – Returns tuple (diagonal elements, offdiagonal elements, B ) as np.array Jobz==’V’ – Returns tuple (diagonal elements, offdiagonal elements, Q ) as np.array
See CULA docs regarding syrdb for specific application.
Computes the invervse of a triangular matrix A given as GPUarray.
Keyword arguments: diag – ‘N’ for A non-unit triangular
‘U’ for A unit triangular
A – triangular input matrix as GPUarray uplo – which half of A contains data;
‘U’ upper (default) ‘L’ lower
Returns: inverse of A as np.array
Refer to CULA docs regarding trtri for specific application.
Computes soltution to system A*X=B where A is triangular.
Keyword arguments: diag – ‘N’ for A non-unit triangular
‘U’ for A unit triangular
A – input triangular matrix as GPUarray B – right hand side matrix(s) B as GPUarray uplo – which half of A contains data;
‘U’ upper (default) ‘L’ lower
Returns solution matrix X as np.array.
Note: May be used to solve multiple systems by inputing B where each column of B represents the righthand side of a system.
See CULA docs regarding trtrs for specific application.
Takes general matrix A as numpy.array and returns eigenvalues of A as numpy.array.
Optionally, finds left or right eigenvectors.
Keyword arguments: left_vectors – find left eigenvectors (default == False) right_vectors – find right eigenvectors (default == False)
Refer to CULA docs regarding geev.
Takes a general real matrix A as numpy.array and reduces to upper or lower bidiagonal form, returning numpy.array.
Refer to CULA docs regarding gebrd.
Takes general matrix A as numpy.array and returns eigenvalues of A as numpy.array.
Optionally, finds left or right eigenvectors.
Keyword arguments: left_vectors – find left eigenvectors (default == False) right_vectors – find right eigenvectors (default == False)
Refer to CULA docs regarding geev.
Takes general matrix A as numpy.array and reduces to upper Hessenberg form H, returning numpy.array.
Keyword arguments: ilo_in – if not already upper triangular, ilo ihi_in – if not already upper triangular, ihi
Refer to CULA docs regarding gehrd for specific application if ilo and ihi if neccessary.
Takes general matrix A as numpy.array and returns LQ factorization as numpy.arrays.
Refer to CULA docs regarding gelqf for specific application.
Takes matrices A, B as numpy.arrays and solves under/over-determined real linear systems returning numpy.array.
Keyword arguments: A – input matrix A B – input solution matrix B trans – transpose, ‘T’ for transpose, default is ‘N’
Refer to CULA docs regard gels for specific application.
Takes numpy.array A and returns QL factorization as numpy.array.
Refer to CULA docs regarding geqlf for specific application.
Takes matrix A as numpy.array and returns QR factorization as numpy.arrays.
Refer to CULA docs regarding geqrf for specific application.
Takes general matrix A, B and solvesn least squares problem min||A*X-B||.
Keyword arguments: A – input matrix A as numpy.array B – input matrix B as numpy.array
Refer to CULA docs regarding geqrs for specific application.
Takes matrix A as numpy.array and returns RQ factorization as numpy.arrays.
Refer to CULA docs regarding gerqf for specific application.
Takes numpy.arrays A, B and solves system A*X=B, returning tuple of np.arrays (LUfactors,Pivots,X).
Refer to CULA docs regarding gesv for specific application.
See gpu_svd.
Takes a general matrix A as np.array computes, LU factorization and returns np.array.
Refer to CULA docs regarding getrf for specific application.
Takes general matrix A as np.array and returns the inverse and pivot matrix as np.array using LU factorization.
Refer to CULA docs regarding getri for specific application and alternative routine recomendations.
Takes np.arrays A and B from system A*X=B and solves using LU factorization.
Returns a tuple of (factors, Pivot matrix, Solution matrix X) as np.arrays
Keyword arguments: A – input matrix A representing left hand side of system A*X=B B – input matrix B representing right hand side of system A*X=B trans – default == ‘N’; ‘T’ for transpose; ‘C’ for conjugate transpose
Refer to CULA docs regarding getrs for specific application.
Solves linear equality constrained least squares system:
minimize ||c-A*X||^2 subject to system B*X=D
given conditions for A an m by n matrix:
Rank(B)<=Rank(A)<=m+Rank(B)
Which imply existence and uniqueness to RQ factorization given by:
B = (0 R)*Q, A = Z*T*Q.
Keyword arguments: A – input array A as np.array B – input array B as np.array C – input array C as np.array D – input array D as np.array
Returns tuple (T, R, C, X) as np.arrays
T – output array as np.array contains the upper trapazoidal matrix T R – output array as np.array contains the upper triangular matrix R C – output array as np.array contains the residual sum of squares of input vector C X – output array as np.array is the solution matrix X
Refer to CULA docs regarding gglse for specific application. ...or LAPACK for more information regarding the algortithm
Computes a generalized RQ factorization for input matrices A, B given as np.arrays.
Keyword arguments: A – input m x n matrix as np.array B – input p x n matrix as np.array
Returns a tuple (A,TAUA,B,TAUB): A – output contains upper triangular matrix R as np.array TAUA – output contains scalar factors of elementary reflectors of Q, as np.array B – output contains upper trapazoidal matrix T as np.array TAUB – output contains scalar factors of elementary reflectors of Z, as np.array
Refer to CULA docs regarding ggrqf for specific applications.
Computes an orthogonal/unitary matrix Q or P^T.
Keyword arguments: A – input vectors returned by GEBRD as np.array vect – specifies required matrix
‘Q’ generate Q ‘P’ generate P^T
m – number of rows to be returned k – number or rows/columns in the original matrix when vect==’Q’/’P’ respectively
Returns: the matrix Q or P^T as np.array
See CULA docs regarding orgbr for specific application.
Computes a orthogoanl/unitary matrix Q following a call to GEHRD.
Keyword arguments: A – vectors which define the elementary reflectors, returned by GEHRD, as np.array ilo – ilo from call to GEHRD ihi – ihi from call to GEHRD TAU – respective scalar factors of elementary reflectors as returned by GEHRD, as np.array
Returns unitary matrix Q as np.array
See CULA docs regarding orghr for specific application.
Computes a real matrix Q with orthonormal rows following a call to GELQF.
Keyword arguments: A – input martix, as returned by GELQF, as np.array m – number of rows of Q TAU – scalar factors of elementary reflectors returned by GELQF, as np.array
Returns matrix Q as np.array
See CULA docs regarding orglq for specific application.
Computes a real/complex matrix Q with orthonormal columns following a call to GELQF.
Keyword arguments: A – input martix, as returned by GELQF, as np.array m – number of rows of Q TAU – scalar factors of elementary reflectors returned by GELQF, as np.array
Returns matrix Q as np.array
See CULA docs regarding orgql for specific application.
Computes a real/complex matrix Q with orthonormal columns following a call to GEQRF.
Keyword arguments: A – input martix, as returned by GEQRF, as np.array m – number of rows of Q TAU – scalar factors of elementary reflectors returned by GEQRF, as np.array
Returns matrix Q as np.array
See CULA docs regarding orgqr for specific application.
Computes an orthogonal/unitary matrix from a general matrix returned by GELQF.
Keyword arguments: side – which side to apply transformation; ‘L’ left; ‘R’ right A – input matrix as returned by GELQF, as np.array TAU – TAU matrix as returned by GELQF, as np.array C – input matrix C, as np.array trans – transpose (default ==’N’)
‘N’ for no transpose ‘T’ for transpose
SIDE = ‘L’ SIDE = ‘R’
TRANS = ‘N’ Q*C C*Q TRANS = ‘T’ QT * C C * QT
See CULA docs regarding ormlq for specific application.
Computes an orthogonal/unitary matrix from a general matrix returned by GELQF.
Keyword arguments: side – which side to apply transformation; ‘L’ left; ‘R’ right A – input matrix as returned by GELQF, as np.array TAU – TAU matrix as returned by GELQF, as np.array C – input matrix C, as np.array trans – transpose (default ==’N’)
‘N’ for no transpose, apply Q ‘C’ for transpose, apply Q**H
SIDE = ‘L’ SIDE = ‘R’
TRANS = ‘N’ Q*C C*Q TRANS = ‘C’ Q**H*C C * Q**H
See CULA docs regarding ormql for specific application.
Computes an orthogonal/unitary matrix from a general matrix returned by GEQRF.
Keyword arguments: side – which side to apply transformation; ‘L’ left; ‘R’ right A – input matrix as returned by GEQRF, as np.array TAU – TAU matrix as returned by GEQRF, as np.array C – input matrix C, as np.array trans – transpose (default ==’N’)
‘N’ for no transpose, apply Q ‘T’ for transpose, apply Q^T
SIDE = ‘L’ SIDE = ‘R’
TRANS = ‘N’ Q*C C*Q TRANS = ‘T’ Q^T * C C * Q^T
See CULA docs regarding ormqr for specific application.
Computes an orthogonal/unitary matrix from a general matrix returned by GEQRF.
Keyword arguments: side – which side to apply transformation; ‘L’ left; ‘R’ right A – input matrix as returned by GEQRF, as np.array TAU – TAU matrix as returned by GEQRF, as np.array C – input matrix C, as np.array trans – transpose (default ==’N’)
‘N’ for no transpose, apply Q ‘T’ for transpose, apply Q^T
SIDE = ‘L’ SIDE = ‘R’
TRANS = ‘N’ Q*C C*Q TRANS = ‘T’ Q^T * C C * Q^T
See CULA docs regarding ormrq for specific application.
Computes solution to system of linear equations A*X=B where A is symmetric positive definite.
Keyword arguments: A – input matrix A, symmetric postive definite, as np.array B – input matrix B, right hand side of system, as np.array uplo – refers to whether A is upper or lower half; default ==’U’ for Upper; use ‘L’ for Lower
Returns tuple (A,X): A – output matrix U or L from Cholesky factorization as np.array X – solution matrix X as np.array
Refer to CULA docs regarding posv for specific application.
Takes real symmetric positive definite matrix A as np.array, and returns Cholesky factorization as np.array.
Keyword arguments: A – input matrix A, symmetric positive definite, as np.array uplo – refers to whether upper or lower half of A contains data.
default == ‘U’ for upper; use ‘L’ for lower
Refer to CULA docs regarding potrf for specific application.
Computes solution to system A*X=B, where A is symmetric positive definite.
Keyword arguments: A – input matrix A, symmetric positive definite, as np.array B – input matrix B, solution matrix to the system of equations, as np.array uplo – refers to whether upper or lower half of A contains data.
default == ‘U’ for upper; use ‘L’ for lower
Returns tuple (A,X): A – output matrix U or L from Cholesky factorization as np.array X – solution matrix X as np.array
Refer to CULA docs regarding potrs for specific application.
Takes numpy.arrays A, X, B and solves system A*X=B, using iteratively refined method.
Keyword argurements: A – input matrix A, np.array, np.float64 X – input matrix X, np.array, np.float64 B – input matrix B, np.array, np.float64
Returns tuple of four np.arrays and an int (LUfactors,Pivots, B, X, it).
Refer to CULA docs regarding sgesv for specific application.
Computes all the eigenvalues of a symmetric tridiagonal matrix T.
Keyword arguments: D – diagonal elements of T as np.array E – off diagonal elements of T as np.array abstol – absolute tolerance for the eigenvalues; default == 0
Returns Eigenvalues as np.array
Refer to CULA docs regarding stebz for specific application.
Computes all the eigenvalues of a symmetric tridiagonal matrix T using block method.
Keyword arguments: D – diagonal elements of T as np.array E – off diagonal elements of T as np.array abstol – absolute tolerance for the eigenvalues; default == 0
Returns Eigenvalues as np.array
Refer to CULA docs regarding stebz for specific application.
Computes the eigenvalues given specified indices of a symmetric tridiagonal matrix T.
Keyword arguments: il – lower index iu – upper index D – diagonal elements of T as np.array E – off diagonal elements of T as np.array abstol – absolute tolerance for the eigenvalues; default == 0
Returns Eigenvalues as np.array
Refer to CULA docs regarding stebz for specific application.
Computes the eigenvalues given specified indices of a symmetric tridiagonal matrix T using block method.
Keyword arguments: il – lower index iu – upper index D – diagonal elements of T as np.array E – off diagonal elements of T as np.array abstol – absolute tolerance for the eigenvalues; default == 0
Returns Eigenvalues as np.array
Refer to CULA docs regarding stebz for specific application.
Computes the eigenvalues in specified range of a symmetric tridiagonal matrix T.
Keyword arguments: vl – lower value of range vu – upper value of range D – diagonal elements of T as np.array E – off diagonal elements of T as np.array abstol – absolute tolerance for the eigenvalues; default == 0
Returns Eigenvalues as np.array
Refer to CULA docs regarding stebz for specific application.
Computes the eigenvalues in specified range of a symmetric tridiagonal matrix T using block method.
Keyword arguments: vl – lower value of range vu – upper value of range D – diagonal elements of T as np.array E – off diagonal elements of T as np.array abstol – absolute tolerance for the eigenvalues; default == 0
Returns Eigenvalues as np.array
Refer to CULA docs regarding stebz for specific application.
Computes eigenvalues (optionally eigenvectors) of a symmetric tridiagonal matrix A using implicit QL or QR method.
Keyword arguments: D – diagonal elements of A as np.array E – subdiagonal elements of A as np.array Z – used in conjuction with compz, see compz compz – job descriptor, takes ‘N’,’I’,’V’,
- ‘N’ – default, only compute eigenvalues,
- Z not referenced
- ‘V’ – compute eigenvalues and eigenvectors when A is a symmetric/Hermetian matrix,
- Z is unitary matrix used to reduce A to tridiagonal form, as np.array
- ‘I’ – compute eigenvalues and eigenvectors of a tridiagonal matrix A,
- Z is identity matrix as np.array
Refer to CULA docs regarding steqr for specific application.
Takes numpy.array A and computes the SVD, returns Singular Values (optionally left/right vectors) as np.arrays.
Keyword arguments: A – input matrix left_vectors – default == False; computes left singular vectors right_vectors – default == False; computes right singular vectors
Refer to CULA docs regarding gesvd for specific application.
Takes symetric matrix as np.array and returns eigenvalues (optionally eigenvectors) as np.array.
Keyword arguments: A – input matrix as np.array, symmetric vectors – default == False; use ‘True’ to compute vectors. uplo – Defines whether input array has data in Upper or Lower half using ‘U’ or ‘L’ respectively
default==’U’
Find all eigenvalues of symmetric matrix using iterative numerical method.
Keyword arguments: A – input matrix, symmetric, as np.array abstol – the tolerance of the eigenvalues, default==0
Note: for accuracy, set to twice the underflow threshhold.
vectors – default==False; use ‘True’ to compute and return tuple of (eigenvalues, eigenvectors) uplo – which half of matrix A contains data, default==’U’
Returns: vectors==False – eigenvalues as np.array vectors==True – tuple of (eigenvalues, eigenvectors) as np.arrays
Refer to CULA docs regarding syevx for specific usage.
Find eigenvalues with specified indices of a symmetric matrix using iterative numerical method.
Keyword arguments: A – input matrix, symmetric, as np.array il – lower index of desired eigenavlues; default=1 iu – upper index of desired eigenvalues; default=1 abstol – the tolerance of the eigenvalues, default==0
Note: for accuracy, set to twice the underflow threshhold.
vectors – default==False; use ‘True’ to compute and return tuple of (eigenvalues, eigenvectors) uplo – which half of matrix A contains data, default==’U’
Returns: vectors==False – eigenvalues as np.array vectors==True – tuple of (eigenvalues, eigenvectors) as np.arrays
Refer to CULA docs regarding syevx for specific usage.
Find eigenvalues in specified Range of symmetric matrix using iterative numerical method.
Keyword arguments: A – input matrix, symmetric, as np.array vl – lower range of desired eigenavlues; default=-1 vu – upper range of desired eigenvalues; default=1 abstol – the tolerance of the eigenvalues, default==0
Note: for accuracy, set to twice the underflow threshhold.
vectors – default==False; use ‘True’ to compute and return tuple of (eigenvalues, eigenvectors) uplo – which half of matrix A contains data, default==’U’
Returns: vectors==False – eigenvalues as np.array vectors==True – tuple of (eigenvalues, eigenvectors) as np.arrays
Refer to CULA docs regarding syevx for specific usage.
Takes symmetric/hermetian matrix A and reduces to a symmetric tridiagonal form.
Keyword arguments: jobz – specifies computation and output
- ‘N’ – forms symmetrix tridiagonal matrix T,
- outputs banded matrix B and info needed to construct QsubB
- ‘V’ – forms symmetric tridiagonal matrix T,
- outputs Q
- ‘U’ – forms the symmetric tridiagonal matrix T,
- outputs banded matrix B, info needed to construct QsubB as A, and overwrites Z with Z*Q
A – input matrix, symmetric/Hermitian, as np.array kd – bandwidth of output matrix B Z – optional matrix as np.array, default==’False’;
Z is used with jobz==’U’, and outputs Z*Q
uplo – which half of input A contains data; default==’U’ for Upper; use ‘L’ for Lower
Returns: jobz==’U’ – Returns tuple (diagonal elements, offdiagonal elements, A, (Z*Q) ) as np.array jobz==’N’ – Returns tuple (diagonal elements, offdiagonal elements, B ) as np.array Jobz==’V’ – Returns tuple (diagonal elements, offdiagonal elements, Q ) as np.array
See CULA docs regarding syrdb for specific application.
Computes the invervse of a triangular matrix A given as np.array.
Keyword arguments: diag – ‘N’ for A non-unit triangular
‘U’ for A unit triangular
A – triangular input matrix as np.array uplo – which half of A contains data;
‘U’ upper (default) ‘L’ lower
Returns: inverse of A as np.array
Refer to CULA docs regarding trtri for specific application.
Computes soltution to system A*X=B where A is triangular.
Keyword arguments: diag – ‘N’ for A non-unit triangular
‘U’ for A unit triangular
A – input triangular matrix as np.array B – right hand side matrix(s) B as np.array uplo – which half of A contains data;
‘U’ upper (default) ‘L’ lower
Returns solution matrix X as np.array.
Note: May be used to solve multiple systems by inputing B where each column of B represents the righthand side of a system.
See CULA docs regarding trtrs for specific application.
Takes a square GPUarray on device and transposes in place using a naive elementwise kernel.
Takes square GPUarray on device and transposes in place, returning GPUarray on device.
Checks whether CULA is initialized on devive number ‘dev’, and if not, initializes
Inits driver and runtime libs for transperant mixed mode cuda enviornment.
Initializes PyCUDA and handles context.
Checks if PyCUDA is initiliazed, and initilizes if needed.