Skip to main content

muBLAS API Reference

The muBLAS library provides GPU-accelerated Basic Linear Algebra Subprograms for MUSA applications. This reference describes the muBLAS APIs available in MUSA SDK 5.1.0.

API Function Reference

mublasCreate

mublasStatus mublasCreate(mublasHandle_t* handle);

Create handle

Parameters:

  • handle

Return type: mublasStatus

mublasDestroy

mublasStatus mublasDestroy(mublasHandle_t handle);

Destroy handle

Parameters:

  • handle

Return type: mublasStatus

mublasGetVersion

mublasStatus mublasGetVersion(mublasHandle_t handle, int* version);

Get mublasVersion

Parameters:

  • handle
  • version

Return type: mublasStatus

mublasGetProperty

mublasStatus mublasGetProperty(libraryPropertyType_t type, int* value);

Get the value of the requested property

Parameters:

  • type
  • value

Return type: mublasStatus

mublasSetStream

mublasStatus mublasSetStream(mublasHandle_t handle, MUstream stream);

Set stream for handle

Parameters:

  • handle
  • stream

Return type: mublasStatus

mublasSetWorkspace

mublasStatus mublasSetWorkspace(mublasHandle_t handle, void* workspace, size_t workspaceSizeInBytes);

Set workspace to user-owned device buffer

Parameters:

  • handle
  • workspace
  • workspaceSizeInBytes

Return type: mublasStatus

mublasGetStream

mublasStatus mublasGetStream(mublasHandle_t handle, MUstream* stream);

Get stream [0] from handle

Parameters:

  • handle
  • stream

Return type: mublasStatus

mublasGetPointerMode

mublasStatus mublasGetPointerMode(mublasHandle_t handle, mublasPointerMode_t* pointer_mode);

Get mublasPointerMode_t

Parameters:

  • handle
  • pointer_mode

Return type: mublasStatus

mublasSetPointerMode

mublasStatus mublasSetPointerMode(mublasHandle_t handle, mublasPointerMode_t pointer_mode);

Set mublasPointerMode_t

Parameters:

  • handle
  • pointer_mode

Return type: mublasStatus

mublasSetVector

mublasStatus mublasSetVector(int n, int elem_size, const void* x, int incx, void* y, int incy);

Copy vector from host to device

Parameters:

  • n: [int] number of elements in the vector
  • elem_size: [int] number of bytes per element in the matrix
  • x: pointer to vector on the host
  • incx: [int] specifies the increment for the elements of the vector
  • y: pointer to vector on the device
  • incy: [int] specifies the increment for the elements of the vector

Return type: mublasStatus

mublasGetVector

mublasStatus mublasGetVector(int n, int elem_size, const void* x, int incx, void* y, int incy);

Copy vector from device to host

Parameters:

  • n: [int] number of elements in the vector
  • elem_size: [int] number of bytes per element in the matrix
  • x: pointer to vector on the device
  • incx: [int] specifies the increment for the elements of the vector
  • y: pointer to vector on the host
  • incy: [int] specifies the increment for the elements of the vector

Return type: mublasStatus

mublasSetMatrix

mublasStatus mublasSetMatrix(int rows, int cols, int elem_size, const void* a, int lda, void* b, int ldb);

Copy matrix from host to device

Parameters:

  • rows: [int] number of rows in matrices
  • cols: [int] number of columns in matrices
  • elem_size: [int] number of bytes per element in the matrix
  • a: pointer to matrix on the host
  • lda: [int] specifies the leading dimension of A, lda >= rows
  • b: pointer to matrix on the GPU
  • ldb: [int] specifies the leading dimension of B, ldb >= rows

Return type: mublasStatus

mublasGetMatrix

mublasStatus mublasGetMatrix(int rows, int cols, int elem_size, const void* a, int lda, void* b, int ldb);

Copy matrix from device to host

Parameters:

  • rows: [int] number of rows in matrices
  • cols: [int] number of columns in matrices
  • elem_size: [int] number of bytes per element in the matrix
  • a: pointer to matrix on the GPU
  • lda: [int] specifies the leading dimension of A, lda >= rows
  • b: pointer to matrix on the host
  • ldb: [int] specifies the leading dimension of B, ldb >= rows

Return type: mublasStatus

mublasSetVectorAsync

mublasStatus mublasSetVectorAsync( int n, int elem_size, const void* x, int incx, void* y, int incy, MUstream stream);

Asynchronously copy vector from host to device

mublasSetVectorAsync copies a vector from pinned host memory to device memory asynchronously. Memory on the host must be allocated with musaHostMalloc or the transfer will be synchronous.

Parameters:

  • n: [int] number of elements in the vector
  • elem_size: [int] number of bytes per element in the matrix
  • x: pointer to vector on the host
  • incx: [int] specifies the increment for the elements of the vector
  • y: pointer to vector on the device
  • incy: [int] specifies the increment for the elements of the vector
  • stream: specifies the stream into which this transfer request is queued

Return type: mublasStatus

mublasGetVectorAsync

mublasStatus mublasGetVectorAsync( int n, int elem_size, const void* x, int incx, void* y, int incy, MUstream stream);

Asynchronously copy vector from device to host

mublasGetVectorAsync copies a vector from pinned host memory to device memory asynchronously. Memory on the host must be allocated with musaHostMalloc or the transfer will be synchronous.

Parameters:

  • n: [int] number of elements in the vector
  • elem_size: [int] number of bytes per element in the matrix
  • x: pointer to vector on the device
  • incx: [int] specifies the increment for the elements of the vector
  • y: pointer to vector on the host
  • incy: [int] specifies the increment for the elements of the vector
  • stream: specifies the stream into which this transfer request is queued

Return type: mublasStatus

mublasSetMatrixAsync

mublasStatus mublasSetMatrixAsync( int rows, int cols, int elem_size, const void* a, int lda, void* b, int ldb, MUstream stream);

Asynchronously copy matrix from host to device

mublasSetMatrixAsync copies a matrix from pinned host memory to device memory asynchronously. Memory on the host must be allocated with musaHostMalloc or the transfer will be synchronous.

Parameters:

  • rows: [int] number of rows in matrices
  • cols: [int] number of columns in matrices
  • elem_size: [int] number of bytes per element in the matrix
  • a: pointer to matrix on the host
  • lda: [int] specifies the leading dimension of A, lda >= rows
  • b: pointer to matrix on the GPU
  • ldb: [int] specifies the leading dimension of B, ldb >= rows
  • stream: specifies the stream into which this transfer request is queued

Return type: mublasStatus

mublasGetMatrixAsync

mublasStatus mublasGetMatrixAsync( int rows, int cols, int elem_size, const void* a, int lda, void* b, int ldb, MUstream stream);

Asynchronously copy matrix from device to host

mublasGetMatrixAsync copies a matrix from device memory to pinned host memory asynchronously. Memory on the host must be allocated with musaHostMalloc or the transfer will be synchronous.

Parameters:

  • rows: [int] number of rows in matrices
  • cols: [int] number of columns in matrices
  • elem_size: [int] number of bytes per element in the matrix
  • a: pointer to matrix on the GPU
  • lda: [int] specifies the leading dimension of A, lda >= rows
  • b: pointer to matrix on the host
  • ldb: [int] specifies the leading dimension of B, ldb >= rows
  • stream: specifies the stream into which this transfer request is queued

Return type: mublasStatus

mublasSetAtomicsMode

mublasStatus mublasSetAtomicsMode(mublasHandle_t handle, mublasAtomicsMode_t atomics_mode);

Set mublasAtomicsMode_t

Parameters:

  • handle
  • atomics_mode

Return type: mublasStatus

mublasGetAtomicsMode

mublasStatus mublasGetAtomicsMode(mublasHandle_t handle, mublasAtomicsMode_t* atomics_mode);

Get mublasAtomicsMode_t

Parameters:

  • handle
  • atomics_mode

Return type: mublasStatus

mublasSetMathMode

mublasStatus mublasSetMathMode(mublasHandle_t handle, mublasMath_t math_mode);

Set mublasMath_t

Parameters:

  • handle
  • math_mode

Return type: mublasStatus

mublasGetMathMode

mublasStatus mublasGetMathMode(mublasHandle_t handle, mublasMath_t* math_mode);

Get mublasMath_t

Parameters:

  • handle
  • math_mode

Return type: mublasStatus

mublasSetSmCountTarget

mublasStatus mublasSetSmCountTarget(mublasHandle_t handle, int smCountTarget);

Override the number of multiprocessors available to the library during kernels execution

Parameters:

  • handle
  • smCountTarget

Return type: mublasStatus

mublasGetSmCountTarget

mublasStatus mublasGetSmCountTarget(mublasHandle_t handle, int* smCountTarget);

Get the number of available multiprocessors previously programmed to the library handle

Parameters:

  • handle
  • smCountTarget

Return type: mublasStatus

mublasSetEmulationStrategy

mublasStatus mublasSetEmulationStrategy(mublasHandle_t handle, mublasEmulationStrategy_t emulationStrategy);

The mublasSetEmulationStrategy() function enables you to select how the library should make use of floating point emulation. For more details, please see mublasEmulationStrategy_t.

Parameters:

  • handle
  • emulationStrategy

Return type: mublasStatus

mublasGetEmulationStrategy

mublasStatus mublasGetEmulationStrategy(mublasHandle_t handle, mublasEmulationStrategy_t* emulationStrategy);

This function obtains the value previously programmed to the library handle.

Parameters:

  • handle
  • emulationStrategy

Return type: mublasStatus

mublasGetEmulationSpecialValuesSupport

mublasStatus mublasGetEmulationSpecialValuesSupport( mublasHandle_t handle, musaEmulationSpecialValuesSupport* mask);

This function obtains the value previously programmed to the library handle.

Parameters:

  • handle
  • mask

Return type: mublasStatus

mublasSetEmulationSpecialValuesSupport

mublasStatus mublasSetEmulationSpecialValuesSupport( mublasHandle_t handle, musaEmulationSpecialValuesSupport mask);

This function sets the value previously programmed to the library handle.

Parameters:

  • handle
  • mask

Return type: mublasStatus

mublasGetFixedPointEmulationMantissaBitCountPointer

mublasStatus mublasGetFixedPointEmulationMantissaBitCountPointer( mublasHandle_t handle, int** mantissaBitCount);

This function obtains the value previously programmed to the library handle.

Parameters:

  • handle
  • mantissaBitCount

Return type: mublasStatus

mublasSetFixedPointEmulationMantissaBitCountPointer

mublasStatus mublasSetFixedPointEmulationMantissaBitCountPointer( mublasHandle_t handle, int* mantissaBitCount);

This function sets the value previously programmed to the library handle.

Parameters:

  • handle
  • mantissaBitCount

Return type: mublasStatus

mublasGetFixedPointEmulationMantissaControl

mublasStatus mublasGetFixedPointEmulationMantissaControl( mublasHandle_t handle, musaEmulationMantissaControl* mantissaControl);

This function obtains the value previously programmed to the library handle.

Parameters:

  • handle
  • mantissaControl

Return type: mublasStatus

mublasSetFixedPointEmulationMantissaControl

mublasStatus mublasSetFixedPointEmulationMantissaControl( mublasHandle_t handle, musaEmulationMantissaControl mantissaControl);

This function sets the value previously programmed to the library handle.

Parameters:

  • handle
  • mantissaControl

Return type: mublasStatus

mublasSetFixedPointEmulationMaxMantissaBitCount

mublasStatus mublasSetFixedPointEmulationMaxMantissaBitCount(mublasHandle_t handle, int maxMantissaBitCount);

This function sets the value previously programmed to the library handle.

Parameters:

  • handle
  • maxMantissaBitCount

Return type: mublasStatus

mublasGetFixedPointEmulationMaxMantissaBitCount

mublasStatus mublasGetFixedPointEmulationMaxMantissaBitCount( mublasHandle_t handle, int* maxMantissaBitCount);

This function obtains the value previously programmed to the library handle.

Parameters:

  • handle
  • maxMantissaBitCount

Return type: mublasStatus

mublasSetFixedPointEmulationMantissaBitOffset

mublasStatus mublasSetFixedPointEmulationMantissaBitOffset(mublasHandle_t handle, int mantissaBitOffset);

This function sets the value previously programmed to the library handle.

Parameters:

  • handle
  • mantissaBitOffset

Return type: mublasStatus

mublasGetFixedPointEmulationMantissaBitOffset

mublasStatus mublasGetFixedPointEmulationMantissaBitOffset(mublasHandle_t handle, int* mantissaBitOffset);

This function obtains the value previously programmed to the library handle.

Parameters:

  • handle
  • mantissaBitOffset

Return type: mublasStatus

mublasLoggerConfigure

mublasStatus mublasLoggerConfigure(int logIsOn, int logToStdOut, int logToStdErr, const char* logFileName);

Configures logging during runtime

Parameters:

  • logIsOn
  • logToStdOut
  • logToStdErr
  • logFileName

Return type: mublasStatus

mublasGetLoggerCallback

mublasStatus mublasGetLoggerCallback(mublasLogCallback* userCallback);

This function retrieves function pointer to previously installed

custom user defined callback function via mublasSetLoggerCallback() or zero otherwise.

Parameters:

  • userCallback: Pointer to user defined callback function.

Return type: mublasStatus

mublasSetLoggerCallback

mublasStatus mublasSetLoggerCallback(mublasLogCallback userCallback);

This function installs a custom user-defined callback function

via muBLAS C public API.

Parameters:

  • userCallback: Pointer to user defined callback function.

Return type: mublasStatus

mublasSscal

mublasStatus mublasSscal(mublasHandle_t handle, int n, const float* alpha, float* x, int incx);

BLAS Level 1 API

scal scales each element of vector x with scalar alpha. x := alpha * x

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • n: [int] the number of elements in x.
  • alpha: device pointer or host pointer for the scalar alpha.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.

Return type: mublasStatus

mublasDscal

mublasStatus mublasDscal(mublasHandle_t handle, int n, const double* alpha, double* x, int incx);

BLAS Level 1 API

scal scales each element of vector x with scalar alpha. x := alpha * x

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • n: [int] the number of elements in x.
  • alpha: device pointer or host pointer for the scalar alpha.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.

Return type: mublasStatus

mublasCscal

mublasStatus mublasCscal(mublasHandle_t handle, int n, const muComplex* alpha, muComplex* x, int incx);

BLAS Level 1 API

scal scales each element of vector x with scalar alpha. x := alpha * x

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • n: [int] the number of elements in x.
  • alpha: device pointer or host pointer for the scalar alpha.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.

Return type: mublasStatus

mublasCsscal

mublasStatus mublasCsscal(mublasHandle_t handle, int n, const float* alpha, muComplex* x, int incx);

BLAS Level 1 API

scal scales each element of vector x with scalar alpha. x := alpha * x

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • n: [int] the number of elements in x.
  • alpha: device pointer or host pointer for the scalar alpha.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.

Return type: mublasStatus

mublasZscal

mublasStatus mublasZscal( mublasHandle_t handle, int n, const muDoubleComplex* alpha, muDoubleComplex* x, int incx);

BLAS Level 1 API

scal scales each element of vector x with scalar alpha. x := alpha * x

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • n: [int] the number of elements in x.
  • alpha: device pointer or host pointer for the scalar alpha.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.

Return type: mublasStatus

mublasZdscal

mublasStatus mublasZdscal(mublasHandle_t handle, int n, const double* alpha, muDoubleComplex* x, int incx);

BLAS Level 1 API

scal scales each element of vector x with scalar alpha. x := alpha * x

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • n: [int] the number of elements in x.
  • alpha: device pointer or host pointer for the scalar alpha.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.

Return type: mublasStatus

mublasScopy

MUBLAS_EXPORT mublasStatus mublasScopy(mublasHandle_t handle, int n, const float *x, int incx, float *y, int incy)

BLAS Level 1 API.

copy copies each element x[i] into y[i], for i = 1 , ... , n

y := x,

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • n: [int] the number of elements in x to be copied to y.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.
  • y: device pointer storing vector y.
  • incy: [int] specifies the increment for the elements of y.

Parameters:

  • mublasHandle_t handle
  • int n
  • const float * x
  • int incx
  • float * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasDcopy

MUBLAS_EXPORT mublasStatus mublasDcopy(mublasHandle_t handle, int n, const double *x, int incx, double *y, int incy)

Parameters:

  • mublasHandle_t handle
  • int n
  • const double * x
  • int incx
  • double * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasCcopy

MUBLAS_EXPORT mublasStatus mublasCcopy(mublasHandle_t handle, int n, const muComplex *x, int incx, muComplex *y, int incy)

Parameters:

  • mublasHandle_t handle
  • int n
  • const muComplex * x
  • int incx
  • muComplex * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasZcopy

MUBLAS_EXPORT mublasStatus mublasZcopy(mublasHandle_t handle, int n, const muDoubleComplex *x, int incx, muDoubleComplex *y, int incy)

Parameters:

  • mublasHandle_t handle
  • int n
  • const muDoubleComplex * x
  • int incx
  • muDoubleComplex * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasSdot

MUBLAS_EXPORT mublasStatus mublasSdot(mublasHandle_t handle, int n, const float *x, int incx, const float *y, int incy, float *result)

BLAS Level 1 API.

dot(u) performs the dot product of vectors x and y

result = x * y;

dotc performs the dot product of the conjugate of complex vector x and complex vector y

result = conjugate (x) * y;

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • n: [int] the number of elements in x and y.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of y.
  • y: device pointer storing vector y.
  • incy: [int] specifies the increment for the elements of y.
  • result: device pointer or host pointer to store the dot product. return is 0.0 if n <= 0.

Parameters:

  • mublasHandle_t handle
  • int n
  • const float * x
  • int incx
  • const float * y
  • int incy
  • float * result

Return type: MUBLAS_EXPORT mublasStatus

mublasDdot

MUBLAS_EXPORT mublasStatus mublasDdot(mublasHandle_t handle, int n, const double *x, int incx, const double *y, int incy, double *result)

Parameters:

  • mublasHandle_t handle
  • int n
  • const double * x
  • int incx
  • const double * y
  • int incy
  • double * result

Return type: MUBLAS_EXPORT mublasStatus

mublasCdotu

MUBLAS_EXPORT mublasStatus mublasCdotu(mublasHandle_t handle, int n, const muComplex *x, int incx, const muComplex *y, int incy, muComplex *result)

Parameters:

  • mublasHandle_t handle
  • int n
  • const muComplex * x
  • int incx
  • const muComplex * y
  • int incy
  • muComplex * result

Return type: MUBLAS_EXPORT mublasStatus

mublasZdotu

MUBLAS_EXPORT mublasStatus mublasZdotu(mublasHandle_t handle, int n, const muDoubleComplex *x, int incx, const muDoubleComplex *y, int incy, muDoubleComplex *result)

Parameters:

  • mublasHandle_t handle
  • int n
  • const muDoubleComplex * x
  • int incx
  • const muDoubleComplex * y
  • int incy
  • muDoubleComplex * result

Return type: MUBLAS_EXPORT mublasStatus

mublasCdotc

MUBLAS_EXPORT mublasStatus mublasCdotc(mublasHandle_t handle, int n, const muComplex *x, int incx, const muComplex *y, int incy, muComplex *result)

Parameters:

  • mublasHandle_t handle
  • int n
  • const muComplex * x
  • int incx
  • const muComplex * y
  • int incy
  • muComplex * result

Return type: MUBLAS_EXPORT mublasStatus

mublasZdotc

MUBLAS_EXPORT mublasStatus mublasZdotc(mublasHandle_t handle, int n, const muDoubleComplex *x, int incx, const muDoubleComplex *y, int incy, muDoubleComplex *result)

Parameters:

  • mublasHandle_t handle
  • int n
  • const muDoubleComplex * x
  • int incx
  • const muDoubleComplex * y
  • int incy
  • muDoubleComplex * result

Return type: MUBLAS_EXPORT mublasStatus

mublasSswap

MUBLAS_EXPORT mublasStatus mublasSswap(mublasHandle_t handle, int n, float *x, int incx, float *y, int incy)

BLAS Level 1 API.

swap interchanges vectors x and y.

y := x; x := y

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • n: [int] the number of elements in x and y.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.
  • y: device pointer storing vector y.
  • incy: [int] specifies the increment for the elements of y.

Parameters:

  • mublasHandle_t handle
  • int n
  • float * x
  • int incx
  • float * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasDswap

MUBLAS_EXPORT mublasStatus mublasDswap(mublasHandle_t handle, int n, double *x, int incx, double *y, int incy)

Parameters:

  • mublasHandle_t handle
  • int n
  • double * x
  • int incx
  • double * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasCswap

MUBLAS_EXPORT mublasStatus mublasCswap(mublasHandle_t handle, int n, muComplex *x, int incx, muComplex *y, int incy)

Parameters:

  • mublasHandle_t handle
  • int n
  • muComplex * x
  • int incx
  • muComplex * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasZswap

MUBLAS_EXPORT mublasStatus mublasZswap(mublasHandle_t handle, int n, muDoubleComplex *x, int incx, muDoubleComplex *y, int incy)

Parameters:

  • mublasHandle_t handle
  • int n
  • muDoubleComplex * x
  • int incx
  • muDoubleComplex * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasSaxpy

MUBLAS_EXPORT mublasStatus mublasSaxpy(mublasHandle_t handle, int n, const float *alpha, const float *x, int incx, float *y, int incy)

BLAS Level 1 API.

axpy computes constant alpha multiplied by vector x, plus vector y

y := alpha * x + y

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • n: [int] the number of elements in x and y.
  • alpha: device pointer or host pointer to specify the scalar alpha.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.
  • y: device pointer storing vector y.
  • incy: [int] specifies the increment for the elements of y.

Parameters:

  • mublasHandle_t handle
  • int n
  • const float * alpha
  • const float * x
  • int incx
  • float * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasDaxpy

MUBLAS_EXPORT mublasStatus mublasDaxpy(mublasHandle_t handle, int n, const double *alpha, const double *x, int incx, double *y, int incy)

Parameters:

  • mublasHandle_t handle
  • int n
  • const double * alpha
  • const double * x
  • int incx
  • double * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasCaxpy

MUBLAS_EXPORT mublasStatus mublasCaxpy(mublasHandle_t handle, int n, const muComplex *alpha, const muComplex *x, int incx, muComplex *y, int incy)

Parameters:

  • mublasHandle_t handle
  • int n
  • const muComplex * alpha
  • const muComplex * x
  • int incx
  • muComplex * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasZaxpy

MUBLAS_EXPORT mublasStatus mublasZaxpy(mublasHandle_t handle, int n, const muDoubleComplex *alpha, const muDoubleComplex *x, int incx, muDoubleComplex *y, int incy)

Parameters:

  • mublasHandle_t handle
  • int n
  • const muDoubleComplex * alpha
  • const muDoubleComplex * x
  • int incx
  • muDoubleComplex * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasSasum

MUBLAS_EXPORT mublasStatus mublasSasum(mublasHandle_t handle, int n, const float *x, int incx, float *result)

BLAS Level 1 API.

asum computes the sum of the magnitudes of elements of a real vector x, or the sum of magnitudes of the real and imaginary parts of elements if x is a complex vector

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • n: [int] the number of elements in x and y.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x. incx must be > 0.
  • result: device pointer or host pointer to store the asum product. return is 0.0 if n <= 0.

Parameters:

  • mublasHandle_t handle
  • int n
  • const float * x
  • int incx
  • float * result

Return type: MUBLAS_EXPORT mublasStatus

mublasDasum

MUBLAS_EXPORT mublasStatus mublasDasum(mublasHandle_t handle, int n, const double *x, int incx, double *result)

Parameters:

  • mublasHandle_t handle
  • int n
  • const double * x
  • int incx
  • double * result

Return type: MUBLAS_EXPORT mublasStatus

mublasScasum

MUBLAS_EXPORT mublasStatus mublasScasum(mublasHandle_t handle, int n, const muComplex *x, int incx, float *result)

Parameters:

  • mublasHandle_t handle
  • int n
  • const muComplex * x
  • int incx
  • float * result

Return type: MUBLAS_EXPORT mublasStatus

mublasDzasum

MUBLAS_EXPORT mublasStatus mublasDzasum(mublasHandle_t handle, int n, const muDoubleComplex *x, int incx, double *result)

Parameters:

  • mublasHandle_t handle
  • int n
  • const muDoubleComplex * x
  • int incx
  • double * result

Return type: MUBLAS_EXPORT mublasStatus

mublasSnrm2

MUBLAS_EXPORT mublasStatus mublasSnrm2(mublasHandle_t handle, int n, const float *x, int incx, float *result)

BLAS Level 1 API.

nrm2 computes the euclidean norm of a real or complex vector

result := sqrt( x'*x ) for real vectors
result := sqrt( x**H*x ) for complex vectors

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • n: [int] the number of elements in x.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of y.
  • result: device pointer or host pointer to store the nrm2 product. return is 0.0 if n, incx<=0.

Parameters:

  • mublasHandle_t handle
  • int n
  • const float * x
  • int incx
  • float * result

Return type: MUBLAS_EXPORT mublasStatus

mublasDnrm2

MUBLAS_EXPORT mublasStatus mublasDnrm2(mublasHandle_t handle, int n, const double *x, int incx, double *result)

Parameters:

  • mublasHandle_t handle
  • int n
  • const double * x
  • int incx
  • double * result

Return type: MUBLAS_EXPORT mublasStatus

mublasScnrm2

MUBLAS_EXPORT mublasStatus mublasScnrm2(mublasHandle_t handle, int n, const muComplex *x, int incx, float *result)

Parameters:

  • mublasHandle_t handle
  • int n
  • const muComplex * x
  • int incx
  • float * result

Return type: MUBLAS_EXPORT mublasStatus

mublasDznrm2

MUBLAS_EXPORT mublasStatus mublasDznrm2(mublasHandle_t handle, int n, const muDoubleComplex *x, int incx, double *result)

Parameters:

  • mublasHandle_t handle
  • int n
  • const muDoubleComplex * x
  • int incx
  • double * result

Return type: MUBLAS_EXPORT mublasStatus

mublasIsamax

MUBLAS_EXPORT mublasStatus mublasIsamax(mublasHandle_t handle, int n, const float *x, int incx, int *result)

BLAS Level 1 API.

amax finds the first index of the element of maximum magnitude of a vector x. vector

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • n: [int] the number of elements in x.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of y.
  • result: device pointer or host pointer to store the amax index. return is 0.0 if n, incx<=0.

Parameters:

  • mublasHandle_t handle
  • int n
  • const float * x
  • int incx
  • int * result

Return type: MUBLAS_EXPORT mublasStatus

mublasIdamax

MUBLAS_EXPORT mublasStatus mublasIdamax(mublasHandle_t handle, int n, const double *x, int incx, int *result)

Parameters:

  • mublasHandle_t handle
  • int n
  • const double * x
  • int incx
  • int * result

Return type: MUBLAS_EXPORT mublasStatus

mublasIcamax

MUBLAS_EXPORT mublasStatus mublasIcamax(mublasHandle_t handle, int n, const muComplex *x, int incx, int *result)

Parameters:

  • mublasHandle_t handle
  • int n
  • const muComplex * x
  • int incx
  • int * result

Return type: MUBLAS_EXPORT mublasStatus

mublasIzamax

MUBLAS_EXPORT mublasStatus mublasIzamax(mublasHandle_t handle, int n, const muDoubleComplex *x, int incx, int *result)

Parameters:

  • mublasHandle_t handle
  • int n
  • const muDoubleComplex * x
  • int incx
  • int * result

Return type: MUBLAS_EXPORT mublasStatus

mublasIsamin

MUBLAS_EXPORT mublasStatus mublasIsamin(mublasHandle_t handle, int n, const float *x, int incx, int *result)

BLAS Level 1 API.

amin finds the first index of the element of minimum magnitude of a vector x.

vector

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • n: [int] the number of elements in x.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of y.
  • result: device pointer or host pointer to store the amin index. return is 0.0 if n, incx<=0.

Parameters:

  • mublasHandle_t handle
  • int n
  • const float * x
  • int incx
  • int * result

Return type: MUBLAS_EXPORT mublasStatus

mublasIdamin

MUBLAS_EXPORT mublasStatus mublasIdamin(mublasHandle_t handle, int n, const double *x, int incx, int *result)

Parameters:

  • mublasHandle_t handle
  • int n
  • const double * x
  • int incx
  • int * result

Return type: MUBLAS_EXPORT mublasStatus

mublasIcamin

MUBLAS_EXPORT mublasStatus mublasIcamin(mublasHandle_t handle, int n, const muComplex *x, int incx, int *result)

Parameters:

  • mublasHandle_t handle
  • int n
  • const muComplex * x
  • int incx
  • int * result

Return type: MUBLAS_EXPORT mublasStatus

mublasIzamin

MUBLAS_EXPORT mublasStatus mublasIzamin(mublasHandle_t handle, int n, const muDoubleComplex *x, int incx, int *result)

Parameters:

  • mublasHandle_t handle
  • int n
  • const muDoubleComplex * x
  • int incx
  • int * result

Return type: MUBLAS_EXPORT mublasStatus

mublasSrot

MUBLAS_EXPORT mublasStatus mublasSrot(mublasHandle_t handle, int n, float *x, int incx, float *y, int incy, const float *c, const float *s)

BLAS Level 1 API.

rot applies the Givens rotation matrix defined by c=cos(alpha) and s=sin(alpha) to vectors x and y. Scalars c and s may be stored in either host or device memory, location is specified by calling mublasSetPointerMode.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • n: [int] number of elements in the x and y vectors.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment between elements of x.
  • y: device pointer storing vector y.
  • incy: [int] specifies the increment between elements of y.
  • c: device pointer or host pointer storing scalar cosine component of the rotation matrix.
  • s: device pointer or host pointer storing scalar sine component of the rotation matrix.

Parameters:

  • mublasHandle_t handle
  • int n
  • float * x
  • int incx
  • float * y
  • int incy
  • const float * c
  • const float * s

Return type: MUBLAS_EXPORT mublasStatus

mublasDrot

MUBLAS_EXPORT mublasStatus mublasDrot(mublasHandle_t handle, int n, double *x, int incx, double *y, int incy, const double *c, const double *s)

Parameters:

  • mublasHandle_t handle
  • int n
  • double * x
  • int incx
  • double * y
  • int incy
  • const double * c
  • const double * s

Return type: MUBLAS_EXPORT mublasStatus

mublasCrot

MUBLAS_EXPORT mublasStatus mublasCrot(mublasHandle_t handle, int n, muComplex *x, int incx, muComplex *y, int incy, const float *c, const muComplex *s)

Parameters:

  • mublasHandle_t handle
  • int n
  • muComplex * x
  • int incx
  • muComplex * y
  • int incy
  • const float * c
  • const muComplex * s

Return type: MUBLAS_EXPORT mublasStatus

mublasCsrot

MUBLAS_EXPORT mublasStatus mublasCsrot(mublasHandle_t handle, int n, muComplex *x, int incx, muComplex *y, int incy, const float *c, const float *s)

Parameters:

  • mublasHandle_t handle
  • int n
  • muComplex * x
  • int incx
  • muComplex * y
  • int incy
  • const float * c
  • const float * s

Return type: MUBLAS_EXPORT mublasStatus

mublasZrot

MUBLAS_EXPORT mublasStatus mublasZrot(mublasHandle_t handle, int n, muDoubleComplex *x, int incx, muDoubleComplex *y, int incy, const double *c, const muDoubleComplex *s)

Parameters:

  • mublasHandle_t handle
  • int n
  • muDoubleComplex * x
  • int incx
  • muDoubleComplex * y
  • int incy
  • const double * c
  • const muDoubleComplex * s

Return type: MUBLAS_EXPORT mublasStatus

mublasZdrot

MUBLAS_EXPORT mublasStatus mublasZdrot(mublasHandle_t handle, int n, muDoubleComplex *x, int incx, muDoubleComplex *y, int incy, const double *c, const double *s)

Parameters:

  • mublasHandle_t handle
  • int n
  • muDoubleComplex * x
  • int incx
  • muDoubleComplex * y
  • int incy
  • const double * c
  • const double * s

Return type: MUBLAS_EXPORT mublasStatus

mublasSrotg

MUBLAS_EXPORT mublasStatus mublasSrotg(mublasHandle_t handle, float *a, float *b, float *c, float *s)

BLAS Level 1 API.

rotg creates the Givens rotation matrix for the vector (a b). Scalars c and s and arrays a and b may be stored in either host or device memory, location is specified by calling mublasSetPointerMode. If the pointer mode is set to MUBLAS_POINTER_MODE_HOST, this function blocks the CPU until the GPU has finished and the results are available in host memory. If the pointer mode is set to MUBLAS_POINTER_MODE_DEVICE, this function returns immediately and synchronization is required to read the results.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • a: device pointer or host pointer to input vector element, overwritten with r.
  • b: device pointer or host pointer to input vector element, overwritten with z.
  • c: device pointer or host pointer to cosine element of Givens rotation.
  • s: device pointer or host pointer sine element of Givens rotation.

Parameters:

  • mublasHandle_t handle
  • float * a
  • float * b
  • float * c
  • float * s

Return type: MUBLAS_EXPORT mublasStatus

mublasDrotg

MUBLAS_EXPORT mublasStatus mublasDrotg(mublasHandle_t handle, double *a, double *b, double *c, double *s)

Parameters:

  • mublasHandle_t handle
  • double * a
  • double * b
  • double * c
  • double * s

Return type: MUBLAS_EXPORT mublasStatus

mublasCrotg

MUBLAS_EXPORT mublasStatus mublasCrotg(mublasHandle_t handle, muComplex *a, muComplex *b, float *c, muComplex *s)

Parameters:

  • mublasHandle_t handle
  • muComplex * a
  • muComplex * b
  • float * c
  • muComplex * s

Return type: MUBLAS_EXPORT mublasStatus

mublasZrotg

MUBLAS_EXPORT mublasStatus mublasZrotg(mublasHandle_t handle, muDoubleComplex *a, muDoubleComplex *b, double *c, muDoubleComplex *s)

Parameters:

  • mublasHandle_t handle
  • muDoubleComplex * a
  • muDoubleComplex * b
  • double * c
  • muDoubleComplex * s

Return type: MUBLAS_EXPORT mublasStatus

mublasSrotm

MUBLAS_EXPORT mublasStatus mublasSrotm(mublasHandle_t handle, int n, float *x, int incx, float *y, int incy, const float *param)

BLAS Level 1 API.

rotm applies the modified Givens rotation matrix defined by param to vectors x and y.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • n: [int] number of elements in the x and y vectors.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment between elements of x.
  • y: device pointer storing vector y.
  • incy: [int] specifies the increment between elements of y.
  • param: device vector or host vector of 5 elements defining the rotation. param[0] = flag param[1] = H11 param[2] = H21 param[3] = H12 param[4] = H22 The flag parameter defines the form of H: flag = -1 => H = ( H11 H12 H21 H22 ) flag = 0 => H = ( 1.0 H12 H21 1.0 ) flag = 1 => H = ( H11 1.0 -1.0 H22 ) flag = -2 => H = ( 1.0 0.0 0.0 1.0 ) param may be stored in either host or device memory, location is specified by calling mublasSetPointerMode.

Parameters:

  • mublasHandle_t handle
  • int n
  • float * x
  • int incx
  • float * y
  • int incy
  • const float * param

Return type: MUBLAS_EXPORT mublasStatus

mublasDrotm

MUBLAS_EXPORT mublasStatus mublasDrotm(mublasHandle_t handle, int n, double *x, int incx, double *y, int incy, const double *param)

Parameters:

  • mublasHandle_t handle
  • int n
  • double * x
  • int incx
  • double * y
  • int incy
  • const double * param

Return type: MUBLAS_EXPORT mublasStatus

mublasSrotmg

MUBLAS_EXPORT mublasStatus mublasSrotmg(mublasHandle_t handle, float *d1, float *d2, float *x1, const float *y1, float *param)

BLAS Level 1 API.

rotmg creates the modified Givens rotation matrix for the vector (d1 * x1, d2 * y1). Parameters may be stored in either host or device memory, location is specified by calling mublasSetPointerMode. If the pointer mode is set to MUBLAS_POINTER_MODE_HOST, this function blocks the CPU until the GPU has finished and the results are available in host memory. If the pointer mode is set to MUBLAS_POINTER_MODE_DEVICE, this function returns immediately and synchronization is required to read the results.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • d1: device pointer or host pointer to input scalar that is overwritten.
  • d2: device pointer or host pointer to input scalar that is overwritten.
  • x1: device pointer or host pointer to input scalar that is overwritten.
  • y1: device pointer or host pointer to input scalar.
  • param: device vector or host vector of 5 elements defining the rotation. param[0] = flag param[1] = H11 param[2] = H21 param[3] = H12 param[4] = H22 The flag parameter defines the form of H: flag = -1 => H = ( H11 H12 H21 H22 ) flag = 0 => H = ( 1.0 H12 H21 1.0 ) flag = 1 => H = ( H11 1.0 -1.0 H22 ) flag = -2 => H = ( 1.0 0.0 0.0 1.0 ) param may be stored in either host or device memory, location is specified by calling mublasSetPointerMode.

Parameters:

  • mublasHandle_t handle
  • float * d1
  • float * d2
  • float * x1
  • const float * y1
  • float * param

Return type: MUBLAS_EXPORT mublasStatus

mublasDrotmg

MUBLAS_EXPORT mublasStatus mublasDrotmg(mublasHandle_t handle, double *d1, double *d2, double *x1, const double *y1, double *param)

Parameters:

  • mublasHandle_t handle
  • double * d1
  • double * d2
  • double * x1
  • const double * y1
  • double * param

Return type: MUBLAS_EXPORT mublasStatus

mublasSgbmv

MUBLAS_EXPORT mublasStatus mublasSgbmv(mublasHandle_t handle, mublasOperation_t trans, int m, int n, int kl, int ku, const float *alpha, const float *A, int lda, const float *x, int incx, const float *beta, float *y, int incy)

BLAS Level 2 API.

gbmv performs one of the matrix-vector operations

y := alpha*A*x + beta*y, or
y := alpha*A**T*x + beta*y, or
y := alpha*A**H*x + beta*y,

where alpha and beta are scalars, x and y are vectors and A is an m by n banded matrix with kl sub-diagonals and ku super-diagonals.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • trans: [mublasOperation_t] indicates whether matrix A is tranposed (conjugated) or not
  • m: [int] number of rows of matrix A
  • n: [int] number of columns of matrix A
  • kl: [int] number of sub-diagonals of A
  • ku: [int] number of super-diagonals of A
  • alpha: device pointer or host pointer to scalar alpha.
  • A: device pointer storing banded matrix A. Leading (kl + ku + 1) by n part of the matrix contains the coefficients of the banded matrix. The leading diagonal resides in row (ku + 1) with the first super-diagonal above on the RHS of row ku. The first sub-diagonal resides below on the LHS of row ku + 2. This propogates up and down across sub/super-diagonals. Ex: (m = n = 7; ku = 2, kl = 2) 1 2 3 0 0 0 0 0 0 3 3 3 3 3 4 1 2 3 0 0 0 0 2 2 2 2 2 2 5 4 1 2 3 0 0 ----> 1 1 1 1 1 1 1 0 5 4 1 2 3 0 4 4 4 4 4 4 0 0 0 5 4 1 2 0 5 5 5 5 5 0 0 0 0 0 5 4 1 2 0 0 0 0 0 0 0 0 0 0 0 5 4 1 0 0 0 0 0 0 0 Note that the empty elements which don't correspond to data will not be referenced.
  • lda: [int] specifies the leading dimension of A. Must be >= (kl + ku + 1)
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.
  • beta: device pointer or host pointer to scalar beta.
  • y: device pointer storing vector y.
  • incy: [int] specifies the increment for the elements of y.

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t trans
  • int m
  • int n
  • int kl
  • int ku
  • const float * alpha
  • const float * A
  • int lda
  • const float * x
  • int incx
  • const float * beta
  • float * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasDgbmv

MUBLAS_EXPORT mublasStatus mublasDgbmv(mublasHandle_t handle, mublasOperation_t trans, int m, int n, int kl, int ku, const double *alpha, const double *A, int lda, const double *x, int incx, const double *beta, double *y, int incy)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t trans
  • int m
  • int n
  • int kl
  • int ku
  • const double * alpha
  • const double * A
  • int lda
  • const double * x
  • int incx
  • const double * beta
  • double * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasCgbmv

MUBLAS_EXPORT mublasStatus mublasCgbmv(mublasHandle_t handle, mublasOperation_t trans, int m, int n, int kl, int ku, const muComplex *alpha, const muComplex *A, int lda, const muComplex *x, int incx, const muComplex *beta, muComplex *y, int incy)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t trans
  • int m
  • int n
  • int kl
  • int ku
  • const muComplex * alpha
  • const muComplex * A
  • int lda
  • const muComplex * x
  • int incx
  • const muComplex * beta
  • muComplex * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasZgbmv

MUBLAS_EXPORT mublasStatus mublasZgbmv(mublasHandle_t handle, mublasOperation_t trans, int m, int n, int kl, int ku, const muDoubleComplex *alpha, const muDoubleComplex *A, int lda, const muDoubleComplex *x, int incx, const muDoubleComplex *beta, muDoubleComplex *y, int incy)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t trans
  • int m
  • int n
  • int kl
  • int ku
  • const muDoubleComplex * alpha
  • const muDoubleComplex * A
  • int lda
  • const muDoubleComplex * x
  • int incx
  • const muDoubleComplex * beta
  • muDoubleComplex * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasSgemv

MUBLAS_EXPORT mublasStatus mublasSgemv(mublasHandle_t handle, mublasOperation_t trans, int m, int n, const float *alpha, const float *A, int lda, const float *x, int incx, const float *beta, float *y, int incy)

BLAS Level 2 API.

gemv performs one of the matrix-vector operations

y := alpha*A*x + beta*y, or
y := alpha*A**T*x + beta*y, or
y := alpha*A**H*x + beta*y,

where alpha and beta are scalars, x and y are vectors and A is an m by n matrix.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • trans: [mublasOperation_t] indicates whether matrix A is tranposed (conjugated) or not
  • m: [int] number of rows of matrix A
  • n: [int] number of columns of matrix A
  • alpha: device pointer or host pointer to scalar alpha.
  • A: device pointer storing matrix A.
  • lda: [int] specifies the leading dimension of A.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.
  • beta: device pointer or host pointer to scalar beta.
  • y: device pointer storing vector y.
  • incy: [int] specifies the increment for the elements of y.

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t trans
  • int m
  • int n
  • const float * alpha
  • const float * A
  • int lda
  • const float * x
  • int incx
  • const float * beta
  • float * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasDgemv

MUBLAS_EXPORT mublasStatus mublasDgemv(mublasHandle_t handle, mublasOperation_t trans, int m, int n, const double *alpha, const double *A, int lda, const double *x, int incx, const double *beta, double *y, int incy)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t trans
  • int m
  • int n
  • const double * alpha
  • const double * A
  • int lda
  • const double * x
  • int incx
  • const double * beta
  • double * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasCgemv

MUBLAS_EXPORT mublasStatus mublasCgemv(mublasHandle_t handle, mublasOperation_t trans, int m, int n, const muComplex *alpha, const muComplex *A, int lda, const muComplex *x, int incx, const muComplex *beta, muComplex *y, int incy)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t trans
  • int m
  • int n
  • const muComplex * alpha
  • const muComplex * A
  • int lda
  • const muComplex * x
  • int incx
  • const muComplex * beta
  • muComplex * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasZgemv

MUBLAS_EXPORT mublasStatus mublasZgemv(mublasHandle_t handle, mublasOperation_t trans, int m, int n, const muDoubleComplex *alpha, const muDoubleComplex *A, int lda, const muDoubleComplex *x, int incx, const muDoubleComplex *beta, muDoubleComplex *y, int incy)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t trans
  • int m
  • int n
  • const muDoubleComplex * alpha
  • const muDoubleComplex * A
  • int lda
  • const muDoubleComplex * x
  • int incx
  • const muDoubleComplex * beta
  • muDoubleComplex * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasSgemvBatched

MUBLAS_EXPORT mublasStatus mublasSgemvBatched(mublasHandle_t handle, mublasOperation_t trans, int m, int n, const float *alpha, const float *const A[], int lda, const float *const x[], int incx, const float *beta, float *const y[], int incy, int batch_count)

BLAS Level 2 API.

gemv_batched performs a batch of matrix-vector operations

y_i := alpha*A_i*x_i + beta*y_i, or
y_i := alpha*A_i**T*x_i + beta*y_i, or
y_i := alpha*A_i**H*x_i + beta*y_i,

where (A_i, x_i, y_i) is the i-th instance of the batch. alpha and beta are scalars, x_i and y_i are vectors and A_i is an m by n matrix, for i = 1, ..., batch_count.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • trans: [mublasOperation_t] indicates whether matrices A_i are tranposed (conjugated) or not
  • m: [int] number of rows of each matrix A_i
  • n: [int] number of columns of each matrix A_i
  • alpha: device pointer or host pointer to scalar alpha.
  • A: device array of device pointers storing each matrix A_i.
  • lda: [int] specifies the leading dimension of each matrix A_i.
  • x: device array of device pointers storing each vector x_i.
  • incx: [int] specifies the increment for the elements of each vector x_i.
  • beta: device pointer or host pointer to scalar beta.
  • y: device array of device pointers storing each vector y_i.
  • incy: [int] specifies the increment for the elements of each vector y_i.
  • batch_count: [int] number of instances in the batch

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t trans
  • int m
  • int n
  • const float * alpha
  • const float *const A
  • int lda
  • const float *const x
  • int incx
  • const float * beta
  • float *const y
  • int incy
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasDgemvBatched

MUBLAS_EXPORT mublasStatus mublasDgemvBatched(mublasHandle_t handle, mublasOperation_t trans, int m, int n, const double *alpha, const double *const A[], int lda, const double *const x[], int incx, const double *beta, double *const y[], int incy, int batch_count)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t trans
  • int m
  • int n
  • const double * alpha
  • const double *const A
  • int lda
  • const double *const x
  • int incx
  • const double * beta
  • double *const y
  • int incy
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasCgemvBatched

MUBLAS_EXPORT mublasStatus mublasCgemvBatched(mublasHandle_t handle, mublasOperation_t trans, int m, int n, const muComplex *alpha, const muComplex *const A[], int lda, const muComplex *const x[], int incx, const muComplex *beta, muComplex *const y[], int incy, int batch_count)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t trans
  • int m
  • int n
  • const muComplex * alpha
  • const muComplex *const A
  • int lda
  • const muComplex *const x
  • int incx
  • const muComplex * beta
  • muComplex *const y
  • int incy
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasZgemvBatched

MUBLAS_EXPORT mublasStatus mublasZgemvBatched(mublasHandle_t handle, mublasOperation_t trans, int m, int n, const muDoubleComplex *alpha, const muDoubleComplex *const A[], int lda, const muDoubleComplex *const x[], int incx, const muDoubleComplex *beta, muDoubleComplex *const y[], int incy, int batch_count)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t trans
  • int m
  • int n
  • const muDoubleComplex * alpha
  • const muDoubleComplex *const A
  • int lda
  • const muDoubleComplex *const x
  • int incx
  • const muDoubleComplex * beta
  • muDoubleComplex *const y
  • int incy
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasHSHgemvBatched

MUBLAS_EXPORT mublasStatus mublasHSHgemvBatched(mublasHandle_t handle, mublasOperation_t transA, int m, int n, const float *alpha, const __half *const A[], int lda, const __half *const x[], int incx, const float *beta, __half *const y[], int incy, int batch_count)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • int m
  • int n
  • const float * alpha
  • const __half *const A
  • int lda
  • const __half *const x
  • int incx
  • const float * beta
  • __half *const y
  • int incy
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasHSSgemvBatched

MUBLAS_EXPORT mublasStatus mublasHSSgemvBatched(mublasHandle_t handle, mublasOperation_t transA, int m, int n, const float *alpha, const __half *const A[], int lda, const __half *const x[], int incx, const float *beta, float *const y[], int incy, int batch_count)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • int m
  • int n
  • const float * alpha
  • const __half *const A
  • int lda
  • const __half *const x
  • int incx
  • const float * beta
  • float *const y
  • int incy
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasTSTgemvBatched

MUBLAS_EXPORT mublasStatus mublasTSTgemvBatched(mublasHandle_t handle, mublasOperation_t transA, int m, int n, const float *alpha, const __mt_bfloat16 *const A[], int lda, const __mt_bfloat16 *const x[], int incx, const float *beta, __mt_bfloat16 *const y[], int incy, int batch_count)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • int m
  • int n
  • const float * alpha
  • const __mt_bfloat16 *const A
  • int lda
  • const __mt_bfloat16 *const x
  • int incx
  • const float * beta
  • __mt_bfloat16 *const y
  • int incy
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasTSSgemvBatched

MUBLAS_EXPORT mublasStatus mublasTSSgemvBatched(mublasHandle_t handle, mublasOperation_t transA, int m, int n, const float *alpha, const __mt_bfloat16 *const A[], int lda, const __mt_bfloat16 *const x[], int incx, const float *beta, float *const y[], int incy, int batch_count)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • int m
  • int n
  • const float * alpha
  • const __mt_bfloat16 *const A
  • int lda
  • const __mt_bfloat16 *const x
  • int incx
  • const float * beta
  • float *const y
  • int incy
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasHSHgemvStridedBatched

MUBLAS_EXPORT mublasStatus mublasHSHgemvStridedBatched(mublasHandle_t handle, mublasOperation_t transA, int m, int n, const float *alpha, const __half *A, int lda, long long int strideA, const __half *x, int incx, long long int stridex, const float *beta, __half *y, int incy, long long int stridey, int batch_count)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • int m
  • int n
  • const float * alpha
  • const __half * A
  • int lda
  • long long int strideA
  • const __half * x
  • int incx
  • long long int stridex
  • const float * beta
  • __half * y
  • int incy
  • long long int stridey
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasHSSgemvStridedBatched

MUBLAS_EXPORT mublasStatus mublasHSSgemvStridedBatched(mublasHandle_t handle, mublasOperation_t transA, int m, int n, const float *alpha, const __half *A, int lda, long long int strideA, const __half *x, int incx, long long int stridex, const float *beta, float *y, int incy, long long int stridey, int batch_count)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • int m
  • int n
  • const float * alpha
  • const __half * A
  • int lda
  • long long int strideA
  • const __half * x
  • int incx
  • long long int stridex
  • const float * beta
  • float * y
  • int incy
  • long long int stridey
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasTSTgemvStridedBatched

MUBLAS_EXPORT mublasStatus mublasTSTgemvStridedBatched(mublasHandle_t handle, mublasOperation_t transA, int m, int n, const float *alpha, const __mt_bfloat16 *A, int lda, long long int strideA, const __mt_bfloat16 *x, int incx, long long int stridex, const float *beta, __mt_bfloat16 *y, int incy, long long int stridey, int batch_count)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • int m
  • int n
  • const float * alpha
  • const __mt_bfloat16 * A
  • int lda
  • long long int strideA
  • const __mt_bfloat16 * x
  • int incx
  • long long int stridex
  • const float * beta
  • __mt_bfloat16 * y
  • int incy
  • long long int stridey
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasTSSgemvStridedBatched

MUBLAS_EXPORT mublasStatus mublasTSSgemvStridedBatched(mublasHandle_t handle, mublasOperation_t transA, int m, int n, const float *alpha, const __mt_bfloat16 *A, int lda, long long int strideA, const __mt_bfloat16 *x, int incx, long long int stridex, const float *beta, float *y, int incy, long long int stridey, int batch_count)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • int m
  • int n
  • const float * alpha
  • const __mt_bfloat16 * A
  • int lda
  • long long int strideA
  • const __mt_bfloat16 * x
  • int incx
  • long long int stridex
  • const float * beta
  • float * y
  • int incy
  • long long int stridey
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasChbmv

MUBLAS_EXPORT mublasStatus mublasChbmv(mublasHandle_t handle, mublasFillMode_t uplo, int n, int k, const muComplex *alpha, const muComplex *A, int lda, const muComplex *x, int incx, const muComplex *beta, muComplex *y, int incy)

BLAS Level 2 API.

hbmv performs the matrix-vector operations

y := alpha*A*x + beta*y

where alpha and beta are scalars, x and y are n element vectors and A is an n by n Hermitian band matrix, with k super-diagonals.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: The upper triangular part of A is being supplied. MUBLAS_FILL_MODE_LOWER: The lower triangular part of A is being supplied.
  • n: [int] the order of the matrix A.
  • k: [int] the number of super-diagonals of the matrix A. Must be >= 0.
  • alpha: device pointer or host pointer to scalar alpha.
  • A: device pointer storing matrix A. Of dimension (lda, n). if uplo == MUBLAS_FILL_MODE_UPPER: The leading (k + 1) by n part of A must contain the upper triangular band part of the Hermitian matrix, with the leading diagonal in row (k + 1), the first super-diagonal on the RHS of row k, etc. The top left k by x triangle of A will not be referenced. Ex (upper, lda = n = 4, k = 1): A Represented matrix (0,0) (5,9) (6,8) (7,7) (1, 0) (5, 9) (0, 0) (0, 0) (1,0) (2,0) (3,0) (4,0) (5,-9) (2, 0) (6, 8) (0, 0) (0,0) (0,0) (0,0) (0,0) (0, 0) (6,-8) (3, 0) (7, 7) (0,0) (0,0) (0,0) (0,0) (0, 0) (0, 0) (7,-7) (4, 0)

if uplo == MUBLAS_FILL_MODE_LOWER: The leading (k + 1) by n part of A must contain the lower triangular band part of the Hermitian matrix, with the leading diagonal in row (1), the first sub-diagonal on the LHS of row 2, etc. The bottom right k by k triangle of A will not be referenced. Ex (lower, lda = 2, n = 4, k = 1): A Represented matrix (1,0) (2,0) (3,0) (4,0) (1, 0) (5,-9) (0, 0) (0, 0) (5,9) (6,8) (7,7) (0,0) (5, 9) (2, 0) (6,-8) (0, 0) (0, 0) (6, 8) (3, 0) (7,-7) (0, 0) (0, 0) (7, 7) (4, 0)

As a Hermitian matrix, the imaginary part of the main diagonal of A will not be referenced and is assumed to be == 0. Parameters:

  • lda: [int] specifies the leading dimension of A. must be >= k + 1
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.
  • beta: device pointer or host pointer to scalar beta.
  • y: device pointer storing vector y.
  • incy: [int] specifies the increment for the elements of y.

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • int k
  • const muComplex * alpha
  • const muComplex * A
  • int lda
  • const muComplex * x
  • int incx
  • const muComplex * beta
  • muComplex * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasZhbmv

MUBLAS_EXPORT mublasStatus mublasZhbmv(mublasHandle_t handle, mublasFillMode_t uplo, int n, int k, const muDoubleComplex *alpha, const muDoubleComplex *A, int lda, const muDoubleComplex *x, int incx, const muDoubleComplex *beta, muDoubleComplex *y, int incy)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • int k
  • const muDoubleComplex * alpha
  • const muDoubleComplex * A
  • int lda
  • const muDoubleComplex * x
  • int incx
  • const muDoubleComplex * beta
  • muDoubleComplex * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasChemv

MUBLAS_EXPORT mublasStatus mublasChemv(mublasHandle_t handle, mublasFillMode_t uplo, int n, const muComplex *alpha, const muComplex *A, int lda, const muComplex *x, int incx, const muComplex *beta, muComplex *y, int incy)

BLAS Level 2 API.

hemv performs one of the matrix-vector operations

y := alpha*A*x + beta*y

where alpha and beta are scalars, x and y are n element vectors and A is an n by n Hermitian matrix.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: the upper triangular part of the Hermitian matrix A is supplied. MUBLAS_FILL_MODE_LOWER: the lower triangular part of the Hermitian matrix A is supplied.
  • n: [int] the order of the matrix A.
  • alpha: device pointer or host pointer to scalar alpha.
  • A: device pointer storing matrix A. Of dimension (lda, n). if uplo == MUBLAS_FILL_MODE_UPPER: The upper triangular part of A must contain the upper triangular part of a Hermitian matrix. The lower triangular part of A will not be referenced. if uplo == MUBLAS_FILL_MODE_LOWER: The lower triangular part of A must contain the lower triangular part of a Hermitian matrix. The upper triangular part of A will not be referenced. As a Hermitian matrix, the imaginary part of the main diagonal of A will not be referenced and is assumed to be == 0.
  • lda: [int] specifies the leading dimension of A. must be >= max(1, n)
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.
  • beta: device pointer or host pointer to scalar beta.
  • y: device pointer storing vector y.
  • incy: [int] specifies the increment for the elements of y.

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const muComplex * alpha
  • const muComplex * A
  • int lda
  • const muComplex * x
  • int incx
  • const muComplex * beta
  • muComplex * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasZhemv

MUBLAS_EXPORT mublasStatus mublasZhemv(mublasHandle_t handle, mublasFillMode_t uplo, int n, const muDoubleComplex *alpha, const muDoubleComplex *A, int lda, const muDoubleComplex *x, int incx, const muDoubleComplex *beta, muDoubleComplex *y, int incy)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const muDoubleComplex * alpha
  • const muDoubleComplex * A
  • int lda
  • const muDoubleComplex * x
  • int incx
  • const muDoubleComplex * beta
  • muDoubleComplex * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasCher

MUBLAS_EXPORT mublasStatus mublasCher(mublasHandle_t handle, mublasFillMode_t uplo, int n, const float *alpha, const muComplex *x, int incx, muComplex *A, int lda)

BLAS Level 2 API.

her performs the matrix-vector operations

A := A + alpha*x*x**H

where alpha is a real scalar, x is a vector, and A is an n by n Hermitian matrix.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] specifies whether the upper 'MUBLAS_FILL_MODE_UPPER' or lower 'MUBLAS_FILL_MODE_LOWER' MUBLAS_FILL_MODE_UPPER: The upper triangular part of A is supplied in A. MUBLAS_FILL_MODE_LOWER: The lower triangular part of A is supplied in A.
  • n: [int] the number of rows and columns of matrix A, must be at least 0.
  • alpha: device pointer or host pointer to scalar alpha.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.
  • A: device pointer storing the specified triangular portion of the Hermitian matrix A. Of size (lda * n). if uplo == MUBLAS_FILL_MODE_UPPER: The upper triangular portion of the Hermitian matrix A is supplied. The lower triangluar portion will not be touched. if uplo == MUBLAS_FILL_MODE_LOWER: The lower triangular portion of the Hermitian matrix A is supplied. The upper triangular portion will not be touched. Note that the imaginary part of the diagonal elements are not accessed and are assumed to be 0.
  • lda: [int] specifies the leading dimension of A. Must be at least max(1, n).

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const float * alpha
  • const muComplex * x
  • int incx
  • muComplex * A
  • int lda

Return type: MUBLAS_EXPORT mublasStatus

mublasZher

MUBLAS_EXPORT mublasStatus mublasZher(mublasHandle_t handle, mublasFillMode_t uplo, int n, const double *alpha, const muDoubleComplex *x, int incx, muDoubleComplex *A, int lda)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const double * alpha
  • const muDoubleComplex * x
  • int incx
  • muDoubleComplex * A
  • int lda

Return type: MUBLAS_EXPORT mublasStatus

mublasCher2

MUBLAS_EXPORT mublasStatus mublasCher2(mublasHandle_t handle, mublasFillMode_t uplo, int n, const muComplex *alpha, const muComplex *x, int incx, const muComplex *y, int incy, muComplex *A, int lda)

BLAS Level 2 API.

her2 performs the matrix-vector operations

A := A + alpha*x*y**H + conj(alpha)*y*x**H

where alpha is a complex scalar, x and y are vectors, and A is an n by n Hermitian matrix.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] specifies whether the upper 'MUBLAS_FILL_MODE_UPPER' or lower 'MUBLAS_FILL_MODE_LOWER' MUBLAS_FILL_MODE_UPPER: The upper triangular part of A is supplied. MUBLAS_FILL_MODE_LOWER: The lower triangular part of A is supplied.
  • n: [int] the number of rows and columns of matrix A, must be at least 0.
  • alpha: device pointer or host pointer to scalar alpha.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.
  • y: device pointer storing vector y.
  • incy: [int] specifies the increment for the elements of y.
  • A: device pointer storing the specified triangular portion of the Hermitian matrix A. Of size (lda, n). if uplo == MUBLAS_FILL_MODE_UPPER: The upper triangular portion of the Hermitian matrix A is supplied. The lower triangular portion of A will not be touched. if uplo == MUBLAS_FILL_MODE_LOWER: The lower triangular portion of the Hermitian matrix A is supplied. The upper triangular portion of A will not be touched. Note that the imaginary part of the diagonal elements are not accessed and are assumed to be 0.
  • lda: [int] specifies the leading dimension of A. Must be at least max(lda, 1).

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const muComplex * alpha
  • const muComplex * x
  • int incx
  • const muComplex * y
  • int incy
  • muComplex * A
  • int lda

Return type: MUBLAS_EXPORT mublasStatus

mublasZher2

MUBLAS_EXPORT mublasStatus mublasZher2(mublasHandle_t handle, mublasFillMode_t uplo, int n, const muDoubleComplex *alpha, const muDoubleComplex *x, int incx, const muDoubleComplex *y, int incy, muDoubleComplex *A, int lda)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const muDoubleComplex * alpha
  • const muDoubleComplex * x
  • int incx
  • const muDoubleComplex * y
  • int incy
  • muDoubleComplex * A
  • int lda

Return type: MUBLAS_EXPORT mublasStatus

mublasChpmv

MUBLAS_EXPORT mublasStatus mublasChpmv(mublasHandle_t handle, mublasFillMode_t uplo, int n, const muComplex *alpha, const muComplex *AP, const muComplex *x, int incx, const muComplex *beta, muComplex *y, int incy)

BLAS Level 2 API.

hpmv performs the matrix-vector operation

y := alpha*A*x + beta*y

where alpha and beta are scalars, x and y are n element vectors and A is an n by n Hermitian matrix, supplied in packed form (see description below).

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: the upper triangular part of the Hermitian matrix A is supplied in AP. MUBLAS_FILL_MODE_LOWER: the lower triangular part of the Hermitian matrix A is supplied in AP.
  • n: [int] the order of the matrix A, must be >= 0.
  • alpha: device pointer or host pointer to scalar alpha.
  • AP: device pointer storing the packed version of the specified triangular portion of the Hermitian matrix A. Of at least size ((n * (n + 1)) / 2). if uplo == MUBLAS_FILL_MODE_UPPER: The upper triangular portion of the Hermitian matrix A is supplied. The matrix is compacted so that AP contains the triangular portion column-by-column so that: AP(0) = A(0,0) AP(1) = A(0,1) AP(2) = A(1,1), etc. Ex: (MUBLAS_FILL_MODE_UPPER; n = 3) (1, 0) (2, 1) (3, 2) (2,-1) (4, 0) (5,-1) -----> [(1,0), (2,1), (4,0), (3,2), (5,-1), (6,0)] (3,-2) (5, 1) (6, 0) if uplo == MUBLAS_FILL_MODE_LOWER: The lower triangular portion of the Hermitian matrix A is supplied. The matrix is compacted so that AP contains the triangular portion column-by-column so that: AP(0) = A(0,0) AP(1) = A(1,0) AP(2) = A(2,1), etc. Ex: (MUBLAS_FILL_MODE_LOWER; n = 3) (1, 0) (2, 1) (3, 2) (2,-1) (4, 0) (5,-1) -----> [(1,0), (2,-1), (3,-2), (4,0), (5,1), (6,0)] (3,-2) (5, 1) (6, 0) Note that the imaginary part of the diagonal elements are not accessed and are assumed to be 0.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.
  • beta: device pointer or host pointer to scalar beta.
  • y: device pointer storing vector y.
  • incy: [int] specifies the increment for the elements of y.

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const muComplex * alpha
  • const muComplex * AP
  • const muComplex * x
  • int incx
  • const muComplex * beta
  • muComplex * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasZhpmv

MUBLAS_EXPORT mublasStatus mublasZhpmv(mublasHandle_t handle, mublasFillMode_t uplo, int n, const muDoubleComplex *alpha, const muDoubleComplex *AP, const muDoubleComplex *x, int incx, const muDoubleComplex *beta, muDoubleComplex *y, int incy)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const muDoubleComplex * alpha
  • const muDoubleComplex * AP
  • const muDoubleComplex * x
  • int incx
  • const muDoubleComplex * beta
  • muDoubleComplex * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasChpr

MUBLAS_EXPORT mublasStatus mublasChpr(mublasHandle_t handle, mublasFillMode_t uplo, int n, const float *alpha, const muComplex *x, int incx, muComplex *AP)

BLAS Level 2 API.

hpr performs the matrix-vector operations

A := A + alpha*x*x**H

where alpha is a real scalar, x is a vector, and A is an n by n Hermitian matrix, supplied in packed form.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] specifies whether the upper 'MUBLAS_FILL_MODE_UPPER' or lower 'MUBLAS_FILL_MODE_LOWER' MUBLAS_FILL_MODE_UPPER: The upper triangular part of A is supplied in AP. MUBLAS_FILL_MODE_LOWER: The lower triangular part of A is supplied in AP.
  • n: [int] the number of rows and columns of matrix A, must be at least 0.
  • alpha: device pointer or host pointer to scalar alpha.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.
  • AP: device pointer storing the packed version of the specified triangular portion of the Hermitian matrix A. Of at least size ((n * (n + 1)) / 2). if uplo == MUBLAS_FILL_MODE_UPPER: The upper triangular portion of the Hermitian matrix A is supplied. The matrix is compacted so that AP contains the triangular portion column-by-column so that: AP(0) = A(0,0) AP(1) = A(0,1) AP(2) = A(1,1), etc. Ex: (MUBLAS_FILL_MODE_UPPER; n = 3) (1, 0) (2, 1) (4,9) (2,-1) (3, 0) (5,3) -----> [(1,0), (2,1), (3,0), (4,9), (5,3), (6,0)] (4,-9) (5,-3) (6,0) if uplo == MUBLAS_FILL_MODE_LOWER: The lower triangular portion of the Hermitian matrix A is supplied. The matrix is compacted so that AP contains the triangular portion column-by-column so that: AP(0) = A(0,0) AP(1) = A(1,0) AP(2) = A(2,1), etc. Ex: (MUBLAS_FILL_MODE_LOWER; n = 3) (1, 0) (2, 1) (4,9) (2,-1) (3, 0) (5,3) -----> [(1,0), (2,-1), (4,-9), (3,0), (5,-3), (6,0)] (4,-9) (5,-3) (6,0) Note that the imaginary part of the diagonal elements are not accessed and are assumed to be 0.

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const float * alpha
  • const muComplex * x
  • int incx
  • muComplex * AP

Return type: MUBLAS_EXPORT mublasStatus

mublasZhpr

MUBLAS_EXPORT mublasStatus mublasZhpr(mublasHandle_t handle, mublasFillMode_t uplo, int n, const double *alpha, const muDoubleComplex *x, int incx, muDoubleComplex *AP)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const double * alpha
  • const muDoubleComplex * x
  • int incx
  • muDoubleComplex * AP

Return type: MUBLAS_EXPORT mublasStatus

mublasChpr2

MUBLAS_EXPORT mublasStatus mublasChpr2(mublasHandle_t handle, mublasFillMode_t uplo, int n, const muComplex *alpha, const muComplex *x, int incx, const muComplex *y, int incy, muComplex *AP)

BLAS Level 2 API.

hpr2 performs the matrix-vector operations

A := A + alpha*x*y**H + conj(alpha)*y*x**H

where alpha is a complex scalar, x and y are vectors, and A is an n by n Hermitian matrix, supplied in packed form.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] specifies whether the upper 'MUBLAS_FILL_MODE_UPPER' or lower 'MUBLAS_FILL_MODE_LOWER' MUBLAS_FILL_MODE_UPPER: The upper triangular part of A is supplied in AP. MUBLAS_FILL_MODE_LOWER: The lower triangular part of A is supplied in AP.
  • n: [int] the number of rows and columns of matrix A, must be at least 0.
  • alpha: device pointer or host pointer to scalar alpha.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.
  • y: device pointer storing vector y.
  • incy: [int] specifies the increment for the elements of y.
  • AP: device pointer storing the packed version of the specified triangular portion of the Hermitian matrix A. Of at least size ((n * (n + 1)) / 2). if uplo == MUBLAS_FILL_MODE_UPPER: The upper triangular portion of the Hermitian matrix A is supplied. The matrix is compacted so that AP contains the triangular portion column-by-column so that: AP(0) = A(0,0) AP(1) = A(0,1) AP(2) = A(1,1), etc. Ex: (MUBLAS_FILL_MODE_UPPER; n = 3) (1, 0) (2, 1) (4,9) (2,-1) (3, 0) (5,3) -----> [(1,0), (2,1), (3,0), (4,9), (5,3), (6,0)] (4,-9) (5,-3) (6,0) if uplo == MUBLAS_FILL_MODE_LOWER: The lower triangular portion of the Hermitian matrix A is supplied. The matrix is compacted so that AP contains the triangular portion column-by-column so that: AP(0) = A(0,0) AP(1) = A(1,0) AP(2) = A(2,1), etc. Ex: (MUBLAS_FILL_MODE_LOWER; n = 3) (1, 0) (2, 1) (4,9) (2,-1) (3, 0) (5,3) -----> [(1,0), (2,-1), (4,-9), (3,0), (5,-3), (6,0)] (4,-9) (5,-3) (6,0) Note that the imaginary part of the diagonal elements are not accessed and are assumed to be 0.

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const muComplex * alpha
  • const muComplex * x
  • int incx
  • const muComplex * y
  • int incy
  • muComplex * AP

Return type: MUBLAS_EXPORT mublasStatus

mublasZhpr2

MUBLAS_EXPORT mublasStatus mublasZhpr2(mublasHandle_t handle, mublasFillMode_t uplo, int n, const muDoubleComplex *alpha, const muDoubleComplex *x, int incx, const muDoubleComplex *y, int incy, muDoubleComplex *AP)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const muDoubleComplex * alpha
  • const muDoubleComplex * x
  • int incx
  • const muDoubleComplex * y
  • int incy
  • muDoubleComplex * AP

Return type: MUBLAS_EXPORT mublasStatus

mublasStrmv

MUBLAS_EXPORT mublasStatus mublasStrmv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, const float *A, int lda, float *x, int incx)

BLAS Level 2 API.

trmv performs one of the matrix-vector operations

x = A*x or x = A**T*x,

where x is an n element vector and A is an n by n unit, or non-unit, upper or lower triangular matrix.

The vector x is overwritten.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: A is an upper triangular matrix. MUBLAS_FILL_MODE_LOWER: A is a lower triangular matrix.
  • transA: [mublasOperation_t]
  • diag: [mublasDiagType_t] MUBLAS_DIAG_UNIT: A is assumed to be unit triangular. MUBLAS_DIAG_NON_UNIT: A is not assumed to be unit triangular.
  • m: [int] m specifies the number of rows of A. m >= 0.
  • A: device pointer storing matrix A, of dimension ( lda, m )
  • lda: [int] specifies the leading dimension of A. lda = max( 1, m ).
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • const float * A
  • int lda
  • float * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasDtrmv

MUBLAS_EXPORT mublasStatus mublasDtrmv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, const double *A, int lda, double *x, int incx)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • const double * A
  • int lda
  • double * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasCtrmv

MUBLAS_EXPORT mublasStatus mublasCtrmv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, const muComplex *A, int lda, muComplex *x, int incx)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • const muComplex * A
  • int lda
  • muComplex * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasZtrmv

MUBLAS_EXPORT mublasStatus mublasZtrmv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, const muDoubleComplex *A, int lda, muDoubleComplex *x, int incx)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • const muDoubleComplex * A
  • int lda
  • muDoubleComplex * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasStpmv

MUBLAS_EXPORT mublasStatus mublasStpmv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, const float *A, float *x, int incx)

BLAS Level 2 API.

tpmv performs one of the matrix-vector operations

x = A*x or x = A**T*x,

where x is an n element vector and A is an n by n unit, or non-unit, upper or lower triangular matrix, supplied in the pack form.

The vector x is overwritten.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: A is an upper triangular matrix. MUBLAS_FILL_MODE_LOWER: A is a lower triangular matrix.
  • transA: [mublasOperation_t]
  • diag: [mublasDiagType_t] MUBLAS_DIAG_UNIT: A is assumed to be unit triangular. MUBLAS_DIAG_NON_UNIT: A is not assumed to be unit triangular.
  • m: [int] m specifies the number of rows of A. m >= 0.
  • A: device pointer storing matrix A, of dimension at leat ( m * ( m + 1 ) / 2 ). Before entry with uplo = MUBLAS_FILL_MODE_UPPER, the array A must contain the upper triangular matrix packed sequentially, column by column, so that A[0] contains a_{0,0}, A[1] and A[2] contain a_{0,1} and a_{1, 1} respectively, and so on. Before entry with uplo = MUBLAS_FILL_MODE_LOWER, the array A must contain the lower triangular matrix packed sequentially, column by column, so that A[0] contains a_{0,0}, A[1] and A[2] contain a_{1,0} and a_{2,0} respectively, and so on. Note that when DIAG = MUBLAS_DIAG_UNIT, the diagonal elements of A are not referenced, but are assumed to be unity.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x. incx must not be zero.

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • const float * A
  • float * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasDtpmv

MUBLAS_EXPORT mublasStatus mublasDtpmv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, const double *A, double *x, int incx)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • const double * A
  • double * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasCtpmv

MUBLAS_EXPORT mublasStatus mublasCtpmv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, const muComplex *A, muComplex *x, int incx)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • const muComplex * A
  • muComplex * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasZtpmv

MUBLAS_EXPORT mublasStatus mublasZtpmv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, const muDoubleComplex *A, muDoubleComplex *x, int incx)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • const muDoubleComplex * A
  • muDoubleComplex * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasStbmv

MUBLAS_EXPORT mublasStatus mublasStbmv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t trans, mublasDiagType_t diag, int m, int k, const float *A, int lda, float *x, int incx)

BLAS Level 2 API.

tbmv performs one of the matrix-vector operations

x := A*x or
x := A**T*x or
x := A**H*x,

x is a vectors and A is a banded m by m matrix (see description below).

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: A is an upper banded triangular matrix. MUBLAS_FILL_MODE_LOWER: A is a lower banded triangular matrix.
  • trans: [mublasOperation_t] indicates whether matrix A is tranposed (conjugated) or not.
  • diag: [mublasDiagType_t] MUBLAS_DIAG_UNIT: The main diagonal of A is assumed to consist of only 1's and is not referenced. MUBLAS_DIAG_NON_UNIT: No assumptions are made of A's main diagonal.
  • m: [int] the number of rows and columns of the matrix represented by A.
  • k: [int] if uplo == MUBLAS_FILL_MODE_UPPER, k specifies the number of super-diagonals of the matrix A. if uplo == MUBLAS_FILL_MODE_LOWER, k specifies the number of sub-diagonals of the matrix A. k must satisfy k > 0 && k < lda.
  • A: device pointer storing banded triangular matrix A. if uplo == MUBLAS_FILL_MODE_UPPER: The matrix represented is an upper banded triangular matrix with the main diagonal and k super-diagonals, everything else can be assumed to be 0. The matrix is compacted so that the main diagonal resides on the k'th row, the first super diagonal resides on the RHS of the k-1'th row, etc, with the k'th diagonal on the RHS of the 0'th row. Ex: (MUBLAS_FILL_MODE_UPPER; m = 5; k = 2) 1 6 9 0 0 0 0 9 8 7 0 2 7 8 0 0 6 7 8 9 0 0 3 8 7 ----> 1 2 3 4 5 0 0 0 4 9 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 if uplo == MUBLAS_FILL_MODE_LOWER: The matrix represnted is a lower banded triangular matrix with the main diagonal and k sub-diagonals, everything else can be assumed to be 0. The matrix is compacted so that the main diagonal resides on the 0'th row, working up to the k'th diagonal residing on the LHS of the k'th row. Ex: (MUBLAS_FILL_MODE_LOWER; m = 5; k = 2) 1 0 0 0 0 1 2 3 4 5 6 2 0 0 0 6 7 8 9 0 9 7 3 0 0 ----> 9 8 7 0 0 0 8 8 4 0 0 0 0 0 0 0 0 7 9 5 0 0 0 0 0
  • lda: [int] specifies the leading dimension of A. lda must satisfy lda > k.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t trans
  • mublasDiagType_t diag
  • int m
  • int k
  • const float * A
  • int lda
  • float * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasDtbmv

MUBLAS_EXPORT mublasStatus mublasDtbmv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t trans, mublasDiagType_t diag, int m, int k, const double *A, int lda, double *x, int incx)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t trans
  • mublasDiagType_t diag
  • int m
  • int k
  • const double * A
  • int lda
  • double * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasCtbmv

MUBLAS_EXPORT mublasStatus mublasCtbmv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t trans, mublasDiagType_t diag, int m, int k, const muComplex *A, int lda, muComplex *x, int incx)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t trans
  • mublasDiagType_t diag
  • int m
  • int k
  • const muComplex * A
  • int lda
  • muComplex * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasZtbmv

MUBLAS_EXPORT mublasStatus mublasZtbmv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t trans, mublasDiagType_t diag, int m, int k, const muDoubleComplex *A, int lda, muDoubleComplex *x, int incx)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t trans
  • mublasDiagType_t diag
  • int m
  • int k
  • const muDoubleComplex * A
  • int lda
  • muDoubleComplex * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasStbsv

MUBLAS_EXPORT mublasStatus mublasStbsv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int n, int k, const float *A, int lda, float *x, int incx)

BLAS Level 2 API.

tbsv solves

A*x = b or A**T*x = b or A**H*x = b,

where x and b are vectors and A is a banded triangular matrix.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: A is an upper triangular matrix. MUBLAS_FILL_MODE_LOWER: A is a lower triangular matrix.
  • transA: [mublasOperation_t] MUBLAS_OP_N: Solves Ax = b MUBLAS_OP_T: Solves A**Tx = b MUBLAS_OP_C: Solves A**H*x = b
  • diag: [mublasDiagType_t] MUBLAS_DIAG_UNIT: A is assumed to be unit triangular (i.e. the diagonal elements of A are not used in computations). MUBLAS_DIAG_NON_UNIT: A is not assumed to be unit triangular.
  • n: [int] n specifies the number of rows of b. n >= 0.
  • k: [int] if(uplo == MUBLAS_FILL_MODE_UPPER) k specifies the number of super-diagonals of A. if(uplo == MUBLAS_FILL_MODE_LOWER) k specifies the number of sub-diagonals of A. k >= 0.
  • A: device pointer storing the matrix A in banded format.
  • lda: [int] specifies the leading dimension of A. lda >= (k + 1).
  • x: device pointer storing input vector b. Overwritten by the output vector x.
  • incx: [int] specifies the increment for the elements of x.

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int n
  • int k
  • const float * A
  • int lda
  • float * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasDtbsv

MUBLAS_EXPORT mublasStatus mublasDtbsv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int n, int k, const double *A, int lda, double *x, int incx)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int n
  • int k
  • const double * A
  • int lda
  • double * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasCtbsv

MUBLAS_EXPORT mublasStatus mublasCtbsv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int n, int k, const muComplex *A, int lda, muComplex *x, int incx)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int n
  • int k
  • const muComplex * A
  • int lda
  • muComplex * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasZtbsv

MUBLAS_EXPORT mublasStatus mublasZtbsv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int n, int k, const muDoubleComplex *A, int lda, muDoubleComplex *x, int incx)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int n
  • int k
  • const muDoubleComplex * A
  • int lda
  • muDoubleComplex * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasStrsv

MUBLAS_EXPORT mublasStatus mublasStrsv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, const float *A, int lda, float *x, int incx)

BLAS Level 2 API.

trsv solves

A*x = b or A**T*x = b,

where x and b are vectors and A is a triangular matrix.

The vector x is overwritten on b.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: A is an upper triangular matrix. MUBLAS_FILL_MODE_LOWER: A is a lower triangular matrix.
  • transA: [mublasOperation_t]
  • diag: [mublasDiagType_t] MUBLAS_DIAG_UNIT: A is assumed to be unit triangular. MUBLAS_DIAG_NON_UNIT: A is not assumed to be unit triangular.
  • m: [int] m specifies the number of rows of b. m >= 0.
  • A: device pointer storing matrix A, of dimension ( lda, m )
  • lda: [int] specifies the leading dimension of A. lda = max( 1, m ).
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • const float * A
  • int lda
  • float * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasDtrsv

MUBLAS_EXPORT mublasStatus mublasDtrsv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, const double *A, int lda, double *x, int incx)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • const double * A
  • int lda
  • double * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasCtrsv

MUBLAS_EXPORT mublasStatus mublasCtrsv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, const muComplex *A, int lda, muComplex *x, int incx)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • const muComplex * A
  • int lda
  • muComplex * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasZtrsv

MUBLAS_EXPORT mublasStatus mublasZtrsv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, const muDoubleComplex *A, int lda, muDoubleComplex *x, int incx)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • const muDoubleComplex * A
  • int lda
  • muDoubleComplex * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasStpsv

MUBLAS_EXPORT mublasStatus mublasStpsv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int n, const float *AP, float *x, int incx)

BLAS Level 2 API.

tpsv solves

A*x = b or A**T*x = b, or A**H*x = b,

where x and b are vectors and A is a triangular matrix stored in the packed format.

The input vector b is overwritten by the output vector x.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: A is an upper triangular matrix. MUBLAS_FILL_MODE_LOWER: A is a lower triangular matrix.
  • transA: [mublasOperation_t] MUBLAS_OP_N: Solves Ax = b MUBLAS_OP_T: Solves A**Tx = b MUBLAS_OP_C: Solves A**H*x = b
  • diag: [mublasDiagType_t] MUBLAS_DIAG_UNIT: A is assumed to be unit triangular (i.e. the diagonal elements of A are not used in computations). MUBLAS_DIAG_NON_UNIT: A is not assumed to be unit triangular.
  • n: [int] n specifies the number of rows of b. n >= 0.
  • AP: device pointer storing the packed version of matrix A, of dimension >= (n * (n + 1) / 2)
  • x: device pointer storing vector b on input, overwritten by x on output.
  • incx: [int] specifies the increment for the elements of x.

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int n
  • const float * AP
  • float * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasDtpsv

MUBLAS_EXPORT mublasStatus mublasDtpsv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int n, const double *AP, double *x, int incx)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int n
  • const double * AP
  • double * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasCtpsv

MUBLAS_EXPORT mublasStatus mublasCtpsv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int n, const muComplex *AP, muComplex *x, int incx)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int n
  • const muComplex * AP
  • muComplex * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasZtpsv

MUBLAS_EXPORT mublasStatus mublasZtpsv(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int n, const muDoubleComplex *AP, muDoubleComplex *x, int incx)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int n
  • const muDoubleComplex * AP
  • muDoubleComplex * x
  • int incx

Return type: MUBLAS_EXPORT mublasStatus

mublasSsymv

MUBLAS_EXPORT mublasStatus mublasSsymv(mublasHandle_t handle, mublasFillMode_t uplo, int n, const float *alpha, const float *A, int lda, const float *x, int incx, const float *beta, float *y, int incy)

BLAS Level 2 API.

symv performs the matrix-vector operation:

y := alpha*A*x + beta*y,

where alpha and beta are scalars, x and y are n element vectors and A should contain an upper or lower triangular n by n symmetric matrix.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: mublasFillMode_t specifies whether the upper 'MUBLAS_FILL_MODE_UPPER' or lower 'MUBLAS_FILL_MODE_LOWER' if MUBLAS_FILL_MODE_UPPER, the lower part of A is not referenced if MUBLAS_FILL_MODE_LOWER, the upper part of A is not referenced
  • n: [int]
  • alpha: specifies the scalar alpha
  • A: pointer storing matrix A on the GPU
  • lda: [int] specifies the leading dimension of A
  • x: pointer storing vector x on the GPU
  • incx: [int] specifies the increment for the elements of x
  • beta: specifies the scalar beta
  • y: pointer storing vector y on the GPU
  • incy: [int] specifies the increment for the elements of y

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const float * alpha
  • const float * A
  • int lda
  • const float * x
  • int incx
  • const float * beta
  • float * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasDsymv

MUBLAS_EXPORT mublasStatus mublasDsymv(mublasHandle_t handle, mublasFillMode_t uplo, int n, const double *alpha, const double *A, int lda, const double *x, int incx, const double *beta, double *y, int incy)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const double * alpha
  • const double * A
  • int lda
  • const double * x
  • int incx
  • const double * beta
  • double * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasCsymv

MUBLAS_EXPORT mublasStatus mublasCsymv(mublasHandle_t handle, mublasFillMode_t uplo, int n, const muComplex *alpha, const muComplex *A, int lda, const muComplex *x, int incx, const muComplex *beta, muComplex *y, int incy)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const muComplex * alpha
  • const muComplex * A
  • int lda
  • const muComplex * x
  • int incx
  • const muComplex * beta
  • muComplex * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasZsymv

MUBLAS_EXPORT mublasStatus mublasZsymv(mublasHandle_t handle, mublasFillMode_t uplo, int n, const muDoubleComplex *alpha, const muDoubleComplex *A, int lda, const muDoubleComplex *x, int incx, const muDoubleComplex *beta, muDoubleComplex *y, int incy)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const muDoubleComplex * alpha
  • const muDoubleComplex * A
  • int lda
  • const muDoubleComplex * x
  • int incx
  • const muDoubleComplex * beta
  • muDoubleComplex * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasSspmv

MUBLAS_EXPORT mublasStatus mublasSspmv(mublasHandle_t handle, mublasFillMode_t uplo, int n, const float *alpha, const float *A, const float *x, int incx, const float *beta, float *y, int incy)

BLAS Level 2 API.

spmv performs the matrix-vector operation:

y := alpha*A*x + beta*y,

where alpha and beta are scalars, x and y are n element vectors and A should contain an upper or lower triangular n by n packed symmetric matrix.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: mublasFillMode_t specifies whether the upper 'MUBLAS_FILL_MODE_UPPER' or lower 'MUBLAS_FILL_MODE_LOWER' if MUBLAS_FILL_MODE_UPPER, the lower part of A is not referenced if MUBLAS_FILL_MODE_LOWER, the upper part of A is not referenced
  • n: [int]
  • alpha: specifies the scalar alpha
  • A: pointer storing matrix A on the GPU
  • x: pointer storing vector x on the GPU
  • incx: [int] specifies the increment for the elements of x
  • beta: specifies the scalar beta
  • y: pointer storing vector y on the GPU
  • incy: [int] specifies the increment for the elements of y

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const float * alpha
  • const float * A
  • const float * x
  • int incx
  • const float * beta
  • float * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasDspmv

MUBLAS_EXPORT mublasStatus mublasDspmv(mublasHandle_t handle, mublasFillMode_t uplo, int n, const double *alpha, const double *A, const double *x, int incx, const double *beta, double *y, int incy)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const double * alpha
  • const double * A
  • const double * x
  • int incx
  • const double * beta
  • double * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasSsbmv

MUBLAS_EXPORT mublasStatus mublasSsbmv(mublasHandle_t handle, mublasFillMode_t uplo, int n, int k, const float *alpha, const float *A, int lda, const float *x, int incx, const float *beta, float *y, int incy)

BLAS Level 2 API.

sbmv performs the matrix-vector operation:

y := alpha*A*x + beta*y,

where alpha and beta are scalars, x and y are n element vectors and A should contain an upper or lower triangular n by n symmetric banded matrix.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: mublasFillMode_t specifies whether the upper 'MUBLAS_FILL_MODE_UPPER' or lower 'MUBLAS_FILL_MODE_LOWER' if MUBLAS_FILL_MODE_UPPER, the lower part of A is not referenced if MUBLAS_FILL_MODE_LOWER, the upper part of A is not referenced
  • n: [int]
  • k: [int] specifies the number of sub- and super-diagonals
  • alpha: specifies the scalar alpha
  • A: pointer storing matrix A on the GPU
  • lda: [int] specifies the leading dimension of matrix A
  • x: pointer storing vector x on the GPU
  • incx: [int] specifies the increment for the elements of x
  • beta: specifies the scalar beta
  • y: pointer storing vector y on the GPU
  • incy: [int] specifies the increment for the elements of y

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • int k
  • const float * alpha
  • const float * A
  • int lda
  • const float * x
  • int incx
  • const float * beta
  • float * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasDsbmv

MUBLAS_EXPORT mublasStatus mublasDsbmv(mublasHandle_t handle, mublasFillMode_t uplo, int n, int k, const double *alpha, const double *A, int lda, const double *x, int incx, const double *beta, double *y, int incy)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • int k
  • const double * alpha
  • const double * A
  • int lda
  • const double * x
  • int incx
  • const double * beta
  • double * y
  • int incy

Return type: MUBLAS_EXPORT mublasStatus

mublasSger

MUBLAS_EXPORT mublasStatus mublasSger(mublasHandle_t handle, int m, int n, const float *alpha, const float *x, int incx, const float *y, int incy, float *A, int lda)

BLAS Level 2 API.

ger,geru,gerc performs the matrix-vector operations

A := A + alpha*x*y**T , OR
A := A + alpha*x*y**H for gerc

where alpha is a scalar, x and y are vectors, and A is an m by n matrix.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • m: [int] the number of rows of the matrix A.
  • n: [int] the number of columns of the matrix A.
  • alpha: device pointer or host pointer to scalar alpha.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.
  • y: device pointer storing vector y.
  • incy: [int] specifies the increment for the elements of y.
  • A: device pointer storing matrix A.
  • lda: [int] specifies the leading dimension of A.

Parameters:

  • mublasHandle_t handle
  • int m
  • int n
  • const float * alpha
  • const float * x
  • int incx
  • const float * y
  • int incy
  • float * A
  • int lda

Return type: MUBLAS_EXPORT mublasStatus

mublasDger

MUBLAS_EXPORT mublasStatus mublasDger(mublasHandle_t handle, int m, int n, const double *alpha, const double *x, int incx, const double *y, int incy, double *A, int lda)

Parameters:

  • mublasHandle_t handle
  • int m
  • int n
  • const double * alpha
  • const double * x
  • int incx
  • const double * y
  • int incy
  • double * A
  • int lda

Return type: MUBLAS_EXPORT mublasStatus

mublasCgeru

MUBLAS_EXPORT mublasStatus mublasCgeru(mublasHandle_t handle, int m, int n, const muComplex *alpha, const muComplex *x, int incx, const muComplex *y, int incy, muComplex *A, int lda)

Parameters:

  • mublasHandle_t handle
  • int m
  • int n
  • const muComplex * alpha
  • const muComplex * x
  • int incx
  • const muComplex * y
  • int incy
  • muComplex * A
  • int lda

Return type: MUBLAS_EXPORT mublasStatus

mublasZgeru

MUBLAS_EXPORT mublasStatus mublasZgeru(mublasHandle_t handle, int m, int n, const muDoubleComplex *alpha, const muDoubleComplex *x, int incx, const muDoubleComplex *y, int incy, muDoubleComplex *A, int lda)

Parameters:

  • mublasHandle_t handle
  • int m
  • int n
  • const muDoubleComplex * alpha
  • const muDoubleComplex * x
  • int incx
  • const muDoubleComplex * y
  • int incy
  • muDoubleComplex * A
  • int lda

Return type: MUBLAS_EXPORT mublasStatus

mublasCgerc

MUBLAS_EXPORT mublasStatus mublasCgerc(mublasHandle_t handle, int m, int n, const muComplex *alpha, const muComplex *x, int incx, const muComplex *y, int incy, muComplex *A, int lda)

Parameters:

  • mublasHandle_t handle
  • int m
  • int n
  • const muComplex * alpha
  • const muComplex * x
  • int incx
  • const muComplex * y
  • int incy
  • muComplex * A
  • int lda

Return type: MUBLAS_EXPORT mublasStatus

mublasZgerc

MUBLAS_EXPORT mublasStatus mublasZgerc(mublasHandle_t handle, int m, int n, const muDoubleComplex *alpha, const muDoubleComplex *x, int incx, const muDoubleComplex *y, int incy, muDoubleComplex *A, int lda)

Parameters:

  • mublasHandle_t handle
  • int m
  • int n
  • const muDoubleComplex * alpha
  • const muDoubleComplex * x
  • int incx
  • const muDoubleComplex * y
  • int incy
  • muDoubleComplex * A
  • int lda

Return type: MUBLAS_EXPORT mublasStatus

mublasSspr

MUBLAS_EXPORT mublasStatus mublasSspr(mublasHandle_t handle, mublasFillMode_t uplo, int n, const float *alpha, const float *x, int incx, float *AP)

BLAS Level 2 API.

spr performs the matrix-vector operations

A := A + alpha*x*x**T

where alpha is a scalar, x is a vector, and A is an n by n symmetric matrix, supplied in packed form.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] specifies whether the upper 'MUBLAS_FILL_MODE_UPPER' or lower 'MUBLAS_FILL_MODE_LOWER' MUBLAS_FILL_MODE_UPPER: The upper triangular part of A is supplied in AP. MUBLAS_FILL_MODE_LOWER: The lower triangular part of A is supplied in AP.
  • n: [int] the number of rows and columns of matrix A, must be at least 0.
  • alpha: device pointer or host pointer to scalar alpha.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.
  • AP: device pointer storing the packed version of the specified triangular portion of the symmetric matrix A. Of at least size ((n * (n + 1)) / 2). if uplo == MUBLAS_FILL_MODE_UPPER: The upper triangular portion of the symmetric matrix A is supplied. The matrix is compacted so that AP contains the triangular portion column-by-column so that: AP(0) = A(0,0) AP(1) = A(0,1) AP(2) = A(1,1), etc. Ex: (MUBLAS_FILL_MODE_UPPER; n = 4) 1 2 4 7 2 3 5 8 -----> [1, 2, 3, 4, 5, 6, 7, 8, 9, 0] 4 5 6 9 7 8 9 0 if uplo == MUBLAS_FILL_MODE_LOWER: The lower triangular portion of the symmetric matrix A is supplied. The matrix is compacted so that AP contains the triangular portion column-by-column so that: AP(0) = A(0,0) AP(1) = A(1,0) AP(2) = A(2,1), etc. Ex: (MUBLAS_FILL_MODE_LOWER; n = 4) 1 2 3 4 2 5 6 7 -----> [1, 2, 3, 4, 5, 6, 7, 8, 9, 0] 3 6 8 9 4 7 9 0

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const float * alpha
  • const float * x
  • int incx
  • float * AP

Return type: MUBLAS_EXPORT mublasStatus

mublasDspr

MUBLAS_EXPORT mublasStatus mublasDspr(mublasHandle_t handle, mublasFillMode_t uplo, int n, const double *alpha, const double *x, int incx, double *AP)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const double * alpha
  • const double * x
  • int incx
  • double * AP

Return type: MUBLAS_EXPORT mublasStatus

mublasSspr2

MUBLAS_EXPORT mublasStatus mublasSspr2(mublasHandle_t handle, mublasFillMode_t uplo, int n, const float *alpha, const float *x, int incx, const float *y, int incy, float *AP)

BLAS Level 2 API.

spr2 performs the matrix-vector operation

A := A + alpha*x*y**T + alpha*y*x**T

where alpha is a scalar, x and y are vectors, and A is an n by n symmetric matrix, supplied in packed form.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] specifies whether the upper 'MUBLAS_FILL_MODE_UPPER' or lower 'MUBLAS_FILL_MODE_LOWER' MUBLAS_FILL_MODE_UPPER: The upper triangular part of A is supplied in AP. MUBLAS_FILL_MODE_LOWER: The lower triangular part of A is supplied in AP.
  • n: [int] the number of rows and columns of matrix A, must be at least 0.
  • alpha: device pointer or host pointer to scalar alpha.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.
  • y: device pointer storing vector y.
  • incy: [int] specifies the increment for the elements of y.
  • AP: device pointer storing the packed version of the specified triangular portion of the symmetric matrix A. Of at least size ((n * (n + 1)) / 2). if uplo == MUBLAS_FILL_MODE_UPPER: The upper triangular portion of the symmetric matrix A is supplied. The matrix is compacted so that AP contains the triangular portion column-by-column so that: AP(0) = A(0,0) AP(1) = A(0,1) AP(2) = A(1,1), etc. Ex: (MUBLAS_FILL_MODE_UPPER; n = 4) 1 2 4 7 2 3 5 8 -----> [1, 2, 3, 4, 5, 6, 7, 8, 9, 0] 4 5 6 9 7 8 9 0 if uplo == MUBLAS_FILL_MODE_LOWER: The lower triangular portion of the symmetric matrix A is supplied. The matrix is compacted so that AP contains the triangular portion column-by-column so that: AP(0) = A(0,0) AP(1) = A(1,0) AP(n) = A(2,1), etc. Ex: (MUBLAS_FILL_MODE_LOWER; n = 4) 1 2 3 4 2 5 6 7 -----> [1, 2, 3, 4, 5, 6, 7, 8, 9, 0] 3 6 8 9 4 7 9 0

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const float * alpha
  • const float * x
  • int incx
  • const float * y
  • int incy
  • float * AP

Return type: MUBLAS_EXPORT mublasStatus

mublasDspr2

MUBLAS_EXPORT mublasStatus mublasDspr2(mublasHandle_t handle, mublasFillMode_t uplo, int n, const double *alpha, const double *x, int incx, const double *y, int incy, double *AP)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const double * alpha
  • const double * x
  • int incx
  • const double * y
  • int incy
  • double * AP

Return type: MUBLAS_EXPORT mublasStatus

mublasSsyr

MUBLAS_EXPORT mublasStatus mublasSsyr(mublasHandle_t handle, mublasFillMode_t uplo, int n, const float *alpha, const float *x, int incx, float *A, int lda)

BLAS Level 2 API.

syr performs the matrix-vector operations

A := A + alpha*x*x**T

where alpha is a scalar, x is a vector, and A is an n by n symmetric matrix.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] specifies whether the upper 'MUBLAS_FILL_MODE_UPPER' or lower 'MUBLAS_FILL_MODE_LOWER' if MUBLAS_FILL_MODE_UPPER, the lower part of A is not referenced if MUBLAS_FILL_MODE_LOWER, the upper part of A is not referenced
  • n: [int] the number of rows and columns of matrix A.
  • alpha: device pointer or host pointer to scalar alpha.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.
  • A: device pointer storing matrix A.
  • lda: [int] specifies the leading dimension of A.

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const float * alpha
  • const float * x
  • int incx
  • float * A
  • int lda

Return type: MUBLAS_EXPORT mublasStatus

mublasDsyr

MUBLAS_EXPORT mublasStatus mublasDsyr(mublasHandle_t handle, mublasFillMode_t uplo, int n, const double *alpha, const double *x, int incx, double *A, int lda)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const double * alpha
  • const double * x
  • int incx
  • double * A
  • int lda

Return type: MUBLAS_EXPORT mublasStatus

mublasCsyr

MUBLAS_EXPORT mublasStatus mublasCsyr(mublasHandle_t handle, mublasFillMode_t uplo, int n, const muComplex *alpha, const muComplex *x, int incx, muComplex *A, int lda)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const muComplex * alpha
  • const muComplex * x
  • int incx
  • muComplex * A
  • int lda

Return type: MUBLAS_EXPORT mublasStatus

mublasZsyr

MUBLAS_EXPORT mublasStatus mublasZsyr(mublasHandle_t handle, mublasFillMode_t uplo, int n, const muDoubleComplex *alpha, const muDoubleComplex *x, int incx, muDoubleComplex *A, int lda)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const muDoubleComplex * alpha
  • const muDoubleComplex * x
  • int incx
  • muDoubleComplex * A
  • int lda

Return type: MUBLAS_EXPORT mublasStatus

mublasSsyr2

MUBLAS_EXPORT mublasStatus mublasSsyr2(mublasHandle_t handle, mublasFillMode_t uplo, int n, const float *alpha, const float *x, int incx, const float *y, int incy, float *A, int lda)

BLAS Level 2 API.

syr2 performs the matrix-vector operations

A := A + alpha*x*y**T + alpha*y*x**T

where alpha is a scalar, x and y are vectors, and A is an n by n symmetric matrix.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] specifies whether the upper 'MUBLAS_FILL_MODE_UPPER' or lower 'MUBLAS_FILL_MODE_LOWER' if MUBLAS_FILL_MODE_UPPER, the lower part of A is not referenced if MUBLAS_FILL_MODE_LOWER, the upper part of A is not referenced
  • n: [int] the number of rows and columns of matrix A.
  • alpha: device pointer or host pointer to scalar alpha.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment for the elements of x.
  • y: device pointer storing vector y.
  • incy: [int] specifies the increment for the elements of y.
  • A: device pointer storing matrix A.
  • lda: [int] specifies the leading dimension of A.

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const float * alpha
  • const float * x
  • int incx
  • const float * y
  • int incy
  • float * A
  • int lda

Return type: MUBLAS_EXPORT mublasStatus

mublasDsyr2

MUBLAS_EXPORT mublasStatus mublasDsyr2(mublasHandle_t handle, mublasFillMode_t uplo, int n, const double *alpha, const double *x, int incx, const double *y, int incy, double *A, int lda)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const double * alpha
  • const double * x
  • int incx
  • const double * y
  • int incy
  • double * A
  • int lda

Return type: MUBLAS_EXPORT mublasStatus

mublasCsyr2

MUBLAS_EXPORT mublasStatus mublasCsyr2(mublasHandle_t handle, mublasFillMode_t uplo, int n, const muComplex *alpha, const muComplex *x, int incx, const muComplex *y, int incy, muComplex *A, int lda)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const muComplex * alpha
  • const muComplex * x
  • int incx
  • const muComplex * y
  • int incy
  • muComplex * A
  • int lda

Return type: MUBLAS_EXPORT mublasStatus

mublasZsyr2

MUBLAS_EXPORT mublasStatus mublasZsyr2(mublasHandle_t handle, mublasFillMode_t uplo, int n, const muDoubleComplex *alpha, const muDoubleComplex *x, int incx, const muDoubleComplex *y, int incy, muDoubleComplex *A, int lda)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const muDoubleComplex * alpha
  • const muDoubleComplex * x
  • int incx
  • const muDoubleComplex * y
  • int incy
  • muDoubleComplex * A
  • int lda

Return type: MUBLAS_EXPORT mublasStatus

mublasChemm

MUBLAS_EXPORT mublasStatus mublasChemm(mublasHandle_t handle, mublasSideMode_t side, mublasFillMode_t uplo, int m, int n, const muComplex *alpha, const muComplex *A, int lda, const muComplex *B, int ldb, const muComplex *beta, muComplex *C, int ldc)

BLAS Level 3 API.

hemm performs one of the matrix-matrix operations:

C := alphaAB + betaC if side == MUBLAS_SIDE_LEFT, C := alphaBA + betaC if side == MUBLAS_SIDE_RIGHT,

where alpha and beta are scalars, B and C are m by n matrices, and A is a Hermitian matrix stored as either upper or lower.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • side: [mublasSideMode_t] MUBLAS_SIDE_LEFT: C := alphaAB + betaC MUBLAS_SIDE_RIGHT: C := alphaBA + betaC
  • uplo: [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: A is an upper triangular matrix MUBLAS_FILL_MODE_LOWER: A is a lower triangular matrix
  • m: [int] m specifies the number of rows of B and C. m >= 0.
  • n: [int] n specifies the number of columns of B and C. n >= 0.
  • alpha: alpha specifies the scalar alpha. When alpha is zero then A and B are not referenced.
  • A: pointer storing matrix A on the GPU. A is m by m if side == MUBLAS_SIDE_LEFT A is n by n if side == MUBLAS_SIDE_RIGHT Only the upper/lower triangular part is accessed. The imaginary component of the diagonal elements is not used.
  • lda: [int] lda specifies the first dimension of A. if side = MUBLAS_SIDE_LEFT, lda >= max( 1, m ), otherwise lda >= max( 1, n ).
  • B: pointer storing matrix B on the GPU. Matrix dimension is m by n
  • ldb: [int] ldb specifies the first dimension of B. ldb >= max( 1, m )
  • beta: beta specifies the scalar beta. When beta is zero then C need not be set before entry.
  • C: pointer storing matrix C on the GPU. Matrix dimension is m by n
  • ldc: [int] ldc specifies the first dimension of C. ldc >= max( 1, m )

Parameters:

  • mublasHandle_t handle
  • mublasSideMode_t side
  • mublasFillMode_t uplo
  • int m
  • int n
  • const muComplex * alpha
  • const muComplex * A
  • int lda
  • const muComplex * B
  • int ldb
  • const muComplex * beta
  • muComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasZhemm

MUBLAS_EXPORT mublasStatus mublasZhemm(mublasHandle_t handle, mublasSideMode_t side, mublasFillMode_t uplo, int m, int n, const muDoubleComplex *alpha, const muDoubleComplex *A, int lda, const muDoubleComplex *B, int ldb, const muDoubleComplex *beta, muDoubleComplex *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasSideMode_t side
  • mublasFillMode_t uplo
  • int m
  • int n
  • const muDoubleComplex * alpha
  • const muDoubleComplex * A
  • int lda
  • const muDoubleComplex * B
  • int ldb
  • const muDoubleComplex * beta
  • muDoubleComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasCherk

MUBLAS_EXPORT mublasStatus mublasCherk(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, int n, int k, const float *alpha, const muComplex *A, int lda, const float *beta, muComplex *C, int ldc)

BLAS Level 3 API.

herk performs one of the matrix-matrix operations for a Hermitian rank-k update

C := alpha*op( A )op( A )^H + betaC

where alpha and beta are scalars, op(A) is an n by k matrix, and C is a n x n Hermitian matrix stored as either upper or lower.

op( A ) = A, and A is n by k if transA == MUBLAS_OP_N
op( A ) = A^H and A is k by n if transA == MUBLAS_OP_C

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: C is an upper triangular matrix MUBLAS_FILL_MODE_LOWER: C is a lower triangular matrix
  • transA: [mublasOperation_t] MUBLAS_OP_C: op(A) = A^H MUBLAS_OP_N: op(A) = A
  • n: [int] n specifies the number of rows and columns of C. n >= 0.
  • k: [int] k specifies the number of columns of op(A). k >= 0.
  • alpha: alpha specifies the scalar alpha. When alpha is zero then A is not referenced and A need not be set before entry.
  • A: pointer storing matrix A on the GPU. Martrix dimension is ( lda, k ) when if transA = MUBLAS_OP_N, otherwise (lda, n) only the upper/lower triangular part is accessed.
  • lda: [int] lda specifies the first dimension of A. if transA = MUBLAS_OP_N, lda >= max( 1, n ), otherwise lda >= max( 1, k ).
  • beta: beta specifies the scalar beta. When beta is zero then C need not be set before entry.
  • C: pointer storing matrix C on the GPU. The imaginary component of the diagonal elements are not used but are set to zero unless quick return.
  • ldc: [int] ldc specifies the first dimension of C. ldc >= max( 1, n ).

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • int n
  • int k
  • const float * alpha
  • const muComplex * A
  • int lda
  • const float * beta
  • muComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasZherk

MUBLAS_EXPORT mublasStatus mublasZherk(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, int n, int k, const double *alpha, const muDoubleComplex *A, int lda, const double *beta, muDoubleComplex *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • int n
  • int k
  • const double * alpha
  • const muDoubleComplex * A
  • int lda
  • const double * beta
  • muDoubleComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasCherkEx

mublasStatus mublasCherkEx(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, int n, int k, const float *alpha, const void *A, musaDataType Atype, int lda, const float *beta, muComplex *C, musaDataType Ctype, int ldc)

BLAS Level 3 API.

herkEx and herk3mEx perform one of the matrix-matrix operations for a Hermitian rank-k update

C := alpha*op( A )op( A )^H + betaC

where alpha and beta are scalars, op(A) is an n by k matrix, and C is a n x n Hermitian matrix stored as either upper or lower.

op( A ) = A, and A is n by k if transA == MUBLAS_OP_N
op( A ) = A^H and A is k by n if transA == MUBLAS_OP_C

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: C is an upper triangular matrix MUBLAS_FILL_MODE_LOWER: C is a lower triangular matrix
  • transA: [mublasOperation_t] MUBLAS_OP_C: op(A) = A^H MUBLAS_OP_N: op(A) = A
  • n: [int] n specifies the number of rows and columns of C. n >= 0.
  • k: [int] k specifies the number of columns of op(A). k >= 0.
  • alpha: alpha specifies the scalar alpha. When alpha is zero then A is not referenced and A need not be set before entry.
  • A: pointer storing matrix A on the GPU. Martrix dimension is ( lda, k ) when if transA = MUBLAS_OP_N, otherwise (lda, n) only the upper/lower triangular part is accessed.
  • Atype: numerant specifying the datatype of matrix A
  • lda: [int] lda specifies the first dimension of A. if transA = MUBLAS_OP_N, lda >= max( 1, n ), otherwise lda >= max( 1, k ).
  • beta: beta specifies the scalar beta. When beta is zero then C need not be set before entry.
  • C: pointer storing matrix C on the GPU. The imaginary component of the diagonal elements are not used but are set to zero unless quick return.
  • Ctype: numerant specifying the datatype of matrix C
  • ldc: [int] ldc specifies the first dimension of C. ldc >= max( 1, n ).

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • int n
  • int k
  • const float * alpha
  • const void * A
  • musaDataType Atype
  • int lda
  • const float * beta
  • muComplex * C
  • musaDataType Ctype
  • int ldc

Return type: mublasStatus

mublasCherk3mEx

mublasStatus mublasCherk3mEx(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, int n, int k, const float *alpha, const void *A, musaDataType Atype, int lda, const float *beta, muComplex *C, musaDataType Ctype, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • int n
  • int k
  • const float * alpha
  • const void * A
  • musaDataType Atype
  • int lda
  • const float * beta
  • muComplex * C
  • musaDataType Ctype
  • int ldc

Return type: mublasStatus

mublasCher2k

MUBLAS_EXPORT mublasStatus mublasCher2k(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t trans, int n, int k, const muComplex *alpha, const muComplex *A, int lda, const muComplex *B, int ldb, const float *beta, muComplex *C, int ldc)

BLAS Level 3 API.

her2k performs one of the matrix-matrix operations for a Hermitian rank-2k update

C := alpha*op( A )*op( B )^H + conj(alpha)*op( B )op( A )^H + betaC

where alpha and beta are scalars, op(A) and op(B) are n by k matrices, and C is a n x n Hermitian matrix stored as either upper or lower.

op( A ) = A, op( B ) = B, and A and B are n by k if trans == MUBLAS_OP_N
op( A ) = A^H, op( B ) = B^H, and A and B are k by n if trans == MUBLAS_OP_C

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: C is an upper triangular matrix MUBLAS_FILL_MODE_LOWER: C is a lower triangular matrix
  • trans: [mublasOperation_t] MUBLAS_OP_C: op( A ) = A^H, op( B ) = B^H MUBLAS_OP_N: op( A ) = A, op( B ) = B
  • n: [int] n specifies the number of rows and columns of C. n >= 0.
  • k: [int] k specifies the number of columns of op(A). k >= 0.
  • alpha: alpha specifies the scalar alpha. When alpha is zero then A is not referenced and A need not be set before entry.
  • A: pointer storing matrix A on the GPU. Martrix dimension is ( lda, k ) when if trans = MUBLAS_OP_N, otherwise (lda, n) only the upper/lower triangular part is accessed.
  • lda: [int] lda specifies the first dimension of A. if trans = MUBLAS_OP_N, lda >= max( 1, n ), otherwise lda >= max( 1, k ).
  • B: pointer storing matrix B on the GPU. Martrix dimension is ( ldb, k ) when if trans = MUBLAS_OP_N, otherwise (ldb, n) only the upper/lower triangular part is accessed.
  • ldb: [int] ldb specifies the first dimension of B. if trans = MUBLAS_OP_N, ldb >= max( 1, n ), otherwise ldb >= max( 1, k ).
  • beta: beta specifies the scalar beta. When beta is zero then C need not be set before entry.
  • C: pointer storing matrix C on the GPU. The imaginary component of the diagonal elements are not used but are set to zero unless quick return.
  • ldc: [int] ldc specifies the first dimension of C. ldc >= max( 1, n ).

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t trans
  • int n
  • int k
  • const muComplex * alpha
  • const muComplex * A
  • int lda
  • const muComplex * B
  • int ldb
  • const float * beta
  • muComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasZher2k

MUBLAS_EXPORT mublasStatus mublasZher2k(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t trans, int n, int k, const muDoubleComplex *alpha, const muDoubleComplex *A, int lda, const muDoubleComplex *B, int ldb, const double *beta, muDoubleComplex *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t trans
  • int n
  • int k
  • const muDoubleComplex * alpha
  • const muDoubleComplex * A
  • int lda
  • const muDoubleComplex * B
  • int ldb
  • const double * beta
  • muDoubleComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasCherkx

MUBLAS_EXPORT mublasStatus mublasCherkx(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t trans, int n, int k, const muComplex *alpha, const muComplex *A, int lda, const muComplex *B, int ldb, const float *beta, muComplex *C, int ldc)

BLAS Level 3 API.

herkx performs one of the matrix-matrix operations for a Hermitian rank-k update

C := alpha*op( A )op( B )^H + betaC

where alpha and beta are scalars, op(A) and op(B) are n by k matrices, and C is a n x n Hermitian matrix stored as either upper or lower. This routine should only be used when the caller can guarantee that the result of op( A )*op( B )^T will be Hermitian.

op( A ) = A, op( B ) = B, and A and B are n by k if trans == MUBLAS_OP_N
op( A ) = A^H, op( B ) = B^H, and A and B are k by n if trans == MUBLAS_OP_C

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: C is an upper triangular matrix MUBLAS_FILL_MODE_LOWER: C is a lower triangular matrix
  • trans: [mublasOperation_t] MUBLAS_OP_C: op( A ) = A^H, op( B ) = B^H MUBLAS_OP_N: op( A ) = A, op( B ) = B
  • n: [int] n specifies the number of rows and columns of C. n >= 0.
  • k: [int] k specifies the number of columns of op(A). k >= 0.
  • alpha: alpha specifies the scalar alpha. When alpha is zero then A is not referenced and A need not be set before entry.
  • A: pointer storing matrix A on the GPU. Martrix dimension is ( lda, k ) when if trans = MUBLAS_OP_N, otherwise (lda, n) only the upper/lower triangular part is accessed.
  • lda: [int] lda specifies the first dimension of A. if trans = MUBLAS_OP_N, lda >= max( 1, n ), otherwise lda >= max( 1, k ).
  • B: pointer storing matrix B on the GPU. Martrix dimension is ( ldb, k ) when if trans = MUBLAS_OP_N, otherwise (ldb, n) only the upper/lower triangular part is accessed.
  • ldb: [int] ldb specifies the first dimension of B. if trans = MUBLAS_OP_N, ldb >= max( 1, n ), otherwise ldb >= max( 1, k ).
  • beta: beta specifies the scalar beta. When beta is zero then C need not be set before entry.
  • C: pointer storing matrix C on the GPU. The imaginary component of the diagonal elements are not used but are set to zero unless quick return.
  • ldc: [int] ldc specifies the first dimension of C. ldc >= max( 1, n ).

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t trans
  • int n
  • int k
  • const muComplex * alpha
  • const muComplex * A
  • int lda
  • const muComplex * B
  • int ldb
  • const float * beta
  • muComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasZherkx

MUBLAS_EXPORT mublasStatus mublasZherkx(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t trans, int n, int k, const muDoubleComplex *alpha, const muDoubleComplex *A, int lda, const muDoubleComplex *B, int ldb, const double *beta, muDoubleComplex *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t trans
  • int n
  • int k
  • const muDoubleComplex * alpha
  • const muDoubleComplex * A
  • int lda
  • const muDoubleComplex * B
  • int ldb
  • const double * beta
  • muDoubleComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasSsymm

MUBLAS_EXPORT mublasStatus mublasSsymm(mublasHandle_t handle, mublasSideMode_t side, mublasFillMode_t uplo, int m, int n, const float *alpha, const float *A, int lda, const float *B, int ldb, const float *beta, float *C, int ldc)

BLAS Level 3 API.

symm performs one of the matrix-matrix operations:

C := alphaAB + betaC if side == MUBLAS_SIDE_LEFT, C := alphaBA + betaC if side == MUBLAS_SIDE_RIGHT,

where alpha and beta are scalars, B and C are m by n matrices, and A is a symmetric matrix stored as either upper or lower.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • side: [mublasSideMode_t] MUBLAS_SIDE_LEFT: C := alphaAB + betaC MUBLAS_SIDE_RIGHT: C := alphaBA + betaC
  • uplo: [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: A is an upper triangular matrix MUBLAS_FILL_MODE_LOWER: A is a lower triangular matrix
  • m: [int] m specifies the number of rows of B and C. m >= 0.
  • n: [int] n specifies the number of columns of B and C. n >= 0.
  • alpha: alpha specifies the scalar alpha. When alpha is zero then A and B are not referenced.
  • A: pointer storing matrix A on the GPU. A is m by m if side == MUBLAS_SIDE_LEFT A is n by n if side == MUBLAS_SIDE_RIGHT only the upper/lower triangular part is accessed.
  • lda: [int] lda specifies the first dimension of A. if side = MUBLAS_SIDE_LEFT, lda >= max( 1, m ), otherwise lda >= max( 1, n ).
  • B: pointer storing matrix B on the GPU. Matrix dimension is m by n
  • ldb: [int] ldb specifies the first dimension of B. ldb >= max( 1, m )
  • beta: beta specifies the scalar beta. When beta is zero then C need not be set before entry.
  • C: pointer storing matrix C on the GPU. Matrix dimension is m by n
  • ldc: [int] ldc specifies the first dimension of C. ldc >= max( 1, m )

Parameters:

  • mublasHandle_t handle
  • mublasSideMode_t side
  • mublasFillMode_t uplo
  • int m
  • int n
  • const float * alpha
  • const float * A
  • int lda
  • const float * B
  • int ldb
  • const float * beta
  • float * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasDsymm

MUBLAS_EXPORT mublasStatus mublasDsymm(mublasHandle_t handle, mublasSideMode_t side, mublasFillMode_t uplo, int m, int n, const double *alpha, const double *A, int lda, const double *B, int ldb, const double *beta, double *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasSideMode_t side
  • mublasFillMode_t uplo
  • int m
  • int n
  • const double * alpha
  • const double * A
  • int lda
  • const double * B
  • int ldb
  • const double * beta
  • double * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasCsymm

MUBLAS_EXPORT mublasStatus mublasCsymm(mublasHandle_t handle, mublasSideMode_t side, mublasFillMode_t uplo, int m, int n, const muComplex *alpha, const muComplex *A, int lda, const muComplex *B, int ldb, const muComplex *beta, muComplex *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasSideMode_t side
  • mublasFillMode_t uplo
  • int m
  • int n
  • const muComplex * alpha
  • const muComplex * A
  • int lda
  • const muComplex * B
  • int ldb
  • const muComplex * beta
  • muComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasZsymm

MUBLAS_EXPORT mublasStatus mublasZsymm(mublasHandle_t handle, mublasSideMode_t side, mublasFillMode_t uplo, int m, int n, const muDoubleComplex *alpha, const muDoubleComplex *A, int lda, const muDoubleComplex *B, int ldb, const muDoubleComplex *beta, muDoubleComplex *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasSideMode_t side
  • mublasFillMode_t uplo
  • int m
  • int n
  • const muDoubleComplex * alpha
  • const muDoubleComplex * A
  • int lda
  • const muDoubleComplex * B
  • int ldb
  • const muDoubleComplex * beta
  • muDoubleComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasSsyrk

MUBLAS_EXPORT mublasStatus mublasSsyrk(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, int n, int k, const float *alpha, const float *A, int lda, const float *beta, float *C, int ldc)

BLAS Level 3 API.

syrk performs one of the matrix-matrix operations for a symmetric rank-k update

C := alpha*op( A )op( A )^T + betaC

where alpha and beta are scalars, op(A) is an n by k matrix, and C is a symmetric n x n matrix stored as either upper or lower.

op( A ) = A, and A is n by k if transA == MUBLAS_OP_N
op( A ) = A^T and A is k by n if transA == MUBLAS_OP_T

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: C is an upper triangular matrix MUBLAS_FILL_MODE_LOWER: C is a lower triangular matrix
  • transA: [mublasOperation_t] MUBLAS_OP_T: op(A) = A^T MUBLAS_OP_N: op(A) = A MUBLAS_OP_C: op(A) = A^T

MUBLAS_OP_C is not supported for complex types, see cherk and zherk.

Parameters:

  • n: [int] n specifies the number of rows and columns of C. n >= 0.
  • k: [int] k specifies the number of columns of op(A). k >= 0.
  • alpha: alpha specifies the scalar alpha. When alpha is zero then A is not referenced and A need not be set before entry.
  • A: pointer storing matrix A on the GPU. Martrix dimension is ( lda, k ) when if transA = MUBLAS_OP_N, otherwise (lda, n) only the upper/lower triangular part is accessed.
  • lda: [int] lda specifies the first dimension of A. if transA = MUBLAS_OP_N, lda >= max( 1, n ), otherwise lda >= max( 1, k ).
  • beta: beta specifies the scalar beta. When beta is zero then C need not be set before entry.
  • C: pointer storing matrix C on the GPU.
  • ldc: [int] ldc specifies the first dimension of C. ldc >= max( 1, n ).

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • int n
  • int k
  • const float * alpha
  • const float * A
  • int lda
  • const float * beta
  • float * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasDsyrk

MUBLAS_EXPORT mublasStatus mublasDsyrk(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, int n, int k, const double *alpha, const double *A, int lda, const double *beta, double *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • int n
  • int k
  • const double * alpha
  • const double * A
  • int lda
  • const double * beta
  • double * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasCsyrk

MUBLAS_EXPORT mublasStatus mublasCsyrk(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, int n, int k, const muComplex *alpha, const muComplex *A, int lda, const muComplex *beta, muComplex *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • int n
  • int k
  • const muComplex * alpha
  • const muComplex * A
  • int lda
  • const muComplex * beta
  • muComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasZsyrk

MUBLAS_EXPORT mublasStatus mublasZsyrk(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t transA, int n, int k, const muDoubleComplex *alpha, const muDoubleComplex *A, int lda, const muDoubleComplex *beta, muDoubleComplex *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • int n
  • int k
  • const muDoubleComplex * alpha
  • const muDoubleComplex * A
  • int lda
  • const muDoubleComplex * beta
  • muDoubleComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasSsyr2k

MUBLAS_EXPORT mublasStatus mublasSsyr2k(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t trans, int n, int k, const float *alpha, const float *A, int lda, const float *B, int ldb, const float *beta, float *C, int ldc)

BLAS Level 3 API.

syr2k performs one of the matrix-matrix operations for a symmetric rank-2k update

C := alpha*(op( A )*op( B )^T + op( B )op( A )^T) + betaC

where alpha and beta are scalars, op(A) and op(B) are n by k matrix, and C is a symmetric n x n matrix stored as either upper or lower.

op( A ) = A, op( B ) = B, and A and B are n by k if trans == MUBLAS_OP_N
op( A ) = A^T, op( B ) = B^T, and A and B are k by n if trans == MUBLAS_OP_T

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: C is an upper triangular matrix MUBLAS_FILL_MODE_LOWER: C is a lower triangular matrix
  • trans: [mublasOperation_t] MUBLAS_OP_T: op( A ) = A^T, op( B ) = B^T MUBLAS_OP_N: op( A ) = A, op( B ) = B
  • n: [int] n specifies the number of rows and columns of C. n >= 0.
  • k: [int] k specifies the number of columns of op(A) and op(B). k >= 0.
  • alpha: alpha specifies the scalar alpha. When alpha is zero then A is not referenced and A need not be set before entry.
  • A: pointer storing matrix A on the GPU. Martrix dimension is ( lda, k ) when if trans = MUBLAS_OP_N, otherwise (lda, n) only the upper/lower triangular part is accessed.
  • lda: [int] lda specifies the first dimension of A. if trans = MUBLAS_OP_N, lda >= max( 1, n ), otherwise lda >= max( 1, k ).
  • B: pointer storing matrix B on the GPU. Martrix dimension is ( ldb, k ) when if trans = MUBLAS_OP_N, otherwise (ldb, n) only the upper/lower triangular part is accessed.
  • ldb: [int] ldb specifies the first dimension of B. if trans = MUBLAS_OP_N, ldb >= max( 1, n ), otherwise ldb >= max( 1, k ).
  • beta: beta specifies the scalar beta. When beta is zero then C need not be set before entry.
  • C: pointer storing matrix C on the GPU.
  • ldc: [int] ldc specifies the first dimension of C. ldc >= max( 1, n ).

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t trans
  • int n
  • int k
  • const float * alpha
  • const float * A
  • int lda
  • const float * B
  • int ldb
  • const float * beta
  • float * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasDsyr2k

MUBLAS_EXPORT mublasStatus mublasDsyr2k(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t trans, int n, int k, const double *alpha, const double *A, int lda, const double *B, int ldb, const double *beta, double *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t trans
  • int n
  • int k
  • const double * alpha
  • const double * A
  • int lda
  • const double * B
  • int ldb
  • const double * beta
  • double * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasCsyr2k

MUBLAS_EXPORT mublasStatus mublasCsyr2k(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t trans, int n, int k, const muComplex *alpha, const muComplex *A, int lda, const muComplex *B, int ldb, const muComplex *beta, muComplex *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t trans
  • int n
  • int k
  • const muComplex * alpha
  • const muComplex * A
  • int lda
  • const muComplex * B
  • int ldb
  • const muComplex * beta
  • muComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasZsyr2k

MUBLAS_EXPORT mublasStatus mublasZsyr2k(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t trans, int n, int k, const muDoubleComplex *alpha, const muDoubleComplex *A, int lda, const muDoubleComplex *B, int ldb, const muDoubleComplex *beta, muDoubleComplex *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t trans
  • int n
  • int k
  • const muDoubleComplex * alpha
  • const muDoubleComplex * A
  • int lda
  • const muDoubleComplex * B
  • int ldb
  • const muDoubleComplex * beta
  • muDoubleComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasSsyrkx

MUBLAS_EXPORT mublasStatus mublasSsyrkx(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t trans, int n, int k, const float *alpha, const float *A, int lda, const float *B, int ldb, const float *beta, float *C, int ldc)

BLAS Level 3 API.

syrkx performs one of the matrix-matrix operations for a symmetric rank-k update

C := alpha*op( A )op( B )^T + betaC

where alpha and beta are scalars, op(A) and op(B) are n by k matrix, and C is a symmetric n x n matrix stored as either upper or lower. This routine should only be used when the caller can guarantee that the result of op( A )*op( B )^T will be symmetric.

op( A ) = A, op( B ) = B, and A and B are n by k if trans == MUBLAS_OP_N
op( A ) = A^T, op( B ) = B^T, and A and B are k by n if trans == MUBLAS_OP_T

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: C is an upper triangular matrix MUBLAS_FILL_MODE_LOWER: C is a lower triangular matrix
  • trans: [mublasOperation_t] MUBLAS_OP_T: op( A ) = A^T, op( B ) = B^T MUBLAS_OP_N: op( A ) = A, op( B ) = B
  • n: [int] n specifies the number of rows and columns of C. n >= 0.
  • k: [int] k specifies the number of columns of op(A) and op(B). k >= 0.
  • alpha: alpha specifies the scalar alpha. When alpha is zero then A is not referenced and A need not be set before entry.
  • A: pointer storing matrix A on the GPU. Martrix dimension is ( lda, k ) when if trans = MUBLAS_OP_N, otherwise (lda, n) only the upper/lower triangular part is accessed.
  • lda: [int] lda specifies the first dimension of A. if trans = MUBLAS_OP_N, lda >= max( 1, n ), otherwise lda >= max( 1, k ).
  • B: pointer storing matrix B on the GPU. Martrix dimension is ( ldb, k ) when if trans = MUBLAS_OP_N, otherwise (ldb, n) only the upper/lower triangular part is accessed.
  • ldb: [int] ldb specifies the first dimension of B. if trans = MUBLAS_OP_N, ldb >= max( 1, n ), otherwise ldb >= max( 1, k ).
  • beta: beta specifies the scalar beta. When beta is zero then C need not be set before entry.
  • C: pointer storing matrix C on the GPU.
  • ldc: [int] ldc specifies the first dimension of C. ldc >= max( 1, n ).

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t trans
  • int n
  • int k
  • const float * alpha
  • const float * A
  • int lda
  • const float * B
  • int ldb
  • const float * beta
  • float * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasDsyrkx

MUBLAS_EXPORT mublasStatus mublasDsyrkx(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t trans, int n, int k, const double *alpha, const double *A, int lda, const double *B, int ldb, const double *beta, double *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t trans
  • int n
  • int k
  • const double * alpha
  • const double * A
  • int lda
  • const double * B
  • int ldb
  • const double * beta
  • double * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasCsyrkx

MUBLAS_EXPORT mublasStatus mublasCsyrkx(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t trans, int n, int k, const muComplex *alpha, const muComplex *A, int lda, const muComplex *B, int ldb, const muComplex *beta, muComplex *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t trans
  • int n
  • int k
  • const muComplex * alpha
  • const muComplex * A
  • int lda
  • const muComplex * B
  • int ldb
  • const muComplex * beta
  • muComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasZsyrkx

MUBLAS_EXPORT mublasStatus mublasZsyrkx(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t trans, int n, int k, const muDoubleComplex *alpha, const muDoubleComplex *A, int lda, const muDoubleComplex *B, int ldb, const muDoubleComplex *beta, muDoubleComplex *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t trans
  • int n
  • int k
  • const muDoubleComplex * alpha
  • const muDoubleComplex * A
  • int lda
  • const muDoubleComplex * B
  • int ldb
  • const muDoubleComplex * beta
  • muDoubleComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasStrmm

MUBLAS_EXPORT mublasStatus mublasStrmm(mublasHandle_t handle, mublasSideMode_t side, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, int n, const float *alpha, const float *A, int lda, const float *B, int ldb, float *C, int ldc)

BLAS Level 3 API.

trmm performs one of the matrix-matrix operations

C := alphaop( A )B, or C := alphaBop( A )

where alpha is a scalar, B and C are m by n matrices, A is a unit, or non-unit, upper or lower triangular matrix and op( A ) is one of

op( A ) = A or op( A ) = A^T or op( A ) = A^H.

Note that trmm can provide in-place functionality in the same way as trmm by passing in the same address for both matrices B and C.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • side: [mublasSideMode_t] Specifies whether op(A) multiplies B from the left or right as follows: MUBLAS_SIDE_LEFT: C := alphaop( A )B. MUBLAS_SIDE_RIGHT: C := alphaBop( A ).
  • uplo: [mublasFillMode_t] Specifies whether the matrix A is an upper or lower triangular matrix as follows: MUBLAS_FILL_MODE_UPPER: A is an upper triangular matrix. MUBLAS_FILL_MODE_LOWER: A is a lower triangular matrix.
  • transA: [mublasOperation_t] Specifies the form of op(A) to be used in the matrix multiplication as follows: MUBLAS_OP_N: op(A) = A. MUBLAS_OP_T: op(A) = A^T. MUBLAS_OP_C: op(A) = A^H.
  • diag: [mublasDiagType_t] Specifies whether or not A is unit triangular as follows: MUBLAS_DIAG_UNIT: A is assumed to be unit triangular. MUBLAS_DIAG_NON_UNIT: A is not assumed to be unit triangular.
  • m: [int] m specifies the number of rows of B. m >= 0.
  • n: [int] n specifies the number of columns of B. n >= 0.
  • alpha: alpha specifies the scalar alpha. When alpha is zero then A is not referenced and B need not be set before entry.
  • A: Device pointer to matrix A on the GPU. A has dimension ( lda, k ), where k is m when side == MUBLAS_SIDE_LEFT and is n when side == MUBLAS_SIDE_RIGHT.

When uplo == MUBLAS_FILL_MODE_UPPER the leading k by k upper triangular part of the array A must contain the upper triangular matrix and the strictly lower triangular part of A is not referenced.

When uplo == MUBLAS_FILL_MODE_LOWER the leading k by k lower triangular part of the array A must contain the lower triangular matrix and the strictly upper triangular part of A is not referenced.

Note that when diag == MUBLAS_DIAG_UNIT the diagonal elements of A are not referenced either, but are assumed to be unity.

Parameters:

  • lda: [int] lda specifies the first dimension of A. if side == MUBLAS_SIDE_LEFT, lda >= max( 1, m ), if side == MUBLAS_SIDE_RIGHT, lda >= max( 1, n ).
  • B: Device pointer to the matrix B on the GPU.
  • ldb: [int] ldb specifies the first dimension of B. ldb >= max( 1, m ).
  • C: Device pointer to the matrix C on the GPU.
  • ldc: [int] ldc specifies the first dimension of C. ldc >= max( 1, m).

Parameters:

  • mublasHandle_t handle
  • mublasSideMode_t side
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • int n
  • const float * alpha
  • const float * A
  • int lda
  • const float * B
  • int ldb
  • float * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasDtrmm

MUBLAS_EXPORT mublasStatus mublasDtrmm(mublasHandle_t handle, mublasSideMode_t side, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, int n, const double *alpha, const double *A, int lda, const double *B, int ldb, double *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasSideMode_t side
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • int n
  • const double * alpha
  • const double * A
  • int lda
  • const double * B
  • int ldb
  • double * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasCtrmm

MUBLAS_EXPORT mublasStatus mublasCtrmm(mublasHandle_t handle, mublasSideMode_t side, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, int n, const muComplex *alpha, const muComplex *A, int lda, const muComplex *B, int ldb, muComplex *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasSideMode_t side
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • int n
  • const muComplex * alpha
  • const muComplex * A
  • int lda
  • const muComplex * B
  • int ldb
  • muComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasZtrmm

MUBLAS_EXPORT mublasStatus mublasZtrmm(mublasHandle_t handle, mublasSideMode_t side, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, int n, const muDoubleComplex *alpha, const muDoubleComplex *A, int lda, const muDoubleComplex *B, int ldb, muDoubleComplex *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasSideMode_t side
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • int n
  • const muDoubleComplex * alpha
  • const muDoubleComplex * A
  • int lda
  • const muDoubleComplex * B
  • int ldb
  • muDoubleComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasStrsm

MUBLAS_EXPORT mublasStatus mublasStrsm(mublasHandle_t handle, mublasSideMode_t side, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, int n, const float *alpha, const float *A, int lda, float *B, int ldb)

BLAS Level 3 API.

trsm solves

op(A)*X = alpha*B or X*op(A) = alpha*B,

where alpha is a scalar, X and B are m by n matrices, A is triangular matrix and op(A) is one of

op( A ) = A or op( A ) = A^T or op( A ) = A^H.

The matrix X is overwritten on B.

Note about memory allocation: When trsm is launched with a k evenly divisible by the internal block size of 128, and is no larger than 10 of these blocks, the API takes advantage of utilizing pre-allocated memory found in the handle to increase overall performance. This memory can be managed by using the environment variable WORKBUF_TRSM_B_CHNK. When this variable is not set the device memory used for temporary storage will default to 1 MB and may result in chunking, which in turn may reduce performance. Under these circumstances it is recommended that WORKBUF_TRSM_B_CHNK be set to the desired chunk of right hand sides to be used at a time.

(where k is m when MUBLAS_SIDE_LEFT and is n when MUBLAS_SIDE_RIGHT)

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • side: [mublasSideMode_t] MUBLAS_SIDE_LEFT: op(A)X = alphaB. MUBLAS_SIDE_RIGHT: Xop(A) = alphaB.
  • uplo: [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: A is an upper triangular matrix. MUBLAS_FILL_MODE_LOWER: A is a lower triangular matrix.
  • transA: [mublasOperation_t] transB: op(A) = A. MUBLAS_OP_T: op(A) = A^T. MUBLAS_OP_C: op(A) = A^H.
  • diag: [mublasDiagType_t] MUBLAS_DIAG_UNIT: A is assumed to be unit triangular. MUBLAS_DIAG_NON_UNIT: A is not assumed to be unit triangular.
  • m: [int] m specifies the number of rows of B. m >= 0.
  • n: [int] n specifies the number of columns of B. n >= 0.
  • alpha: device pointer or host pointer specifying the scalar alpha. When alpha is &zero then A is not referenced and B need not be set before entry.
  • A: device pointer storing matrix A. of dimension ( lda, k ), where k is m when MUBLAS_SIDE_LEFT and is n when MUBLAS_SIDE_RIGHT only the upper/lower triangular part is accessed.
  • lda: [int] lda specifies the first dimension of A. if side = MUBLAS_SIDE_LEFT, lda >= max( 1, m ), if side = MUBLAS_SIDE_RIGHT, lda >= max( 1, n ).
  • B: device pointer storing matrix B.
  • ldb: [int] ldb specifies the first dimension of B. ldb >= max( 1, m ).

Parameters:

  • mublasHandle_t handle
  • mublasSideMode_t side
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • int n
  • const float * alpha
  • const float * A
  • int lda
  • float * B
  • int ldb

Return type: MUBLAS_EXPORT mublasStatus

mublasDtrsm

MUBLAS_EXPORT mublasStatus mublasDtrsm(mublasHandle_t handle, mublasSideMode_t side, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, int n, const double *alpha, const double *A, int lda, double *B, int ldb)

Parameters:

  • mublasHandle_t handle
  • mublasSideMode_t side
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • int n
  • const double * alpha
  • const double * A
  • int lda
  • double * B
  • int ldb

Return type: MUBLAS_EXPORT mublasStatus

mublasCtrsm

MUBLAS_EXPORT mublasStatus mublasCtrsm(mublasHandle_t handle, mublasSideMode_t side, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, int n, const muComplex *alpha, const muComplex *A, int lda, muComplex *B, int ldb)

Parameters:

  • mublasHandle_t handle
  • mublasSideMode_t side
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • int n
  • const muComplex * alpha
  • const muComplex * A
  • int lda
  • muComplex * B
  • int ldb

Return type: MUBLAS_EXPORT mublasStatus

mublasZtrsm

MUBLAS_EXPORT mublasStatus mublasZtrsm(mublasHandle_t handle, mublasSideMode_t side, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, int n, const muDoubleComplex *alpha, const muDoubleComplex *A, int lda, muDoubleComplex *B, int ldb)

Parameters:

  • mublasHandle_t handle
  • mublasSideMode_t side
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • int n
  • const muDoubleComplex * alpha
  • const muDoubleComplex * A
  • int lda
  • muDoubleComplex * B
  • int ldb

Return type: MUBLAS_EXPORT mublasStatus

mublasStrsmBatched

MUBLAS_EXPORT mublasStatus mublasStrsmBatched(mublasHandle_t handle, mublasSideMode_t side, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, int n, const float *alpha, const float *const A[], int lda, float *const B[], int ldb, int batch_count)

BLAS Level 3 API.

trsm_batched performs the following batched operation:

op(A_i)*X_i = alpha*B_i or X_i*op(A_i) = alpha*B_i, for i = 1, ..., batch_count.

where alpha is a scalar, X and B are batched m by n matrices, A is triangular batched matrix and op(A) is one of

op( A ) = A or op( A ) = A^T or op( A ) = A^H.

Each matrix X_i is overwritten on B_i for i = 1, ..., batch_count.

Note about memory allocation: When trsm is launched with a k evenly divisible by the internal block size of 128, and is no larger than 10 of these blocks, the API takes advantage of utilizing pre-allocated memory found in the handle to increase overall performance. This memory can be managed by using the environment variable WORKBUF_TRSM_B_CHNK. When this variable is not set the device memory used for temporary storage will default to 1 MB and may result in chunking, which in turn may reduce performance. Under these circumstances it is recommended that WORKBUF_TRSM_B_CHNK be set to the desired chunk of right hand sides to be used at a time. (where k is m when MUBLAS_SIDE_LEFT and is n when MUBLAS_SIDE_RIGHT)

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • side: [mublasSideMode_t] MUBLAS_SIDE_LEFT: op(A)X = alphaB. MUBLAS_SIDE_RIGHT: Xop(A) = alphaB.
  • uplo: [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: each A_i is an upper triangular matrix. MUBLAS_FILL_MODE_LOWER: each A_i is a lower triangular matrix.
  • transA: [mublasOperation_t] transB: op(A) = A. MUBLAS_OP_T: op(A) = A^T. MUBLAS_OP_C: op(A) = A^H.
  • diag: [mublasDiagType_t] MUBLAS_DIAG_UNIT: each A_i is assumed to be unit triangular. MUBLAS_DIAG_NON_UNIT: each A_i is not assumed to be unit triangular.
  • m: [int] m specifies the number of rows of each B_i. m >= 0.
  • n: [int] n specifies the number of columns of each B_i. n >= 0.
  • alpha: device pointer or host pointer specifying the scalar alpha. When alpha is &zero then A is not referenced and B need not be set before entry.
  • A: device array of device pointers storing each matrix A_i on the GPU. Matricies are of dimension ( lda, k ), where k is m when MUBLAS_SIDE_LEFT and is n when MUBLAS_SIDE_RIGHT only the upper/lower triangular part is accessed.
  • lda: [int] lda specifies the first dimension of each A_i. if side = MUBLAS_SIDE_LEFT, lda >= max( 1, m ), if side = MUBLAS_SIDE_RIGHT, lda >= max( 1, n ).
  • B: device array of device pointers storing each matrix B_i on the GPU.
  • ldb: [int] ldb specifies the first dimension of each B_i. ldb >= max( 1, m ).
  • batch_count: [int] number of trsm operatons in the batch.

Parameters:

  • mublasHandle_t handle
  • mublasSideMode_t side
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • int n
  • const float * alpha
  • const float *const A
  • int lda
  • float *const B
  • int ldb
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasDtrsmBatched

MUBLAS_EXPORT mublasStatus mublasDtrsmBatched(mublasHandle_t handle, mublasSideMode_t side, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, int n, const double *alpha, const double *const A[], int lda, double *const B[], int ldb, int batch_count)

Parameters:

  • mublasHandle_t handle
  • mublasSideMode_t side
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • int n
  • const double * alpha
  • const double *const A
  • int lda
  • double *const B
  • int ldb
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasCtrsmBatched

MUBLAS_EXPORT mublasStatus mublasCtrsmBatched(mublasHandle_t handle, mublasSideMode_t side, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, int n, const muComplex *alpha, const muComplex *const A[], int lda, muComplex *const B[], int ldb, int batch_count)

Parameters:

  • mublasHandle_t handle
  • mublasSideMode_t side
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • int n
  • const muComplex * alpha
  • const muComplex *const A
  • int lda
  • muComplex *const B
  • int ldb
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasZtrsmBatched

MUBLAS_EXPORT mublasStatus mublasZtrsmBatched(mublasHandle_t handle, mublasSideMode_t side, mublasFillMode_t uplo, mublasOperation_t transA, mublasDiagType_t diag, int m, int n, const muDoubleComplex *alpha, const muDoubleComplex *const A[], int lda, muDoubleComplex *const B[], int ldb, int batch_count)

Parameters:

  • mublasHandle_t handle
  • mublasSideMode_t side
  • mublasFillMode_t uplo
  • mublasOperation_t transA
  • mublasDiagType_t diag
  • int m
  • int n
  • const muDoubleComplex * alpha
  • const muDoubleComplex *const A
  • int lda
  • muDoubleComplex *const B
  • int ldb
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasSgemm

MUBLAS_EXPORT mublasStatus mublasSgemm(mublasHandle_t handle, mublasOperation_t transA, mublasOperation_t transB, int m, int n, int k, const float *alpha, const float *A, int lda, const float *B, int ldb, const float *beta, float *C, int ldc)

BLAS Level 3 API.

gemm performs one of the matrix-matrix operations

C = alpha*op( A )*op( B ) + beta*C,

where op( X ) is one of

op( X ) = X or
op( X ) = X**T or
op( X ) = X**H,

alpha and beta are scalars, and A, B and C are matrices, with op( A ) an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • transA: [mublasOperation_t] specifies the form of op( A )
  • transB: [mublasOperation_t] specifies the form of op( B )
  • m: [int] number or rows of matrices op( A ) and C
  • n: [int] number of columns of matrices op( B ) and C
  • k: [int] number of columns of matrix op( A ) and number of rows of matrix op( B )
  • alpha: device pointer or host pointer specifying the scalar alpha.
  • A: device pointer storing matrix A.
  • lda: [int] specifies the leading dimension of A.
  • B: device pointer storing matrix B.
  • ldb: [int] specifies the leading dimension of B.
  • beta: device pointer or host pointer specifying the scalar beta.
  • C: device pointer storing matrix C on the GPU.
  • ldc: [int] specifies the leading dimension of C.

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • mublasOperation_t transB
  • int m
  • int n
  • int k
  • const float * alpha
  • const float * A
  • int lda
  • const float * B
  • int ldb
  • const float * beta
  • float * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasDgemm

MUBLAS_EXPORT mublasStatus mublasDgemm(mublasHandle_t handle, mublasOperation_t transA, mublasOperation_t transB, int m, int n, int k, const double *alpha, const double *A, int lda, const double *B, int ldb, const double *beta, double *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • mublasOperation_t transB
  • int m
  • int n
  • int k
  • const double * alpha
  • const double * A
  • int lda
  • const double * B
  • int ldb
  • const double * beta
  • double * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasHgemm

MUBLAS_EXPORT mublasStatus mublasHgemm(mublasHandle_t handle, mublasOperation_t transA, mublasOperation_t transB, int m, int n, int k, const __half *alpha, const __half *A, int lda, const __half *B, int ldb, const __half *beta, __half *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • mublasOperation_t transB
  • int m
  • int n
  • int k
  • const __half * alpha
  • const __half * A
  • int lda
  • const __half * B
  • int ldb
  • const __half * beta
  • __half * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasCgemm

MUBLAS_EXPORT mublasStatus mublasCgemm(mublasHandle_t handle, mublasOperation_t transA, mublasOperation_t transB, int m, int n, int k, const muComplex *alpha, const muComplex *A, int lda, const muComplex *B, int ldb, const muComplex *beta, muComplex *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • mublasOperation_t transB
  • int m
  • int n
  • int k
  • const muComplex * alpha
  • const muComplex * A
  • int lda
  • const muComplex * B
  • int ldb
  • const muComplex * beta
  • muComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasZgemm

MUBLAS_EXPORT mublasStatus mublasZgemm(mublasHandle_t handle, mublasOperation_t transA, mublasOperation_t transB, int m, int n, int k, const muDoubleComplex *alpha, const muDoubleComplex *A, int lda, const muDoubleComplex *B, int ldb, const muDoubleComplex *beta, muDoubleComplex *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • mublasOperation_t transB
  • int m
  • int n
  • int k
  • const muDoubleComplex * alpha
  • const muDoubleComplex * A
  • int lda
  • const muDoubleComplex * B
  • int ldb
  • const muDoubleComplex * beta
  • muDoubleComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasCgemm3m

MUBLAS_EXPORT mublasStatus mublasCgemm3m(mublasHandle_t handle, mublasOperation_t transA, mublasOperation_t transB, int m, int n, int k, const muComplex *alpha, const muComplex *A, int lda, const muComplex *B, int ldb, const muComplex *beta, muComplex *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • mublasOperation_t transB
  • int m
  • int n
  • int k
  • const muComplex * alpha
  • const muComplex * A
  • int lda
  • const muComplex * B
  • int ldb
  • const muComplex * beta
  • muComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasZgemm3m

MUBLAS_EXPORT mublasStatus mublasZgemm3m(mublasHandle_t handle, mublasOperation_t transA, mublasOperation_t transB, int m, int n, int k, const muDoubleComplex *alpha, const muDoubleComplex *A, int lda, const muDoubleComplex *B, int ldb, const muDoubleComplex *beta, muDoubleComplex *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • mublasOperation_t transB
  • int m
  • int n
  • int k
  • const muDoubleComplex * alpha
  • const muDoubleComplex * A
  • int lda
  • const muDoubleComplex * B
  • int ldb
  • const muDoubleComplex * beta
  • muDoubleComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasSgemmBatched

MUBLAS_EXPORT mublasStatus mublasSgemmBatched(mublasHandle_t handle, mublasOperation_t transA, mublasOperation_t transB, int m, int n, int k, const float *alpha, const float *const A[], int lda, const float *const B[], int ldb, const float *beta, float *const C[], int ldc, int batch_count)

BLAS Level 3 API.

gemm_batched performs one of the batched matrix-matrix operations C_i = alpha*op( A_i )op( B_i ) + betaC_i, for i = 1, ..., batch_count. where op( X ) is one of op( X ) = X or op( X ) = XT or op( X ) = XH, alpha and beta are scalars, and A, B and C are strided batched matrices, with op( A ) an m by k by batch_count strided_batched matrix, op( B ) an k by n by batch_count strided_batched matrix and C an m by n by batch_count strided_batched matrix. Parameters:

  • handle: [mublasHandle_t handle to the mublas library context queue.
  • transA: [mublasOperation_t] specifies the form of op( A )
  • transB: [mublasOperation_t] specifies the form of op( B )
  • m: [int] matrix dimention m.
  • n: [int] matrix dimention n.
  • k: [int] matrix dimention k.
  • alpha: device pointer or host pointer specifying the scalar alpha.
  • A: device array of device pointers storing each matrix A_i.
  • lda: [int] specifies the leading dimension of each A_i.
  • B: device array of device pointers storing each matrix B_i.
  • ldb: [int] specifies the leading dimension of each B_i.
  • beta: device pointer or host pointer specifying the scalar beta.
  • C: device array of device pointers storing each matrix C_i.
  • ldc: [int] specifies the leading dimension of each C_i.
  • batch_count: [int] number of gemm operations in the batch

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • mublasOperation_t transB
  • int m
  • int n
  • int k
  • const float * alpha
  • const float *const A
  • int lda
  • const float *const B
  • int ldb
  • const float * beta
  • float *const C
  • int ldc
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasDgemmBatched

MUBLAS_EXPORT mublasStatus mublasDgemmBatched(mublasHandle_t handle, mublasOperation_t transA, mublasOperation_t transB, int m, int n, int k, const double *alpha, const double *const A[], int lda, const double *const B[], int ldb, const double *beta, double *const C[], int ldc, int batch_count)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • mublasOperation_t transB
  • int m
  • int n
  • int k
  • const double * alpha
  • const double *const A
  • int lda
  • const double *const B
  • int ldb
  • const double * beta
  • double *const C
  • int ldc
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasHgemmBatched

MUBLAS_EXPORT mublasStatus mublasHgemmBatched(mublasHandle_t handle, mublasOperation_t transA, mublasOperation_t transB, int m, int n, int k, const __half *alpha, const __half *const A[], int lda, const __half *const B[], int ldb, const __half *beta, __half *const C[], int ldc, int batch_count)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • mublasOperation_t transB
  • int m
  • int n
  • int k
  • const __half * alpha
  • const __half *const A
  • int lda
  • const __half *const B
  • int ldb
  • const __half * beta
  • __half *const C
  • int ldc
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasCgemmBatched

MUBLAS_EXPORT mublasStatus mublasCgemmBatched(mublasHandle_t handle, mublasOperation_t transA, mublasOperation_t transB, int m, int n, int k, const muComplex *alpha, const muComplex *const A[], int lda, const muComplex *const B[], int ldb, const muComplex *beta, muComplex *const C[], int ldc, int batch_count)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • mublasOperation_t transB
  • int m
  • int n
  • int k
  • const muComplex * alpha
  • const muComplex *const A
  • int lda
  • const muComplex *const B
  • int ldb
  • const muComplex * beta
  • muComplex *const C
  • int ldc
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasZgemmBatched

MUBLAS_EXPORT mublasStatus mublasZgemmBatched(mublasHandle_t handle, mublasOperation_t transA, mublasOperation_t transB, int m, int n, int k, const muDoubleComplex *alpha, const muDoubleComplex *const A[], int lda, const muDoubleComplex *const B[], int ldb, const muDoubleComplex *beta, muDoubleComplex *const C[], int ldc, int batch_count)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • mublasOperation_t transB
  • int m
  • int n
  • int k
  • const muDoubleComplex * alpha
  • const muDoubleComplex *const A
  • int lda
  • const muDoubleComplex *const B
  • int ldb
  • const muDoubleComplex * beta
  • muDoubleComplex *const C
  • int ldc
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasSgemmStridedBatched

MUBLAS_EXPORT mublasStatus mublasSgemmStridedBatched(mublasHandle_t handle, mublasOperation_t transA, mublasOperation_t transB, int m, int n, int k, const float *alpha, const float *A, int lda, long long int stride_a, const float *B, int ldb, long long int stride_b, const float *beta, float *C, int ldc, long long int stride_c, int batch_count)

BLAS Level 3 API.

gemm_strided_batched performs one of the strided batched matrix-matrix operations

C_i = alpha*op( A_i )*op( B_i ) + beta*C_i, for i = 1, ..., batch_count.

where op( X ) is one of

op( X ) = X or
op( X ) = X**T or
op( X ) = X**H,

alpha and beta are scalars, and A, B and C are strided batched matrices, with op( A ) an m by k by batch_count strided_batched matrix, op( B ) an k by n by batch_count strided_batched matrix and C an m by n by batch_count strided_batched matrix.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • transA: [mublasOperation_t] specifies the form of op( A )
  • transB: [mublasOperation_t] specifies the form of op( B )
  • m: [int] matrix dimention m.
  • n: [int] matrix dimention n.
  • k: [int] matrix dimention k.
  • alpha: device pointer or host pointer specifying the scalar alpha.
  • A: device pointer pointing to the first matrix A_1.
  • lda: [int] specifies the leading dimension of each A_i.
  • stride_a: [long long int] stride from the start of one A_i matrix to the next A_(i + 1).
  • B: device pointer pointing to the first matrix B_1.
  • ldb: [int] specifies the leading dimension of each B_i.
  • stride_b: [long long int] stride from the start of one B_i matrix to the next B_(i + 1).
  • beta: device pointer or host pointer specifying the scalar beta.
  • C: device pointer pointing to the first matrix C_1.
  • ldc: [int] specifies the leading dimension of each C_i.
  • stride_c: [long long int] stride from the start of one C_i matrix to the next C_(i + 1).
  • batch_count: [int] number of gemm operatons in the batch

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • mublasOperation_t transB
  • int m
  • int n
  • int k
  • const float * alpha
  • const float * A
  • int lda
  • long long int stride_a
  • const float * B
  • int ldb
  • long long int stride_b
  • const float * beta
  • float * C
  • int ldc
  • long long int stride_c
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasDgemmStridedBatched

MUBLAS_EXPORT mublasStatus mublasDgemmStridedBatched(mublasHandle_t handle, mublasOperation_t transA, mublasOperation_t transB, int m, int n, int k, const double *alpha, const double *A, int lda, long long int stride_a, const double *B, int ldb, long long int stride_b, const double *beta, double *C, int ldc, long long int stride_c, int batch_count)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • mublasOperation_t transB
  • int m
  • int n
  • int k
  • const double * alpha
  • const double * A
  • int lda
  • long long int stride_a
  • const double * B
  • int ldb
  • long long int stride_b
  • const double * beta
  • double * C
  • int ldc
  • long long int stride_c
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasHgemmStridedBatched

MUBLAS_EXPORT mublasStatus mublasHgemmStridedBatched(mublasHandle_t handle, mublasOperation_t transA, mublasOperation_t transB, int m, int n, int k, const __half *alpha, const __half *A, int lda, long long int stride_a, const __half *B, int ldb, long long int stride_b, const __half *beta, __half *C, int ldc, long long int stride_c, int batch_count)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • mublasOperation_t transB
  • int m
  • int n
  • int k
  • const __half * alpha
  • const __half * A
  • int lda
  • long long int stride_a
  • const __half * B
  • int ldb
  • long long int stride_b
  • const __half * beta
  • __half * C
  • int ldc
  • long long int stride_c
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasCgemmStridedBatched

MUBLAS_EXPORT mublasStatus mublasCgemmStridedBatched(mublasHandle_t handle, mublasOperation_t transA, mublasOperation_t transB, int m, int n, int k, const muComplex *alpha, const muComplex *A, int lda, long long int stride_a, const muComplex *B, int ldb, long long int stride_b, const muComplex *beta, muComplex *C, int ldc, long long int stride_c, int batch_count)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • mublasOperation_t transB
  • int m
  • int n
  • int k
  • const muComplex * alpha
  • const muComplex * A
  • int lda
  • long long int stride_a
  • const muComplex * B
  • int ldb
  • long long int stride_b
  • const muComplex * beta
  • muComplex * C
  • int ldc
  • long long int stride_c
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasCgemm3mStridedBatched

MUBLAS_EXPORT mublasStatus mublasCgemm3mStridedBatched(mublasHandle_t handle, mublasOperation_t trans_a, mublasOperation_t trans_b, int m, int n, int k, const muComplex *alpha, const muComplex *A, int lda, long long int stride_a, const muComplex *B, int ldb, long long int stride_b, const muComplex *beta, muComplex *C, int ldc, long long int stride_c, int batch_count)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t trans_a
  • mublasOperation_t trans_b
  • int m
  • int n
  • int k
  • const muComplex * alpha
  • const muComplex * A
  • int lda
  • long long int stride_a
  • const muComplex * B
  • int ldb
  • long long int stride_b
  • const muComplex * beta
  • muComplex * C
  • int ldc
  • long long int stride_c
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasZgemmStridedBatched

MUBLAS_EXPORT mublasStatus mublasZgemmStridedBatched(mublasHandle_t handle, mublasOperation_t transA, mublasOperation_t transB, int m, int n, int k, const muDoubleComplex *alpha, const muDoubleComplex *A, int lda, long long int stride_a, const muDoubleComplex *B, int ldb, long long int stride_b, const muDoubleComplex *beta, muDoubleComplex *C, int ldc, long long int stride_c, int batch_count)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • mublasOperation_t transB
  • int m
  • int n
  • int k
  • const muDoubleComplex * alpha
  • const muDoubleComplex * A
  • int lda
  • long long int stride_a
  • const muDoubleComplex * B
  • int ldb
  • long long int stride_b
  • const muDoubleComplex * beta
  • muDoubleComplex * C
  • int ldc
  • long long int stride_c
  • int batch_count

Return type: MUBLAS_EXPORT mublasStatus

mublasSgemmGroupedBatched

MUBLAS_EXPORT mublasStatus mublasSgemmGroupedBatched(mublasHandle_t handle, const mublasOperation_t transa_array[], const mublasOperation_t transb_array[], const int m_array[], const int n_array[], const int k_array[], const float alpha_array[], const float *const Aarray[], const int lda_array[], const float *const Barray[], const int ldb_array[], const float beta_array[], float *const Carray[], const int ldc_array[], int group_count, const int group_size[])

Parameters:

  • mublasHandle_t handle
  • const mublasOperation_t transa_array
  • const mublasOperation_t transb_array
  • const int m_array
  • const int n_array
  • const int k_array
  • const float alpha_array
  • const float *const Aarray
  • const int lda_array
  • const float *const Barray
  • const int ldb_array
  • const float beta_array
  • float *const Carray
  • const int ldc_array
  • int group_count
  • const int group_size

Return type: MUBLAS_EXPORT mublasStatus

mublasDgemmGroupedBatched

MUBLAS_EXPORT mublasStatus mublasDgemmGroupedBatched(mublasHandle_t handle, const mublasOperation_t transa_array[], const mublasOperation_t transb_array[], const int m_array[], const int n_array[], const int k_array[], const double alpha_array[], const double *const Aarray[], const int lda_array[], const double *const Barray[], const int ldb_array[], const double beta_array[], double *const Carray[], const int ldc_array[], int group_count, const int group_size[])

Parameters:

  • mublasHandle_t handle
  • const mublasOperation_t transa_array
  • const mublasOperation_t transb_array
  • const int m_array
  • const int n_array
  • const int k_array
  • const double alpha_array
  • const double *const Aarray
  • const int lda_array
  • const double *const Barray
  • const int ldb_array
  • const double beta_array
  • double *const Carray
  • const int ldc_array
  • int group_count
  • const int group_size

Return type: MUBLAS_EXPORT mublasStatus

mublasSdgmm

MUBLAS_EXPORT mublasStatus mublasSdgmm(mublasHandle_t handle, mublasSideMode_t side, int m, int n, const float *A, int lda, const float *x, int incx, float *C, int ldc)

BLAS Level 3 API.

dgmm performs one of the matrix-matrix operations

C = A * diag(x) if side == MUBLAS_SIDE_RIGHT
C = diag(x) * A if side == MUBLAS_SIDE_LEFT

where C and A are m by n dimensional matrices. diag( x ) is a diagonal matrix and x is vector of dimension n if side == MUBLAS_SIDE_RIGHT and dimension m if side == MUBLAS_SIDE_LEFT.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • side: [mublasSideMode_t] specifies the side of diag(x)
  • m: [int] matrix dimension m.
  • n: [int] matrix dimension n.
  • A: device pointer storing matrix A.
  • lda: [int] specifies the leading dimension of A.
  • x: device pointer storing vector x.
  • incx: [int] specifies the increment between values of x
  • C: device pointer storing matrix C.
  • ldc: [int] specifies the leading dimension of C.

Parameters:

  • mublasHandle_t handle
  • mublasSideMode_t side
  • int m
  • int n
  • const float * A
  • int lda
  • const float * x
  • int incx
  • float * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasDdgmm

MUBLAS_EXPORT mublasStatus mublasDdgmm(mublasHandle_t handle, mublasSideMode_t side, int m, int n, const double *A, int lda, const double *x, int incx, double *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasSideMode_t side
  • int m
  • int n
  • const double * A
  • int lda
  • const double * x
  • int incx
  • double * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasCdgmm

MUBLAS_EXPORT mublasStatus mublasCdgmm(mublasHandle_t handle, mublasSideMode_t side, int m, int n, const muComplex *A, int lda, const muComplex *x, int incx, muComplex *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasSideMode_t side
  • int m
  • int n
  • const muComplex * A
  • int lda
  • const muComplex * x
  • int incx
  • muComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasZdgmm

MUBLAS_EXPORT mublasStatus mublasZdgmm(mublasHandle_t handle, mublasSideMode_t side, int m, int n, const muDoubleComplex *A, int lda, const muDoubleComplex *x, int incx, muDoubleComplex *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasSideMode_t side
  • int m
  • int n
  • const muDoubleComplex * A
  • int lda
  • const muDoubleComplex * x
  • int incx
  • muDoubleComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasSgeam

MUBLAS_EXPORT mublasStatus mublasSgeam(mublasHandle_t handle, mublasOperation_t transA, mublasOperation_t transB, int m, int n, const float *alpha, const float *A, int lda, const float *beta, const float *B, int ldb, float *C, int ldc)

BLAS Level 3 API.

geam performs one of the matrix-matrix operations

C = alpha*op( A ) + beta*op( B ),

where op( X ) is one of

op( X ) = X or
op( X ) = X**T or
op( X ) = X**H,

alpha and beta are scalars, and A, B and C are matrices, with op( A ) an m by n matrix, op( B ) an m by n matrix, and C an m by n matrix.

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • transA: [mublasOperation_t] specifies the form of op( A )
  • transB: [mublasOperation_t] specifies the form of op( B )
  • m: [int] matrix dimension m.
  • n: [int] matrix dimension n.
  • alpha: device pointer or host pointer specifying the scalar alpha.
  • A: device pointer storing matrix A.
  • lda: [int] specifies the leading dimension of A.
  • beta: device pointer or host pointer specifying the scalar beta.
  • B: device pointer storing matrix B.
  • ldb: [int] specifies the leading dimension of B.
  • C: device pointer storing matrix C.
  • ldc: [int] specifies the leading dimension of C.

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • mublasOperation_t transB
  • int m
  • int n
  • const float * alpha
  • const float * A
  • int lda
  • const float * beta
  • const float * B
  • int ldb
  • float * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasDgeam

MUBLAS_EXPORT mublasStatus mublasDgeam(mublasHandle_t handle, mublasOperation_t transA, mublasOperation_t transB, int m, int n, const double *alpha, const double *A, int lda, const double *beta, const double *B, int ldb, double *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • mublasOperation_t transB
  • int m
  • int n
  • const double * alpha
  • const double * A
  • int lda
  • const double * beta
  • const double * B
  • int ldb
  • double * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasCgeam

MUBLAS_EXPORT mublasStatus mublasCgeam(mublasHandle_t handle, mublasOperation_t transA, mublasOperation_t transB, int m, int n, const muComplex *alpha, const muComplex *A, int lda, const muComplex *beta, const muComplex *B, int ldb, muComplex *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • mublasOperation_t transB
  • int m
  • int n
  • const muComplex * alpha
  • const muComplex * A
  • int lda
  • const muComplex * beta
  • const muComplex * B
  • int ldb
  • muComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasZgeam

MUBLAS_EXPORT mublasStatus mublasZgeam(mublasHandle_t handle, mublasOperation_t transA, mublasOperation_t transB, int m, int n, const muDoubleComplex *alpha, const muDoubleComplex *A, int lda, const muDoubleComplex *beta, const muDoubleComplex *B, int ldb, muDoubleComplex *C, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • mublasOperation_t transB
  • int m
  • int n
  • const muDoubleComplex * alpha
  • const muDoubleComplex * A
  • int lda
  • const muDoubleComplex * beta
  • const muDoubleComplex * B
  • int ldb
  • muDoubleComplex * C
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasGemmGroupedBatchedEx

MUBLAS_EXPORT mublasStatus mublasGemmGroupedBatchedEx(mublasHandle_t handle, const mublasOperation_t transa_array[], const mublasOperation_t transb_array[], const int m_array[], const int n_array[], const int k_array[], const void *alpha_array, const void *const Aarray[], musaDataType_t Atype, const int lda_array[], const void *const Barray[], musaDataType_t Btype, const int ldb_array[], const void *beta_array, void *const Carray[], musaDataType_t Ctype, const int ldc_array[], int group_count, const int group_size[], mublasComputeType_t computeType)

Parameters:

  • mublasHandle_t handle
  • const mublasOperation_t transa_array
  • const mublasOperation_t transb_array
  • const int m_array
  • const int n_array
  • const int k_array
  • const void * alpha_array
  • const void *const Aarray
  • musaDataType_t Atype
  • const int lda_array
  • const void *const Barray
  • musaDataType_t Btype
  • const int ldb_array
  • const void * beta_array
  • void *const Carray
  • musaDataType_t Ctype
  • const int ldc_array
  • int group_count
  • const int group_size
  • mublasComputeType_t computeType

Return type: MUBLAS_EXPORT mublasStatus

mublasGemmEx

MUBLAS_EXPORT mublasStatus mublasGemmEx(mublasHandle_t handle, mublasOperation_t transA, mublasOperation_t transB, int m, int n, int k, const void *alpha, const void *a, musaDataType_t a_type, int lda, const void *b, musaDataType_t b_type, int ldb, const void *beta, void *c, musaDataType_t c_type, int ldc, mublasComputeType_t compute_type, mublasGemmAlgo_t algo)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • mublasOperation_t transB
  • int m
  • int n
  • int k
  • const void * alpha
  • const void * a
  • musaDataType_t a_type
  • int lda
  • const void * b
  • musaDataType_t b_type
  • int ldb
  • const void * beta
  • void * c
  • musaDataType_t c_type
  • int ldc
  • mublasComputeType_t compute_type
  • mublasGemmAlgo_t algo

Return type: MUBLAS_EXPORT mublasStatus

mublasSgemmEx

MUBLAS_EXPORT mublasStatus mublasSgemmEx(mublasHandle_t handle, mublasOperation_t trans_a, mublasOperation_t trans_b, int m, int n, int k, const float *alpha, const void *A, musaDataType_t Atype, int lda, const void *B, musaDataType_t Btype, int ldb, const float *beta, void *C, musaDataType_t Ctype, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t trans_a
  • mublasOperation_t trans_b
  • int m
  • int n
  • int k
  • const float * alpha
  • const void * A
  • musaDataType_t Atype
  • int lda
  • const void * B
  • musaDataType_t Btype
  • int ldb
  • const float * beta
  • void * C
  • musaDataType_t Ctype
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasCgemmEx

MUBLAS_EXPORT mublasStatus mublasCgemmEx(mublasHandle_t handle, mublasOperation_t trans_a, mublasOperation_t trans_b, int m, int n, int k, const muComplex *alpha, const void *A, musaDataType_t Atype, int lda, const void *B, musaDataType_t Btype, int ldb, const muComplex *beta, void *C, musaDataType_t Ctype, int ldc)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t trans_a
  • mublasOperation_t trans_b
  • int m
  • int n
  • int k
  • const muComplex * alpha
  • const void * A
  • musaDataType_t Atype
  • int lda
  • const void * B
  • musaDataType_t Btype
  • int ldb
  • const muComplex * beta
  • void * C
  • musaDataType_t Ctype
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus

mublasGemmBatchedEx

MUBLAS_EXPORT mublasStatus mublasGemmBatchedEx(mublasHandle_t handle, mublasOperation_t transA, mublasOperation_t transB, int m, int n, int k, const void *alpha, const void *const a[], musaDataType_t a_type, int lda, const void *const b[], musaDataType_t b_type, int ldb, const void *beta, void *const c[], musaDataType_t c_type, int ldc, int batch_count, mublasComputeType_t compute_type, mublasGemmAlgo_t algo)

BLAS EX API.

gemm_batched_ex performs one of the batched matrix-matrix operations C_i = alpha*op(A_i)op(B_i) + betaC_i, for i = 1, ..., batch_count. where op( X ) is one of op( X ) = X or op( X ) = XT or op( X ) = XH, alpha and beta are scalars, and A, B and C are batched pointers to matrices, with op( A ) an m by k by batch_count batched matrix, op( B ) a k by n by batch_count batched matrix and C are m by n by batch_count batched matrices. The batched matrices are an array of pointers to matrices. The number of pointers to matrices is batch_count.

Supported types are as follows:

  • MUSA_R_16F = a_type = b_type = c_type, compute_type = MUSA_R_16F or MUBLAS_COMPUTE_16F

  • MUSA_R_16F = a_type = b_type, MUSA_R_32F = c_type, compute_type = MUSA_R_32F or MUBLAS_COMPUTE_32F

  • MUSA_R_32F = a_type = b_type, MUSA_R_32F = c_type, compute_type = MUBLAS_COMPUTE_32F_FAST_TF32

  • MUSA_R_16BF = a_type = b_type = c_type, compute_type = MUSA_R_16BF or MUBLAS_COMPUTE_32F

  • MUSA_R_32F = a_type = b_type = c_type, compute_type = MUSA_R_32F or MUBLAS_COMPUTE_32F

  • MUSA_R_64F = a_type = b_type = c_type, compute_type = MUBLAS_COMPUTE_64F or MUSA_R_64F

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • transA: [mublasOperation_t] specifies the form of op( A ).
  • transB: [mublasOperation_t] specifies the form of op( B ).
  • m: [int] matrix dimension m.
  • n: [int] matrix dimension n.
  • k: [int] matrix dimension k.
  • alpha: [const void *] device pointer or host pointer specifying the scalar alpha. Same datatype as compute_type.
  • a: [void *] device pointer storing array of pointers to each matrix A_i.
  • a_type: [musaDataType_t] specifies the datatype of each matrix A_i.
  • lda: [int] specifies the leading dimension of each A_i.
  • b: [void *] device pointer storing array of pointers to each matrix B_i.
  • b_type: [musaDataType_t] specifies the datatype of each matrix B_i.
  • ldb: [int] specifies the leading dimension of each B_i.
  • beta: [const void *] device pointer or host pointer specifying the scalar beta. Same datatype as compute_type.
  • c: [void *] device array of device pointers to each matrix C_i.
  • c_type: [musaDataType_t] specifies the datatype of each matrix C_i.
  • ldc: [int] specifies the leading dimension of each C_i.
  • batch_count: [int] number of gemm operations in the batch.
  • compute_type: [musaDataType_t] specifies the datatype of computation.
  • algo: [mublasGemmAlgo_t] enumerant specifying the algorithm type.

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transA
  • mublasOperation_t transB
  • int m
  • int n
  • int k
  • const void * alpha
  • const void *const a
  • musaDataType_t a_type
  • int lda
  • const void *const b
  • musaDataType_t b_type
  • int ldb
  • const void * beta
  • void *const c
  • musaDataType_t c_type
  • int ldc
  • int batch_count
  • mublasComputeType_t compute_type
  • mublasGemmAlgo_t algo

Return type: MUBLAS_EXPORT mublasStatus

mublasGemmStridedBatchedEx

MUBLAS_EXPORT mublasStatus mublasGemmStridedBatchedEx(mublasHandle_t handle, mublasOperation_t transa, mublasOperation_t transb, int m, int n, int k, const void *alpha, const void *a, musaDataType_t a_type, int lda, long long int stride_a, const void *b, musaDataType_t b_type, int ldb, long long int stride_b, const void *beta, void *c, musaDataType_t c_type, int ldc, long long int stride_c, int batch_count, mublasComputeType_t compute_type, mublasGemmAlgo_t algo)

BLAS EX API.

gemm_strided_batched_ex performs one of the strided_batched matrix-matrix operations

C_i = alpha*op(A_i)*op(B_i) + beta*C_i, for i = 1, ..., batch_count

where op( X ) is one of

op( X ) = X or
op( X ) = X**T or
op( X ) = X**H,

alpha and beta are scalars, and A, B, C are strided_batched matrices, with op( A ) an m by k by batch_count strided_batched matrix, op( B ) a k by n by batch_count strided_batched matrix and C are m by n by batch_count strided_batched matrices.

The strided_batched matrices are multiple matrices separated by a constant stride. The number of matrices is batch_count.

Supported types are as follows:

  • MUSA_R_16F = a_type = b_type = c_type, compute_type = MUSA_R_16F or MUBLAS_COMPUTE_16F

  • MUSA_R_16F = a_type = b_type, MUSA_R_32F = c_type, compute_type = MUSA_R_32F or MUBLAS_COMPUTE_32F

  • MUSA_R_32F = a_type = b_type, MUSA_R_32F = c_type, compute_type = MUBLAS_COMPUTE_32F_FAST_TF32

  • MUSA_R_16BF = a_type = b_type = c_type, compute_type = MUSA_R_16BF or MUBLAS_COMPUTE_32F

  • MUSA_R_32F = a_type = b_type = c_type, compute_type = MUSA_R_32F or MUBLAS_COMPUTE_32F

  • MUSA_R_64F = a_type = b_type = c_type, compute_type = MUBLAS_COMPUTE_64F or MUSA_R_64F

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • transA: [mublasOperation_t] specifies the form of op( A ).
  • transB: [mublasOperation_t] specifies the form of op( B ).
  • m: [int] matrix dimension m.
  • n: [int] matrix dimension n.
  • k: [int] matrix dimension k.
  • alpha: [const void *] device pointer or host pointer specifying the scalar alpha. Same datatype as compute_type.
  • a: [void *] device pointer pointing to first matrix A_1.
  • a_type: [musaDataType_t] specifies the datatype of each matrix A_i.
  • lda: [int] specifies the leading dimension of each A_i.
  • stride_a: [long long int] specifies stride from start of one A_i matrix to the next A_(i + 1).
  • b: [void *] device pointer pointing to first matrix B_1.
  • b_type: [musaDataType_t] specifies the datatype of each matrix B_i.
  • ldb: [int] specifies the leading dimension of each B_i.
  • stride_b: [long long int] specifies stride from start of one B_i matrix to the next B_(i + 1).
  • beta: [const void *] device pointer or host pointer specifying the scalar beta. Same datatype as compute_type.
  • c: [void *] device pointer pointing to first matrix C_1.
  • c_type: [musaDataType_t] specifies the datatype of each matrix C_i.
  • ldc: [int] specifies the leading dimension of each C_i.
  • stride_c: [long long int] specifies stride from start of one C_i matrix to the next C_(i + 1).
  • batch_count: [int] number of gemm operations in the batch.
  • compute_type: [musaDataType_t] specifies the datatype of computation.
  • algo: [mublasGemmAlgo_t] enumerant specifying the algorithm type.

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t transa
  • mublasOperation_t transb
  • int m
  • int n
  • int k
  • const void * alpha
  • const void * a
  • musaDataType_t a_type
  • int lda
  • long long int stride_a
  • const void * b
  • musaDataType_t b_type
  • int ldb
  • long long int stride_b
  • const void * beta
  • void * c
  • musaDataType_t c_type
  • int ldc
  • long long int stride_c
  • int batch_count
  • mublasComputeType_t compute_type
  • mublasGemmAlgo_t algo

Return type: MUBLAS_EXPORT mublasStatus

mublasAxpyEx

MUBLAS_EXPORT mublasStatus mublasAxpyEx(mublasHandle_t handle, int n, const void *alpha, musaDataType_t alpha_type, const void *x, musaDataType_t x_type, int incx, void *y, musaDataType_t y_type, int incy, musaDataType_t execution_type)

BLAS EX API.

axpy_ex computes constant alpha multiplied by vector x, plus vector y

y := alpha * x + y

Currently supported datatypes are as follows:

-------------------------------------------------
| alpha_type | x_type | y_type | execution_type |
|------------|--------|--------|----------------|
| f16_r | f16_r | f16_r | f16_r |
| f16_r | f16_r | f16_r | f32_r |
| f32_r | f16_r | f16_r | f32_r |
| f32_r | f32_r | f32_r | f32_r |
| f64_r | f64_r | f64_r | f64_r |
| f32_c | f32_c | f32_c | f32_c |
| f64_c | f64_c | f64_c | f64_c |
-------------------------------------------------

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • n: [int] the number of elements in x and y.
  • alpha: device pointer or host pointer to specify the scalar alpha.
  • alpha_type: [musaDataType_t] specifies the datatype of alpha.
  • x: device pointer storing vector x.
  • x_type: [musaDataType_t] specifies the datatype of vector x.
  • incx: [int] specifies the increment for the elements of x.
  • y: device pointer storing vector y.
  • y_type: [musaDataType_t] specifies the datatype of vector y.
  • incy: [int] specifies the increment for the elements of y.
  • execution_type: [musaDataType_t] specifies the datatype of computation.

Parameters:

  • mublasHandle_t handle
  • int n
  • const void * alpha
  • musaDataType_t alpha_type
  • const void * x
  • musaDataType_t x_type
  • int incx
  • void * y
  • musaDataType_t y_type
  • int incy
  • musaDataType_t execution_type

Return type: MUBLAS_EXPORT mublasStatus

mublasDotEx

MUBLAS_EXPORT mublasStatus mublasDotEx(mublasHandle_t handle, int n, const void *x, musaDataType_t x_type, int incx, const void *y, musaDataType_t y_type, int incy, void *result, musaDataType_t result_type, musaDataType_t execution_type)

BLAS EX API.

dot_ex performs the dot product of vectors x and y

result = x * y;

dotc_ex performs the dot product of the conjugate of complex vector x and complex vector y

result = conjugate (x) * y;

Currently supported datatypes are as follows:

--------------------------------------------------
| x_type | y_type | result_type | execution_type |
|--------|--------|-------------|----------------|
| f16_r | f16_r | f16_r | f16_r |
| f16_r | f16_r | f16_r | f32_r |
| bf16_r | bf16_r | bf16_r | f32_r |
| f32_r | f32_r | f32_r | f32_r |
| f64_r | f64_r | f64_r | f64_r |
| f32_c | f32_c | f32_c | f32_c |
| f64_c | f64_c | f64_c | f64_c |
--------------------------------------------------

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • n: [int] the number of elements in x and y.
  • x: device pointer storing vector x.
  • x_type: [musaDataType_t] specifies the datatype of vector x.
  • incx: [int] specifies the increment for the elements of y.
  • y: device pointer storing vector y.
  • y_type: [musaDataType_t] specifies the datatype of vector y.
  • incy: [int] specifies the increment for the elements of y.
  • result: device pointer or host pointer to store the dot product. return is 0.0 if n <= 0.
  • result_type: [musaDataType_t] specifies the datatype of the result.
  • execution_type: [musaDataType_t] specifies the datatype of computation.

Parameters:

  • mublasHandle_t handle
  • int n
  • const void * x
  • musaDataType_t x_type
  • int incx
  • const void * y
  • musaDataType_t y_type
  • int incy
  • void * result
  • musaDataType_t result_type
  • musaDataType_t execution_type

Return type: MUBLAS_EXPORT mublasStatus

mublasDotcEx

MUBLAS_EXPORT mublasStatus mublasDotcEx(mublasHandle_t handle, int n, const void *x, musaDataType_t x_type, int incx, const void *y, musaDataType_t y_type, int incy, void *result, musaDataType_t result_type, musaDataType_t execution_type)

Parameters:

  • mublasHandle_t handle
  • int n
  • const void * x
  • musaDataType_t x_type
  • int incx
  • const void * y
  • musaDataType_t y_type
  • int incy
  • void * result
  • musaDataType_t result_type
  • musaDataType_t execution_type

Return type: MUBLAS_EXPORT mublasStatus

mublasNrm2Ex

MUBLAS_EXPORT mublasStatus mublasNrm2Ex(mublasHandle_t handle, int n, const void *x, musaDataType_t x_type, int incx, void *results, musaDataType_t result_type, musaDataType_t execution_type)

BLAS_EX API.

nrm2_ex computes the euclidean norm of a real or complex vector

result := sqrt( x'*x ) for real vectors
result := sqrt( x**H*x ) for complex vectors

Currently supported datatypes are as follows:

x_typeresultexecution_type
f16_rf16_rf32_r
f32_rf32_rf32_r
f64_rf64_rf64_r
f32_cf32_rf32_r
f64_cf64_rf64_r

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • n: [int] the number of elements in x.
  • x: device pointer storing vector x.
  • x_type: [musaDataType_t] specifies the datatype of the vector x.
  • incx: [int] specifies the increment for the elements of y.
  • results: device pointer or host pointer to store the nrm2 product. return is 0.0 if n, incx<=0.
  • result_type: [musaDataType_t] specifies the datatype of the result.
  • execution_type: [musaDataType_t] specifies the datatype of computation.

Parameters:

  • mublasHandle_t handle
  • int n
  • const void * x
  • musaDataType_t x_type
  • int incx
  • void * results
  • musaDataType_t result_type
  • musaDataType_t execution_type

Return type: MUBLAS_EXPORT mublasStatus

mublasRotEx

MUBLAS_EXPORT mublasStatus mublasRotEx(mublasHandle_t handle, int n, void *x, musaDataType_t x_type, int incx, void *y, musaDataType_t y_type, int incy, const void *c, const void *s, musaDataType_t cs_type, musaDataType_t execution_type)

BLAS EX API.

rot_ex applies the Givens rotation matrix defined by c=cos(alpha) and s=sin(alpha) to vectors x and y. Scalars c and s may be stored in either host or device memory, location is specified by calling mublasSetPointerMode.

In the case where cs_type is real: x := c * x + s * y y := c * y - s * x

In the case where cs_type is complex, the imaginary part of c is ignored: x := real(c) * x + s * y y := real(c) * y - conj(s) * x

Currently supported datatypes are as follows:

x_typey_typecs_typeexecution_type
bf16_rbf16_rbf16_rf32_r
f16_rf16_rf16_rf32_r
f32_rf32_rf32_rf32_r
f64_rf64_rf64_rf64_r
f32_cf32_cf32_cf32_c
f32_cf32_cf32_rf32_c
f64_cf64_cf64_cf64_c
f64_cf64_cf64_rf64_c

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • n: [int] number of elements in the x and y vectors.
  • x: device pointer storing vector x.
  • x_type: [musaDataType_t] specifies the datatype of vector x.
  • incx: [int] specifies the increment between elements of x.
  • y: device pointer storing vector y.
  • y_type: [musaDataType_t] specifies the datatype of vector y.
  • incy: [int] specifies the increment between elements of y.
  • c: device pointer or host pointer storing scalar cosine component of the rotation matrix.
  • s: device pointer or host pointer storing scalar sine component of the rotation matrix.
  • cs_type: [musaDataType_t] specifies the datatype of c and s.
  • execution_type: [musaDataType_t] specifies the datatype of computation.

Parameters:

  • mublasHandle_t handle
  • int n
  • void * x
  • musaDataType_t x_type
  • int incx
  • void * y
  • musaDataType_t y_type
  • int incy
  • const void * c
  • const void * s
  • musaDataType_t cs_type
  • musaDataType_t execution_type

Return type: MUBLAS_EXPORT mublasStatus

mublasScalEx

MUBLAS_EXPORT mublasStatus mublasScalEx(mublasHandle_t handle, int n, const void *alpha, musaDataType_t alpha_type, void *x, musaDataType_t x_type, int incx, musaDataType_t execution_type)

BLAS EX API.

scal_ex scales each element of vector x with scalar alpha.

x := alpha * x

Currently supported datatypes are as follows:

alpha_typex_typeexecution_type
f16_rf16_rf16_r
f16_rf16_rf32_r
f32_rf16_rf32_r
f32_rf32_rf32_r
f64_rf64_rf64_r
f32_cf32_cf32_c
f64_cf64_cf64_c
f32_rf32_cf32_c
f64_rf64_cf64_c

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • n: [int] the number of elements in x.
  • alpha: device pointer or host pointer for the scalar alpha.
  • alpha_type: [musaDataType_t] specifies the datatype of alpha.
  • x: device pointer storing vector x.
  • x_type: [musaDataType_t] specifies the datatype of vector x.
  • incx: [int] specifies the increment for the elements of x.
  • execution_type: [musaDataType_t] specifies the datatype of computation.

Parameters:

  • mublasHandle_t handle
  • int n
  • const void * alpha
  • musaDataType_t alpha_type
  • void * x
  • musaDataType_t x_type
  • int incx
  • musaDataType_t execution_type

Return type: MUBLAS_EXPORT mublasStatus

mublasCsyrkEx

MUBLAS_EXPORT mublasStatus_t mublasCsyrkEx(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t trans, int n, int k, const muComplex *alpha, const void *A, musaDataType_t Atype, int lda, const muComplex *beta, muComplex *C, musaDataType_t Ctype, int ldc)

BLAS EX API.

syrkEx performs one of the matrix-matrix operations for a symmetric rank-k update

C := alpha*op( A )op( A )^T + betaC

where alpha and beta are scalars, op(A) is an n by k matrix, and C is a symmetric n x n matrix stored as either upper or lower.

op( A ) = A, and A is n by k if transA == MUBLAS_OP_N
op( A ) = A^T and A is k by n if transA == MUBLAS_OP_T

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: C is an upper triangular matrix MUBLAS_FILL_MODE_LOWER: C is a lower triangular matrix
  • transA: [mublasOperation_t] MUBLAS_OP_T: op(A) = A^T MUBLAS_OP_N: op(A) = A MUBLAS_OP_C: op(A) = A^T

MUBLAS_OP_C is not supported for complex types, see cherk and zherk.

Parameters:

  • n: [int] n specifies the number of rows and columns of C. n >= 0.
  • k: [int] k specifies the number of columns of op(A). k >= 0.
  • alpha: alpha specifies the scalar alpha. When alpha is zero then A is not referenced and A need not be set before entry.
  • A: pointer storing matrix A on the GPU. Martrix dimension is ( lda, k ) when if transA = MUBLAS_OP_N, otherwise (lda, n) only the upper/lower triangular part is accessed.
  • lda: [int] lda specifies the first dimension of A. if transA = MUBLAS_OP_N, lda >= max( 1, n ), otherwise lda >= max( 1, k ).
  • beta: beta specifies the scalar beta. When beta is zero then C need not be set before entry.
  • C: pointer storing matrix C on the GPU.
  • ldc: [int] ldc specifies the first dimension of C. ldc >= max( 1, n ).

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t trans
  • int n
  • int k
  • const muComplex * alpha
  • const void * A
  • musaDataType_t Atype
  • int lda
  • const muComplex * beta
  • muComplex * C
  • musaDataType_t Ctype
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus_t

mublasCsyrk3mEx

MUBLAS_EXPORT mublasStatus_t mublasCsyrk3mEx(mublasHandle_t handle, mublasFillMode_t uplo, mublasOperation_t trans, int n, int k, const muComplex *alpha, const void *A, musaDataType_t Atype, int lda, const muComplex *beta, muComplex *C, musaDataType_t Ctype, int ldc)

BLAS EX API.

syrk3mEx performs one of the matrix-matrix operations for a symmetric rank-k update

C := alpha*op( A )op( A )^T + betaC

where alpha and beta are scalars, op(A) is an n by k matrix, and C is a symmetric n x n matrix stored as either upper or lower.

op( A ) = A, and A is n by k if transA == MUBLAS_OP_N
op( A ) = A^T and A is k by n if transA == MUBLAS_OP_T

Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • uplo: [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: C is an upper triangular matrix MUBLAS_FILL_MODE_LOWER: C is a lower triangular matrix
  • transA: [mublasOperation_t] MUBLAS_OP_T: op(A) = A^T MUBLAS_OP_N: op(A) = A MUBLAS_OP_C: op(A) = A^T

MUBLAS_OP_C is not supported for complex types, see cherk and zherk.

Parameters:

  • n: [int] n specifies the number of rows and columns of C. n >= 0.
  • k: [int] k specifies the number of columns of op(A). k >= 0.
  • alpha: alpha specifies the scalar alpha. When alpha is zero then A is not referenced and A need not be set before entry.
  • A: pointer storing matrix A on the GPU. Martrix dimension is ( lda, k ) when if transA = MUBLAS_OP_N, otherwise (lda, n) only the upper/lower triangular part is accessed.
  • lda: [int] lda specifies the first dimension of A. if transA = MUBLAS_OP_N, lda >= max( 1, n ), otherwise lda >= max( 1, k ).
  • beta: beta specifies the scalar beta. When beta is zero then C need not be set before entry.
  • C: pointer storing matrix C on the GPU.
  • ldc: [int] ldc specifies the first dimension of C. ldc >= max( 1, n ).

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • mublasOperation_t trans
  • int n
  • int k
  • const muComplex * alpha
  • const void * A
  • musaDataType_t Atype
  • int lda
  • const muComplex * beta
  • muComplex * C
  • musaDataType_t Ctype
  • int ldc

Return type: MUBLAS_EXPORT mublasStatus_t

mublasStpttr

MUBLAS_EXPORT mublasStatus mublasStpttr(mublasHandle_t handle, mublasFillMode_t uplo, int n, const float *AP, float *A, int lda)

BLAS EX API.

This function performs the conversion from the triangular packed format to the triangular format If uplo == MUBLAS_FILL_MODE_LOWER then the elements of AP are copied into the lower triangular part of the triangular matrix A and the upper part of A is left untouched. If uplo == MUBLAS_FILL_MODE_UPPER then the elements of AP are copied into the upper triangular part of the triangular matrix A and the lower part of A is left untouched.

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const float * AP
  • float * A
  • int lda

Return type: MUBLAS_EXPORT mublasStatus

mublasDtpttr

MUBLAS_EXPORT mublasStatus mublasDtpttr(mublasHandle_t handle, mublasFillMode_t uplo, int n, const double *AP, double *A, int lda)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const double * AP
  • double * A
  • int lda

Return type: MUBLAS_EXPORT mublasStatus

mublasCtpttr

MUBLAS_EXPORT mublasStatus mublasCtpttr(mublasHandle_t handle, mublasFillMode_t uplo, int n, const muComplex *AP, muComplex *A, int lda)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const muComplex * AP
  • muComplex * A
  • int lda

Return type: MUBLAS_EXPORT mublasStatus

mublasZtpttr

MUBLAS_EXPORT mublasStatus mublasZtpttr(mublasHandle_t handle, mublasFillMode_t uplo, int n, const muDoubleComplex *AP, muDoubleComplex *A, int lda)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const muDoubleComplex * AP
  • muDoubleComplex * A
  • int lda

Return type: MUBLAS_EXPORT mublasStatus

mublasStrttp

MUBLAS_EXPORT mublasStatus mublasStrttp(mublasHandle_t handle, mublasFillMode_t uplo, int n, const float *A, int lda, float *AP)

BLAS EX API.

This function performs the conversion from the triangular format to the triangular packed format If uplo == MUBLAS_FILL_MODE_LOWER then the lower triangular part of the triangular matrix A is copied into the array AP. If uplo == MUBLAS_FILL_MODE_UPPER then then the upper triangular part of the triangular matrix A is copied into the array AP.

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const float * A
  • int lda
  • float * AP

Return type: MUBLAS_EXPORT mublasStatus

mublasDtrttp

MUBLAS_EXPORT mublasStatus mublasDtrttp(mublasHandle_t handle, mublasFillMode_t uplo, int n, const double *A, int lda, double *AP)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const double * A
  • int lda
  • double * AP

Return type: MUBLAS_EXPORT mublasStatus

mublasCtrttp

MUBLAS_EXPORT mublasStatus mublasCtrttp(mublasHandle_t handle, mublasFillMode_t uplo, int n, const muComplex *A, int lda, muComplex *AP)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const muComplex * A
  • int lda
  • muComplex * AP

Return type: MUBLAS_EXPORT mublasStatus

mublasZtrttp

MUBLAS_EXPORT mublasStatus mublasZtrttp(mublasHandle_t handle, mublasFillMode_t uplo, int n, const muDoubleComplex *A, int lda, muDoubleComplex *AP)

Parameters:

  • mublasHandle_t handle
  • mublasFillMode_t uplo
  • int n
  • const muDoubleComplex * A
  • int lda
  • muDoubleComplex * AP

Return type: MUBLAS_EXPORT mublasStatus

mublasSgetrfBatched

MUBLAS_EXPORT mublasStatus mublasSgetrfBatched(mublasHandle_t handle, int n, float *const A[], int lda, int *P, int *info, int batchedSize)

GETRF EX API.

getrfBatched performs one of the batched the LU factorization operations of P_i * A_i = L_i * U_i, for i = 1, ..., batchedSize. A is batched matrices, and it is both an input matrix and an output matrix, storing the results of L and U factorization. where P is a permutation matrix which represents partial pivoting with row interchanges. Parameters:

  • handle: [mublasHandle_t] handle to the mublas library context queue.
  • n: [int] number of columns and rows of matrices A_i
  • A: device array A is an array of pointers to matrices stored in column-major format with dimensions n * n and stores batchedSize matrices.
  • lda: [int] leading dimension of two-dimensional array A used to store each matrix A_i. lda >= max(1,n)
  • P: [int*] array of size n x batchSize that contains the pivoting sequence of each factorization of Aarray A stored in a linear fashion. If PivotArray is NULL, pivoting is disabled.
  • info: [int*] array of size is batchSize contains the information of factorization of A. If info = 0, the execution is successful. If info = -j, the j-th parameter had an illegal value. If info = k, U(k,k) is 0. The factorization has been completed, but U is exactly singular.

Parameters:

  • mublasHandle_t handle
  • int n
  • float *const A
  • int lda
  • int * P
  • int * info
  • int batchedSize

Return type: MUBLAS_EXPORT mublasStatus

mublasDgetrfBatched

MUBLAS_EXPORT mublasStatus mublasDgetrfBatched(mublasHandle_t handle, int n, double *const A[], int lda, int *P, int *info, int batchedSize)

Parameters:

  • mublasHandle_t handle
  • int n
  • double *const A
  • int lda
  • int * P
  • int * info
  • int batchedSize

Return type: MUBLAS_EXPORT mublasStatus

mublasCgetrfBatched

MUBLAS_EXPORT mublasStatus mublasCgetrfBatched(mublasHandle_t handle, int n, muComplex *const A[], int lda, int *P, int *info, int batchedSize)

Parameters:

  • mublasHandle_t handle
  • int n
  • muComplex *const A
  • int lda
  • int * P
  • int * info
  • int batchedSize

Return type: MUBLAS_EXPORT mublasStatus

mublasZgetrfBatched

MUBLAS_EXPORT mublasStatus mublasZgetrfBatched(mublasHandle_t handle, int n, muDoubleComplex *const A[], int lda, int *P, int *info, int batchedSize)

Parameters:

  • mublasHandle_t handle
  • int n
  • muDoubleComplex *const A
  • int lda
  • int * P
  • int * info
  • int batchedSize

Return type: MUBLAS_EXPORT mublasStatus

mublasSmatinvBatched

MUBLAS_EXPORT mublasStatus mublasSmatinvBatched(mublasHandle_t handle, int n, const float *const A[], int lda, float *const Ainv[], int lda_inv, int *info, int batchSize)

BLASEX MATINV API.

!

mublasXmatinvBatched computes the inverse of a batch of square matrices.

For each i in 1 .. batchSize, the routine computes

Ainv[i] := inv( A[i] )

where A[i] is an n x n matrix, and Ainv[i] is its inverse. The input matrices A[i] must be nonsingular; otherwise the corresponding info[i] will contain a non-zero value.

The computation is typically performed using LU factorization followed
by matrix inversion from the factorized form.

This is a batched routine: A and Ainv are arrays of pointers to device memory regions storing each matrix in the batch.

Parameters:

  • handle: [mublasHandle_t] Handle to the muBLAS library context queue.
  • n: [int] Number of rows and columns of each matrix A[i].
  • A: Array of pointers to input matrices on the device. Each A[i] is a column-major n x n matrix with leading dimension lda.
  • lda: [int] Leading dimension of each matrix A[i]. Must satisfy: lda >= max(1, n).
  • Ainv: [X* const Ainv[]] Array of pointers to output matrices on the device. Each Ainv[i] is a column-major n x n matrix that receives inv(A[i]), with leading dimension lda_inv.
  • lda_inv: [int] Leading dimension of two-dimensional array used to store each matrix Ainv[i]. Must satisfy: lda_inv >= max(1, n).
  • info: [int*] Array of size batchSize on the device. info[i] = 0 : successful inversion info[i] > 0 : matrix A[i] is singular and the inversion failed
  • batchSize: [int] Number of matrices in the batch. batchSize >= 0.

Note: This routine requires all pointers A[i] and Ainv[i] to be valid device pointers. If n == 0 or batchSize == 0, the routine returns success without performing any computation.

Parameters:

  • mublasHandle_t handle
  • int n
  • const float *const A
  • int lda
  • float *const Ainv
  • int lda_inv
  • int * info
  • int batchSize

Return type: MUBLAS_EXPORT mublasStatus

mublasDmatinvBatched

MUBLAS_EXPORT mublasStatus mublasDmatinvBatched(mublasHandle_t handle, int n, const double *const A[], int lda, double *const Ainv[], int lda_inv, int *info, int batchSize)

Parameters:

  • mublasHandle_t handle
  • int n
  • const double *const A
  • int lda
  • double *const Ainv
  • int lda_inv
  • int * info
  • int batchSize

Return type: MUBLAS_EXPORT mublasStatus

mublasCmatinvBatched

MUBLAS_EXPORT mublasStatus mublasCmatinvBatched(mublasHandle_t handle, int n, const muComplex *const A[], int lda, muComplex *const Ainv[], int lda_inv, int *info, int batchSize)

Parameters:

  • mublasHandle_t handle
  • int n
  • const muComplex *const A
  • int lda
  • muComplex *const Ainv
  • int lda_inv
  • int * info
  • int batchSize

Return type: MUBLAS_EXPORT mublasStatus

mublasZmatinvBatched

MUBLAS_EXPORT mublasStatus mublasZmatinvBatched(mublasHandle_t handle, int n, const muDoubleComplex *const A[], int lda, muDoubleComplex *const Ainv[], int lda_inv, int *info, int batchSize)

Parameters:

  • mublasHandle_t handle
  • int n
  • const muDoubleComplex *const A
  • int lda
  • muDoubleComplex *const Ainv
  • int lda_inv
  • int * info
  • int batchSize

Return type: MUBLAS_EXPORT mublasStatus

mublasSgeqrfBatched

MUBLAS_EXPORT mublasStatus mublasSgeqrfBatched(mublasHandle_t handle, int m, int n, float *const Aarray[], int lda, float *const TauArray[], int *info, int batchSize)

Parameters:

  • mublasHandle_t handle
  • int m
  • int n
  • float *const Aarray
  • int lda
  • float *const TauArray
  • int * info
  • int batchSize

Return type: MUBLAS_EXPORT mublasStatus

mublasDgeqrfBatched

MUBLAS_EXPORT mublasStatus mublasDgeqrfBatched(mublasHandle_t handle, int m, int n, double *const Aarray[], int lda, double *const TauArray[], int *info, int batchSize)

Parameters:

  • mublasHandle_t handle
  • int m
  • int n
  • double *const Aarray
  • int lda
  • double *const TauArray
  • int * info
  • int batchSize

Return type: MUBLAS_EXPORT mublasStatus

mublasCgeqrfBatched

MUBLAS_EXPORT mublasStatus mublasCgeqrfBatched(mublasHandle_t handle, int m, int n, muComplex *const Aarray[], int lda, muComplex *const TauArray[], int *info, int batchSize)

Parameters:

  • mublasHandle_t handle
  • int m
  • int n
  • muComplex *const Aarray
  • int lda
  • muComplex *const TauArray
  • int * info
  • int batchSize

Return type: MUBLAS_EXPORT mublasStatus

mublasZgeqrfBatched

MUBLAS_EXPORT mublasStatus mublasZgeqrfBatched(mublasHandle_t handle, int m, int n, muDoubleComplex *const Aarray[], int lda, muDoubleComplex *const TauArray[], int *info, int batchSize)

Parameters:

  • mublasHandle_t handle
  • int m
  • int n
  • muDoubleComplex *const Aarray
  • int lda
  • muDoubleComplex *const TauArray
  • int * info
  • int batchSize

Return type: MUBLAS_EXPORT mublasStatus

mublasSgelsBatched

MUBLAS_EXPORT mublasStatus mublasSgelsBatched(mublasHandle_t handle, mublasOperation_t trans, int m, int n, int nrhs, float *const Aarray[], int lda, float *const Carray[], int ldc, int *info, int *devInfoArray, int batchSize)

BLASEX GELS API.

!

mublasSgelsBatched solves a batch of linear least-squares problems using QR factorization:

minimize || op(A[i]) * X[i] - C[i] ||

where A[i] is m-by-n and C[i] is m-by-nrhs. The operator op(A) is:

op(A) = A if trans == MUBLAS_OP_N
op(A) = A^T if trans == MUBLAS_OP_T

X[i] overwrites C[i] on output.

The routine uses QR factorization internally. Aarray[i] and Carray[i] must be pointers to matrices stored in device memory.

Parameters:

  • handle: [mublasHandle_t] Handle to the mublas context.
  • trans: [mublasOperation_t] MUBLAS_OP_N : solve A * X = C
    MUBLAS_OP_T : solve A^T * X = C
  • m: [int] Number of rows of A[i]. m >= 0.
  • n: [int] Number of columns of A[i]. n >= 0.
  • nrhs: [int] Number of right-hand sides. nrhs >= 0.
  • Aarray: [float* const Aarray[]] Array of pointers to input matrices A[i], each m-by-n. Leading dimension lda.
  • lda: [int] Leading dimension of each A[i]. lda >= max(1, m).
  • Carray: [float* const Carray[]] Array of pointers to right-hand side matrices C[i], size m-by-nrhs on input, overwritten with X[i] on output.
  • ldc: [int] Leading dimension of each C[i]. ldc >= max(1, m, n).
  • info: [int*] If non-null, device array of length batchSize indicating status of factorization.
  • devInfoArray: [int*] Device array of length batchSize indicating final solver status. devInfoArray[i] = 0 : success
    devInfoArray[i] > 0 : rank deficiency or failure
  • batchSize: [int] Number of problems in the batch. batchSize >= 0.

Note: C[i] is overwritten with the solution X[i].

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t trans
  • int m
  • int n
  • int nrhs
  • float *const Aarray
  • int lda
  • float *const Carray
  • int ldc
  • int * info
  • int * devInfoArray
  • int batchSize

Return type: MUBLAS_EXPORT mublasStatus

mublasDgelsBatched

MUBLAS_EXPORT mublasStatus mublasDgelsBatched(mublasHandle_t handle, mublasOperation_t trans, int m, int n, int nrhs, double *const Aarray[], int lda, double *const Carray[], int ldc, int *info, int *devInfoArray, int batchSize)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t trans
  • int m
  • int n
  • int nrhs
  • double *const Aarray
  • int lda
  • double *const Carray
  • int ldc
  • int * info
  • int * devInfoArray
  • int batchSize

Return type: MUBLAS_EXPORT mublasStatus

mublasCgelsBatched

MUBLAS_EXPORT mublasStatus mublasCgelsBatched(mublasHandle_t handle, mublasOperation_t trans, int m, int n, int nrhs, muComplex *const Aarray[], int lda, muComplex *const Carray[], int ldc, int *info, int *devInfoArray, int batchSize)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t trans
  • int m
  • int n
  • int nrhs
  • muComplex *const Aarray
  • int lda
  • muComplex *const Carray
  • int ldc
  • int * info
  • int * devInfoArray
  • int batchSize

Return type: MUBLAS_EXPORT mublasStatus

mublasZgelsBatched

MUBLAS_EXPORT mublasStatus mublasZgelsBatched(mublasHandle_t handle, mublasOperation_t trans, int m, int n, int nrhs, muDoubleComplex *const Aarray[], int lda, muDoubleComplex *const Carray[], int ldc, int *info, int *devInfoArray, int batchSize)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t trans
  • int m
  • int n
  • int nrhs
  • muDoubleComplex *const Aarray
  • int lda
  • muDoubleComplex *const Carray
  • int ldc
  • int * info
  • int * devInfoArray
  • int batchSize

Return type: MUBLAS_EXPORT mublasStatus

mublasSgetriBatched

MUBLAS_EXPORT mublasStatus_t mublasSgetriBatched(mublasHandle_t handle, int n, const float *const Aarray[], int lda, int *PivotArray, float *const Carray[], int ldc, int *infoArray, int batchSize)

BLASEX GETRI API.

!

mublasSgetriBatched computes the inverse of a batch of n-by-n matrices using previously computed LU factorizations (typically from getrf).

For each matrix i:

Aarray[i] contains the LU factors of A[i]
PivotArray contains pivot indices
Carray[i] receives A[i]^{-1}

The inversion is performed via the LU factors using forward and backward substitution.

Parameters:

  • handle: [mublasHandle_t] Handle to the mublas context.
  • n: [int] Order of each matrix A[i]. n >= 0.
  • Aarray: [const float* const Aarray[]] Array of pointers to LU-factorized matrices A[i], each n-by-n with leading dimension lda.
  • lda: [int] Leading dimension of matrices in Aarray. lda >= max(1, n).
  • PivotArray: [int*] Device array of pivot indices generated from getrfBatched. Must contain n pivots per batch entry.
  • Carray: [float* const Carray[]] Array of pointers to output matrices A^{-1}[i], each n-by-n with leading dimension ldc.
  • ldc: [int] Leading dimension of output matrices Carray[i]. ldc >= max(1, n).
  • infoArray: [int*] Device array of size batchSize. infoArray[i] = 0 : success
    infoArray[i] > 0 : matrix is singular and not invertible
  • batchSize: [int] Number of matrices in the batch. batchSize >= 0.

Note: Input Aarray[i] must already contain the LU factorization from mublasSgetrfBatched.

Parameters:

  • mublasHandle_t handle
  • int n
  • const float *const Aarray
  • int lda
  • int * PivotArray
  • float *const Carray
  • int ldc
  • int * infoArray
  • int batchSize

Return type: MUBLAS_EXPORT mublasStatus_t

mublasDgetriBatched

MUBLAS_EXPORT mublasStatus_t mublasDgetriBatched(mublasHandle_t handle, int n, const double *const Aarray[], int lda, int *PivotArray, double *const Carray[], int ldc, int *infoArray, int batchSize)

Parameters:

  • mublasHandle_t handle
  • int n
  • const double *const Aarray
  • int lda
  • int * PivotArray
  • double *const Carray
  • int ldc
  • int * infoArray
  • int batchSize

Return type: MUBLAS_EXPORT mublasStatus_t

mublasCgetriBatched

MUBLAS_EXPORT mublasStatus_t mublasCgetriBatched(mublasHandle_t handle, int n, const muComplex *const Aarray[], int lda, int *PivotArray, muComplex *const Carray[], int ldc, int *infoArray, int batchSize)

Parameters:

  • mublasHandle_t handle
  • int n
  • const muComplex *const Aarray
  • int lda
  • int * PivotArray
  • muComplex *const Carray
  • int ldc
  • int * infoArray
  • int batchSize

Return type: MUBLAS_EXPORT mublasStatus_t

mublasZgetriBatched

MUBLAS_EXPORT mublasStatus_t mublasZgetriBatched(mublasHandle_t handle, int n, const muDoubleComplex *const Aarray[], int lda, int *PivotArray, muDoubleComplex *const Carray[], int ldc, int *infoArray, int batchSize)

Parameters:

  • mublasHandle_t handle
  • int n
  • const muDoubleComplex *const Aarray
  • int lda
  • int * PivotArray
  • muDoubleComplex *const Carray
  • int ldc
  • int * infoArray
  • int batchSize

Return type: MUBLAS_EXPORT mublasStatus_t

mublasSgetrsBatched

MUBLAS_EXPORT mublasStatus_t mublasSgetrsBatched(mublasHandle_t handle, mublasOperation_t trans, int n, int nrhs, const float *const Aarray[], int lda, const int *devIpiv, float *const Barray[], int ldb, int *info, int batchSize)

BLASEX GETRS API.

!

mublasSgetrsBatched solves a batch of linear systems for multiple single-precision matrices. Each system is of the form:

op(A) * X = B

where op(A) is either A, A^T, or A^H depending on the value of trans. The matrices A and B are stored in device memory in an array-of-pointers layout.

Parameters:

  • handle: [mublasHandle_t] Handle to the mublas library context queue.

  • trans: [mublasOperation_t] Specifies the form of op(A):

  • MUBLAS_OP_N: op(A) = A

  • MUBLAS_OP_T: op(A) = A^T

  • MUBLAS_OP_C: op(A) = A^H (conjugate transpose)

  • n: [int] The number of rows and columns of each square matrix A. Must be n >= 0.

  • nrhs: [int] The number of right-hand sides, i.e., the number of columns of B. Must be nrhs >= 0.

  • Aarray: [const float* const []] Array of device pointers, each pointing to a single-precision n-by-n matrix A on the GPU.

  • lda: [int] Leading dimension of each matrix A. Must be lda >= max(1, n).

  • devIpiv: [const int*] Array of device pointers to pivot indices as returned by getrfBatched.

  • Barray: [float* const []] Array of device pointers, each pointing to a n-by-nrhs matrix B on the GPU. On exit, each B is overwritten by the solution matrix X.

  • ldb: [int] Leading dimension of each matrix B. Must be ldb >= max(1, n).

  • info: [int*] Device pointer to an array of length batchSize. Each entry contains the solution info:

  • 0: successful exit

  • <0: the i-th argument had an illegal value

  • >0: U(i,i) is exactly zero; the matrix is singular and its solution could not be computed.

  • batchSize: [int] The number of matrices to solve in the batch.

Returns:

mublasStatus_t Returns MUBLAS_STATUS_SUCCESS if successful, or an appropriate error code.

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t trans
  • int n
  • int nrhs
  • const float *const Aarray
  • int lda
  • const int * devIpiv
  • float *const Barray
  • int ldb
  • int * info
  • int batchSize

Return type: MUBLAS_EXPORT mublasStatus_t

mublasDgetrsBatched

MUBLAS_EXPORT mublasStatus_t mublasDgetrsBatched(mublasHandle_t handle, mublasOperation_t trans, int n, int nrhs, const double *const Aarray[], int lda, const int *devIpiv, double *const Barray[], int ldb, int *info, int batchSize)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t trans
  • int n
  • int nrhs
  • const double *const Aarray
  • int lda
  • const int * devIpiv
  • double *const Barray
  • int ldb
  • int * info
  • int batchSize

Return type: MUBLAS_EXPORT mublasStatus_t

mublasCgetrsBatched

MUBLAS_EXPORT mublasStatus_t mublasCgetrsBatched(mublasHandle_t handle, mublasOperation_t trans, int n, int nrhs, const muComplex *const Aarray[], int lda, const int *devIpiv, muComplex *const Barray[], int ldb, int *info, int batchSize)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t trans
  • int n
  • int nrhs
  • const muComplex *const Aarray
  • int lda
  • const int * devIpiv
  • muComplex *const Barray
  • int ldb
  • int * info
  • int batchSize

Return type: MUBLAS_EXPORT mublasStatus_t

mublasZgetrsBatched

MUBLAS_EXPORT mublasStatus_t mublasZgetrsBatched(mublasHandle_t handle, mublasOperation_t trans, int n, int nrhs, const muDoubleComplex *const Aarray[], int lda, const int *devIpiv, muDoubleComplex *const Barray[], int ldb, int *info, int batchSize)

Parameters:

  • mublasHandle_t handle
  • mublasOperation_t trans
  • int n
  • int nrhs
  • const muDoubleComplex *const Aarray
  • int lda
  • const int * devIpiv
  • muDoubleComplex *const Barray
  • int ldb
  • int * info
  • int batchSize

Return type: MUBLAS_EXPORT mublasStatus_t

Status Helper Functions

mublasGetStatusString

MUBLAS_EXPORT const char * mublasGetStatusString(mublasStatus status)

BLAS Auxiliary API

mublasGetStatusString

Returns string representing mublasStatus value.

Parameters:

  • status: [mublasStatus] muBLAS status to convert to string

Parameters:

  • mublasStatus status

Return type: MUBLAS_EXPORT const char *

mublasGetStatusName

MUBLAS_EXPORT const char * mublasGetStatusName(mublasStatus status)

BLAS Auxiliary API

mublasGetStatusName

Returns the string representation of a given status.

Parameters:

  • status: [mublasStatus] muBLAS status to convert to Name

Parameters:

  • mublasStatus status

Return type: MUBLAS_EXPORT const char *