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