Skip to main content

muBLAS API Reference

This document describes the muBLAS APIs supported in MUSA SDK 5.2. It starts with the muBLAS programming model, then documents the supported APIs in the order readers typically use them.

1. Introduction

1.1 What Is muBLAS

muBLAS is the MUSA Basic Linear Algebra Subprograms library. It provides GPU-accelerated helper routines, Level 1, Level 2, and Level 3 BLAS operations, and a small set of BLAS-like extension APIs for MTGPU devices.

1.2 Document Scope in MUSA SDK 5.2

This reference describes the muBLAS APIs supported in MUSA SDK 5.2. Use it as the compatibility reference for the functions, types, and status values documented here.

Note: Some muBLAS declarations may appear in mublas_auxiliary.h or mublas_functions.h but are not described in this reference. These declarations are experimental in MUSA SDK 5.2 and are provided for reference only.

1.3 Supported API Families

API familyRepresentative APIs
Helper and context managementmublasCreate, mublasSetStream, mublasSetPointerMode
Level 1 BLASmublasSaxpy, mublasSnrm2, mublasSscal
Level 2 BLASmublasSgemv, mublasStrsv, mublasChemv
Level 3 BLASmublasSgemm, mublasStrsm, mublasCherk
BLAS-like extensionsmublasSgemmEx, mublasGemmEx, mublasGemmGroupedBatchedEx

1.4 How to Use This Document

Start with Chapter 2 for the usage model and configuration concepts. Use Chapter 3 to check status values, datatypes, function signatures, parameter lists, return values, or supported API entries.

2. Using the muBLAS API

2.1 Error Status

The supported muBLAS APIs return mublasStatus. Check the return value after each library call, especially for handle creation, stream setup, data movement helpers, and Level 2 or Level 3 compute calls that depend on size, layout, and pointer parameters. For status values, see 3.1 Return Value mublasStatus.

2.2 muBLAS Context

Most supported muBLAS routines take a mublasHandle_t. Create the handle with mublasCreate, configure it as needed, reuse it across related calls, and release it with mublasDestroy when the context is no longer needed.

Use the helper APIs to query or configure handle state before dispatching compute work. MUSA SDK 5.2 includes helper APIs for version and property queries, stream association, pointer mode, atomics mode, math mode, emulation controls, and logging configuration.

2.3 Scalar Parameters

Many BLAS routines use scalar parameters such as alpha and beta. Some helper APIs also return scalar results, such as version, property, or index values. Pointer location is part of the programming model, so use mublasSetPointerMode and mublasGetPointerMode when you need explicit control over scalar parameters or scalar results.

2.4 Parallelism with Streams

Use mublasSetStream to associate a handle with a MUstream, and use mublasGetStream to query the current association. Asynchronous transfer helpers, such as mublasSetVectorAsync, mublasGetVectorAsync, mublasSetMatrixAsync, and mublasGetMatrixAsync, queue transfers on the supplied stream.

When you overlap data movement and compute, keep stream ownership clear and reuse handles consistently with the intended execution stream.

2.5 Batching Kernels

MUSA SDK 5.2 supports batched, strided-batched, and grouped-batched entry points in several BLAS families. These routines extend the single-operation model to repeated operations that share an API family but differ in memory layout, pointer organization, or grouping.

Use pointer-array batched interfaces when each operand instance is addressed independently. Use strided-batched interfaces when instances are stored at regular intervals in memory. Use grouped-batched interfaces when a single call must cover multiple operation groups with separate shape arrays.

2.6 Math, Atomics, and Emulation Controls

MUSA SDK 5.2 includes helper APIs such as mublasSetMathMode, mublasGetMathMode, mublasSetAtomicsMode, mublasGetAtomicsMode, and the documented emulation-control APIs. These routines configure library behavior instead of performing linear algebra directly, so call them before dependent compute work.

Logging and emulation support controls are configuration APIs. Use them only for corresponding supported 5.2 reference entries included in this document.

3. API Reference

This chapter describes muBLAS status values, datatypes, and library functions. Function entries include signatures, parameters, return values, and descriptions derived from public header comments. APIs that may appear in the public headers but are not documented here should be treated as experimental and for reference only in this release.

3.1 Return Value mublasStatus

Most supported muBLAS APIs return mublasStatus. A return value of MUBLAS_STATUS_SUCCESS indicates that the call completed successfully. Any other value indicates that the call did not complete as requested.

The following table lists the status values used by muBLAS.

Status valueMeaning
MUBLAS_STATUS_SUCCESSThe operation completed successfully.
MUBLAS_STATUS_INVALID_HANDLEThe handle is not initialized, invalid, or null.
MUBLAS_STATUS_NOT_IMPLEMENTEDThe requested function is not implemented.
MUBLAS_STATUS_INVALID_POINTERA pointer argument is invalid.
MUBLAS_STATUS_INVALID_SIZEA size, dimension, leading dimension, increment, or batch-count argument is invalid.
MUBLAS_STATUS_MEMORY_ERRORAn internal memory allocation, copy, or deallocation failed.
MUBLAS_STATUS_INTERNAL_ERRORThe library encountered an internal failure.
MUBLAS_STATUS_PERF_DEGRADEDThe operation completed with degraded performance, typically because available device memory was low.
MUBLAS_STATUS_SIZE_QUERY_MISMATCHA device-memory size query start or stop operation is not matched with the expected query state.
MUBLAS_STATUS_SIZE_INCREASEDThe queried device-memory size increased.
MUBLAS_STATUS_SIZE_UNCHANGEDThe queried device-memory size did not change.
MUBLAS_STATUS_INVALID_VALUEAn argument value is not valid for the requested operation.
MUBLAS_STATUS_CONTINUENo status condition prevents the function from proceeding.
MUBLAS_STATUS_CHECK_NUMERICS_FAILA vector or matrix numerics check detected a NaN or infinity.

3.2 muBLAS Datatypes Reference

This section summarizes the muBLAS-specific types that appear in the supported MUSA SDK 5.2 API signatures.

TypePurpose
mublasHandle_tLibrary context handle passed to most supported muBLAS routines.
mublasStatusReturn type used by the supported muBLAS APIs.
mublasOperation_tOperation selector used by Level 2, Level 3, and extension routines to control transpose behavior.
mublasFillMode_tStorage selector used by symmetric, Hermitian, triangular, and packed-matrix routines.
mublasDiagType_tDiagonal-mode selector used by triangular routines.
mublasSideMode_tSide selector used by routines where the matrix operand appears on the left or right.
mublasPointerMode_tPointer-location selector used for scalar parameters and scalar result handling.
mublasAtomicsMode_tAtomics-mode selector used by atomics configuration helpers.
mublasMath_tMath-mode selector used by math configuration helpers.
mublasComputeType_tCompute-precision selector used by extension GEMM APIs.
mublasGemmAlgo_tAlgorithm selector used by extension GEMM APIs.
mublasEmulationStrategy_tEmulation-strategy selector used by emulation configuration helpers.
mublasLogCallbackCallback-function type used by logging helper APIs.

3.3 MUSA Datatypes Reference

This section summarizes the non-muBLAS public types that appear directly in the supported MUSA SDK 5.2 API signatures.

TypePurpose
MUstreamStream handle used by stream-association helpers and asynchronous vector or matrix transfer helpers.
libraryPropertyType_tProperty selector used by mublasGetProperty.
musaDataType_tStorage-type selector used by extension GEMM APIs.
musaEmulationSpecialValuesSupportMask type used by emulation special-values helpers.
musaEmulationMantissaControlControl type used by mantissa-configuration helpers.
muComplexSingle-precision complex scalar type used by complex BLAS routines.
muDoubleComplexDouble-precision complex scalar type used by complex BLAS routines.

3.4 muBLAS Helper Function Reference

This section covers helper and context-management APIs for handle lifecycle, stream association, host-device data movement, math and atomics modes, emulation controls, and logging configuration.

mublasCreate

mublasStatus mublasCreate(mublasHandle_t *handle)

Description

  • Creates a muBLAS handle.

Parameters

  • handle (mublasHandle_t *)

Returns

mublasDestroy

mublasStatus mublasDestroy(mublasHandle_t handle)

Description

  • Destroys a muBLAS handle.

Parameters

  • handle (mublasHandle_t)

Returns

mublasGetVersion

mublasStatus mublasGetVersion(mublasHandle_t handle, int *version)

Description

  • Gets the muBLAS version.

Parameters

  • handle (mublasHandle_t)
  • version (int *)

Returns

mublasGetProperty

mublasStatus mublasGetProperty(libraryPropertyType_t type, int *value)

Description

  • Gets the value of the requested property.

Parameters

  • type (libraryPropertyType_t)
  • value (int *)

Returns

mublasSetStream

mublasStatus mublasSetStream(mublasHandle_t handle, MUstream stream)

Description

  • Sets the stream for the handle.

Parameters

  • handle (mublasHandle_t)
  • stream (MUstream)

Returns

mublasGetPointerMode

mublasStatus mublasGetPointerMode(mublasHandle_t handle, mublasPointerMode_t *pointer_mode)

Description

  • Gets the pointer mode.

Parameters

  • handle (mublasHandle_t)
  • pointer_mode (mublasPointerMode_t *)

Returns

mublasSetPointerMode

mublasStatus mublasSetPointerMode(mublasHandle_t handle, mublasPointerMode_t pointer_mode)

Description

  • Sets the pointer mode.

Parameters

  • handle (mublasHandle_t)
  • pointer_mode (mublasPointerMode_t)

Returns

mublasSetVector

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

Description

  • Copies a vector from host memory to device memory.

Parameters

  • n (int): number of elements in the vector
  • elem_size (int): number of bytes per element
  • x (const void *): host pointer to the vector
  • incx (int): specifies the increment for elements of the vector
  • y (void *): device pointer to the vector
  • incy (int): specifies the increment for elements of the vector

Returns

mublasGetVector

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

Description

  • Copies a vector from device memory to host memory.

Parameters

  • n (int): number of elements in the vector
  • elem_size (int): number of bytes per element
  • x (const void *): device pointer to the vector
  • incx (int): specifies the increment for elements of the vector
  • y (void *): host pointer to the vector
  • incy (int): specifies the increment for elements of the vector

Returns

mublasSetMatrix

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

Description

  • Copies a matrix from host memory to device memory.

Parameters

  • rows (int): number of rows in matrices
  • cols (int): number of columns in matrices
  • elem_size (int): number of bytes per element
  • a (const void *): host pointer to the matrix
  • lda (int): specifies the leading dimension of A, lda >= rows
  • b (void *): device pointer to the matrix
  • ldb (int): specifies the leading dimension of B, ldb >= rows

Returns

mublasGetMatrix

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

Description

  • Copies a matrix from device memory to host memory.

Parameters

  • rows (int): number of rows in matrices
  • cols (int): number of columns in matrices
  • elem_size (int): number of bytes per element
  • a (const void *): device pointer to the matrix
  • lda (int): specifies the leading dimension of A, lda >= rows
  • b (void *): host pointer to the matrix
  • ldb (int): specifies the leading dimension of B, ldb >= rows

Returns

mublasSetVectorAsync

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

Description

  • Copies a vector asynchronously from host memory to device memory.

Parameters

  • n (int): number of elements in the vector
  • elem_size (int): number of bytes per element
  • x (const void *): host pointer to the vector
  • incx (int): specifies the increment for elements of the vector
  • y (void *): device pointer to the vector
  • incy (int): specifies the increment for elements of the vector
  • stream (MUstream): specifies the stream where the transfer is queued

Returns

mublasGetVectorAsync

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

Description

  • Copies a vector asynchronously from device memory to host memory.

Parameters

  • n (int): number of elements in the vector
  • elem_size (int): number of bytes per element
  • x (const void *): device pointer to the vector
  • incx (int): specifies the increment for elements of the vector
  • y (void *): host pointer to the vector
  • incy (int): specifies the increment for elements of the vector
  • stream (MUstream): specifies the stream where the transfer is queued

Returns

mublasSetMatrixAsync

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

Description

  • Copies a matrix asynchronously from host memory to device memory.

Parameters

  • rows (int): number of rows in matrices
  • cols (int): number of columns in matrices
  • elem_size (int): number of bytes per element
  • a (const void *): host pointer to the matrix
  • lda (int): specifies the leading dimension of A, lda >= rows
  • b (void *): device pointer to the matrix
  • ldb (int): specifies the leading dimension of B, ldb >= rows
  • stream (MUstream): specifies the stream where the transfer is queued

Returns

mublasGetMatrixAsync

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

Description

  • Copies a matrix asynchronously from device memory to host memory.

Parameters

  • rows (int): number of rows in matrices
  • cols (int): number of columns in matrices
  • elem_size (int): number of bytes per element
  • a (const void *): device pointer to the matrix
  • lda (int): specifies the leading dimension of A, lda >= rows
  • b (void *): host pointer to the matrix
  • ldb (int): specifies the leading dimension of B, ldb >= rows
  • stream (MUstream): specifies the stream where the transfer is queued

Returns

mublasSetAtomicsMode

mublasStatus mublasSetAtomicsMode(mublasHandle_t handle, mublasAtomicsMode_t atomics_mode)

Description

  • Sets the atomics mode.

Parameters

  • handle (mublasHandle_t)
  • atomics_mode (mublasAtomicsMode_t)

Returns

mublasGetAtomicsMode

mublasStatus mublasGetAtomicsMode(mublasHandle_t handle, mublasAtomicsMode_t *atomics_mode)

Description

  • Gets the atomics mode.

Parameters

  • handle (mublasHandle_t)
  • atomics_mode (mublasAtomicsMode_t *)

Returns

mublasSetMathMode

mublasStatus mublasSetMathMode(mublasHandle_t handle, mublasMath_t math_mode)

Description

  • Sets the math mode.

Parameters

  • handle (mublasHandle_t)
  • math_mode (mublasMath_t)

Returns

mublasGetMathMode

mublasStatus mublasGetMathMode(mublasHandle_t handle, mublasMath_t *math_mode)

Description

  • Gets the math mode.

Parameters

  • handle (mublasHandle_t)
  • math_mode (mublasMath_t *)

Returns

mublasSetEmulationStrategy

mublasStatus mublasSetEmulationStrategy(mublasHandle_t handle, mublasEmulationStrategy_t emulationStrategy)

Parameters

  • handle (mublasHandle_t)
  • emulationStrategy (mublasEmulationStrategy_t)

Returns

mublasGetEmulationStrategy

mublasStatus mublasGetEmulationStrategy(mublasHandle_t handle, mublasEmulationStrategy_t *emulationStrategy)

Parameters

  • handle (mublasHandle_t)
  • emulationStrategy (mublasEmulationStrategy_t *)

Returns

mublasGetEmulationSpecialValuesSupport

mublasStatus mublasGetEmulationSpecialValuesSupport(mublasHandle_t handle, musaEmulationSpecialValuesSupport *mask)

Parameters

  • handle (mublasHandle_t)
  • mask (musaEmulationSpecialValuesSupport *)

Returns

mublasSetEmulationSpecialValuesSupport

mublasStatus mublasSetEmulationSpecialValuesSupport(mublasHandle_t handle, musaEmulationSpecialValuesSupport mask)

Parameters

  • handle (mublasHandle_t)
  • mask (musaEmulationSpecialValuesSupport)

Returns

mublasGetFixedPointEmulationMantissaBitCountPointer

mublasStatus mublasGetFixedPointEmulationMantissaBitCountPointer(mublasHandle_t handle, int **mantissaBitCount)

Parameters

  • handle (mublasHandle_t)
  • mantissaBitCount (int **)

Returns

mublasSetFixedPointEmulationMantissaBitCountPointer

mublasStatus mublasSetFixedPointEmulationMantissaBitCountPointer(mublasHandle_t handle, int *mantissaBitCount)

Parameters

  • handle (mublasHandle_t)
  • mantissaBitCount (int *)

Returns

mublasGetFixedPointEmulationMantissaControl

mublasStatus mublasGetFixedPointEmulationMantissaControl(mublasHandle_t handle, musaEmulationMantissaControl *mantissaControl)

Parameters

  • handle (mublasHandle_t)
  • mantissaControl (musaEmulationMantissaControl *)

Returns

mublasSetFixedPointEmulationMantissaControl

mublasStatus mublasSetFixedPointEmulationMantissaControl(mublasHandle_t handle, musaEmulationMantissaControl mantissaControl)

Parameters

  • handle (mublasHandle_t)
  • mantissaControl (musaEmulationMantissaControl)

Returns

mublasSetFixedPointEmulationMaxMantissaBitCount

mublasStatus mublasSetFixedPointEmulationMaxMantissaBitCount(mublasHandle_t handle, int maxMantissaBitCount)

Parameters

  • handle (mublasHandle_t)
  • maxMantissaBitCount (int)

Returns

mublasGetFixedPointEmulationMaxMantissaBitCount

mublasStatus mublasGetFixedPointEmulationMaxMantissaBitCount(mublasHandle_t handle, int *maxMantissaBitCount)

Parameters

  • handle (mublasHandle_t)
  • maxMantissaBitCount (int *)

Returns

mublasSetFixedPointEmulationMantissaBitOffset

mublasStatus mublasSetFixedPointEmulationMantissaBitOffset(mublasHandle_t handle, int mantissaBitOffset)

Parameters

  • handle (mublasHandle_t)
  • mantissaBitOffset (int)

Returns

mublasGetFixedPointEmulationMantissaBitOffset

mublasStatus mublasGetFixedPointEmulationMantissaBitOffset(mublasHandle_t handle, int *mantissaBitOffset)

Parameters

  • handle (mublasHandle_t)
  • mantissaBitOffset (int *)

Returns

mublasLoggerConfigure

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

Description

  • Configures runtime logging.

Parameters

  • logIsOn (int)
  • logToStdOut (int)
  • logToStdErr (int)
  • logFileName (const char *)

Returns

mublasGetLoggerCallback

mublasStatus mublasGetLoggerCallback(mublasLogCallback *userCallback)

Description

  • Retrieves the function pointer for the custom user-defined callback previously installed with mublasSetLoggerCallback, or zero if no callback is installed.

Parameters

  • userCallback (mublasLogCallback *): Pointer to a user-defined callback function.

Returns

mublasSetLoggerCallback

mublasStatus mublasSetLoggerCallback(mublasLogCallback userCallback)

Description

  • Installs a custom user-defined callback function through the muBLAS C API.

Parameters

  • userCallback (mublasLogCallback): Pointer to a user-defined callback function.

Returns

3.5 muBLAS Level-1 Function Reference

This section covers the supported Level 1 BLAS vector operations in MUSA SDK 5.2, including index, norm, scale, swap, copy, dot, and rotation routines.

mublasIsamax

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

Description

  • BLAS Level 1 API.
  • Finds the first index of the element with the maximum magnitude in vector x.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • n (int): the number of elements in x.
  • x (const float *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.
  • result (int *): device or host pointer to store the amax index. Returns 0 if n <= 0 or incx <= 0.

Returns

mublasIdamax

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

Parameters

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

Returns

mublasIcamax

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

Parameters

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

Returns

mublasIzamax

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

Parameters

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

Returns

mublasIsamin

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

Description

  • BLAS Level 1 API.
  • Finds the first index of the element with the minimum magnitude in vector x.
  • vector

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • n (int): the number of elements in x.
  • x (const float *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.
  • result (int *): device or host pointer to store the amin index. Returns 0 if n <= 0 or incx <= 0.

Returns

mublasIdamin

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

Parameters

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

Returns

mublasIcamin

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

Parameters

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

Returns

mublasIzamin

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

Parameters

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

Returns

mublasSasum

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

Description

  • BLAS Level 1 API.
  • Computes the sum of element magnitudes for a real vector x, or the sum of real and imaginary component magnitudes for a complex vector x.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • n (int): the number of elements in x and y.
  • x (const float *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector. incx must be > 0.
  • result (float *): device or host pointer to store the asum product. Returns 0 if n <= 0.

Returns

mublasDasum

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

Parameters

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

Returns

mublasScasum

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

Parameters

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

Returns

mublasDzasum

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

Parameters

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

Returns

mublasSaxpy

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

Description

  • BLAS Level 1 API.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • n (int): the number of elements in x and y.
  • alpha (const float *): device or host pointer to specify the scalar alpha.
  • x (const float *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.
  • y (float *): device pointer to vector y.
  • incy (int): specifies the increment for elements of the vector.

Returns

mublasDaxpy

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

Parameters

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

Returns

mublasCaxpy

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

Parameters

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

Returns

mublasZaxpy

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

Parameters

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

Returns

mublasScopy

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

Description

  • BLAS Level 1 API.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • n (int): the number of elements in x to be copied to y.
  • x (const float *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.
  • y (float *): device pointer to vector y.
  • incy (int): specifies the increment for elements of the vector.

Returns

mublasDcopy

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

Parameters

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

Returns

mublasCcopy

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

Parameters

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

Returns

mublasZcopy

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

Parameters

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

Returns

mublasSdot

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

Description

  • BLAS Level 1 API.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • n (int): the number of elements in x and y.
  • x (const float *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.
  • y (const float *): device pointer to vector y.
  • incy (int): specifies the increment for elements of the vector.
  • result (float *): device or host pointer to store the dot product. Returns 0 if n <= 0.

Returns

mublasDdot

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

Parameters

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

Returns

mublasCdotu

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

Parameters

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

Returns

mublasCdotc

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

Parameters

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

Returns

mublasZdotu

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

Parameters

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

Returns

mublasZdotc

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

Parameters

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

Returns

mublasSnrm2

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

Description

  • BLAS Level 1 API.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • n (int): the number of elements in x.
  • x (const float *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.
  • result (float *): device or host pointer to store the nrm2 product. Returns 0 if n <= 0 or incx <= 0.

Returns

mublasDnrm2

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

Parameters

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

Returns

mublasScnrm2

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

Parameters

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

Returns

mublasDznrm2

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

Parameters

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

Returns

mublasSrot

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

Description

  • BLAS Level 1 API.
  • 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 host or device memory; use mublasSetPointerMode to specify the location.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • n (int): number of elements in the x and y vectors.
  • x (float *): device pointer to vector x.
  • incx (int): specifies the increment between elements of x.
  • y (float *): device pointer to vector y.
  • incy (int): specifies the increment between elements of y.
  • c (const float *): device or host pointer storing scalar cosine component of the rotation matrix.
  • s (const float *): device or host pointer storing scalar sine component of the rotation matrix.

Returns

mublasDrot

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

Parameters

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

Returns

mublasCrot

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

Parameters

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

Returns

mublasCsrot

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

Parameters

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

Returns

mublasZrot

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

Parameters

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

Returns

mublasZdrot

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

Parameters

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

Returns

mublasSrotg

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

Description

  • BLAS Level 1 API.
  • Creates the Givens rotation matrix for the vector (a, b). Scalars c and s and arrays a and b may be stored in host or device memory; use mublasSetPointerMode to specify the location. In MUBLAS_POINTER_MODE_HOST, the function blocks the CPU until device work completes and results are available in host memory. In MUBLAS_POINTER_MODE_DEVICE, the function returns immediately, and synchronization is required before reading the results.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • a (float *): device or host pointer to input vector element, overwritten with r.
  • b (float *): device or host pointer to input vector element, overwritten with z.
  • c (float *): device or host pointer to cosine element of Givens rotation.
  • s (float *): device or host pointer sine element of Givens rotation.

Returns

mublasDrotg

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

Parameters

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

Returns

mublasCrotg

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

Parameters

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

Returns

mublasZrotg

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

Parameters

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

Returns

mublasSrotm

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

Description

  • BLAS Level 1 API.
  • Applies the modified Givens rotation matrix defined by param to vectors x and y.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • n (int): number of elements in the x and y vectors.
  • x (float *): device pointer to vector x.
  • incx (int): specifies the increment between elements of x.
  • y (float *): device pointer to vector y.
  • incy (int): specifies the increment between elements of y.
  • param (const float *): 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.

Returns

mublasDrotm

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

Parameters

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

Returns

mublasSrotmg

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

Description

  • BLAS Level 1 API.
  • Creates the modified Givens rotation matrix for the vector (d1 * x1, d2 * y1). Parameters may be stored in host or device memory; use mublasSetPointerMode to specify the location. In MUBLAS_POINTER_MODE_HOST, the function blocks the CPU until device work completes and results are available in host memory. In MUBLAS_POINTER_MODE_DEVICE, the function returns immediately, and synchronization is required before reading the results.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • d1 (float *): device or host pointer to input scalar that is overwritten.
  • d2 (float *): device or host pointer to input scalar that is overwritten.
  • x1 (float *): device or host pointer to input scalar that is overwritten.
  • y1 (const float *): device or host pointer to input scalar.
  • param (float *): 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.

Returns

mublasDrotmg

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

Parameters

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

Returns

mublasSscal

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

Description

  • BLAS Level 1 API.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • n (int): the number of elements in x.
  • alpha (const float *): device or host pointer for the scalar alpha.
  • x (float *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.

Returns

mublasDscal

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

Parameters

  • handle (mublasHandle_t)
  • n (int)
  • alpha (const double *)
  • x (double *)
  • incx (int)

Returns

mublasCscal

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

Parameters

  • handle (mublasHandle_t)
  • n (int)
  • alpha (const muComplex *)
  • x (muComplex *)
  • incx (int)

Returns

mublasCsscal

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

Parameters

  • handle (mublasHandle_t)
  • n (int)
  • alpha (const float *)
  • x (muComplex *)
  • incx (int)

Returns

mublasZscal

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

Parameters

  • handle (mublasHandle_t)
  • n (int)
  • alpha (const muDoubleComplex *)
  • x (muDoubleComplex *)
  • incx (int)

Returns

mublasZdscal

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

Parameters

  • handle (mublasHandle_t)
  • n (int)
  • alpha (const double *)
  • x (muDoubleComplex *)
  • incx (int)

Returns

mublasSswap

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

Description

  • BLAS Level 1 API.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • n (int): the number of elements in x and y.
  • x (float *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.
  • y (float *): device pointer to vector y.
  • incy (int): specifies the increment for elements of the vector.

Returns

mublasDswap

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

Parameters

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

Returns

mublasCswap

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

Parameters

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

Returns

mublasZswap

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

Parameters

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

Returns

3.6 muBLAS Level-2 Function Reference

This section covers the supported Level 2 BLAS matrix-vector routines in MUSA SDK 5.2, including general, symmetric, Hermitian, banded, packed, triangular, and selected batched GEMV interfaces.

mublasSgbmv

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)

Description

  • BLAS Level 2 API.
  • Performs one of the matrix-vector operations y := alpha*A*x + beta*y, 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 subdiagonals and ku superdiagonals.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • trans (mublasOperation_t): indicates whether matrix A is transposed (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 (const float *): device or host pointer to scalar alpha.
  • A (const float *): 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 right-hand side of row ku. The first sub-diagonal resides below on the left-hand side of row ku + 2. This propagates up and down across subdiagonals and superdiagonals. 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 (const float *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.
  • beta (const float *): device or host pointer to scalar beta.
  • y (float *): device pointer to vector y.
  • incy (int): specifies the increment for elements of the vector.

Returns

mublasDgbmv

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

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

Returns

mublasCgbmv

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

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

Returns

mublasZgbmv

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

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

Returns

mublasSgemv

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)

Description

  • BLAS Level 2 API.
  • Performs one of the matrix-vector operations y := alpha*A*x + beta*y, 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.
  • trans (mublasOperation_t): indicates whether matrix A is transposed (conjugated) or not
  • m (int): number of rows of matrix A
  • n (int): number of columns of matrix A
  • alpha (const float *): device or host pointer to scalar alpha.
  • A (const float *): device pointer to matrix A.
  • lda (int): specifies the leading dimension of A.
  • x (const float *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.
  • beta (const float *): device or host pointer to scalar beta.
  • y (float *): device pointer to vector y.
  • incy (int): specifies the increment for elements of the vector.

Returns

mublasDgemv

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

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

Returns

mublasCgemv

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

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

Returns

mublasZgemv

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

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

Returns

mublasSger

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)

Description

  • BLAS Level 2 API.
  • ger,geru,gerc performs the matrix-vector operations A := A + alphaxyT , OR A := A + alphaxyH 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.
  • m (int): the number of rows of the matrix A.
  • n (int): the number of columns of the matrix A.
  • alpha (const float *): device or host pointer to scalar alpha.
  • x (const float *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.
  • y (const float *): device pointer to vector y.
  • incy (int): specifies the increment for elements of the vector.
  • A (float *): device pointer to matrix A.
  • lda (int): specifies the leading dimension of A.

Returns

mublasDger

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

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

Returns

mublasCgeru

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

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

Returns

mublasCgerc

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

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

Returns

mublasZgeru

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

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

Returns

mublasZgerc

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

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

Returns

mublasSsbmv

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)

Description

  • BLAS Level 2 API.
  • 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 contains an upper or lower triangular n by n symmetric banded matrix.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • uplo (mublasFillMode_t): selects the stored triangular part. MUBLAS_FILL_MODE_UPPER means the lower part of A is not referenced. MUBLAS_FILL_MODE_LOWER means the upper part of A is not referenced.
  • n (int): - k (int): specifies the number of sub- and super-diagonals
  • alpha (const float *): specifies the scalar alpha
  • A (const float *): device pointer to matrix A
  • lda (int): specifies the leading dimension of matrix A
  • x (const float *): device pointer to vector x
  • incx (int): specifies the increment for the elements of x
  • beta (const float *): specifies the scalar beta
  • y (float *): device pointer to vector y
  • incy (int): specifies the increment for the elements of y

Returns

mublasDsbmv

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

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

Returns

mublasSspmv

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)

Description

  • BLAS Level 2 API.
  • 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 contains an upper or lower triangular n by n packed symmetric matrix.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • uplo (mublasFillMode_t): selects the stored triangular part. MUBLAS_FILL_MODE_UPPER means the lower part of A is not referenced. MUBLAS_FILL_MODE_LOWER means the upper part of A is not referenced.
  • n (int): - alpha (const float *): specifies the scalar alpha
  • A (const float *): device pointer to matrix A
  • x (const float *): device pointer to vector x
  • incx (int): specifies the increment for the elements of x
  • beta (const float *): specifies the scalar beta
  • y (float *): device pointer to vector y
  • incy (int): specifies the increment for the elements of y

Returns

mublasDspmv

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

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

Returns

mublasSspr

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

Description

  • BLAS Level 2 API.
  • Performs the symmetric packed rank-1 update 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.
  • uplo (mublasFillMode_t): selects the stored triangular part of A. MUBLAS_FILL_MODE_UPPER means the upper triangular part of A is supplied in AP. MUBLAS_FILL_MODE_LOWER means 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 (const float *): device or host pointer to scalar alpha.
  • x (const float *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.
  • AP (float *): device pointer storing the packed version of the specified triangular portion of the symmetric matrix A with size at least ((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

Returns

mublasDspr

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

Parameters

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

Returns

mublasSspr2

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)

Description

  • BLAS Level 2 API.
  • spr2 performs the matrix-vector operation A := A + alphaxyT + alphayxT 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.
  • uplo (mublasFillMode_t): selects the stored triangular part of A. MUBLAS_FILL_MODE_UPPER means the upper triangular part of A is supplied in AP. MUBLAS_FILL_MODE_LOWER means 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 (const float *): device or host pointer to scalar alpha.
  • x (const float *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.
  • y (const float *): device pointer to vector y.
  • incy (int): specifies the increment for elements of the vector.
  • AP (float *): device pointer storing the packed version of the specified triangular portion of the symmetric matrix A with size at least ((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

Returns

mublasDspr2

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

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

Returns

mublasSsymv

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)

Description

  • BLAS Level 2 API.
  • 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 contains an upper or lower triangular n by n symmetric matrix.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • uplo (mublasFillMode_t): selects the stored triangular part. MUBLAS_FILL_MODE_UPPER means the lower part of A is not referenced. MUBLAS_FILL_MODE_LOWER means the upper part of A is not referenced.
  • n (int): - alpha (const float *): specifies the scalar alpha
  • A (const float *): device pointer to matrix A
  • lda (int): specifies the leading dimension of A
  • x (const float *): device pointer to vector x
  • incx (int): specifies the increment for the elements of x
  • beta (const float *): specifies the scalar beta
  • y (float *): device pointer to vector y
  • incy (int): specifies the increment for the elements of y

Returns

mublasDsymv

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

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

Returns

mublasSsyr

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

Description

  • BLAS Level 2 API.
  • Performs the symmetric rank-1 update 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.
  • uplo (mublasFillMode_t): selects the stored triangular part. MUBLAS_FILL_MODE_UPPER means the lower part of A is not referenced. MUBLAS_FILL_MODE_LOWER means the upper part of A is not referenced.
  • n (int): the number of rows and columns of matrix A.
  • alpha (const float *): device or host pointer to scalar alpha.
  • x (const float *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.
  • A (float *): device pointer to matrix A.
  • lda (int): specifies the leading dimension of A.

Returns

mublasDsyr

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

Parameters

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

Returns

mublasCsyr

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

Parameters

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

Returns

mublasZsyr

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

Parameters

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

Returns

mublasSsyr2

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)

Description

  • BLAS Level 2 API.
  • syr2 performs the matrix-vector operations A := A + alphaxyT + alphayxT 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.
  • uplo (mublasFillMode_t): selects the stored triangular part. MUBLAS_FILL_MODE_UPPER means the lower part of A is not referenced. MUBLAS_FILL_MODE_LOWER means the upper part of A is not referenced.
  • n (int): the number of rows and columns of matrix A.
  • alpha (const float *): device or host pointer to scalar alpha.
  • x (const float *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.
  • y (const float *): device pointer to vector y.
  • incy (int): specifies the increment for elements of the vector.
  • A (float *): device pointer to matrix A.
  • lda (int): specifies the leading dimension of A.

Returns

mublasDsyr2

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

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

Returns

mublasCsyr2

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

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

Returns

mublasZsyr2

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

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

Returns

mublasStbmv

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)

Description

  • BLAS Level 2 API.
  • Performs one of the matrix-vector operations x := A*x, x := A**T*x, or x := A**H*x, where x is a vector and A is a banded m by m matrix.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • 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 transposed (conjugated) or not.
  • diag (mublasDiagType_t): MUBLAS_DIAG_UNIT: The main diagonal of A is assumed to consist of only ones 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 > 0 && k < lda.
  • A (const float *): 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 right-hand side of the (k - 1)-th row, etc, with the k-th diagonal on the right-hand side 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 represented 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 left-hand side 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 > k.
  • x (float *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.

Returns

mublasDtbmv

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

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

Returns

mublasCtbmv

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

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

Returns

mublasZtbmv

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

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

Returns

mublasStbsv

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)

Description

  • BLAS Level 2 API.
  • Solves A*x = b, 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.
  • 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 (const float *): device pointer storing the matrix A in banded format.
  • lda (int): specifies the leading dimension of A. lda >= (k + 1).
  • x (float *): device pointer storing input vector b. Overwritten by the output vector x.
  • incx (int): specifies the increment for elements of the vector.

Returns

mublasDtbsv

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

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

Returns

mublasCtbsv

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

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

Returns

mublasZtbsv

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

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

Returns

mublasStpmv

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

Description

  • BLAS Level 2 API.
  • 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 packed form.
  • The vector x is overwritten.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • 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): specifies the form of op(A).
  • diag (mublasDiagType_t): MUBLAS_DIAG_UNIT treats A as unit triangular; MUBLAS_DIAG_NON_UNIT does not assume a unit diagonal.
  • m (int): m specifies the number of rows of A. m >= 0.
  • A (const float *): device pointer to matrix A with dimension at least ( 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, A[1] and A[2] contain a_1 and a_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, A[1] and A[2] contain a_0 and a_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 (float *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector. incx must not be zero.

Returns

mublasDtpmv

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

Parameters

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

Returns

mublasCtpmv

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

Parameters

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

Returns

mublasZtpmv

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

Parameters

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

Returns

mublasStpsv

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

Description

  • BLAS Level 2 API.
  • Solves A*x = b, A**T*x = b, or A**H*x = b, where x and b are vectors and A is a triangular matrix stored in packed format.
  • The input vector b is overwritten by the output vector x.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • 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 (const float *): device pointer storing the packed version of matrix A, of dimension >= (n * (n + 1) / 2)
  • x (float *): device pointer to vector b on input, overwritten by x on output.
  • incx (int): specifies the increment for elements of the vector.

Returns

mublasDtpsv

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

Parameters

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

Returns

mublasCtpsv

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

Parameters

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

Returns

mublasZtpsv

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

Parameters

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

Returns

mublasStrmv

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)

Description

  • BLAS Level 2 API.
  • 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.
  • 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): specifies the form of op(A).
  • diag (mublasDiagType_t): MUBLAS_DIAG_UNIT treats A as unit triangular; MUBLAS_DIAG_NON_UNIT does not assume a unit diagonal.
  • m (int): m specifies the number of rows of A. m >= 0.
  • A (const float *): device pointer to matrix A with dimension ( lda, m )
  • lda (int): specifies the leading dimension of A. lda = max( 1, m ).
  • x (float *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.

Returns

mublasDtrmv

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

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

Returns

mublasCtrmv

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

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

Returns

mublasZtrmv

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

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

Returns

mublasStrsv

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)

Description

  • BLAS Level 2 API.
  • 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.
  • 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): specifies the form of op(A).
  • diag (mublasDiagType_t): MUBLAS_DIAG_UNIT treats A as unit triangular; MUBLAS_DIAG_NON_UNIT does not assume a unit diagonal.
  • m (int): m specifies the number of rows of b. m >= 0.
  • A (const float *): device pointer to matrix A with dimension ( lda, m )
  • lda (int): specifies the leading dimension of A. lda = max( 1, m ).
  • x (float *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.

Returns

mublasDtrsv

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

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

Returns

mublasCtrsv

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

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

Returns

mublasZtrsv

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

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

Returns

mublasChemv

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)

Description

  • BLAS Level 2 API.
  • 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.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • 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 (const muComplex *): device or host pointer to scalar alpha.
  • A (const muComplex *): device pointer to matrix A with 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 is not referenced and is assumed to be zero.
  • lda (int): specifies the leading dimension of A. must be >= max(1, n)
  • x (const muComplex *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.
  • beta (const muComplex *): device or host pointer to scalar beta.
  • y (muComplex *): device pointer to vector y.
  • incy (int): specifies the increment for elements of the vector.

Returns

mublasZhemv

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

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

Returns

mublasChbmv

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)

Description

  • BLAS Level 2 API.
  • 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 band matrix with k superdiagonals.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • 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 (const muComplex *): device or host pointer to scalar alpha.
  • A (const muComplex *): device pointer to matrix A with 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 right-hand side of row k, etc. The top-left k by k triangle of A is not 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)
  • lda (int): specifies the leading dimension of A. must be >= k + 1
  • x (const muComplex *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.
  • beta (const muComplex *): device or host pointer to scalar beta.
  • y (muComplex *): device pointer to vector y.
  • incy (int): specifies the increment for elements of the vector.

Returns

mublasZhbmv

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

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

Returns

mublasChpmv

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)

Description

  • BLAS Level 2 API.
  • 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.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • 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 matrix A. Must be >= 0.
  • alpha (const muComplex *): device or host pointer to scalar alpha.
  • AP (const muComplex *): device pointer storing the packed version of the specified triangular portion of the Hermitian matrix A with size at least ((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 parts of the diagonal elements are not accessed and are assumed to be zero.
  • x (const muComplex *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.
  • beta (const muComplex *): device or host pointer to scalar beta.
  • y (muComplex *): device pointer to vector y.
  • incy (int): specifies the increment for elements of the vector.

Returns

mublasZhpmv

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

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

Returns

mublasCher

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

Description

  • BLAS Level 2 API.
  • Performs the Hermitian rank-1 update 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.
  • uplo (mublasFillMode_t): selects the stored triangular part of A. MUBLAS_FILL_MODE_UPPER means the upper triangular part of A is supplied in A. MUBLAS_FILL_MODE_LOWER means 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 (const float *): device or host pointer to scalar alpha.
  • x (const muComplex *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.
  • A (muComplex *): device pointer storing the specified triangular portion of the Hermitian matrix A with size (lda * n). If uplo == MUBLAS_FILL_MODE_UPPER: The upper triangular portion of the Hermitian matrix A is supplied. The lower triangular portion is not modified. If uplo == MUBLAS_FILL_MODE_LOWER: The lower triangular portion of the Hermitian matrix A is supplied. The upper triangular portion is not modified. Note that the imaginary parts of the diagonal elements are not accessed and are assumed to be zero.
  • lda (int): specifies the leading dimension of A. Must be at least max(1, n).

Returns

mublasZher

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

Parameters

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

Returns

mublasCher2

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)

Description

  • BLAS Level 2 API.
  • her2 performs the matrix-vector operations A := A + alphaxyH + conj(alpha)yxH 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.
  • uplo (mublasFillMode_t): selects the stored triangular part of A. MUBLAS_FILL_MODE_UPPER means the upper triangular part of A is supplied. MUBLAS_FILL_MODE_LOWER means 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 (const muComplex *): device or host pointer to scalar alpha.
  • x (const muComplex *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.
  • y (const muComplex *): device pointer to vector y.
  • incy (int): specifies the increment for elements of the vector.
  • A (muComplex *): device pointer storing the specified triangular portion of the Hermitian matrix A with 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 is not modified. If uplo == MUBLAS_FILL_MODE_LOWER: The lower triangular portion of the Hermitian matrix A is supplied. The upper triangular portion of A is not modified. Note that the imaginary parts of the diagonal elements are not accessed and are assumed to be zero.
  • lda (int): specifies the leading dimension of A. Must be at least max(lda, 1).

Returns

mublasZher2

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

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

Returns

mublasChpr

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

Description

  • BLAS Level 2 API.
  • Performs the Hermitian packed rank-1 update 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.
  • uplo (mublasFillMode_t): selects the stored triangular part of A. MUBLAS_FILL_MODE_UPPER means the upper triangular part of A is supplied in AP. MUBLAS_FILL_MODE_LOWER means 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 (const float *): device or host pointer to scalar alpha.
  • x (const muComplex *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.
  • AP (muComplex *): device pointer storing the packed version of the specified triangular portion of the Hermitian matrix A with size at least ((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 parts of the diagonal elements are not accessed and are assumed to be zero.

Returns

mublasZhpr

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

Parameters

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

Returns

mublasChpr2

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)

Description

  • BLAS Level 2 API.
  • hpr2 performs the matrix-vector operations A := A + alphaxyH + conj(alpha)yxH 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.
  • uplo (mublasFillMode_t): selects the stored triangular part of A. MUBLAS_FILL_MODE_UPPER means the upper triangular part of A is supplied in AP. MUBLAS_FILL_MODE_LOWER means 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 (const muComplex *): device or host pointer to scalar alpha.
  • x (const muComplex *): device pointer to vector x.
  • incx (int): specifies the increment for elements of the vector.
  • y (const muComplex *): device pointer to vector y.
  • incy (int): specifies the increment for elements of the vector.
  • AP (muComplex *): device pointer storing the packed version of the specified triangular portion of the Hermitian matrix A with size at least ((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 parts of the diagonal elements are not accessed and are assumed to be zero.

Returns

mublasZhpr2

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

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

Returns

mublasSgemvBatched

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)

Description

  • BLAS Level 2 API.
  • Performs a batch of matrix-vector operations y_i := alpha*A_i*x_i + beta*y_i, 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 batch instance. 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.
  • trans (mublasOperation_t): indicates whether matrices A_i are transposed (conjugated) or not
  • m (int): number of rows of each matrix A_i
  • n (int): number of columns of each matrix A_i
  • alpha (const float *): device or host pointer to scalar alpha.
  • A (const float *const): device array of device pointers storing each matrix A_i.
  • lda (int): specifies the leading dimension of each matrix A_i.
  • x (const float *const): device array of device pointers storing each vector x_i.
  • incx (int): specifies the increment for the elements of each vector x_i.
  • beta (const float *): device or host pointer to scalar beta.
  • y (float *const): 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

Returns

3.7 muBLAS Level-3 Function Reference

This section covers the supported Level 3 BLAS matrix-matrix routines in MUSA SDK 5.2, including GEMM, symmetric, Hermitian, triangular, and supported batched or grouped-batched variants.

mublasSgemm

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)

Description

  • BLAS Level 3 API.
  • Performs one of the matrix-matrix operations C = alpha*op(A)*op(B) + beta*C, where op(X) is X, X**T, or X**H; alpha and beta are scalars; op(A) is an m by k matrix; op(B) is a k by n matrix; and C is an m by n matrix.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • 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 (const float *): device or host pointer specifying the scalar alpha.
  • A (const float *): device pointer to matrix A.
  • lda (int): specifies the leading dimension of A.
  • B (const float *): device pointer to matrix B.
  • ldb (int): specifies the leading dimension of B.
  • beta (const float *): device or host pointer specifying the scalar beta.
  • C (float *): device pointer to matrix C.
  • ldc (int): specifies the leading dimension of C.

Returns

mublasDgemm

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

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

Returns

mublasCgemm

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

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

Returns

mublasZgemm

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

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

Returns

mublasSgemmBatched

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)

Description

  • BLAS Level 3 API.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • 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 float *): device or host pointer specifying the scalar alpha.
  • A (const float *const): device array of device pointers storing each matrix A_i.
  • lda (int): specifies the leading dimension of each A_i.
  • B (const float *const): device array of device pointers storing each matrix B_i.
  • ldb (int): specifies the leading dimension of each B_i.
  • beta (const float *): device or host pointer specifying the scalar beta.
  • C (float *const): 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

Returns

mublasDgemmBatched

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

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

Returns

mublasCgemmBatched

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

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

Returns

mublasZgemmBatched

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

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

Returns

mublasSgemmStridedBatched

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)

Description

  • BLAS Level 3 API.
  • 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. op(X) is X, X**T, or X**H; alpha and beta are scalars; A, B, and C are strided-batched matrices; op(A) is m by k by batch_count; op(B) is k by n by batch_count; and C is m by n by batch_count.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • 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 float *): device or host pointer specifying the scalar alpha.
  • A (const float *): device pointer pointing to the first matrix A_1.
  • lda (int): specifies the leading dimension of each A_i.
  • stride_a (long long int): [long long int] stride from the start of one A_i matrix to the next A_(i + 1).
  • B (const float *): device pointer pointing to the first matrix B_1.
  • ldb (int): specifies the leading dimension of each B_i.
  • stride_b (long long int): [long long int] stride from the start of one B_i matrix to the next B_(i + 1).
  • beta (const float *): device or host pointer specifying the scalar beta.
  • C (float *): device pointer pointing to the first matrix C_1.
  • ldc (int): specifies the leading dimension of each C_i.
  • stride_c (long long int): [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

Returns

mublasDgemmStridedBatched

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

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

Returns

mublasCgemmStridedBatched

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

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

Returns

mublasZgemmStridedBatched

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

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

Returns

mublasSgemmGroupedBatched

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

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

Returns

mublasDgemmGroupedBatched

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

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

Returns

mublasSsymm

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)

Description

  • BLAS Level 3 API.
  • 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.
  • side (mublasSideMode_t): MUBLAS_SIDE_LEFT: C := alphaAB + betaC MUBLAS_SIDE_RIGHT: C := alphaBA + betaC
  • uplo (mublasFillMode_t): MUBLAS_FILL_MODE_UPPER selects the upper triangular part of A. MUBLAS_FILL_MODE_LOWER selects the lower triangular part of A.
  • 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 (const float *): alpha specifies the scalar alpha. When alpha is zero then A and B are not referenced.
  • A (const float *): device pointer to matrix A. A is m by m when side == MUBLAS_SIDE_LEFT, and n by n when side == MUBLAS_SIDE_RIGHT. Only the selected upper or lower triangular part is accessed.
  • lda (int): lda specifies the leading dimension of A. If side == MUBLAS_SIDE_LEFT, lda >= max(1, m); otherwise, lda >= max(1, n).
  • B (const float *): device pointer to matrix B. The matrix dimension is m by n.
  • ldb (int): ldb specifies the leading dimension of B. ldb >= max(1, m)
  • beta (const float *): beta specifies the scalar beta. When beta is zero then C need not be set before entry.
  • C (float *): device pointer to matrix C. The matrix dimension is m by n.
  • ldc (int): ldc specifies the leading dimension of C. ldc >= max(1, m)

Returns

mublasDsymm

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

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

Returns

mublasCsymm

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

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

Returns

mublasZsymm

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

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

Returns

mublasSsyrk

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)

Description

  • BLAS Level 3 API.
  • Performs one of the matrix-matrix operations for a symmetric rank-k update.
  • C := alpha*op( A )op( A )^T + betaC

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • uplo (mublasFillMode_t): MUBLAS_FILL_MODE_UPPER selects the upper triangular part of C. MUBLAS_FILL_MODE_LOWER selects the lower triangular part of C.
  • transA (mublasOperation_t): MUBLAS_OP_T: op(A) = A^T MUBLAS_OP_N: op(A) = A MUBLAS_OP_C: op(A) = A^T
  • 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 (const float *): alpha specifies the scalar alpha. When alpha is zero then A is not referenced and A need not be set before entry.
  • A (const float *): device pointer to matrix A. The matrix dimension is (lda, k) when transA == MUBLAS_OP_N, and (lda, n) otherwise. Only the selected upper or lower triangular part is accessed.
  • lda (int): lda specifies the leading dimension of A. If transA == MUBLAS_OP_N, lda >= max(1, n); otherwise, lda >= max(1, k).
  • beta (const float *): beta specifies the scalar beta. When beta is zero then C need not be set before entry.
  • C (float *): device pointer to matrix C.
  • ldc (int): ldc specifies the leading dimension of C. ldc >= max(1, n).

Returns

mublasDsyrk

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

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

Returns

mublasCsyrk

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

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

Returns

mublasZsyrk

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

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

Returns

mublasSsyr2k

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)

Description

  • 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

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • uplo (mublasFillMode_t): MUBLAS_FILL_MODE_UPPER selects the upper triangular part of C. MUBLAS_FILL_MODE_LOWER selects the lower triangular part of C.
  • 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 (const float *): alpha specifies the scalar alpha. When alpha is zero then A is not referenced and A need not be set before entry.
  • A (const float *): device pointer to matrix A. The matrix dimension is (lda, k) when trans == MUBLAS_OP_N, and (lda, n) otherwise. Only the selected upper or lower triangular part is accessed.
  • lda (int): lda specifies the leading dimension of A. If trans == MUBLAS_OP_N, lda >= max(1, n); otherwise, lda >= max(1, k).
  • B (const float *): device pointer to matrix B. The matrix dimension is (ldb, k) when trans == MUBLAS_OP_N, and (ldb, n) otherwise. Only the selected upper or lower triangular part is accessed.
  • ldb (int): ldb specifies the leading dimension of B. If trans == MUBLAS_OP_N, ldb >= max(1, n); otherwise, ldb >= max(1, k).
  • beta (const float *): beta specifies the scalar beta. When beta is zero then C need not be set before entry.
  • C (float *): device pointer to matrix C.
  • ldc (int): ldc specifies the leading dimension of C. ldc >= max(1, n).

Returns

mublasDsyr2k

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

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

Returns

mublasCsyr2k

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

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

Returns

mublasZsyr2k

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

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

Returns

mublasCsyrkx

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

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

Returns

mublasStrmm

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)

Description

  • BLAS Level 3 API.
  • 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 A, A^T, or A^H. The operation can be performed in place by passing the same address for matrices B and C.
  • 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.
  • When diag == MUBLAS_DIAG_UNIT, the diagonal elements of A are not referenced and are assumed to be unity.

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • 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 (const float *): alpha specifies the scalar alpha. When alpha is zero then A is not referenced and B need not be set before entry.
  • A (const float *): device pointer to matrix A. A has dimension (lda, k), where k is m when side == MUBLAS_SIDE_LEFT and n when side == MUBLAS_SIDE_RIGHT.
  • lda (int): lda specifies the leading dimension of A. If side == MUBLAS_SIDE_LEFT, lda >= max(1, m). If side == MUBLAS_SIDE_RIGHT, lda >= max(1, n).
  • B (const float *): device pointer to matrix B.
  • ldb (int): ldb specifies the leading dimension of B. ldb >= max(1, m).
  • C (float *): device pointer to matrix C.
  • ldc (int): ldc specifies the leading dimension of C. ldc >= max(1, m).

Returns

mublasDtrmm

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

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

Returns

mublasCtrmm

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

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

Returns

mublasZtrmm

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

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

Returns

mublasStrsm

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)

Description

  • BLAS Level 3 API.
  • 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 a triangular matrix, and op(A) is A, A^T, or A^H. The solution matrix X overwrites 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.
  • 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 (const float *): device 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 (const float *): device pointer to matrix A. with dimension (lda, k), where k is m for MUBLAS_SIDE_LEFT and n for MUBLAS_SIDE_RIGHT. Only the selected upper or lower triangular part is accessed.
  • lda (int): lda specifies the leading dimension of A. If side == MUBLAS_SIDE_LEFT, lda >= max(1, m). If side == MUBLAS_SIDE_RIGHT, lda >= max(1, n).
  • B (float *): device pointer to matrix B.
  • ldb (int): ldb specifies the leading dimension of B. ldb >= max(1, m).

Returns

mublasDtrsm

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

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

Returns

mublasCtrsm

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

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

Returns

mublasZtrsm

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

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

Returns

mublasChemm

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)

Description

  • BLAS Level 3 API.
  • 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.
  • side (mublasSideMode_t): MUBLAS_SIDE_LEFT: C := alphaAB + betaC MUBLAS_SIDE_RIGHT: C := alphaBA + betaC
  • uplo (mublasFillMode_t): MUBLAS_FILL_MODE_UPPER selects the upper triangular part of A. MUBLAS_FILL_MODE_LOWER selects the lower triangular part of A.
  • 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 (const muComplex *): alpha specifies the scalar alpha. When alpha is zero then A and B are not referenced.
  • A (const muComplex *): device pointer to matrix A. A is m by m when side == MUBLAS_SIDE_LEFT, and n by n when side == MUBLAS_SIDE_RIGHT. Only the selected upper or lower triangular part is accessed. The imaginary component of the diagonal elements is not used.
  • lda (int): lda specifies the leading dimension of A. If side == MUBLAS_SIDE_LEFT, lda >= max(1, m); otherwise, lda >= max(1, n).
  • B (const muComplex *): device pointer to matrix B. The matrix dimension is m by n.
  • ldb (int): ldb specifies the leading dimension of B. ldb >= max(1, m)
  • beta (const muComplex *): beta specifies the scalar beta. When beta is zero then C need not be set before entry.
  • C (muComplex *): device pointer to matrix C. The matrix dimension is m by n.
  • ldc (int): ldc specifies the leading dimension of C. ldc >= max(1, m)

Returns

mublasZhemm

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

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

Returns

mublasCherk

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)

Description

  • BLAS Level 3 API.
  • Performs one of the matrix-matrix operations for a Hermitian rank-k update.
  • C := alpha*op( A )op( A )^H + betaC

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • uplo (mublasFillMode_t): MUBLAS_FILL_MODE_UPPER selects the upper triangular part of C. MUBLAS_FILL_MODE_LOWER selects the lower triangular part of C.
  • 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 (const float *): alpha specifies the scalar alpha. When alpha is zero then A is not referenced and A need not be set before entry.
  • A (const muComplex *): device pointer to matrix A. The matrix dimension is (lda, k) when transA == MUBLAS_OP_N, and (lda, n) otherwise. Only the selected upper or lower triangular part is accessed.
  • lda (int): lda specifies the leading dimension of A. If transA == MUBLAS_OP_N, lda >= max(1, n); otherwise, lda >= max(1, k).
  • beta (const float *): beta specifies the scalar beta. When beta is zero then C need not be set before entry.
  • C (muComplex *): device pointer to matrix C. The imaginary components of the diagonal elements are not used but are set to zero unless quick return.
  • ldc (int): ldc specifies the leading dimension of C. ldc >= max(1, n).

Returns

mublasZherk

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

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

Returns

mublasCher2k

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)

Description

  • 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

Parameters

  • handle (mublasHandle_t): handle to the muBLAS library context.
  • uplo (mublasFillMode_t): MUBLAS_FILL_MODE_UPPER selects the upper triangular part of C. MUBLAS_FILL_MODE_LOWER selects the lower triangular part of C.
  • 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 (const muComplex *): alpha specifies the scalar alpha. When alpha is zero then A is not referenced and A need not be set before entry.
  • A (const muComplex *): device pointer to matrix A. The matrix dimension is (lda, k) when trans == MUBLAS_OP_N, and (lda, n) otherwise. Only the selected upper or lower triangular part is accessed.
  • lda (int): lda specifies the leading dimension of A. If trans == MUBLAS_OP_N, lda >= max(1, n); otherwise, lda >= max(1, k).
  • B (const muComplex *): device pointer to matrix B. The matrix dimension is (ldb, k) when trans == MUBLAS_OP_N, and (ldb, n) otherwise. Only the selected upper or lower triangular part is accessed.
  • ldb (int): ldb specifies the leading dimension of B. If trans == MUBLAS_OP_N, ldb >= max(1, n); otherwise, ldb >= max(1, k).
  • beta (const float *): beta specifies the scalar beta. When beta is zero then C need not be set before entry.
  • C (muComplex *): device pointer to matrix C. The imaginary components of the diagonal elements are not used but are set to zero unless quick return.
  • ldc (int): ldc specifies the leading dimension of C. ldc >= max(1, n).

Returns

mublasZher2k

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

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

Returns

3.8 BLAS-like Extension Reference

This section covers the supported BLAS-like extension APIs in MUSA SDK 5.2. In this release, the section is limited to the supported GemmEx family and grouped-batched extension entry points.

mublasSgemmEx

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

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

Returns

mublasGemmEx

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

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

Returns

mublasGemmGroupedBatchedEx

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

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

Returns