跳到主要内容

muBLAS API Reference

mublas-auxiliary.h provides auxilary functions in mublas

Types Documentation​

typedef mublasLogCallback​

typedef void(* mublasLogCallback) (const char *msg);

Functions Documentation​

function mublasCreate​

mublasStatus mublasCreate(
mublasHandle_t * handle
)

create handle

function mublasDestroy​

mublasStatus mublasDestroy(
mublasHandle_t handle
)

destroy handle

function mublasGetProperty​

mublasStatus mublasGetProperty(
libraryPropertyType_t type,
int * value
)

get the value of the requested property

function mublasSetStream​

mublasStatus mublasSetStream(
mublasHandle_t handle,
MUstream stream
)

set stream for handle

function mublasSetKernelStream​

mublasStatus mublasSetKernelStream(
mublasHandle_t handle,
MUstream stream
)

set stream for handle

function mublasGetStream​

mublasStatus mublasGetStream(
mublasHandle_t handle,
MUstream * stream
)

get stream [0] from handle

function mublasLoggerConfigure​

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

configures logging during runtime

function mublasSetPointerMode​

mublasStatus mublasSetPointerMode(
mublasHandle_t handle,
mublasPointerMode_t pointer_mode
)

set mublasPointerMode_t

function mublasGetPointerMode​

mublasStatus mublasGetPointerMode(
mublasHandle_t handle,
mublasPointerMode_t * pointer_mode
)

get mublasPointerMode_t

function mublasSetMathMode​

mublasStatus mublasSetMathMode(
mublasHandle_t handle,
mublasMathMode_t math_mode
)

set mublasMathMode_t

function mublasGetMathMode​

mublasStatus mublasGetMathMode(
mublasHandle_t handle,
mublasMathMode_t * math_mode
)

get mublasMathMode_t

function mublasGetVersion​

mublasStatus mublasGetVersion(
mublasHandle_t handle,
int * version
)

get mublasVersion

function mublasSetAtomicsMode​

mublasStatus mublasSetAtomicsMode(
mublasHandle_t handle,
mublasAtomicsMode_t atomics_mode
)

set mublasAtomicsMode_t

function mublasGetAtomicsMode​

mublasStatus mublasGetAtomicsMode(
mublasHandle_t handle,
mublasAtomicsMode_t * atomics_mode
)

get mublasAtomicsMode_t

function mublas_query_int8_layout_flag​

mublasStatus mublas_query_int8_layout_flag(
mublasHandle_t handle,
mublas_gemm_flags * flag
)

query the preferable supported int8 input layout for gemm

Parameters:

  • handle [mublasHandle_t] the handle of device
  • flag pointer to mublas_gemm_flags

Indicates the supported int8 input layout for gemm according to the device. If the device supports packed-int8x4 (1) only, output flag is MUBLAS_GEMM_FLAGS_PACK_INT8x4 and users must bitwise-or your flag with MUBLAS_GEMM_FLAGS_PACK_INT8x4. If output flag is MUBLAS_GEMM_FLAGS_NONE (0), then unpacked int8 is preferable and suggested.

function mublas_pointer_to_mode​

mublasPointerMode_t mublas_pointer_to_mode(
void * ptr
)

Indicates whether the pointer is on the host or device.

function mublasSetVector​

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

copy vector from host to device

Parameters:

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

function mublasGetVector​

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

copy vector from device to host

Parameters:

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

function mublasSetMatrix​

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

copy matrix from host to device

Parameters:

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

function mublasGetMatrix​

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

copy matrix from device to host

Parameters:

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

function mublasSetVectorAsync​

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

asynchronously copy vector from host to device

Parameters:

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

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

function mublasGetVectorAsync​

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

asynchronously copy vector from device to host

Parameters:

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

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

function mublasSetMatrixAsync​

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

asynchronously copy matrix from host to device

Parameters:

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

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

function mublasGetMatrixAsync​

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

asynchronously copy matrix from device to host

Parameters:

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

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

function mublas_set_start_stop_events​

mublasStatus mublas_set_start_stop_events(
mublasHandle_t handle,
MUevent startEvent,
MUevent stopEvent
)

function mublas_set_solution_fitness_query​

mublasStatus mublas_set_solution_fitness_query(
mublasHandle_t handle,
double * fitness
)

function mublas_set_performance_metric​

mublasStatus mublas_set_performance_metric(
mublasHandle_t handle,
mublas_performance_metric metric
)

specifies the performance metric that solution selection uses

Parameters:

  • handle [mublasHandle_t] the handle of device
  • metric [mublas_performance_metric] the performance metric to be used

Determines which performance metric will be used by Tensile when selecting the optimal solution for gemm problems. If a valid solution benchmarked for this performance metric does not exist for a problem, Tensile will default to a solution benchmarked for overall performance instead.

function mublas_get_performance_metric​

mublasStatus mublas_get_performance_metric(
mublasHandle_t handle,
mublas_performance_metric * metric
)

returns the performance metric being used for solution selection

Parameters:

  • handle [mublasHandle_t] the handle of device
  • metric [mublas_performance_metric*] pointer to where the metric will be stored

Returns the performance metric used by Tensile to select the optimal solution for gemm problems.

function mublasAlloc​

mublasStatus mublasAlloc(
int n,
int elemSize,
void ** devicePtr
)

Allocate memory on the device.

Parameters:

  • n numeber of elemSize elemSize size of element devicePtr pointer to allocated device memory

mublas api Allocate memory on the device.

function mublasFree​

mublasStatus mublasFree(
void * devicePtr
)

Frees the memory space pointed to by devicePtr.

Parameters:

  • devicePtr memory on device

function mublasGetCudartVersion​

size_t mublasGetCudartVersion(
void
)

returns the version number of the MUSA Runtime library

Parameters:

  • version number of the MUSA Runtime

function mublasSetLoggerCallback​

mublasStatus mublasSetLoggerCallback(
mublasLogCallback userCallback
)

This function installs a custom user-defined callback function via muBLAS C public API.

Parameters:

  • userCallback Pointer to user defined callback function.

function mublasGetLoggerCallback​

mublasStatus mublasGetLoggerCallback(
mublasLogCallback * userCallback
)

This function retrieves function pointer to previously installed custom user defined callback function via mublasSetLoggerCallback() or zero otherwise.

Parameters:

  • userCallback Pointer to user defined callback function.

function mublasGetError​

mublasStatus mublasGetError(
void
)

This function is deprecated.

function mublasInit​

mublasStatus mublasInit(
void
)

This function is deprecated.

function mublasShutdown​

mublasStatus mublasShutdown(
void
)

This function is deprecated.

function mublasGetmusartVersion​

mublasStatus mublasGetmusartVersion(
int * musartversion
)

This function returns the version of MUSA runtime.

function ComputeType2DataType​

musaDataType ComputeType2DataType(
mublasComputeType_t computeType
)

Macros Documentation​

define MUBLAS_INVOKE_START_STOP_EVENTS​

#define MUBLAS_INVOKE_START_STOP_EVENTS(
handle,
startEvent,
stopEvent,
call
)
do \
{ \
mublasHandle_t tmp_h = (handle); \
mublas_set_start_stop_events(tmp_h, (startEvent), (stopEvent)); \
call; \
mublas_set_start_stop_events(tmp_h, (MUevent)0, (MUevent)0); \
} while(0)

mublas_functions.h provides Basic Linear Algebra Subprograms of Level 1, 2 and 3, using HIP optimized for AMD HCC-based GPU hardware. This library can also run on CUDA-based NVIDIA GPUs. This file exposes C99 BLAS interface

Functions Documentation​

function mublasSscal​

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

BLAS Level 1 API.

Parameters:

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

scal scales each element of vector x with scalar alpha.

x := alpha * x

function mublasDscal​

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

function mublasCscal​

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

function mublasZscal​

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

function mublasCsscal​

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

function mublasZdscal​

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

function mublasSscalBatched​

mublasStatus mublasSscalBatched(
mublasHandle_t handle,
mublas_int n,
const float * alpha,
float *const x[],
mublas_int incx,
mublas_int batch_count
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] the number of elements in each x_i.
  • alpha host pointer or device pointer for the scalar alpha.
  • x device array of device pointers storing each vector x_i.
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • batch_count [mublas_int] specifies the number of batches in x.

scal_batched scales each element of vector x_i with scalar alpha, for i = 1, ... , batch_count.

x_i := alpha * x_i

where (x_i) is the i-th instance of the batch.

function mublasDscalBatched​

mublasStatus mublasDscalBatched(
mublasHandle_t handle,
mublas_int n,
const double * alpha,
double *const x[],
mublas_int incx,
mublas_int batch_count
)

function mublasCscalBatched​

mublasStatus mublasCscalBatched(
mublasHandle_t handle,
mublas_int n,
const muComplex * alpha,
muComplex *const x[],
mublas_int incx,
mublas_int batch_count
)

function mublasZscalBatched​

mublasStatus mublasZscalBatched(
mublasHandle_t handle,
mublas_int n,
const muDoubleComplex * alpha,
muDoubleComplex *const x[],
mublas_int incx,
mublas_int batch_count
)

function mublasCsscalBatched​

mublasStatus mublasCsscalBatched(
mublasHandle_t handle,
mublas_int n,
const float * alpha,
muComplex *const x[],
mublas_int incx,
mublas_int batch_count
)

function mublasZdscalBatched​

mublasStatus mublasZdscalBatched(
mublasHandle_t handle,
mublas_int n,
const double * alpha,
muDoubleComplex *const x[],
mublas_int incx,
mublas_int batch_count
)

function mublasSscalStridedBatched​

mublasStatus mublasSscalStridedBatched(
mublasHandle_t handle,
mublas_int n,
const float * alpha,
float * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] the number of elements in each x_i.
  • alpha host pointer or device pointer for the scalar alpha.
  • x device pointer to the first vector (x_1) in the batch.
  • incx [mublas_int] specifies the increment for the elements of x.
  • stride_x [mublas_stride] stride from the start of one vector (x_i) and the next one (x_i+1). There are no restrictions placed on stride_x, however the user should take care to ensure that stride_x is of appropriate size, for a typical case this means stride_x >= n * incx.
  • batch_count [mublas_int] specifies the number of batches in x.

scal_strided_batched scales each element of vector x_i with scalar alpha, for i = 1, ... , batch_count.

x_i := alpha * x_i ,

where (x_i) is the i-th instance of the batch.

function mublasDscalStridedBatched​

mublasStatus mublasDscalStridedBatched(
mublasHandle_t handle,
mublas_int n,
const double * alpha,
double * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

function mublasCscalStridedBatched​

mublasStatus mublasCscalStridedBatched(
mublasHandle_t handle,
mublas_int n,
const muComplex * alpha,
muComplex * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

function mublasZscalStridedBatched​

mublasStatus mublasZscalStridedBatched(
mublasHandle_t handle,
mublas_int n,
const muDoubleComplex * alpha,
muDoubleComplex * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

function mublasCsscalStridedBatched​

mublasStatus mublasCsscalStridedBatched(
mublasHandle_t handle,
mublas_int n,
const float * alpha,
muComplex * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

function mublasZdscalStridedBatched​

mublasStatus mublasZdscalStridedBatched(
mublasHandle_t handle,
mublas_int n,
const double * alpha,
muDoubleComplex * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

function mublasScopy​

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

BLAS Level 1 API.

Parameters:

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

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

y := x,

function mublasDcopy​

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

function mublasCcopy​

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

function mublasZcopy​

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

function mublasScopyBatched​

mublasStatus mublasScopyBatched(
mublasHandle_t handle,
mublas_int n,
const float *const x[],
mublas_int incx,
float *const y[],
mublas_int incy,
mublas_int batch_count
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] the number of elements in each x_i to be copied to y_i.
  • x device array of device pointers storing each vector x_i.
  • incx [mublas_int] specifies the increment for the elements of each vector x_i.
  • y device array of device pointers storing each vector y_i.
  • incy [mublas_int] specifies the increment for the elements of each vector y_i.
  • batch_count [mublas_int] number of instances in the batch

copy_batched copies each element x_i[j] into y_i[j], for j = 1 , ... , n; i = 1 , ... , batch_count

y_i := x_i,

where (x_i, y_i) is the i-th instance of the batch. x_i and y_i are vectors.

function mublasDcopyBatched​

mublasStatus mublasDcopyBatched(
mublasHandle_t handle,
mublas_int n,
const double *const x[],
mublas_int incx,
double *const y[],
mublas_int incy,
mublas_int batch_count
)

function mublasCcopyBatched​

mublasStatus mublasCcopyBatched(
mublasHandle_t handle,
mublas_int n,
const muComplex *const x[],
mublas_int incx,
muComplex *const y[],
mublas_int incy,
mublas_int batch_count
)

function mublasZcopyBatched​

mublasStatus mublasZcopyBatched(
mublasHandle_t handle,
mublas_int n,
const muDoubleComplex *const x[],
mublas_int incx,
muDoubleComplex *const y[],
mublas_int incy,
mublas_int batch_count
)

function mublasScopyStridedBatched​

mublasStatus mublasScopyStridedBatched(
mublasHandle_t handle,
mublas_int n,
const float * x,
mublas_int incx,
mublas_stride stridex,
float * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] the number of elements in each x_i to be copied to y_i.
  • x device pointer to the first vector (x_1) in the batch.
  • incx [mublas_int] specifies the increments for the elements of vectors x_i.
  • stridex [mublas_stride] stride from the start of one vector (x_i) and the next one (x_i+1). There are no restrictions placed on stride_x, however the user should take care to ensure that stride_x is of appropriate size, for a typical case this means stride_x >= n * incx.
  • y device pointer to the first vector (y_1) in the batch.
  • incy [mublas_int] specifies the increment for the elements of vectors y_i.
  • stridey [mublas_stride] stride from the start of one vector (y_i) and the next one (y_i+1). There are no restrictions placed on stride_y, however the user should take care to ensure that stride_y is of appropriate size, for a typical case this means stride_y >= n * incy. stridey should be non zero.
  • incy [mublas_int] specifies the increment for the elements of y.
  • batch_count [mublas_int] number of instances in the batch

copy_strided_batched copies each element x_i[j] into y_i[j], for j = 1 , ... , n; i = 1 , ... , batch_count

y_i := x_i,

where (x_i, y_i) is the i-th instance of the batch. x_i and y_i are vectors.

function mublasDcopyStridedBatched​

mublasStatus mublasDcopyStridedBatched(
mublasHandle_t handle,
mublas_int n,
const double * x,
mublas_int incx,
mublas_stride stridex,
double * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

function mublasCcopyStridedBatched​

mublasStatus mublasCcopyStridedBatched(
mublasHandle_t handle,
mublas_int n,
const muComplex * x,
mublas_int incx,
mublas_stride stridex,
muComplex * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

function mublasZcopyStridedBatched​

mublasStatus mublasZcopyStridedBatched(
mublasHandle_t handle,
mublas_int n,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stridex,
muDoubleComplex * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

function mublasSdot​

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

BLAS Level 1 API.

Parameters:

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

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

result = x * y;

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

result = conjugate (x) * y;

function mublasDdot​

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

function mublasHdot​

mublasStatus mublasHdot(
mublasHandle_t handle,
mublas_int n,
const mublas_half * x,
mublas_int incx,
const mublas_half * y,
mublas_int incy,
mublas_half * result
)

function mublasBfdot​

mublasStatus mublasBfdot(
mublasHandle_t handle,
mublas_int n,
const mublas_bfloat16 * x,
mublas_int incx,
const mublas_bfloat16 * y,
mublas_int incy,
mublas_bfloat16 * result
)

function mublasCdotu​

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

function mublasZdotu​

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

function mublasCdotc​

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

function mublasZdotc​

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

function mublasSdotBatched​

mublasStatus mublasSdotBatched(
mublasHandle_t handle,
mublas_int n,
const float *const x[],
mublas_int incx,
const float *const y[],
mublas_int incy,
mublas_int batch_count,
float * result
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] the number of elements in each x_i and y_i.
  • x device array of device pointers storing each vector x_i.
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • y device array of device pointers storing each vector y_i.
  • incy [mublas_int] specifies the increment for the elements of each y_i.
  • batch_count [mublas_int] number of instances in the batch
  • result device array or host array of batch_count size to store the dot products of each batch. return 0.0 for each element if n \<= 0.

dot_batched(u) performs a batch of dot products of vectors x and y

result_i = x_i * y_i;

dotc_batched performs a batch of dot products of the conjugate of complex vector x and complex vector y

result_i = conjugate (x_i) * y_i;

where (x_i, y_i) is the i-th instance of the batch. x_i and y_i are vectors, for i = 1, ..., batch_count

function mublasDdotBatched​

mublasStatus mublasDdotBatched(
mublasHandle_t handle,
mublas_int n,
const double *const x[],
mublas_int incx,
const double *const y[],
mublas_int incy,
mublas_int batch_count,
double * result
)

function mublasHdotBatched​

mublasStatus mublasHdotBatched(
mublasHandle_t handle,
mublas_int n,
const mublas_half *const x[],
mublas_int incx,
const mublas_half *const y[],
mublas_int incy,
mublas_int batch_count,
mublas_half * result
)

function mublasBfdotBatched​

mublasStatus mublasBfdotBatched(
mublasHandle_t handle,
mublas_int n,
const mublas_bfloat16 *const x[],
mublas_int incx,
const mublas_bfloat16 *const y[],
mublas_int incy,
mublas_int batch_count,
mublas_bfloat16 * result
)

function mublasCdotuBatched​

mublasStatus mublasCdotuBatched(
mublasHandle_t handle,
mublas_int n,
const muComplex *const x[],
mublas_int incx,
const muComplex *const y[],
mublas_int incy,
mublas_int batch_count,
muComplex * result
)

function mublasZdotuBatched​

mublasStatus mublasZdotuBatched(
mublasHandle_t handle,
mublas_int n,
const muDoubleComplex *const x[],
mublas_int incx,
const muDoubleComplex *const y[],
mublas_int incy,
mublas_int batch_count,
muDoubleComplex * result
)

function mublasCdotcBatched​

mublasStatus mublasCdotcBatched(
mublasHandle_t handle,
mublas_int n,
const muComplex *const x[],
mublas_int incx,
const muComplex *const y[],
mublas_int incy,
mublas_int batch_count,
muComplex * result
)

function mublasZdotcBatched​

mublasStatus mublasZdotcBatched(
mublasHandle_t handle,
mublas_int n,
const muDoubleComplex *const x[],
mublas_int incx,
const muDoubleComplex *const y[],
mublas_int incy,
mublas_int batch_count,
muDoubleComplex * result
)

function mublasSdotStridedBatched​

mublasStatus mublasSdotStridedBatched(
mublasHandle_t handle,
mublas_int n,
const float * x,
mublas_int incx,
mublas_stride stridex,
const float * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count,
float * result
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] the number of elements in each x_i and y_i.
  • x device pointer to the first vector (x_1) in the batch.
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • stridex [mublas_stride] stride from the start of one vector (x_i) and the next one (x_i+1)
  • y device pointer to the first vector (y_1) in the batch.
  • incy [mublas_int] specifies the increment for the elements of each y_i.
  • stridey [mublas_stride] stride from the start of one vector (y_i) and the next one (y_i+1)
  • batch_count [mublas_int] number of instances in the batch
  • result device array or host array of batch_count size to store the dot products of each batch. return 0.0 for each element if n \<= 0.

dot_strided_batched(u) performs a batch of dot products of vectors x and y

result_i = x_i * y_i;

dotc_strided_batched performs a batch of dot products of the conjugate of complex vector x and complex vector y

result_i = conjugate (x_i) * y_i;

where (x_i, y_i) is the i-th instance of the batch. x_i and y_i are vectors, for i = 1, ..., batch_count

function mublasDdotStridedBatched​

mublasStatus mublasDdotStridedBatched(
mublasHandle_t handle,
mublas_int n,
const double * x,
mublas_int incx,
mublas_stride stridex,
const double * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count,
double * result
)

function mublasHdotStridedBatched​

mublasStatus mublasHdotStridedBatched(
mublasHandle_t handle,
mublas_int n,
const mublas_half * x,
mublas_int incx,
mublas_stride stridex,
const mublas_half * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count,
mublas_half * result
)

function mublasBfdotStridedBatched​

mublasStatus mublasBfdotStridedBatched(
mublasHandle_t handle,
mublas_int n,
const mublas_bfloat16 * x,
mublas_int incx,
mublas_stride stridex,
const mublas_bfloat16 * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count,
mublas_bfloat16 * result
)

function mublasCdotuStridedBatched​

mublasStatus mublasCdotuStridedBatched(
mublasHandle_t handle,
mublas_int n,
const muComplex * x,
mublas_int incx,
mublas_stride stridex,
const muComplex * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count,
muComplex * result
)

function mublasZdotuStridedBatched​

mublasStatus mublasZdotuStridedBatched(
mublasHandle_t handle,
mublas_int n,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stridex,
const muDoubleComplex * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count,
muDoubleComplex * result
)

function mublasCdotcStridedBatched​

mublasStatus mublasCdotcStridedBatched(
mublasHandle_t handle,
mublas_int n,
const muComplex * x,
mublas_int incx,
mublas_stride stridex,
const muComplex * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count,
muComplex * result
)

function mublasZdotcStridedBatched​

mublasStatus mublasZdotcStridedBatched(
mublasHandle_t handle,
mublas_int n,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stridex,
const muDoubleComplex * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count,
muDoubleComplex * result
)

function mublasSswap​

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

BLAS Level 1 API.

Parameters:

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

swap interchanges vectors x and y.

y := x; x := y

function mublasDswap​

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

function mublasCswap​

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

function mublasZswap​

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

function mublasSswapBatched​

mublasStatus mublasSswapBatched(
mublasHandle_t handle,
mublas_int n,
float *const x[],
mublas_int incx,
float *const y[],
mublas_int incy,
mublas_int batch_count
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] the number of elements in each x_i and y_i.
  • x device array of device pointers storing each vector x_i.
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • y device array of device pointers storing each vector y_i.
  • incy [mublas_int] specifies the increment for the elements of each y_i.
  • batch_count [mublas_int] number of instances in the batch.

swap_batched interchanges vectors x_i and y_i, for i = 1 , ... , batch_count

y_i := x_i; x_i := y_i

function mublasDswapBatched​

mublasStatus mublasDswapBatched(
mublasHandle_t handle,
mublas_int n,
double *const x[],
mublas_int incx,
double *const y[],
mublas_int incy,
mublas_int batch_count
)

function mublasCswapBatched​

mublasStatus mublasCswapBatched(
mublasHandle_t handle,
mublas_int n,
muComplex *const x[],
mublas_int incx,
muComplex *const y[],
mublas_int incy,
mublas_int batch_count
)

function mublasZswapBatched​

mublasStatus mublasZswapBatched(
mublasHandle_t handle,
mublas_int n,
muDoubleComplex *const x[],
mublas_int incx,
muDoubleComplex *const y[],
mublas_int incy,
mublas_int batch_count
)

function mublasSswapStridedBatched​

mublasStatus mublasSswapStridedBatched(
mublasHandle_t handle,
mublas_int n,
float * x,
mublas_int incx,
mublas_stride stridex,
float * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] the number of elements in each x_i and y_i.
  • x device pointer to the first vector x_1.
  • incx [mublas_int] specifies the increment for the elements of x.
  • stridex [mublas_stride] stride from the start of one vector (x_i) and the next one (x_i+1). There are no restrictions placed on stride_x, however the user should take care to ensure that stride_x is of appropriate size, for a typical case this means stride_x >= n * incx.
  • y device pointer to the first vector y_1.
  • incy [mublas_int] specifies the increment for the elements of y.
  • stridey [mublas_stride] stride from the start of one vector (y_i) and the next one (y_i+1). There are no restrictions placed on stride_x, however the user should take care to ensure that stride_y is of appropriate size, for a typical case this means stride_y >= n * incy. stridey should be non zero.
  • batch_count [mublas_int] number of instances in the batch.

swap_strided_batched interchanges vectors x_i and y_i, for i = 1 , ... , batch_count

y_i := x_i; x_i := y_i

function mublasDswapStridedBatched​

mublasStatus mublasDswapStridedBatched(
mublasHandle_t handle,
mublas_int n,
double * x,
mublas_int incx,
mublas_stride stridex,
double * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

function mublasCswapStridedBatched​

mublasStatus mublasCswapStridedBatched(
mublasHandle_t handle,
mublas_int n,
muComplex * x,
mublas_int incx,
mublas_stride stridex,
muComplex * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

function mublasZswapStridedBatched​

mublasStatus mublasZswapStridedBatched(
mublasHandle_t handle,
mublas_int n,
muDoubleComplex * x,
mublas_int incx,
mublas_stride stridex,
muDoubleComplex * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

function mublasSaxpy​

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

BLAS Level 1 API.

Parameters:

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

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

y := alpha * x + y

function mublasDaxpy​

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

function mublas_haxpy​

mublasStatus mublas_haxpy(
mublasHandle_t handle,
mublas_int n,
const mublas_half * alpha,
const mublas_half * x,
mublas_int incx,
mublas_half * y,
mublas_int incy
)

function mublasCaxpy​

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

function mublasZaxpy​

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

function mublasHaxpyBatched​

mublasStatus mublasHaxpyBatched(
mublasHandle_t handle,
mublas_int n,
const mublas_half * alpha,
const mublas_half *const x[],
mublas_int incx,
mublas_half *const y[],
mublas_int incy,
mublas_int batch_count
)

BLAS Level 1 API.

Parameters:

  • handle mublasHandle_t handle to the mublas library context queue.
  • n mublas_int
  • alpha specifies the scalar alpha.
  • x pointer storing vector x on the GPU.
  • incx mublas_int specifies the increment for the elements of x.
  • y pointer storing vector y on the GPU.
  • incy mublas_int specifies the increment for the elements of y.
  • batch_count mublas_int number of instances in the batch

axpy_batched compute y := alpha * x + y over a set of batched vectors.

function mublasSaxpyBatched​

mublasStatus mublasSaxpyBatched(
mublasHandle_t handle,
mublas_int n,
const float * alpha,
const float *const x[],
mublas_int incx,
float *const y[],
mublas_int incy,
mublas_int batch_count
)

function mublasDaxpyBatched​

mublasStatus mublasDaxpyBatched(
mublasHandle_t handle,
mublas_int n,
const double * alpha,
const double *const x[],
mublas_int incx,
double *const y[],
mublas_int incy,
mublas_int batch_count
)

function mublasCaxpyBatched​

mublasStatus mublasCaxpyBatched(
mublasHandle_t handle,
mublas_int n,
const muComplex * alpha,
const muComplex *const x[],
mublas_int incx,
muComplex *const y[],
mublas_int incy,
mublas_int batch_count
)

function mublasZaxpyBatched​

mublasStatus mublasZaxpyBatched(
mublasHandle_t handle,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex *const x[],
mublas_int incx,
muDoubleComplex *const y[],
mublas_int incy,
mublas_int batch_count
)

function mublasHaxpyStridedBatched​

mublasStatus mublasHaxpyStridedBatched(
mublasHandle_t handle,
mublas_int n,
const mublas_half * alpha,
const mublas_half * x,
mublas_int incx,
mublas_stride stridex,
mublas_half * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

BLAS Level 1 API.

Parameters:

  • handle mublasHandle_t handle to the mublas library context queue.
  • n mublas_int
  • alpha specifies the scalar alpha.
  • x pointer storing vector x on the GPU.
  • incx mublas_int specifies the increment for the elements of x.
  • stridex mublas_stride specifies the increment between vectors of x.
  • y pointer storing vector y on the GPU.
  • incy mublas_int specifies the increment for the elements of y.
  • stridey mublas_stride specifies the increment between vectors of y.
  • batch_count mublas_int number of instances in the batch

axpy_strided_batched compute y := alpha * x + y over a set of strided batched vectors.

function mublasSaxpyStridedBatched​

mublasStatus mublasSaxpyStridedBatched(
mublasHandle_t handle,
mublas_int n,
const float * alpha,
const float * x,
mublas_int incx,
mublas_stride stridex,
float * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

function mublasDaxpyStridedBatched​

mublasStatus mublasDaxpyStridedBatched(
mublasHandle_t handle,
mublas_int n,
const double * alpha,
const double * x,
mublas_int incx,
mublas_stride stridex,
double * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

function mublasCaxpyStridedBatched​

mublasStatus mublasCaxpyStridedBatched(
mublasHandle_t handle,
mublas_int n,
const muComplex * alpha,
const muComplex * x,
mublas_int incx,
mublas_stride stridex,
muComplex * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

function mublasZaxpyStridedBatched​

mublasStatus mublasZaxpyStridedBatched(
mublasHandle_t handle,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stridex,
muDoubleComplex * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

function mublasSasum​

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

BLAS Level 1 API.

Parameters:

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

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

function mublasDasum​

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

function mublasScasum​

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

function mublasDzasum​

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

function mublasSasumBatched​

mublasStatus mublasSasumBatched(
mublasHandle_t handle,
mublas_int n,
const float *const x[],
mublas_int incx,
mublas_int batch_count,
float * results
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] number of elements in each vector x_i
  • x device array of device pointers storing each vector x_i.
  • incx [mublas_int] specifies the increment for the elements of each x_i. incx must be > 0.
  • results device array or host array of batch_count size for results. return is 0.0 if n, incx\<=0.
  • batch_count [mublas_int] number of instances in the batch.

asum_batched computes the sum of the magnitudes of the elements in a batch of real vectors x_i, or the sum of magnitudes of the real and imaginary parts of elements if x_i is a complex vector, for i = 1, ..., batch_count

function mublasDasumBatched​

mublasStatus mublasDasumBatched(
mublasHandle_t handle,
mublas_int n,
const double *const x[],
mublas_int incx,
mublas_int batch_count,
double * results
)

function mublasScasumBatched​

mublasStatus mublasScasumBatched(
mublasHandle_t handle,
mublas_int n,
const muComplex *const x[],
mublas_int incx,
mublas_int batch_count,
float * results
)

function mublasDzasumBatched​

mublasStatus mublasDzasumBatched(
mublasHandle_t handle,
mublas_int n,
const muDoubleComplex *const x[],
mublas_int incx,
mublas_int batch_count,
double * results
)

function mublasSasumStridedBatched​

mublasStatus mublasSasumStridedBatched(
mublasHandle_t handle,
mublas_int n,
const float * x,
mublas_int incx,
mublas_stride stridex,
mublas_int batch_count,
float * results
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] number of elements in each vector x_i
  • x device pointer to the first vector x_1.
  • incx [mublas_int] specifies the increment for the elements of each x_i. incx must be > 0.
  • stridex [mublas_stride] stride from the start of one vector (x_i) and the next one (x_i+1). There are no restrictions placed on stride_x, however the user should take care to ensure that stride_x is of appropriate size, for a typical case this means stride_x >= n * incx.
  • results device pointer or host pointer to array for storing contiguous batch_count results. return is 0.0 if n, incx\<=0.
  • batch_count [mublas_int] number of instances in the batch

asum_strided_batched computes the sum of the magnitudes of elements of a real vectors x_i, or the sum of magnitudes of the real and imaginary parts of elements if x_i is a complex vector, for i = 1, ..., batch_count

function mublasDasumStridedBatched​

mublasStatus mublasDasumStridedBatched(
mublasHandle_t handle,
mublas_int n,
const double * x,
mublas_int incx,
mublas_stride stridex,
mublas_int batch_count,
double * results
)

function mublasScasumStridedBatched​

mublasStatus mublasScasumStridedBatched(
mublasHandle_t handle,
mublas_int n,
const muComplex * x,
mublas_int incx,
mublas_stride stridex,
mublas_int batch_count,
float * results
)

function mublasDzasumStridedBatched​

mublasStatus mublasDzasumStridedBatched(
mublasHandle_t handle,
mublas_int n,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stridex,
mublas_int batch_count,
double * results
)

function mublasSnrm2​

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

BLAS Level 1 API.

Parameters:

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

nrm2 computes the euclidean norm of a real or complex vector

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

function mublasDnrm2​

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

function mublasScnrm2​

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

function mublasDznrm2​

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

function mublasSnrm2Batched​

mublasStatus mublasSnrm2Batched(
mublasHandle_t handle,
mublas_int n,
const float *const x[],
mublas_int incx,
mublas_int batch_count,
float * results
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] number of elements in each x_i.
  • x device array of device pointers storing each vector x_i.
  • incx [mublas_int] specifies the increment for the elements of each x_i. incx must be > 0.
  • batch_count [mublas_int] number of instances in the batch
  • results device pointer or host pointer to array of batch_count size for nrm2 results. return is 0.0 for each element if n \<= 0, incx\<=0.

nrm2_batched computes the euclidean norm over a batch of real or complex vectors

result := sqrt( x_i'*x_i ) for real vectors x, for i = 1, ..., batch_count
result := sqrt( x_i**H*x_i ) for complex vectors x, for i = 1, ..., batch_count

function mublasDnrm2Batched​

mublasStatus mublasDnrm2Batched(
mublasHandle_t handle,
mublas_int n,
const double *const x[],
mublas_int incx,
mublas_int batch_count,
double * results
)

function mublasScnrm2Batched​

mublasStatus mublasScnrm2Batched(
mublasHandle_t handle,
mublas_int n,
const muComplex *const x[],
mublas_int incx,
mublas_int batch_count,
float * results
)

function mublasDznrm2Batched​

mublasStatus mublasDznrm2Batched(
mublasHandle_t handle,
mublas_int n,
const muDoubleComplex *const x[],
mublas_int incx,
mublas_int batch_count,
double * results
)

function mublasSnrm2StridedBatched​

mublasStatus mublasSnrm2StridedBatched(
mublasHandle_t handle,
mublas_int n,
const float * x,
mublas_int incx,
mublas_stride stridex,
mublas_int batch_count,
float * results
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] number of elements in each x_i.
  • x device pointer to the first vector x_1.
  • incx [mublas_int] specifies the increment for the elements of each x_i. incx must be > 0.
  • stridex [mublas_stride] stride from the start of one vector (x_i) and the next one (x_i+1). There are no restrictions placed on stride_x, however the user should take care to ensure that stride_x is of appropriate size, for a typical case this means stride_x >= n * incx.
  • batch_count [mublas_int] number of instances in the batch
  • results device pointer or host pointer to array for storing contiguous batch_count results. return is 0.0 for each element if n \<= 0, incx\<=0.

nrm2_strided_batched computes the euclidean norm over a batch of real or complex vectors

:= sqrt( x_i'*x_i ) for real vectors x, for i = 1, ..., batch_count
:= sqrt( x_i**H*x_i ) for complex vectors, for i = 1, ..., batch_count

function mublasDnrm2StridedBatched​

mublasStatus mublasDnrm2StridedBatched(
mublasHandle_t handle,
mublas_int n,
const double * x,
mublas_int incx,
mublas_stride stridex,
mublas_int batch_count,
double * results
)

function mublasScnrm2StridedBatched​

mublasStatus mublasScnrm2StridedBatched(
mublasHandle_t handle,
mublas_int n,
const muComplex * x,
mublas_int incx,
mublas_stride stridex,
mublas_int batch_count,
float * results
)

function mublasDznrm2StridedBatched​

mublasStatus mublasDznrm2StridedBatched(
mublasHandle_t handle,
mublas_int n,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stridex,
mublas_int batch_count,
double * results
)

function mublasIsamax​

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

BLAS Level 1 API.

Parameters:

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

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

function mublasIdamax​

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

function mublasIcamax​

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

function mublasIzamax​

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

function mublasIsamaxBatched​

mublasStatus mublasIsamaxBatched(
mublasHandle_t handle,
mublas_int n,
const float *const x[],
mublas_int incx,
mublas_int batch_count,
mublas_int * result
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] number of elements in each vector x_i
  • x device array of device pointers storing each vector x_i.
  • incx [mublas_int] specifies the increment for the elements of each x_i. incx must be > 0.
  • batch_count [mublas_int] number of instances in the batch, must be > 0.
  • result device or host array of pointers of batch_count size for results. return is 0 if n, incx\<=0.

amax_batched finds the first index of the element of maximum magnitude of each vector x_i in a batch, for i = 1, ..., batch_count.

function mublasIdamaxBatched​

mublasStatus mublasIdamaxBatched(
mublasHandle_t handle,
mublas_int n,
const double *const x[],
mublas_int incx,
mublas_int batch_count,
mublas_int * result
)

function mublasIcamaxBatched​

mublasStatus mublasIcamaxBatched(
mublasHandle_t handle,
mublas_int n,
const muComplex *const x[],
mublas_int incx,
mublas_int batch_count,
mublas_int * result
)

function mublasIzamaxBatched​

mublasStatus mublasIzamaxBatched(
mublasHandle_t handle,
mublas_int n,
const muDoubleComplex *const x[],
mublas_int incx,
mublas_int batch_count,
mublas_int * result
)

function mublasIsamaxStridedBatched​

mublasStatus mublasIsamaxStridedBatched(
mublasHandle_t handle,
mublas_int n,
const float * x,
mublas_int incx,
mublas_stride stridex,
mublas_int batch_count,
mublas_int * result
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] number of elements in each vector x_i
  • x device pointer to the first vector x_1.
  • incx [mublas_int] specifies the increment for the elements of each x_i. incx must be > 0.
  • stridex [mublas_stride] specifies the pointer increment between one x_i and the next x_(i + 1).
  • batch_count [mublas_int] number of instances in the batch
  • result device or host pointer for storing contiguous batch_count results. return is 0 if n \<= 0, incx\<=0.

amax_strided_batched finds the first index of the element of maximum magnitude of each vector x_i in a batch, for i = 1, ..., batch_count.

function mublasIdamaxStridedBatched​

mublasStatus mublasIdamaxStridedBatched(
mublasHandle_t handle,
mublas_int n,
const double * x,
mublas_int incx,
mublas_stride stridex,
mublas_int batch_count,
mublas_int * result
)

function mublasIcamaxStridedBatched​

mublasStatus mublasIcamaxStridedBatched(
mublasHandle_t handle,
mublas_int n,
const muComplex * x,
mublas_int incx,
mublas_stride stridex,
mublas_int batch_count,
mublas_int * result
)

function mublasIzamaxStridedBatched​

mublasStatus mublasIzamaxStridedBatched(
mublasHandle_t handle,
mublas_int n,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stridex,
mublas_int batch_count,
mublas_int * result
)

function mublasIsamin​

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

BLAS Level 1 API.

Parameters:

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

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

vector

function mublasIdamin​

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

function mublasIcamin​

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

function mublasIzamin​

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

function mublasIsaminBatched​

mublasStatus mublasIsaminBatched(
mublasHandle_t handle,
mublas_int n,
const float *const x[],
mublas_int incx,
mublas_int batch_count,
mublas_int * result
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] number of elements in each vector x_i
  • x device array of device pointers storing each vector x_i.
  • incx [mublas_int] specifies the increment for the elements of each x_i. incx must be > 0.
  • batch_count [mublas_int] number of instances in the batch, must be > 0.
  • result device or host pointers to array of batch_count size for results. return is 0 if n, incx\<=0.

amin_batched finds the first index of the element of minimum magnitude of each vector x_i in a batch, for i = 1, ..., batch_count.

function mublasIdaminBatched​

mublasStatus mublasIdaminBatched(
mublasHandle_t handle,
mublas_int n,
const double *const x[],
mublas_int incx,
mublas_int batch_count,
mublas_int * result
)

function mublasIcaminBatched​

mublasStatus mublasIcaminBatched(
mublasHandle_t handle,
mublas_int n,
const muComplex *const x[],
mublas_int incx,
mublas_int batch_count,
mublas_int * result
)

function mublasIzaminBatched​

mublasStatus mublasIzaminBatched(
mublasHandle_t handle,
mublas_int n,
const muDoubleComplex *const x[],
mublas_int incx,
mublas_int batch_count,
mublas_int * result
)

function mublasIsaminStridedBatched​

mublasStatus mublasIsaminStridedBatched(
mublasHandle_t handle,
mublas_int n,
const float * x,
mublas_int incx,
mublas_stride stridex,
mublas_int batch_count,
mublas_int * result
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] number of elements in each vector x_i
  • x device pointer to the first vector x_1.
  • incx [mublas_int] specifies the increment for the elements of each x_i. incx must be > 0.
  • stridex [mublas_stride] specifies the pointer increment between one x_i and the next x_(i + 1)
  • batch_count [mublas_int] number of instances in the batch
  • result device or host pointer to array for storing contiguous batch_count results. return is 0 if n \<= 0, incx\<=0.

amin_strided_batched finds the first index of the element of minimum magnitude of each vector x_i in a batch, for i = 1, ..., batch_count.

function mublasIdaminStridedBatched​

mublasStatus mublasIdaminStridedBatched(
mublasHandle_t handle,
mublas_int n,
const double * x,
mublas_int incx,
mublas_stride stridex,
mublas_int batch_count,
mublas_int * result
)

function mublasIcaminStridedBatched​

mublasStatus mublasIcaminStridedBatched(
mublasHandle_t handle,
mublas_int n,
const muComplex * x,
mublas_int incx,
mublas_stride stridex,
mublas_int batch_count,
mublas_int * result
)

function mublasIzaminStridedBatched​

mublasStatus mublasIzaminStridedBatched(
mublasHandle_t handle,
mublas_int n,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stridex,
mublas_int batch_count,
mublas_int * result
)

function mublasSrot​

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

BLAS Level 1 API.

Parameters:

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

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

function mublasDrot​

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

function mublasCrot​

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

function mublasCsrot​

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

function mublasZrot​

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

function mublasZdrot​

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

function mublasSrotBatched​

mublasStatus mublasSrotBatched(
mublasHandle_t handle,
mublas_int n,
float *const x[],
mublas_int incx,
float *const y[],
mublas_int incy,
const float * c,
const float * s,
mublas_int batch_count
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] number of elements in each x_i and y_i vectors.
  • x device array of deivce pointers storing each vector x_i.
  • incx [mublas_int] specifies the increment between elements of each x_i.
  • y device array of device pointers storing each vector y_i.
  • incy [mublas_int] specifies the increment between elements of each y_i.
  • c device pointer or host pointer to scalar cosine component of the rotation matrix.
  • s device pointer or host pointer to scalar sine component of the rotation matrix.
  • batch_count [mublas_int] the number of x and y arrays, i.e. the number of batches.

rot_batched applies the Givens rotation matrix defined by c=cos(alpha) and s=sin(alpha) to batched vectors x_i and y_i, for i = 1, ..., batch_count. Scalars c and s may be stored in either host or device memory, location is specified by calling mublasSetPointerMode.

function mublasDrotBatched​

mublasStatus mublasDrotBatched(
mublasHandle_t handle,
mublas_int n,
double *const x[],
mublas_int incx,
double *const y[],
mublas_int incy,
const double * c,
const double * s,
mublas_int batch_count
)

function mublasCrotBatched​

mublasStatus mublasCrotBatched(
mublasHandle_t handle,
mublas_int n,
muComplex *const x[],
mublas_int incx,
muComplex *const y[],
mublas_int incy,
const float * c,
const muComplex * s,
mublas_int batch_count
)

function mublasCsrotBatched​

mublasStatus mublasCsrotBatched(
mublasHandle_t handle,
mublas_int n,
muComplex *const x[],
mublas_int incx,
muComplex *const y[],
mublas_int incy,
const float * c,
const float * s,
mublas_int batch_count
)

function mublasZrotBatched​

mublasStatus mublasZrotBatched(
mublasHandle_t handle,
mublas_int n,
muDoubleComplex *const x[],
mublas_int incx,
muDoubleComplex *const y[],
mublas_int incy,
const double * c,
const muDoubleComplex * s,
mublas_int batch_count
)

function mublasZdrotBatched​

mublasStatus mublasZdrotBatched(
mublasHandle_t handle,
mublas_int n,
muDoubleComplex *const x[],
mublas_int incx,
muDoubleComplex *const y[],
mublas_int incy,
const double * c,
const double * s,
mublas_int batch_count
)

function mublasSrotStridedBatched​

mublasStatus mublasSrotStridedBatched(
mublasHandle_t handle,
mublas_int n,
float * x,
mublas_int incx,
mublas_stride stride_x,
float * y,
mublas_int incy,
mublas_stride stride_y,
const float * c,
const float * s,
mublas_int batch_count
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] number of elements in each x_i and y_i vectors.
  • x device pointer to the first vector x_1.
  • incx [mublas_int] specifies the increment between elements of each x_i.
  • stride_x [mublas_stride] specifies the increment from the beginning of x_i to the beginning of x_(i+1)
  • y device pointer to the first vector y_1.
  • incy [mublas_int] specifies the increment between elements of each y_i.
  • stride_y [mublas_stride] specifies the increment from the beginning of y_i to the beginning of y_(i+1)
  • c device pointer or host pointer to scalar cosine component of the rotation matrix.
  • s device pointer or host pointer to scalar sine component of the rotation matrix.
  • batch_count [mublas_int] the number of x and y arrays, i.e. the number of batches.

rot_strided_batched applies the Givens rotation matrix defined by c=cos(alpha) and s=sin(alpha) to strided batched vectors x_i and y_i, for i = 1, ..., batch_count. Scalars c and s may be stored in either host or device memory, location is specified by calling mublasSetPointerMode.

function mublasDrotStridedBatched​

mublasStatus mublasDrotStridedBatched(
mublasHandle_t handle,
mublas_int n,
double * x,
mublas_int incx,
mublas_stride stride_x,
double * y,
mublas_int incy,
mublas_stride stride_y,
const double * c,
const double * s,
mublas_int batch_count
)

function mublasCrotStridedBatched​

mublasStatus mublasCrotStridedBatched(
mublasHandle_t handle,
mublas_int n,
muComplex * x,
mublas_int incx,
mublas_stride stride_x,
muComplex * y,
mublas_int incy,
mublas_stride stride_y,
const float * c,
const muComplex * s,
mublas_int batch_count
)

function mublasCsrotStridedBatched​

mublasStatus mublasCsrotStridedBatched(
mublasHandle_t handle,
mublas_int n,
muComplex * x,
mublas_int incx,
mublas_stride stride_x,
muComplex * y,
mublas_int incy,
mublas_stride stride_y,
const float * c,
const float * s,
mublas_int batch_count
)

function mublasZrotStridedBatched​

mublasStatus mublasZrotStridedBatched(
mublasHandle_t handle,
mublas_int n,
muDoubleComplex * x,
mublas_int incx,
mublas_stride stride_x,
muDoubleComplex * y,
mublas_int incy,
mublas_stride stride_y,
const double * c,
const muDoubleComplex * s,
mublas_int batch_count
)

function mublasZdrotStridedBatched​

mublasStatus mublasZdrotStridedBatched(
mublasHandle_t handle,
mublas_int n,
muDoubleComplex * x,
mublas_int incx,
mublas_stride stride_x,
muDoubleComplex * y,
mublas_int incy,
mublas_stride stride_y,
const double * c,
const double * s,
mublas_int batch_count
)

function mublasSrotg​

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

BLAS Level 1 API.

Parameters:

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

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

function mublasDrotg​

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

function mublasCrotg​

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

function mublasZrotg​

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

function mublasSrotgBatched​

mublasStatus mublasSrotgBatched(
mublasHandle_t handle,
float *const a[],
float *const b[],
float *const c[],
float *const s[],
mublas_int batch_count
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • a device array of device pointers storing each single input vector element a_i, overwritten with r_i.
  • b device array of device pointers storing each single input vector element b_i, overwritten with z_i.
  • c device array of device pointers storing each cosine element of Givens rotation for the batch.
  • s device array of device pointers storing each sine element of Givens rotation for the batch.
  • batch_count [mublas_int] number of batches (length of arrays a, b, c, and s).

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

function mublasDrotgBatched​

mublasStatus mublasDrotgBatched(
mublasHandle_t handle,
double *const a[],
double *const b[],
double *const c[],
double *const s[],
mublas_int batch_count
)

function mublasCrotgBatched​

mublasStatus mublasCrotgBatched(
mublasHandle_t handle,
muComplex *const a[],
muComplex *const b[],
float *const c[],
muComplex *const s[],
mublas_int batch_count
)

function mublasZrotgBatched​

mublasStatus mublasZrotgBatched(
mublasHandle_t handle,
muDoubleComplex *const a[],
muDoubleComplex *const b[],
double *const c[],
muDoubleComplex *const s[],
mublas_int batch_count
)

function mublasSrotgStridedBatched​

mublasStatus mublasSrotgStridedBatched(
mublasHandle_t handle,
float * a,
mublas_stride stride_a,
float * b,
mublas_stride stride_b,
float * c,
mublas_stride stride_c,
float * s,
mublas_stride stride_s,
mublas_int batch_count
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • a device strided_batched pointer or host strided_batched pointer to first single input vector element a_1, overwritten with r.
  • stride_a [mublas_stride] distance between elements of a in batch (distance between a_i and a_(i + 1))
  • b device strided_batched pointer or host strided_batched pointer to first single input vector element b_1, overwritten with z.
  • stride_b [mublas_stride] distance between elements of b in batch (distance between b_i and b_(i + 1))
  • c device strided_batched pointer or host strided_batched pointer to first cosine element of Givens rotations c_1.
  • stride_c [mublas_stride] distance between elements of c in batch (distance between c_i and c_(i + 1))
  • s device strided_batched pointer or host strided_batched pointer to sine element of Givens rotations s_1.
  • stride_s [mublas_stride] distance between elements of s in batch (distance between s_i and s_(i + 1))
  • batch_count [mublas_int] number of batches (length of arrays a, b, c, and s).

rotg_strided_batched creates the Givens rotation matrix for the strided batched vectors (a_i b_i), for i = 1, ..., batch_count. a, b, c, and s may be stored in either host or device memory, location is specified by calling mublasSetPointerMode. If the pointer mode is set to MUBLAS_POINTER_MODE_HOST, this function blocks the CPU until the GPU has finished and the results are available in host memory. If the pointer mode is set to MUBLAS_POINTER_MODE_DEVICE, this function returns immediately and synchronization is required to read the results.

function mublasDrotgStridedBatched​

mublasStatus mublasDrotgStridedBatched(
mublasHandle_t handle,
double * a,
mublas_stride stride_a,
double * b,
mublas_stride stride_b,
double * c,
mublas_stride stride_c,
double * s,
mublas_stride stride_s,
mublas_int batch_count
)

function mublasCrotgStridedBatched​

mublasStatus mublasCrotgStridedBatched(
mublasHandle_t handle,
muComplex * a,
mublas_stride stride_a,
muComplex * b,
mublas_stride stride_b,
float * c,
mublas_stride stride_c,
muComplex * s,
mublas_stride stride_s,
mublas_int batch_count
)

function mublasZrotgStridedBatched​

mublasStatus mublasZrotgStridedBatched(
mublasHandle_t handle,
muDoubleComplex * a,
mublas_stride stride_a,
muDoubleComplex * b,
mublas_stride stride_b,
double * c,
mublas_stride stride_c,
muDoubleComplex * s,
mublas_stride stride_s,
mublas_int batch_count
)

function mublasSrotm​

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

BLAS Level 1 API.

Parameters:

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

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

function mublasDrotm​

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

function mublasSrotmBatched​

mublasStatus mublasSrotmBatched(
mublasHandle_t handle,
mublas_int n,
float *const x[],
mublas_int incx,
float *const y[],
mublas_int incy,
const float *const param[],
mublas_int batch_count
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] number of elements in the x and y vectors.
  • x device array of device pointers storing each vector x_i.
  • incx [mublas_int] specifies the increment between elements of each x_i.
  • y device array of device pointers storing each vector y_1.
  • incy [mublas_int] specifies the increment between elements of each y_i.
  • param device array of device vectors 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 ONLY be stored on the device for the batched version of this function.
  • batch_count [mublas_int] the number of x and y arrays, i.e. the number of batches.

rotm_batched applies the modified Givens rotation matrix defined by param_i to batched vectors x_i and y_i, for i = 1, ..., batch_count.

function mublasDrotmBatched​

mublasStatus mublasDrotmBatched(
mublasHandle_t handle,
mublas_int n,
double *const x[],
mublas_int incx,
double *const y[],
mublas_int incy,
const double *const param[],
mublas_int batch_count
)

function mublasSrotmStridedBatched​

mublasStatus mublasSrotmStridedBatched(
mublasHandle_t handle,
mublas_int n,
float * x,
mublas_int incx,
mublas_stride stride_x,
float * y,
mublas_int incy,
mublas_stride stride_y,
const float * param,
mublas_stride stride_param,
mublas_int batch_count
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] number of elements in the x and y vectors.
  • x device pointer pointing to first strided batched vector x_1.
  • incx [mublas_int] specifies the increment between elements of each x_i.
  • stride_x [mublas_stride] specifies the increment between the beginning of x_i and x_(i + 1)
  • y device pointer pointing to first strided batched vector y_1.
  • incy [mublas_int] specifies the increment between elements of each y_i.
  • stride_y [mublas_stride] specifies the increment between the beginning of y_i and y_(i + 1)
  • param device pointer pointing to first array of 5 elements defining the rotation (param_1). 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 ONLY be stored on the device for the strided_batched version of this function.
  • stride_param [mublas_stride] specifies the increment between the beginning of param_i and param_(i + 1)
  • batch_count [mublas_int] the number of x and y arrays, i.e. the number of batches.

rotm_strided_batched applies the modified Givens rotation matrix defined by param_i to strided batched vectors x_i and y_i, for i = 1, ..., batch_count

function mublasDrotmStridedBatched​

mublasStatus mublasDrotmStridedBatched(
mublasHandle_t handle,
mublas_int n,
double * x,
mublas_int incx,
mublas_stride stride_x,
double * y,
mublas_int incy,
mublas_stride stride_y,
const double * param,
mublas_stride stride_param,
mublas_int batch_count
)

function mublasSrotmg​

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

BLAS Level 1 API.

Parameters:

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

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

function mublasDrotmg​

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

function mublasSrotmgBatched​

mublasStatus mublasSrotmgBatched(
mublasHandle_t handle,
float *const d1[],
float *const d2[],
float *const x1[],
const float *const y1[],
float *const param[],
mublas_int batch_count
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • d1 device batched array or host batched array of input scalars that is overwritten.
  • d2 device batched array or host batched array of input scalars that is overwritten.
  • x1 device batched array or host batched array of input scalars that is overwritten.
  • y1 device batched array or host batched array of input scalars.
  • param device batched array or host batched array of vectors 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.
  • batch_count [mublas_int] the number of instances in the batch.

rotmg_batched creates the modified Givens rotation matrix for the batched vectors (d1_i * x1_i, d2_i * y1_i), for i = 1, ..., batch_count. Parameters may be stored in either host or device memory, location is specified by calling mublasSetPointerMode. If the pointer mode is set to MUBLAS_POINTER_MODE_HOST, this function blocks the CPU until the GPU has finished and the results are available in host memory. If the pointer mode is set to MUBLAS_POINTER_MODE_DEVICE, this function returns immediately and synchronization is required to read the results.

function mublasDrotmgBatched​

mublasStatus mublasDrotmgBatched(
mublasHandle_t handle,
double *const d1[],
double *const d2[],
double *const x1[],
const double *const y1[],
double *const param[],
mublas_int batch_count
)

function mublasSrotmgStridedBatched​

mublasStatus mublasSrotmgStridedBatched(
mublasHandle_t handle,
float * d1,
mublas_stride stride_d1,
float * d2,
mublas_stride stride_d2,
float * x1,
mublas_stride stride_x1,
const float * y1,
mublas_stride stride_y1,
float * param,
mublas_stride stride_param,
mublas_int batch_count
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • d1 device strided_batched array or host strided_batched array of input scalars that is overwritten.
  • stride_d1 [mublas_stride] specifies the increment between the beginning of d1_i and d1_(i+1)
  • d2 device strided_batched array or host strided_batched array of input scalars that is overwritten.
  • stride_d2 [mublas_stride] specifies the increment between the beginning of d2_i and d2_(i+1)
  • x1 device strided_batched array or host strided_batched array of input scalars that is overwritten.
  • stride_x1 [mublas_stride] specifies the increment between the beginning of x1_i and x1_(i+1)
  • y1 device strided_batched array or host strided_batched array of input scalars.
  • stride_y1 [mublas_stride] specifies the increment between the beginning of y1_i and y1_(i+1)
  • param device strided_batched array or host strided_batched array of vectors 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.
  • stride_param [mublas_stride] specifies the increment between the beginning of param_i and param_(i + 1)
  • batch_count [mublas_int] the number of instances in the batch.

rotmg_strided_batched creates the modified Givens rotation matrix for the strided batched vectors (d1_i * x1_i, d2_i * y1_i), for i = 1, ..., batch_count. Parameters may be stored in either host or device memory, location is specified by calling mublasSetPointerMode. If the pointer mode is set to MUBLAS_POINTER_MODE_HOST, this function blocks the CPU until the GPU has finished and the results are available in host memory. If the pointer mode is set to MUBLAS_POINTER_MODE_DEVICE, this function returns immediately and synchronization is required to read the results.

function mublasDrotmgStridedBatched​

mublasStatus mublasDrotmgStridedBatched(
mublasHandle_t handle,
double * d1,
mublas_stride stride_d1,
double * d2,
mublas_stride stride_d2,
double * x1,
mublas_stride stride_x1,
const double * y1,
mublas_stride stride_y1,
double * param,
mublas_stride stride_param,
mublas_int batch_count
)

function mublasSgbmv​

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

BLAS Level 2 API.

Parameters:

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

gbmv performs one of the matrix-vector operations

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

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

function mublasDgbmv​

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

function mublasCgbmv​

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

function mublasZgbmv​

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

function mublasSgbmvBatched​

mublasStatus mublasSgbmvBatched(
mublasHandle_t handle,
mublasOperation_t trans,
mublas_int m,
mublas_int n,
mublas_int kl,
mublas_int ku,
const float * alpha,
const float *const A[],
mublas_int lda,
const float *const x[],
mublas_int incx,
const float * beta,
float *const y[],
mublas_int incy,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

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

gbmv_batched performs one of the matrix-vector operations

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

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

function mublasDgbmvBatched​

mublasStatus mublasDgbmvBatched(
mublasHandle_t handle,
mublasOperation_t trans,
mublas_int m,
mublas_int n,
mublas_int kl,
mublas_int ku,
const double * alpha,
const double *const A[],
mublas_int lda,
const double *const x[],
mublas_int incx,
const double * beta,
double *const y[],
mublas_int incy,
mublas_int batch_count
)

function mublasCgbmvBatched​

mublasStatus mublasCgbmvBatched(
mublasHandle_t handle,
mublasOperation_t trans,
mublas_int m,
mublas_int n,
mublas_int kl,
mublas_int ku,
const muComplex * alpha,
const muComplex *const A[],
mublas_int lda,
const muComplex *const x[],
mublas_int incx,
const muComplex * beta,
muComplex *const y[],
mublas_int incy,
mublas_int batch_count
)

function mublasZgbmvBatched​

mublasStatus mublasZgbmvBatched(
mublasHandle_t handle,
mublasOperation_t trans,
mublas_int m,
mublas_int n,
mublas_int kl,
mublas_int ku,
const muDoubleComplex * alpha,
const muDoubleComplex *const A[],
mublas_int lda,
const muDoubleComplex *const x[],
mublas_int incx,
const muDoubleComplex * beta,
muDoubleComplex *const y[],
mublas_int incy,
mublas_int batch_count
)

function mublasSgbmvStridedBatched​

mublasStatus mublasSgbmvStridedBatched(
mublasHandle_t handle,
mublasOperation_t trans,
mublas_int m,
mublas_int n,
mublas_int kl,
mublas_int ku,
const float * alpha,
const float * A,
mublas_int lda,
mublas_stride stride_A,
const float * x,
mublas_int incx,
mublas_stride stride_x,
const float * beta,
float * y,
mublas_int incy,
mublas_stride stride_y,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

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

gbmv_strided_batched performs one of the matrix-vector operations

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

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

function mublasDgbmvStridedBatched​

mublasStatus mublasDgbmvStridedBatched(
mublasHandle_t handle,
mublasOperation_t trans,
mublas_int m,
mublas_int n,
mublas_int kl,
mublas_int ku,
const double * alpha,
const double * A,
mublas_int lda,
mublas_stride stride_A,
const double * x,
mublas_int incx,
mublas_stride stride_x,
const double * beta,
double * y,
mublas_int incy,
mublas_stride stride_y,
mublas_int batch_count
)

function mublasCgbmvStridedBatched​

mublasStatus mublasCgbmvStridedBatched(
mublasHandle_t handle,
mublasOperation_t trans,
mublas_int m,
mublas_int n,
mublas_int kl,
mublas_int ku,
const muComplex * alpha,
const muComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muComplex * x,
mublas_int incx,
mublas_stride stride_x,
const muComplex * beta,
muComplex * y,
mublas_int incy,
mublas_stride stride_y,
mublas_int batch_count
)

function mublasZgbmvStridedBatched​

mublasStatus mublasZgbmvStridedBatched(
mublasHandle_t handle,
mublasOperation_t trans,
mublas_int m,
mublas_int n,
mublas_int kl,
mublas_int ku,
const muDoubleComplex * alpha,
const muDoubleComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stride_x,
const muDoubleComplex * beta,
muDoubleComplex * y,
mublas_int incy,
mublas_stride stride_y,
mublas_int batch_count
)

function mublasSgemv​

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

BLAS Level 2 API.

Parameters:

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

gemv performs one of the matrix-vector operations

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

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

function mublasDgemv​

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

function mublasCgemv​

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

function mublasZgemv​

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

function mublasSgemvBatched​

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

BLAS Level 2 API.

Parameters:

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

gemv_batched performs a batch of matrix-vector operations

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

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

function mublasDgemvBatched​

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

function mublasCgemvBatched​

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

function mublasZgemvBatched​

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

function mublasSgemvStridedBatched​

mublasStatus mublasSgemvStridedBatched(
mublasHandle_t handle,
mublasOperation_t transA,
mublas_int m,
mublas_int n,
const float * alpha,
const float * A,
mublas_int lda,
mublas_stride strideA,
const float * x,
mublas_int incx,
mublas_stride stridex,
const float * beta,
float * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • transA [mublasOperation_t] indicates whether matrices A_i are tranposed (conjugated) or not
  • m [mublas_int] number of rows of matrices A_i
  • n [mublas_int] number of columns of matrices A_i
  • alpha device pointer or host pointer to scalar alpha.
  • A device pointer to the first matrix (A_1) in the batch.
  • lda [mublas_int] specifies the leading dimension of matrices A_i.
  • strideA [mublas_stride] stride from the start of one matrix (A_i) and the next one (A_i+1)
  • x device pointer to the first vector (x_1) in the batch.
  • incx [mublas_int] specifies the increment for the elements of vectors x_i.
  • stridex [mublas_stride] stride from the start of one vector (x_i) and the next one (x_i+1). There are no restrictions placed on stride_x, however the user should take care to ensure that stride_x is of appropriate size. When trans equals MUBLAS_OP_N this typically means stride_x >= n * incx, otherwise stride_x >= m * incx.
  • beta device pointer or host pointer to scalar beta.
  • y device pointer to the first vector (y_1) in the batch.
  • incy [mublas_int] specifies the increment for the elements of vectors y_i.
  • stridey [mublas_stride] stride from the start of one vector (y_i) and the next one (y_i+1). There are no restrictions placed on stride_y, however the user should take care to ensure that stride_y is of appropriate size. When trans equals MUBLAS_OP_N this typically means stride_y >= m * incy, otherwise stride_y >= n * incy. stridey should be non zero.
  • batch_count [mublas_int] number of instances in the batch

gemv_strided_batched performs a batch of matrix-vector operations

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

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

function mublasDgemvStridedBatched​

mublasStatus mublasDgemvStridedBatched(
mublasHandle_t handle,
mublasOperation_t transA,
mublas_int m,
mublas_int n,
const double * alpha,
const double * A,
mublas_int lda,
mublas_stride strideA,
const double * x,
mublas_int incx,
mublas_stride stridex,
const double * beta,
double * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

function mublasCgemvStridedBatched​

mublasStatus mublasCgemvStridedBatched(
mublasHandle_t handle,
mublasOperation_t transA,
mublas_int m,
mublas_int n,
const muComplex * alpha,
const muComplex * A,
mublas_int lda,
mublas_stride strideA,
const muComplex * x,
mublas_int incx,
mublas_stride stridex,
const muComplex * beta,
muComplex * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

function mublasZgemvStridedBatched​

mublasStatus mublasZgemvStridedBatched(
mublasHandle_t handle,
mublasOperation_t transA,
mublas_int m,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex * A,
mublas_int lda,
mublas_stride strideA,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stridex,
const muDoubleComplex * beta,
muDoubleComplex * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

function mublasChbmv​

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

BLAS Level 2 API.

Parameters:

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

hbmv performs the matrix-vector operations

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

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

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

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

function mublasZhbmv​

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

function mublasChbmvBatched​

mublasStatus mublasChbmvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
mublas_int k,
const muComplex * alpha,
const muComplex *const A[],
mublas_int lda,
const muComplex *const x[],
mublas_int incx,
const muComplex * beta,
muComplex *const y[],
mublas_int incy,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: The upper triangular part of each A_i is being supplied. MUBLAS_FILL_MODE_LOWER: The lower triangular part of each A_i is being supplied.
  • n [mublas_int] the order of each matrix A_i.
  • k [mublas_int] the number of super-diagonals of each matrix A_i. Must be >= 0.
  • alpha device pointer or host pointer to scalar alpha.
  • A device array of device pointers storing each matrix_i A of dimension (lda, n). if uplo == MUBLAS_FILL_MODE_UPPER: The leading (k + 1) by n part of each A_i must contain the upper triangular band part of the Hermitian matrix, with the leading diagonal in row (k + 1), the first super-diagonal on the RHS of row k, etc. The top left k by x triangle of each A_i will not be referenced. Ex (upper, lda = n = 4, k = 1): A Represented matrix (0,0) (5,9) (6,8) (7,7) (1, 0) (5, 9) (0, 0) (0, 0) (1,0) (2,0) (3,0) (4,0) (5,-9) (2, 0) (6, 8) (0, 0) (0,0) (0,0) (0,0) (0,0) (0, 0) (6,-8) (3, 0) (7, 7) (0,0) (0,0) (0,0) (0,0) (0, 0) (0, 0) (7,-7) (4, 0)
  • lda [mublas_int] specifies the leading dimension of each A_i. must be >= max(1, n)
  • x device array of device pointers storing each vector x_i.
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • beta device pointer or host pointer to scalar beta.
  • y device array of device pointers storing each vector y_i.
  • incy [mublas_int] specifies the increment for the elements of y.
  • batch_count [mublas_int] number of instances in the batch.

hbmv_batched performs one of the matrix-vector operations

y_i := alpha*A_i*x_i + beta*y_i

where alpha and beta are scalars, x_i and y_i are n element vectors and A_i is an n by n Hermitian band matrix with k super-diagonals, for each batch in i = [1, batch_count].

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

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

function mublasZhbmvBatched​

mublasStatus mublasZhbmvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
mublas_int k,
const muDoubleComplex * alpha,
const muDoubleComplex *const A[],
mublas_int lda,
const muDoubleComplex *const x[],
mublas_int incx,
const muDoubleComplex * beta,
muDoubleComplex *const y[],
mublas_int incy,
mublas_int batch_count
)

function mublasChbmvStridedBatched​

mublasStatus mublasChbmvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
mublas_int k,
const muComplex * alpha,
const muComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muComplex * x,
mublas_int incx,
mublas_stride stride_x,
const muComplex * beta,
muComplex * y,
mublas_int incy,
mublas_stride stride_y,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: The upper triangular part of each A_i is being supplied. MUBLAS_FILL_MODE_LOWER: The lower triangular part of each A_i is being supplied.
  • n [mublas_int] the order of each matrix A_i.
  • k [mublas_int] the number of super-diagonals of each matrix A_i. Must be >= 0.
  • alpha device pointer or host pointer to scalar alpha.
  • A device array pointing to the first matrix A_1. Each A_i is of dimension (lda, n). if uplo == MUBLAS_FILL_MODE_UPPER: The leading (k + 1) by n part of each A_i must contain the upper triangular band part of the Hermitian matrix, with the leading diagonal in row (k + 1), the first super-diagonal on the RHS of row k, etc. The top left k by x triangle of each A_i will not be referenced. Ex (upper, lda = n = 4, k = 1): A Represented matrix (0,0) (5,9) (6,8) (7,7) (1, 0) (5, 9) (0, 0) (0, 0) (1,0) (2,0) (3,0) (4,0) (5,-9) (2, 0) (6, 8) (0, 0) (0,0) (0,0) (0,0) (0,0) (0, 0) (6,-8) (3, 0) (7, 7) (0,0) (0,0) (0,0) (0,0) (0, 0) (0, 0) (7,-7) (4, 0)
  • lda [mublas_int] specifies the leading dimension of each A_i. must be >= max(1, n)
  • stride_A [mublas_stride] stride from the start of one matrix (A_i) and the next one (A_i+1)
  • x device array pointing to the first vector y_1.
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • stride_x [mublas_stride] stride from the start of one vector (x_i) and the next one (x_i+1)
  • beta device pointer or host pointer to scalar beta.
  • y device array pointing to the first vector y_1.
  • incy [mublas_int] specifies the increment for the elements of y.
  • stride_y [mublas_stride] stride from the start of one vector (y_i) and the next one (y_i+1)
  • batch_count [mublas_int] number of instances in the batch.

hbmv_strided_batched performs one of the matrix-vector operations

y_i := alpha*A_i*x_i + beta*y_i

where alpha and beta are scalars, x_i and y_i are n element vectors and A_i is an n by n Hermitian band matrix with k super-diagonals, for each batch in i = [1, batch_count].

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

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

function mublasZhbmvStridedBatched​

mublasStatus mublasZhbmvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
mublas_int k,
const muDoubleComplex * alpha,
const muDoubleComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stride_x,
const muDoubleComplex * beta,
muDoubleComplex * y,
mublas_int incy,
mublas_stride stride_y,
mublas_int batch_count
)

function mublasChemv​

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

BLAS Level 2 API.

Parameters:

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

hemv performs one of the matrix-vector operations

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

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

function mublasZhemv​

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

function mublasChemvBatched​

mublasStatus mublasChemvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muComplex * alpha,
const muComplex *const A[],
mublas_int lda,
const muComplex *const x[],
mublas_int incx,
const muComplex * beta,
muComplex *const y[],
mublas_int incy,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

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

hemv_batched performs one of the matrix-vector operations

y_i := alpha*A_i*x_i + beta*y_i

where alpha and beta are scalars, x_i and y_i are n element vectors and A_i is an n by n Hermitian matrix, for each batch in i = [1, batch_count].

function mublasZhemvBatched​

mublasStatus mublasZhemvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex *const A[],
mublas_int lda,
const muDoubleComplex *const x[],
mublas_int incx,
const muDoubleComplex * beta,
muDoubleComplex *const y[],
mublas_int incy,
mublas_int batch_count
)

function mublasChemvStridedBatched​

mublasStatus mublasChemvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muComplex * alpha,
const muComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muComplex * x,
mublas_int incx,
mublas_stride stride_x,
const muComplex * beta,
muComplex * y,
mublas_int incy,
mublas_stride stride_y,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: the upper triangular part of the Hermitian matrix A is supplied. MUBLAS_FILL_MODE_LOWER: the lower triangular part of the Hermitian matrix A is supplied.
  • n [mublas_int] the order of each matrix A_i.
  • alpha device pointer or host pointer to scalar alpha.
  • A device array of device pointers storing each matrix A_i of dimension (lda, n). if uplo == MUBLAS_FILL_MODE_UPPER: The upper triangular part of each A_i must contain the upper triangular part of a Hermitian matrix. The lower triangular part of each A_i will not be referenced. if uplo == MUBLAS_FILL_MODE_LOWER: The lower triangular part of each A_i must contain the lower triangular part of a Hermitian matrix. The upper triangular part of each A_i will not be referenced. As a Hermitian matrix, the imaginary part of the main diagonal of each A_i will not be referenced and is assumed to be == 0.
  • lda [mublas_int] specifies the leading dimension of each A_i. must be >= max(1, n)
  • stride_A [mublas_stride] stride from the start of one (A_i) to the next (A_i+1)
  • x device array of device pointers storing each vector x_i.
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • stride_x [mublas_stride] stride from the start of one vector (x_i) and the next one (x_i+1).
  • beta device pointer or host pointer to scalar beta.
  • y device array of device pointers storing each vector y_i.
  • incy [mublas_int] specifies the increment for the elements of y.
  • stride_y [mublas_stride] stride from the start of one vector (y_i) and the next one (y_i+1).
  • batch_count [mublas_int] number of instances in the batch.

hemv_strided_batched performs one of the matrix-vector operations

y_i := alpha*A_i*x_i + beta*y_i

where alpha and beta are scalars, x_i and y_i are n element vectors and A_i is an n by n Hermitian matrix, for each batch in i = [1, batch_count].

function mublasZhemvStridedBatched​

mublasStatus mublasZhemvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stride_x,
const muDoubleComplex * beta,
muDoubleComplex * y,
mublas_int incy,
mublas_stride stride_y,
mublas_int batch_count
)

function mublasCher​

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

BLAS Level 2 API.

Parameters:

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

her performs the matrix-vector operations

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

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

function mublasZher​

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

function mublasCherBatched​

mublasStatus mublasCherBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const float * alpha,
const muComplex *const x[],
mublas_int incx,
muComplex *const A[],
mublas_int lda,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

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

her_batched performs the matrix-vector operations

A_i := A_i + alpha*x_i*x_i**H

where alpha is a real scalar, x_i is a vector, and A_i is an n by n symmetric matrix, for i = 1, ..., batch_count.

function mublasZherBatched​

mublasStatus mublasZherBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const double * alpha,
const muDoubleComplex *const x[],
mublas_int incx,
muDoubleComplex *const A[],
mublas_int lda,
mublas_int batch_count
)

function mublasCherStridedBatched​

mublasStatus mublasCherStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const float * alpha,
const muComplex * x,
mublas_int incx,
mublas_stride stride_x,
muComplex * A,
mublas_int lda,
mublas_stride stride_A,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] specifies whether the upper 'MUBLAS_FILL_MODE_UPPER' or lower 'MUBLAS_FILL_MODE_LOWER' MUBLAS_FILL_MODE_UPPER: The upper triangular part of each A_i is supplied in A. MUBLAS_FILL_MODE_LOWER: The lower triangular part of each A_i is supplied in A.
  • n [mublas_int] the number of rows and columns of each matrix A_i, must be at least 0.
  • alpha device pointer or host pointer to scalar alpha.
  • x device pointer pointing to the first vector (x_1).
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • stride_x [mublas_stride] stride from the start of one vector (x_i) and the next one (x_i+1).
  • A device array of device pointers storing the specified triangular portion of each Hermitian matrix A_i. Points to the first matrix (A_1). if uplo == MUBLAS_FILL_MODE_UPPER: The upper triangular portion of each Hermitian matrix A_i is supplied. The lower triangular portion of each A_i will not be touched. if uplo == MUBLAS_FILL_MODE_LOWER: The lower triangular portion of each Hermitian matrix A_i is supplied. The upper triangular portion of each A_i will not be touched. Note that the imaginary part of the diagonal elements are not accessed and are assumed to be 0.
  • lda [mublas_int] specifies the leading dimension of each A_i.
  • stride_A [mublas_stride] stride from the start of one (A_i) and the next (A_i+1)
  • batch_count [mublas_int] number of instances in the batch.

her_strided_batched performs the matrix-vector operations

A_i := A_i + alpha*x_i*x_i**H

where alpha is a real scalar, x_i is a vector, and A_i is an n by n Hermitian matrix, for i = 1, ..., batch_count.

function mublasZherStridedBatched​

mublasStatus mublasZherStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const double * alpha,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stride_x,
muDoubleComplex * A,
mublas_int lda,
mublas_stride stride_A,
mublas_int batch_count
)

function mublasCher2​

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

BLAS Level 2 API.

Parameters:

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

her2 performs the matrix-vector operations

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

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

function mublasZher2​

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

function mublasCher2Batched​

mublasStatus mublasCher2Batched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muComplex * alpha,
const muComplex *const x[],
mublas_int incx,
const muComplex *const y[],
mublas_int incy,
muComplex *const A[],
mublas_int lda,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

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

her2_batched performs the matrix-vector operations

A_i := A_i + alpha*x_i*y_i**H + conj(alpha)*y_i*x_i**H

where alpha is a complex scalar, x_i and y_i are vectors, and A_i is an n by n Hermitian matrix for each batch in i = [1, batch_count].

function mublasZher2Batched​

mublasStatus mublasZher2Batched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex *const x[],
mublas_int incx,
const muDoubleComplex *const y[],
mublas_int incy,
muDoubleComplex *const A[],
mublas_int lda,
mublas_int batch_count
)

function mublasCher2StridedBatched​

mublasStatus mublasCher2StridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muComplex * alpha,
const muComplex * x,
mublas_int incx,
mublas_stride stride_x,
const muComplex * y,
mublas_int incy,
mublas_stride stride_y,
muComplex * A,
mublas_int lda,
mublas_stride stride_A,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] specifies whether the upper 'MUBLAS_FILL_MODE_UPPER' or lower 'MUBLAS_FILL_MODE_LOWER' MUBLAS_FILL_MODE_UPPER: The upper triangular part of each A_i is supplied. MUBLAS_FILL_MODE_LOWER: The lower triangular part of each A_i is supplied.
  • n [mublas_int] the number of rows and columns of each matrix A_i, must be at least 0.
  • alpha device pointer or host pointer to scalar alpha.
  • x device pointer pointing to the first vector x_1.
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • stride_x [mublas_stride] specifies the stride between the beginning of one vector (x_i) and the next (x_i+1).
  • y device pointer pointing to the first vector y_i.
  • incy [mublas_int] specifies the increment for the elements of each y_i.
  • stride_y [mublas_stride] specifies the stride between the beginning of one vector (y_i) and the next (y_i+1).
  • A device pointer pointing to the first matrix (A_1). Stores the specified triangular portion of each Hermitian matrix A_i. if uplo == MUBLAS_FILL_MODE_UPPER: The upper triangular portion of each Hermitian matrix A_i is supplied. The lower triangular portion of each A_i will not be touched. if uplo == MUBLAS_FILL_MODE_LOWER: The lower triangular portion of each Hermitian matrix A_i is supplied. The upper triangular portion of each A_i will not be touched. Note that the imaginary part of the diagonal elements are not accessed and are assumed to be 0.
  • lda [mublas_int] specifies the leading dimension of each A_i. Must be at least max(lda, 1).
  • stride_A [mublas_stride] specifies the stride between the beginning of one matrix (A_i) and the next (A_i+1).
  • batch_count [mublas_int] number of instances in the batch.

her2_strided_batched performs the matrix-vector operations

A_i := A_i + alpha*x_i*y_i**H + conj(alpha)*y_i*x_i**H

where alpha is a complex scalar, x_i and y_i are vectors, and A_i is an n by n Hermitian matrix for each batch in i = [1, batch_count].

function mublasZher2StridedBatched​

mublasStatus mublasZher2StridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stride_x,
const muDoubleComplex * y,
mublas_int incy,
mublas_stride stride_y,
muDoubleComplex * A,
mublas_int lda,
mublas_stride stride_A,
mublas_int batch_count
)

function mublasChpmv​

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

BLAS Level 2 API.

Parameters:

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

hpmv performs the matrix-vector operation

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

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

function mublasZhpmv​

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

function mublasChpmvBatched​

mublasStatus mublasChpmvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muComplex * alpha,
const muComplex *const AP[],
const muComplex *const x[],
mublas_int incx,
const muComplex * beta,
muComplex *const y[],
mublas_int incy,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: the upper triangular part of each Hermitian matrix A_i is supplied in AP. MUBLAS_FILL_MODE_LOWER: the lower triangular part of each Hermitian matrix A_i is supplied in AP.
  • n [mublas_int] the order of each matrix A_i.
  • alpha device pointer or host pointer to scalar alpha.
  • AP device pointer of device pointers storing the packed version of the specified triangular portion of each Hermitian matrix A_i. Each A_i is of at least size ((n * (n + 1)) / 2). if uplo == MUBLAS_FILL_MODE_UPPER: The upper triangular portion of each Hermitian matrix A_i is supplied. The matrix is compacted so that each AP_i 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 each Hermitian matrix A_i is supplied. The matrix is compacted so that each AP_i contains the triangular portion column-by-column so that: AP(0) = A(0,0) AP(1) = A(1,0) AP(2) = A(2,1), etc. Ex: (MUBLAS_FILL_MODE_LOWER; n = 3) (1, 0) (2, 1) (3, 2) (2,-1) (4, 0) (5,-1) --—> [(1,0), (2,-1), (3,-2), (4,0), (5,1), (6,0)] (3,-2) (5, 1) (6, 0) Note that the imaginary part of the diagonal elements are not accessed and are assumed to be 0.
  • x device array of device pointers storing each vector x_i.
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • beta device pointer or host pointer to scalar beta.
  • y device array of device pointers storing each vector y_i.
  • incy [mublas_int] specifies the increment for the elements of y.
  • batch_count [mublas_int] number of instances in the batch.

hpmv_batched performs the matrix-vector operation

y_i := alpha*A_i*x_i + beta*y_i

where alpha and beta are scalars, x_i and y_i are n element vectors and A_i is an n by n Hermitian matrix, supplied in packed form (see description below), for each batch in i = [1, batch_count].

function mublasZhpmvBatched​

mublasStatus mublasZhpmvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex *const AP[],
const muDoubleComplex *const x[],
mublas_int incx,
const muDoubleComplex * beta,
muDoubleComplex *const y[],
mublas_int incy,
mublas_int batch_count
)

function mublasChpmvStridedBatched​

mublasStatus mublasChpmvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muComplex * alpha,
const muComplex * AP,
mublas_stride stride_A,
const muComplex * x,
mublas_int incx,
mublas_stride stride_x,
const muComplex * beta,
muComplex * y,
mublas_int incy,
mublas_stride stride_y,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: the upper triangular part of each Hermitian matrix A_i is supplied in AP. MUBLAS_FILL_MODE_LOWER: the lower triangular part of each Hermitian matrix A_i is supplied in AP.
  • n [mublas_int] the order of each matrix A_i.
  • alpha device pointer or host pointer to scalar alpha.
  • AP device pointer pointing to the beginning of the first matrix (AP_1). Stores the packed version of the specified triangular portion of each Hermitian matrix AP_i of size ((n * (n + 1)) / 2). if uplo == MUBLAS_FILL_MODE_UPPER: The upper triangular portion of each Hermitian matrix A_i is supplied. The matrix is compacted so that each AP_i 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 each Hermitian matrix A_i is supplied. The matrix is compacted so that each AP_i contains the triangular portion column-by-column so that: AP(0) = A(0,0) AP(1) = A(1,0) AP(2) = A(2,1), etc. Ex: (MUBLAS_FILL_MODE_LOWER; n = 3) (1, 0) (2, 1) (3, 2) (2,-1) (4, 0) (5,-1) --—> [(1,0), (2,-1), (3,-2), (4,0), (5,1), (6,0)] (3,-2) (5, 1) (6, 0) Note that the imaginary part of the diagonal elements are not accessed and are assumed to be 0.
  • stride_A [mublas_stride] stride from the start of one matrix (AP_i) and the next one (AP_i+1).
  • x device array pointing to the beginning of the first vector (x_1).
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • stride_x [mublas_stride] stride from the start of one vector (x_i) and the next one (x_i+1).
  • beta device pointer or host pointer to scalar beta.
  • y device array pointing to the beginning of the first vector (y_1).
  • incy [mublas_int] specifies the increment for the elements of y.
  • stride_y [mublas_stride] stride from the start of one vector (y_i) and the next one (y_i+1).
  • batch_count [mublas_int] number of instances in the batch.

hpmv_strided_batched performs the matrix-vector operation

y_i := alpha*A_i*x_i + beta*y_i

where alpha and beta are scalars, x_i and y_i are n element vectors and A_i is an n by n Hermitian matrix, supplied in packed form (see description below), for each batch in i = [1, batch_count].

function mublasZhpmvStridedBatched​

mublasStatus mublasZhpmvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex * AP,
mublas_stride stride_A,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stride_x,
const muDoubleComplex * beta,
muDoubleComplex * y,
mublas_int incy,
mublas_stride stride_y,
mublas_int batch_count
)

function mublasChpr​

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

BLAS Level 2 API.

Parameters:

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

hpr performs the matrix-vector operations

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

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

function mublasZhpr​

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

function mublasChprBatched​

mublasStatus mublasChprBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const float * alpha,
const muComplex *const x[],
mublas_int incx,
muComplex *const AP[],
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

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

hpr_batched performs the matrix-vector operations

A_i := A_i + alpha*x_i*x_i**H

where alpha is a real scalar, x_i is a vector, and A_i is an n by n symmetric matrix, supplied in packed form, for i = 1, ..., batch_count.

function mublasZhprBatched​

mublasStatus mublasZhprBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const double * alpha,
const muDoubleComplex *const x[],
mublas_int incx,
muDoubleComplex *const AP[],
mublas_int batch_count
)

function mublasChprStridedBatched​

mublasStatus mublasChprStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const float * alpha,
const muComplex * x,
mublas_int incx,
mublas_stride stride_x,
muComplex * AP,
mublas_stride stride_A,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] specifies whether the upper 'MUBLAS_FILL_MODE_UPPER' or lower 'MUBLAS_FILL_MODE_LOWER' MUBLAS_FILL_MODE_UPPER: The upper triangular part of each A_i is supplied in AP. MUBLAS_FILL_MODE_LOWER: The lower triangular part of each A_i is supplied in AP.
  • n [mublas_int] the number of rows and columns of each matrix A_i, must be at least 0.
  • alpha device pointer or host pointer to scalar alpha.
  • x device pointer pointing to the first vector (x_1).
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • stride_x [mublas_stride] stride from the start of one vector (x_i) and the next one (x_i+1).
  • AP device array of device pointers storing the packed version of the specified triangular portion of each Hermitian matrix A_i. Points to the first matrix (A_1). if uplo == MUBLAS_FILL_MODE_UPPER: The upper triangular portion of each Hermitian matrix A_i 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 each Hermitian matrix A_i is supplied. The matrix is compacted so that AP contains the triangular portion column-by-column so that: AP(0) = A(0,0) AP(1) = A(1,0) AP(2) = A(2,1), etc. Ex: (MUBLAS_FILL_MODE_LOWER; n = 3) (1, 0) (2, 1) (4,9) (2,-1) (3, 0) (5,3) --—> [(1,0), (2,-1), (4,-9), (3,0), (5,-3), (6,0)] (4,-9) (5,-3) (6,0) Note that the imaginary part of the diagonal elements are not accessed and are assumed to be 0.
  • stride_A [mublas_stride] stride from the start of one (A_i) and the next (A_i+1)
  • batch_count [mublas_int] number of instances in the batch.

hpr_strided_batched performs the matrix-vector operations

A_i := A_i + alpha*x_i*x_i**H

where alpha is a real scalar, x_i is a vector, and A_i is an n by n symmetric matrix, supplied in packed form, for i = 1, ..., batch_count.

function mublasZhprStridedBatched​

mublasStatus mublasZhprStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const double * alpha,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stride_x,
muDoubleComplex * AP,
mublas_stride stride_A,
mublas_int batch_count
)

function mublasChpr2​

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

BLAS Level 2 API.

Parameters:

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

hpr2 performs the matrix-vector operations

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

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

function mublasZhpr2​

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

function mublasChpr2Batched​

mublasStatus mublasChpr2Batched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muComplex * alpha,
const muComplex *const x[],
mublas_int incx,
const muComplex *const y[],
mublas_int incy,
muComplex *const AP[],
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

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

hpr2_batched performs the matrix-vector operations

A_i := A_i + alpha*x_i*y_i**H + conj(alpha)*y_i*x_i**H

where alpha is a complex scalar, x_i and y_i are vectors, and A_i is an n by n symmetric matrix, supplied in packed form, for i = 1, ..., batch_count.

function mublasZhpr2Batched​

mublasStatus mublasZhpr2Batched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex *const x[],
mublas_int incx,
const muDoubleComplex *const y[],
mublas_int incy,
muDoubleComplex *const AP[],
mublas_int batch_count
)

function mublasChpr2StridedBatched​

mublasStatus mublasChpr2StridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muComplex * alpha,
const muComplex * x,
mublas_int incx,
mublas_stride stride_x,
const muComplex * y,
mublas_int incy,
mublas_stride stride_y,
muComplex * AP,
mublas_stride stride_A,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] specifies whether the upper 'MUBLAS_FILL_MODE_UPPER' or lower 'MUBLAS_FILL_MODE_LOWER' MUBLAS_FILL_MODE_UPPER: The upper triangular part of each A_i is supplied in AP. MUBLAS_FILL_MODE_LOWER: The lower triangular part of each A_i is supplied in AP.
  • n [mublas_int] the number of rows and columns of each matrix A_i, must be at least 0.
  • alpha device pointer or host pointer to scalar alpha.
  • x device pointer pointing to the first vector (x_1).
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • stride_x [mublas_stride] stride from the start of one vector (x_i) and the next one (x_i+1).
  • y device pointer pointing to the first vector (y_1).
  • incy [mublas_int] specifies the increment for the elements of each y_i.
  • stride_y [mublas_stride] stride from the start of one vector (y_i) and the next one (y_i+1).
  • AP device array of device pointers storing the packed version of the specified triangular portion of each Hermitian matrix A_i. Points to the first matrix (A_1). if uplo == MUBLAS_FILL_MODE_UPPER: The upper triangular portion of each Hermitian matrix A_i 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 each Hermitian matrix A_i is supplied. The matrix is compacted so that AP contains the triangular portion column-by-column so that: AP(0) = A(0,0) AP(1) = A(1,0) AP(2) = A(2,1), etc. Ex: (MUBLAS_FILL_MODE_LOWER; n = 3) (1, 0) (2, 1) (4,9) (2,-1) (3, 0) (5,3) --—> [(1,0), (2,-1), (4,-9), (3,0), (5,-3), (6,0)] (4,-9) (5,-3) (6,0) Note that the imaginary part of the diagonal elements are not accessed and are assumed to be 0.
  • stride_A [mublas_stride] stride from the start of one (A_i) and the next (A_i+1)
  • batch_count [mublas_int] number of instances in the batch.

hpr2_strided_batched performs the matrix-vector operations

A_i := A_i + alpha*x_i*y_i**H + conj(alpha)*y_i*x_i**H

where alpha is a complex scalar, x_i and y_i are vectors, and A_i is an n by n symmetric matrix, supplied in packed form, for i = 1, ..., batch_count.

function mublasZhpr2StridedBatched​

mublasStatus mublasZhpr2StridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stride_x,
const muDoubleComplex * y,
mublas_int incy,
mublas_stride stride_y,
muDoubleComplex * AP,
mublas_stride stride_A,
mublas_int batch_count
)

function mublasStrmv​

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

BLAS Level 2 API.

Parameters:

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

trmv performs one of the matrix-vector operations

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

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

The vector x is overwritten.

function mublasDtrmv​

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

function mublasCtrmv​

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

function mublasZtrmv​

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

function mublasStrmvBatched​

mublasStatus mublasStrmvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const float *const * A,
mublas_int lda,
float *const * x,
mublas_int incx,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

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

trmv_batched performs one of the matrix-vector operations

x_i = A_i*x_i or x_i = A**T*x_i, 0 \le i < batch_count

where x_i is an n element vector and A_i is an n by n (unit, or non-unit, upper or lower triangular matrix)

The vectors x_i are overwritten.

function mublasDtrmvBatched​

mublasStatus mublasDtrmvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const double *const * A,
mublas_int lda,
double *const * x,
mublas_int incx,
mublas_int batch_count
)

function mublasCtrmvBatched​

mublasStatus mublasCtrmvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const muComplex *const * A,
mublas_int lda,
muComplex *const * x,
mublas_int incx,
mublas_int batch_count
)

function mublasZtrmvBatched​

mublasStatus mublasZtrmvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const muDoubleComplex *const * A,
mublas_int lda,
muDoubleComplex *const * x,
mublas_int incx,
mublas_int batch_count
)

function mublasStrmvStridedBatched​

mublasStatus mublasStrmvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const float * A,
mublas_int lda,
mublas_stride stride_A,
float * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: A_i is an upper triangular matrix. MUBLAS_FILL_MODE_LOWER: A_i is a lower triangular matrix.
  • transA [mublasOperation_t]
  • diag [mublasDiagType_t] MUBLAS_DIAG_UNIT: A_i is assumed to be unit triangular. MUBLAS_DIAG_NON_UNIT: A_i is not assumed to be unit triangular.
  • m [mublas_int] m specifies the number of rows of matrices A_i. m >= 0.
  • A device pointer of the matrix A_0, of dimension ( lda, m )
  • lda [mublas_int] specifies the leading dimension of A_i. lda >= max( 1, m ).
  • stride_A [mublas_stride] stride from the start of one A_i matrix to the next A_{i + 1}
  • x device pointer storing the vector x_0.
  • incx [mublas_int] specifies the increment for the elements of one vector x.
  • stride_x [mublas_stride] stride from the start of one x_i vector to the next x_{i + 1}
  • batch_count [mublas_int] The number of batched matrices/vectors.

trmv_strided_batched performs one of the matrix-vector operations

x_i = A_i*x_i or x_i = A**T*x_i, 0 \le i < batch_count

where x_i is an n element vector and A_i is an n by n (unit, or non-unit, upper or lower triangular matrix) with strides specifying how to retrieve xix_i (resp. AiA_i) from x_\{i-1} (resp. AiA_i).

The vectors x_i are overwritten.

function mublasDtrmvStridedBatched​

mublasStatus mublasDtrmvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const double * A,
mublas_int lda,
mublas_stride stride_A,
double * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

function mublasCtrmvStridedBatched​

mublasStatus mublasCtrmvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const muComplex * A,
mublas_int lda,
mublas_stride stride_A,
muComplex * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

function mublasZtrmv_strided_batched​

mublasStatus mublasZtrmv_strided_batched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const muDoubleComplex * A,
mublas_int lda,
mublas_stride stride_A,
muDoubleComplex * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

function mublasStpmv​

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

BLAS Level 2 API.

Parameters:

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

tpmv performs one of the matrix-vector operations:

x = A x \quad \text\{or} \quad x = A^T x,

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

The vector x is overwritten.

function mublasDtpmv​

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

function mublasCtpmv​

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

function mublasZtpmv​

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

function mublasStpmvBatched​

mublasStatus mublasStpmvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const float *const * A,
float *const * x,
mublas_int incx,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t]: Handle to the mublas library context queue.
  • uplo [mublasFillMode_t]:
    • MUBLAS_FILL_MODE_UPPER: AiA_i is an upper triangular matrix.
    • MUBLAS_FILL_MODE_LOWER: AiA_i is a lower triangular matrix.
  • transA [mublasOperation_t]
  • diag [mublasDiagType_t]:
    • MUBLAS_DIAG_UNIT: AiA_i is assumed to be unit triangular.
    • MUBLAS_DIAG_NON_UNIT: AiA_i is not assumed to be unit triangular.
  • m [mublas_int]: mm specifies the number of rows of matrices AiA_i. m≥0m \ge 0.
  • A: Device pointer storing pointers of matrices AiA_i, of dimension (lda,m)(lda, m).
  • x: Device pointer storing vectors xix_i.
  • incx [mublas_int]: Specifies the increment for the elements of vectors xix_i.
  • batch_count [mublas_int]: The number of batched matrices/vectors.

tpmv_batched performs one of the matrix-vector operations:

xi=Aixiorxi=AiTxi,0≤i\<batch_countx_i = A_i x_i \quad \text{or} \quad x_i = A_i^T x_i, \quad 0 \leq i \< \text{batch\_count}

where xix_i is an nn-element vector and AiA_i is an n×nn \times n (unit or non-unit, upper or lower triangular matrix).

The vectors xix_i are overwritten.

function mublasDtpmvBatched​

mublasStatus mublasDtpmvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const double *const * A,
double *const * x,
mublas_int incx,
mublas_int batch_count
)

function mublasCtpmvBatched​

mublasStatus mublasCtpmvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const muComplex *const * A,
muComplex *const * x,
mublas_int incx,
mublas_int batch_count
)

function mublasZtpmvBatched​

mublasStatus mublasZtpmvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const muDoubleComplex *const * A,
muDoubleComplex *const * x,
mublas_int incx,
mublas_int batch_count
)

function mublasStpmvStridedBatched​

mublasStatus mublasStpmvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const float * A,
mublas_stride stride_A,
float * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: A_i is an upper triangular matrix. MUBLAS_FILL_MODE_LOWER: A_i is a lower triangular matrix.
  • transA [mublasOperation_t]
  • diag [mublasDiagType_t] MUBLAS_DIAG_UNIT: A_i is assumed to be unit triangular. MUBLAS_DIAG_NON_UNIT: A_i is not assumed to be unit triangular.
  • m [mublas_int] m specifies the number of rows of matrices A_i. m >= 0.
  • A device pointer of the matrix A_0, of dimension ( lda, m )
  • stride_A [mublas_stride] stride from the start of one A_i matrix to the next A_{i + 1}
  • x device pointer storing the vector x_0.
  • incx [mublas_int] specifies the increment for the elements of one vector x.
  • stride_x [mublas_stride] stride from the start of one x_i vector to the next x_{i + 1}
  • batch_count [mublas_int] The number of batched matrices/vectors.

tpmv_strided_batched performs one of the matrix-vector operations

x_i = A_i*x_i or x_i = A**T*x_i, 0 \le i < batch_count

where x_i is an n element vector and A_i is an n by n (unit, or non-unit, upper or lower triangular matrix) with strides specifying how to retrieve xix_i (resp. AiA_i) from x_\{i-1} (resp. AiA_i).

The vectors x_i are overwritten.

function mublasDtpmvStridedBatched​

mublasStatus mublasDtpmvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const double * A,
mublas_stride stride_A,
double * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

function mublasCtpmvStridedBatched​

mublasStatus mublasCtpmvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const muComplex * A,
mublas_stride stride_A,
muComplex * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

function mublasZtpmvStridedBatched​

mublasStatus mublasZtpmvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const muDoubleComplex * A,
mublas_stride stride_A,
muDoubleComplex * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

function mublasStbmv​

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

BLAS Level 2 API.

Parameters:

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

tbmv performs one of the matrix-vector operations

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

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

function mublasDtbmv​

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

function mublasCtbmv​

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

function mublasZtbmv​

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

function mublasStbmvBatched​

mublasStatus mublasStbmvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublasDiagType_t diag,
mublas_int m,
mublas_int k,
const float *const A[],
mublas_int lda,
float *const x[],
mublas_int incx,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

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

tbmv_batched performs one of the matrix-vector operations

x_i := A_i*x_i or
x_i := A_i**T*x_i or
x_i := A_i**H*x_i,

where (A_i, x_i) is the i-th instance of the batch. x_i is a vector and A_i is an m by m matrix, for i = 1, ..., batch_count.

function mublasDtbmvBatched​

mublasStatus mublasDtbmvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublasDiagType_t diag,
mublas_int m,
mublas_int k,
const double *const A[],
mublas_int lda,
double *const x[],
mublas_int incx,
mublas_int batch_count
)

function mublasCtbmvBatched​

mublasStatus mublasCtbmvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublasDiagType_t diag,
mublas_int m,
mublas_int k,
const muComplex *const A[],
mublas_int lda,
muComplex *const x[],
mublas_int incx,
mublas_int batch_count
)

function mublasZtbmvBatched​

mublasStatus mublasZtbmvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublasDiagType_t diag,
mublas_int m,
mublas_int k,
const muDoubleComplex *const A[],
mublas_int lda,
muDoubleComplex *const x[],
mublas_int incx,
mublas_int batch_count
)

function mublasStbmvStridedBatched​

mublasStatus mublasStbmvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublasDiagType_t diag,
mublas_int m,
mublas_int k,
const float * A,
mublas_int lda,
mublas_stride stride_A,
float * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

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

tbmv_strided_batched performs one of the matrix-vector operations

x_i := A_i*x_i or
x_i := A_i**T*x_i or
x_i := A_i**H*x_i,

where (A_i, x_i) is the i-th instance of the batch. x_i is a vector and A_i is an m by m matrix, for i = 1, ..., batch_count.

function mublasDtbmvStridedBatched​

mublasStatus mublasDtbmvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublasDiagType_t diag,
mublas_int m,
mublas_int k,
const double * A,
mublas_int lda,
mublas_stride stride_A,
double * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

function mublasCtbmvStridedBatched​

mublasStatus mublasCtbmvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublasDiagType_t diag,
mublas_int m,
mublas_int k,
const muComplex * A,
mublas_int lda,
mublas_stride stride_A,
muComplex * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

function mublasZtbmvStridedBatched​

mublasStatus mublasZtbmvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublasDiagType_t diag,
mublas_int m,
mublas_int k,
const muDoubleComplex * A,
mublas_int lda,
mublas_stride stride_A,
muDoubleComplex * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

function mublasStbsv​

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

BLAS Level 2 API.

Parameters:

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

tbsv solves

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

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

function mublasDtbsv​

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

function mublasCtbsv​

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

function mublasZtbsv​

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

function mublasStbsvBatched​

mublasStatus mublasStbsvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int n,
mublas_int k,
const float *const A[],
mublas_int lda,
float *const x[],
mublas_int incx,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

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

tbsv_batched solves

A_i*x_i = b_i or A_i**T*x_i = b_i or A_i**H*x_i = b_i,

where x_i and b_i are vectors and A_i is a banded triangular matrix, for i = [1, batch_count].

The input vectors b_i are overwritten by the output vectors x_i.

function mublasDtbsvBatched​

mublasStatus mublasDtbsvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int n,
mublas_int k,
const double *const A[],
mublas_int lda,
double *const x[],
mublas_int incx,
mublas_int batch_count
)

function mublasCtbsvBatched​

mublasStatus mublasCtbsvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int n,
mublas_int k,
const muComplex *const A[],
mublas_int lda,
muComplex *const x[],
mublas_int incx,
mublas_int batch_count
)

function mublasZtbsvBatched​

mublasStatus mublasZtbsvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int n,
mublas_int k,
const muDoubleComplex *const A[],
mublas_int lda,
muDoubleComplex *const x[],
mublas_int incx,
mublas_int batch_count
)

function mublasStbsvStridedBatched​

mublasStatus mublasStbsvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int n,
mublas_int k,
const float * A,
mublas_int lda,
mublas_stride stride_A,
float * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: A_i is an upper triangular matrix. MUBLAS_FILL_MODE_LOWER: A_i is a lower triangular matrix.
  • transA [mublasOperation_t] MUBLAS_OP_N: Solves A_ix_i = b_i MUBLAS_OP_T: Solves A_i**Tx_i = b_i MUBLAS_OP_C: Solves A_i**H*x_i = b_i
  • diag [mublasDiagType_t] MUBLAS_DIAG_UNIT: each A_i is assumed to be unit triangular (i.e. the diagonal elements of each A_i are not used in computations). MUBLAS_DIAG_NON_UNIT: each A_i is not assumed to be unit triangular.
  • n [mublas_int] n specifies the number of rows of each b_i. n >= 0.
  • k [mublas_int] if(uplo == MUBLAS_FILL_MODE_UPPER) k specifies the number of super-diagonals of each A_i. if(uplo == MUBLAS_FILL_MODE_LOWER) k specifies the number of sub-diagonals of each A_i. k >= 0.
  • A device pointer pointing to the first banded matrix A_1.
  • lda [mublas_int] specifies the leading dimension of each A_i. lda >= (k + 1).
  • stride_A [mublas_stride] specifies the distance between the start of one matrix (A_i) and the next (A_i+1).
  • x device pointer pointing to the first input vector b_1. Overwritten by output vectors x.
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • stride_x [mublas_stride] specifies the distance between the start of one vector (x_i) and the next (x_i+1).
  • batch_count [mublas_int] number of instances in the batch.

tbsv_strided_batched solves

A_i*x_i = b_i or A_i**T*x_i = b_i or A_i**H*x_i = b_i,

where x_i and b_i are vectors and A_i is a banded triangular matrix, for i = [1, batch_count].

The input vectors b_i are overwritten by the output vectors x_i.

function mublasDtbsvStridedBatched​

mublasStatus mublasDtbsvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int n,
mublas_int k,
const double * A,
mublas_int lda,
mublas_stride stride_A,
double * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

function mublasCtbsvStridedBatched​

mublasStatus mublasCtbsvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int n,
mublas_int k,
const muComplex * A,
mublas_int lda,
mublas_stride stride_A,
muComplex * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

function mublasZtbsvStridedBatched​

mublasStatus mublasZtbsvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int n,
mublas_int k,
const muDoubleComplex * A,
mublas_int lda,
mublas_stride stride_A,
muDoubleComplex * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

function mublasStrsv​

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

BLAS Level 2 API.

Parameters:

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

trsv solves

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

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

The vector x is overwritten on b.

function mublasDtrsv​

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

function mublasCtrsv​

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

function mublasZtrsv​

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

function mublasStrsvBatched​

mublasStatus mublasStrsvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const float *const A[],
mublas_int lda,
float *const x[],
mublas_int incx,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

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

  • uplo [mublasFillMode_t]: Specifies the triangular part of matrix AA.

    • \text\{MUBLAS\_FILL\_MODE\_UPPER}: AA is an upper triangular matrix.
    • \text\{MUBLAS\_FILL\_MODE\_LOWER}: AA is a lower triangular matrix.
  • transA [mublasOperation_t]: Specifies the operation to be performed on matrix AA (not explicitly defined in your input; consider including specific options such as transposition).

  • diag [mublasDiagType_t]: Specifies the diagonal properties of matrix AA.

    • \text\{MUBLAS\_DIAG\_UNIT}: AA is assumed to be unit triangular (diagonal entries are assumed to be 1).
    • \text\{MUBLAS\_DIAG\_NON\_UNIT}: AA is not assumed to be unit triangular.
  • m [mublas_int]: Specifies the number of rows of vector bb. Must be greater than or equal to 0 (m≥0m \geq 0).

  • A: Device array of device pointers storing each matrix AiA_i.

  • lda [mublas_int]: Specifies the leading dimension of each AiA_i. Must be greater than or equal to max⁡(1,m)\max(1, m).

  • x: Device array of device pointers storing each vector xix_i.

  • incx [mublas_int]: Specifies the increment for the elements of vector xx.

  • batch_count [mublas_int]: Number of instances in the batch.

trsv_batched solves the following systems of equations:

A_i x_i = b_i \quad \text\{or} \quad A_i^T x_i = b_i,

where (Ai,xi,bi)(A_i, x_i, b_i) is the ii-th instance of the batch. Here, xix_i and bib_i are vectors, and AiA_i is an m×mm \times m triangular matrix.

The vector xx is overwritten on bb.

function mublasDtrsvBatched​

mublasStatus mublasDtrsvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const double *const A[],
mublas_int lda,
double *const x[],
mublas_int incx,
mublas_int batch_count
)

function mublasCtrsvBatched​

mublasStatus mublasCtrsvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const muComplex *const A[],
mublas_int lda,
muComplex *const x[],
mublas_int incx,
mublas_int batch_count
)

function mublasZtrsvBatched​

mublasStatus mublasZtrsvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const muDoubleComplex *const A[],
mublas_int lda,
muDoubleComplex *const x[],
mublas_int incx,
mublas_int batch_count
)

function mublasStrsvStridedBatched​

mublasStatus mublasStrsvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const float * A,
mublas_int lda,
mublas_stride stride_A,
float * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: A is an upper triangular matrix. MUBLAS_FILL_MODE_LOWER: A is a lower triangular matrix.
  • transA [mublasOperation_t]
  • diag [mublasDiagType_t] MUBLAS_DIAG_UNIT: A is assumed to be unit triangular. MUBLAS_DIAG_NON_UNIT: A is not assumed to be unit triangular.
  • m [mublas_int] m specifies the number of rows of each b_i. m >= 0.
  • A device pointer to the first matrix (A_1) in the batch, of dimension ( lda, m )
  • stride_A [mublas_stride] stride from the start of one A_i matrix to the next A_(i + 1)
  • lda [mublas_int] specifies the leading dimension of each A_i. lda = max( 1, m ).
  • x device pointer to the first vector (x_1) in the batch.
  • stride_x [mublas_stride] stride from the start of one x_i vector to the next x_(i + 1)
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • batch_count [mublas_int] number of instances in the batch

trsv_strided_batched solves

A_i*x_i = b_i or A_i**T*x_i = b_i,

where (A_i, x_i, b_i) is the i-th instance of the batch. x_i and b_i are vectors and A_i is an m by m triangular matrix, for i = 1, ..., batch_count.

The vector x is overwritten on b.

function mublasDtrsvStridedBatched​

mublasStatus mublasDtrsvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const double * A,
mublas_int lda,
mublas_stride stride_A,
double * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

function mublasCtrsvStridedBatched​

mublasStatus mublasCtrsvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const muComplex * A,
mublas_int lda,
mublas_stride stride_A,
muComplex * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

function mublasZtrsvStridedBatched​

mublasStatus mublasZtrsvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
const muDoubleComplex * A,
mublas_int lda,
mublas_stride stride_A,
muDoubleComplex * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

function mublasStpsv​

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

BLAS Level 2 API.

Parameters:

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

tpsv solves

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

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

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

function mublasDtpsv​

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

function mublasCtpsv​

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

function mublasZtpsv​

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

function mublasStpsvBatched​

mublasStatus mublasStpsvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int n,
const float *const AP[],
float *const x[],
mublas_int incx,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: each A_i is an upper triangular matrix. MUBLAS_FILL_MODE_LOWER: each A_i is a lower triangular matrix.
  • transA [mublasOperation_t] 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: each A_i is assumed to be unit triangular (i.e. the diagonal elements of each A_i are not used in computations). MUBLAS_DIAG_NON_UNIT: each A_i is not assumed to be unit triangular.
  • n [mublas_int] n specifies the number of rows of each b_i. n >= 0.
  • AP device array of device pointers storing the packed versions of each matrix A_i, of dimension >= (n * (n + 1) / 2)
  • x device array of device pointers storing each input vector b_i, overwritten by x_i on output.
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • batch_count [mublas_int] specifies the number of instances in the batch.

tpsv_batched solves

A_i*x_i = b_i or A_i**T*x_i = b_i, or A_i**H*x_i = b_i,

where x_i and b_i are vectors and A_i is a triangular matrix stored in the packed format, for i in [1, batch_count].

The input vectors b_i are overwritten by the output vectors x_i.

function mublasDtpsvBatched​

mublasStatus mublasDtpsvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int n,
const double *const AP[],
double *const x[],
mublas_int incx,
mublas_int batch_count
)

function mublasCtpsvBatched​

mublasStatus mublasCtpsvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int n,
const muComplex *const AP[],
muComplex *const x[],
mublas_int incx,
mublas_int batch_count
)

function mublasZtpsvBatched​

mublasStatus mublasZtpsvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int n,
const muDoubleComplex *const AP[],
muDoubleComplex *const x[],
mublas_int incx,
mublas_int batch_count
)

function mublasStpsvStridedBatched​

mublasStatus mublasStpsvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int n,
const float * AP,
mublas_stride stride_A,
float * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: each A_i is an upper triangular matrix. MUBLAS_FILL_MODE_LOWER: each A_i is a lower triangular matrix.
  • transA [mublasOperation_t] 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: each A_i is assumed to be unit triangular (i.e. the diagonal elements of each A_i are not used in computations). MUBLAS_DIAG_NON_UNIT: each A_i is not assumed to be unit triangular.
  • n [mublas_int] n specifies the number of rows of each b_i. n >= 0.
  • AP device pointer pointing to the first packed matrix A_1, of dimension >= (n * (n + 1) / 2)
  • stride_A [mublas_stride] stride from the beginning of one packed matrix (AP_i) and the next (AP_i+1).
  • x device pointer pointing to the first input vector b_1. Overwritten by each x_i on output.
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • stride_x [mublas_stride] stride from the beginning of one vector (x_i) and the next (x_i+1).
  • batch_count [mublas_int] specifies the number of instances in the batch.

tpsv_strided_batched solves

A_i*x_i = b_i or A_i**T*x_i = b_i, or A_i**H*x_i = b_i,

where x_i and b_i are vectors and A_i is a triangular matrix stored in the packed format, for i in [1, batch_count].

The input vectors b_i are overwritten by the output vectors x_i.

function mublasDtpsvStridedBatched​

mublasStatus mublasDtpsvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int n,
const double * AP,
mublas_stride stride_A,
double * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

function mublasCtpsvStridedBatched​

mublasStatus mublasCtpsvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int n,
const muComplex * AP,
mublas_stride stride_A,
muComplex * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

function mublasZtpsvStridedBatched​

mublasStatus mublasZtpsvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int n,
const muDoubleComplex * AP,
mublas_stride stride_A,
muDoubleComplex * x,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count
)

function mublasSsymv​

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

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t]: handle to the mublas library context queue.
  • uplo [mublasFillMode_t]: specifies whether the upper or lower triangular part of matrix A is used:
    • MUBLAS_FILL_MODE_UPPER: the lower part of A is not referenced.
    • MUBLAS_FILL_MODE_LOWER: the upper part of A is not referenced.
  • n [mublas_int]: specifies the number of elements in vectors x and y.
  • alpha: specifies the scalar α\alpha.
  • A: pointer storing matrix A on the GPU.
  • lda [mublas_int]: specifies the leading dimension of A.
  • x: pointer storing vector x on the GPU.
  • incx [mublas_int]: specifies the increment for the elements of x.
  • beta: specifies the scalar β\beta.
  • y: pointer storing vector y on the GPU.
  • incy [mublas_int]: specifies the increment for the elements of y.

The function symv performs the matrix-vector operation:

y:=αAx+βy,y := \alpha A x + \beta y,

where α\alpha and β\beta are scalars, xx and yy are nn-element vectors, and AA should contain an upper or lower triangular n×nn \times n symmetric matrix.

function mublasDsymv​

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

function mublasCsymv​

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

function mublasZsymv​

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

function mublasSsymvBatched​

mublasStatus mublasSsymvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const float * alpha,
const float *const A[],
mublas_int lda,
const float *const x[],
mublas_int incx,
const float * beta,
float *const y[],
mublas_int incy,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

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

  • uplo [mublasFillMode_t]: Specifies whether the upper or lower part of matrix A is referenced.

    • MUBLAS_FILL_MODE_UPPER: If this option is selected, the lower part of A is not referenced.
    • MUBLAS_FILL_MODE_LOWER: If this option is selected, the upper part of A is not referenced.
  • n [mublas_int]: Number of rows and columns of each matrix AiA_i.

  • alpha: Device pointer or host pointer to scalar α\alpha.

  • A: Device array of device pointers storing each matrix AiA_i.

  • lda [mublas_int]: Specifies the leading dimension of each matrix AiA_i.

  • x: Device array of device pointers storing each vector xix_i.

  • incx [mublas_int]: Specifies the increment for the elements of each vector xix_i.

  • beta: Device pointer or host pointer to scalar β\beta.

  • y: Device array of device pointers storing each vector yiy_i.

  • incy [mublas_int]: Specifies the increment for the elements of each vector yiy_i.

  • batch_count [mublas_int]: Number of instances in the batch.


The symv_batched function performs the matrix-vector operation:

yi:=αAixi+βyi,y_i := \alpha A_i x_i + \beta y_i,

where (Ai,xi,yi)(A_i, x_i, y_i) is the ii-th instance of the batch. α\alpha and β\beta are scalars, xix_i and yiy_i are vectors, and AiA_i is an n×nn \times n symmetric matrix for i = 1, \ldots, \text\{batch\_count}. The matrix AA should contain an upper or lower triangular symmetric matrix, and the opposing triangular part of AA is not referenced.

function mublasDsymvBatched​

mublasStatus mublasDsymvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const double * alpha,
const double *const A[],
mublas_int lda,
const double *const x[],
mublas_int incx,
const double * beta,
double *const y[],
mublas_int incy,
mublas_int batch_count
)

function mublasCsymvBatched​

mublasStatus mublasCsymvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muComplex * alpha,
const muComplex *const A[],
mublas_int lda,
const muComplex *const x[],
mublas_int incx,
const muComplex * beta,
muComplex *const y[],
mublas_int incy,
mublas_int batch_count
)

function mublasZsymvBatched​

mublasStatus mublasZsymvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex *const A[],
mublas_int lda,
const muDoubleComplex *const x[],
mublas_int incx,
const muDoubleComplex * beta,
muDoubleComplex *const y[],
mublas_int incy,
mublas_int batch_count
)

function mublasSsymvStridedBatched​

mublasStatus mublasSsymvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const float * alpha,
const float * A,
mublas_int lda,
mublas_stride strideA,
const float * x,
mublas_int incx,
mublas_stride stridex,
const float * beta,
float * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

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

  • uplo [mublasFillMode_t]: Specifies whether the upper or lower part of matrix A is referenced.

    • MUBLAS_FILL_MODE_UPPER: If this option is selected, the lower part of A is not referenced.
    • MUBLAS_FILL_MODE_LOWER: If this option is selected, the upper part of A is not referenced.
  • n [mublas_int]: Number of rows and columns of each matrix AiA_i.

  • alpha: Device pointer or host pointer to scalar α\alpha.

  • A: Device pointer to the first matrix A1A_1 on the GPU.

  • lda [mublas_int]: Specifies the leading dimension of each matrix AiA_i.

  • strideA [mublas_stride]: Stride from the start of one matrix (AiA_i) to the next one (A_\{i+1}).

  • x: Device pointer to the first vector x1x_1 on the GPU.

  • incx [mublas_int]: Specifies the increment for the elements of each vector xix_i.

  • stridex [mublas_stride]: Stride from the start of one vector (xix_i) to the next one (x_\{i+1}). There are no restrictions placed on stridex, however, the user should take care to ensure that stridex is of appropriate size. This typically means stridex >= n \cdot incx. stridex should be non-zero.

  • beta: Device pointer or host pointer to scalar β\beta.

  • y: Device pointer to the first vector y1y_1 on the GPU.

  • incy [mublas_int]: Specifies the increment for the elements of each vector yiy_i.

  • stridey [mublas_stride]: Stride from the start of one vector (yiy_i) to the next one (y_\{i+1}). There are no restrictions placed on stridey, however, the user should take care to ensure that stridey is of appropriate size. This typically means stridey >= n \cdot incy. stridey should be non-zero.

  • batch_count [mublas_int]: Number of instances in the batch.


The symv_strided_batched function performs the matrix-vector operation:

yi:=αAixi+βyi,y_i := \alpha A_i x_i + \beta y_i,

where (Ai,xi,yi)(A_i, x_i, y_i) is the ii-th instance of the batch. α\alpha and β\beta are scalars, xix_i and yiy_i are vectors, and AiA_i is an n×nn \times n symmetric matrix for i = 1, \ldots, \text\{batch\_count}. The matrix AA should contain an upper or lower triangular symmetric matrix, and the opposing triangular part of AA is not referenced.

function mublasDsymvStridedBatched​

mublasStatus mublasDsymvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const double * alpha,
const double * A,
mublas_int lda,
mublas_stride strideA,
const double * x,
mublas_int incx,
mublas_stride stridex,
const double * beta,
double * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

function mublasCsymvStridedBatched​

mublasStatus mublasCsymvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muComplex * alpha,
const muComplex * A,
mublas_int lda,
mublas_stride strideA,
const muComplex * x,
mublas_int incx,
mublas_stride stridex,
const muComplex * beta,
muComplex * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

function mublasZsymvStridedBatched​

mublasStatus mublasZsymvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex * A,
mublas_int lda,
mublas_stride strideA,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stridex,
const muDoubleComplex * beta,
muDoubleComplex * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

function mublasSspmv​

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

BLAS Level 2 API.

Parameters:

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

  • uplo [mublasFillMode_t]: Specifies whether the upper or lower part of matrix AA is referenced.

    • MUBLAS_FILL_MODE_UPPER: If this option is selected, the lower part of AA is not referenced.
    • MUBLAS_FILL_MODE_LOWER: If this option is selected, the upper part of AA is not referenced.
  • n [mublas_int]: Number of rows and columns of the matrix AA.

  • alpha: Specifies the scalar α\alpha.

  • A: Pointer storing matrix AA on the GPU.

  • x: Pointer storing vector xx on the GPU.

  • incx [mublas_int]: Specifies the increment for the elements of vector xx.

  • beta: Specifies the scalar β\beta.

  • y: Pointer storing vector yy on the GPU.

  • incy [mublas_int]: Specifies the increment for the elements of vector yy.


The spmv function performs the matrix-vector operation:

y:=αAx+βy,y := \alpha A x + \beta y,

where α\alpha and β\beta are scalars, xx and yy are nn-element vectors, and AA should contain an upper or lower triangular n×nn \times n packed symmetric matrix.

function mublasDspmv​

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

function mublasSspmvBatched​

mublasStatus mublasSspmvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const float * alpha,
const float *const A[],
const float *const x[],
mublas_int incx,
const float * beta,
float *const y[],
mublas_int incy,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

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

  • uplo [mublasFillMode_t]: Specifies whether the upper or lower part of matrix AA is referenced.

    • MUBLAS_FILL_MODE_UPPER: If this option is selected, the lower part of AA is not referenced.
    • MUBLAS_FILL_MODE_LOWER: If this option is selected, the upper part of AA is not referenced.
  • n [mublas_int]: Number of rows and columns of each matrix AiA_i.

  • alpha: Device pointer or host pointer to scalar α\alpha.

  • A: Device array of device pointers storing each matrix AiA_i.

  • x: Device array of device pointers storing each vector xix_i.

  • incx [mublas_int]: Specifies the increment for the elements of each vector xix_i.

  • beta: Device pointer or host pointer to scalar β\beta.

  • y: Device array of device pointers storing each vector yiy_i.

  • incy [mublas_int]: Specifies the increment for the elements of each vector yiy_i.

  • batch_count [mublas_int]: Number of instances in the batch.


The spmv_batched function performs the matrix-vector operation:

yi:=αAixi+βyi,y_i := \alpha A_i x_i + \beta y_i,

where (Ai,xi,yi)(A_i, x_i, y_i) is the ii-th instance of the batch. α\alpha and β\beta are scalars, xix_i and yiy_i are vectors, and AiA_i is an n×nn \times n symmetric matrix for i = 1, \ldots, \text\{batch\_count}. AA should contain an upper or lower triangular n×nn \times n packed symmetric matrix.

function mublasDspmvBatched​

mublasStatus mublasDspmvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const double * alpha,
const double *const A[],
const double *const x[],
mublas_int incx,
const double * beta,
double *const y[],
mublas_int incy,
mublas_int batch_count
)

function mublasSspmvStridedBatched​

mublasStatus mublasSspmvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const float * alpha,
const float * A,
mublas_stride strideA,
const float * x,
mublas_int incx,
mublas_stride stridex,
const float * beta,
float * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

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

  • uplo [mublasFillMode_t]: Specifies whether the upper or lower part of matrix AA is referenced.

    • MUBLAS_FILL_MODE_UPPER: If this option is selected, the lower part of AA is not referenced.
    • MUBLAS_FILL_MODE_LOWER: If this option is selected, the upper part of AA is not referenced.
  • n [mublas_int]: Number of rows and columns of each matrix AiA_i.

  • alpha: Device pointer or host pointer to scalar α\alpha.

  • A: Device pointer to the first matrix A1A_1 on the GPU.

  • strideA [mublas_stride]: Stride from the start of one matrix (AiA_i) to the next one (A_\{i+1}).

  • x: Device pointer to the first vector x1x_1 on the GPU.

  • incx [mublas_int]: Specifies the increment for the elements of each vector xix_i.

  • stridex [mublas_stride]: Stride from the start of one vector (xix_i) to the next one (x_\{i+1}). There are no restrictions placed on stridex; however, the user should ensure that stridex is of appropriate size. This typically means stridex \geq n \cdot incx. stridex should be non-zero.

  • beta: Device pointer or host pointer to scalar β\beta.

  • y: Device pointer to the first vector y1y_1 on the GPU.

  • incy [mublas_int]: Specifies the increment for the elements of each vector yiy_i.

  • stridey [mublas_stride]: Stride from the start of one vector (yiy_i) to the next one (y_\{i+1}). There are no restrictions placed on stridey; however, the user should ensure that stridey is of appropriate size. This typically means stridey \geq n \cdot incy$. stridey` should be non-zero.

  • batch_count [mublas_int]: Number of instances in the batch.


The spmv_strided_batched function performs the matrix-vector operation:

yi:=αAixi+βyi,y_i := \alpha A_i x_i + \beta y_i,

where (Ai,xi,yi)(A_i, x_i, y_i) is the ii-th instance of the batch. α\alpha and β\beta are scalars, xix_i and yiy_i are vectors, and AiA_i is an n×nn \times n symmetric matrix for i = 1, \ldots, \text\{batch\_count}. AA should contain an upper or lower triangular n×nn \times n packed symmetric matrix.

function mublasDspmvStridedBatched​

mublasStatus mublasDspmvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const double * alpha,
const double * A,
mublas_stride strideA,
const double * x,
mublas_int incx,
mublas_stride stridex,
const double * beta,
double * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

function mublasSsbmv​

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

BLAS Level 2 API.

Parameters:

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

sbmv performs the matrix-vector operation:

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

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

function mublasDsbmv​

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

function mublasDsbmvBatched​

mublasStatus mublasDsbmvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
mublas_int k,
const double * alpha,
const double *const A[],
mublas_int lda,
const double *const x[],
mublas_int incx,
const double * beta,
double *const y[],
mublas_int incy,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue
  • uplo [mublasFillMode_t] specifies whether the upper 'MUBLAS_FILL_MODE_UPPER' or lower 'MUBLAS_FILL_MODE_LOWER' if MUBLAS_FILL_MODE_UPPER, the lower part of A is not referenced if MUBLAS_FILL_MODE_LOWER, the upper part of A is not referenced
  • n [mublas_int] number of rows and columns of each matrix A_i
  • k [mublas_int] specifies the number of sub- and super-diagonals
  • alpha device pointer or host pointer to scalar alpha
  • A device array of device pointers storing each matrix A_i
  • lda [mublas_int] specifies the leading dimension of each matrix A_i
  • x device array of device pointers storing each vector x_i
  • incx [mublas_int] specifies the increment for the elements of each vector x_i
  • beta device pointer or host pointer to scalar beta
  • y device array of device pointers storing each vector y_i
  • incy [mublas_int] specifies the increment for the elements of each vector y_i
  • batch_count [mublas_int] number of instances in the batch

sbmv_batched performs the matrix-vector operation:

y_i := alpha*A_i*x_i + beta*y_i,

where (A_i, x_i, y_i) is the i-th instance of the batch. alpha and beta are scalars, x_i and y_i are vectors and A_i is an n by n symmetric banded matrix, for i = 1, ..., batch_count. A should contain an upper or lower triangular n by n symmetric banded matrix.

function mublasSsbmvBatched​

mublasStatus mublasSsbmvBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
mublas_int k,
const float * alpha,
const float *const A[],
mublas_int lda,
const float *const x[],
mublas_int incx,
const float * beta,
float *const y[],
mublas_int incy,
mublas_int batch_count
)

function mublasSsbmvStridedBatched​

mublasStatus mublasSsbmvStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
mublas_int k,
const float * alpha,
const float * A,
mublas_int lda,
mublas_stride strideA,
const float * x,
mublas_int incx,
mublas_stride stridex,
const float * beta,
float * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue
  • uplo [mublasFillMode_t] specifies whether the upper 'MUBLAS_FILL_MODE_UPPER' or lower 'MUBLAS_FILL_MODE_LOWER' if MUBLAS_FILL_MODE_UPPER, the lower part of A is not referenced if MUBLAS_FILL_MODE_LOWER, the upper part of A is not referenced
  • n [mublas_int] number of rows and columns of each matrix A_i
  • k [mublas_int] specifies the number of sub- and super-diagonals
  • alpha device pointer or host pointer to scalar alpha
  • A Device pointer to the first matrix A_1 on the GPU
  • lda [mublas_int] specifies the leading dimension of each matrix A_i
  • strideA [mublas_stride] stride from the start of one matrix (A_i) and the next one (A_i+1)
  • x Device pointer to the first vector x_1 on the GPU
  • incx [mublas_int] specifies the increment for the elements of each vector x_i
  • stridex [mublas_stride] stride from the start of one vector (x_i) and the next one (x_i+1). There are no restrictions placed on stridex, however the user should take care to ensure that stridex is of appropriate size. This typically means stridex >= n * incx. stridex should be non zero.
  • beta device pointer or host pointer to scalar beta
  • y Device pointer to the first vector y_1 on the GPU
  • incy [mublas_int] specifies the increment for the elements of each vector y_i
  • stridey [mublas_stride] stride from the start of one vector (y_i) and the next one (y_i+1). There are no restrictions placed on stridey, however the user should take care to ensure that stridey is of appropriate size. This typically means stridey >= n * incy. stridey should be non zero.
  • batch_count [mublas_int] number of instances in the batch

sbmv_strided_batched performs the matrix-vector operation:

y_i := alpha*A_i*x_i + beta*y_i,

where (A_i, x_i, y_i) is the i-th instance of the batch. alpha and beta are scalars, x_i and y_i are vectors and A_i is an n by n symmetric banded matrix, for i = 1, ..., batch_count. A should contain an upper or lower triangular n by n symmetric banded matrix.

function mublasDsbmv_strided_batched​

mublasStatus mublasDsbmv_strided_batched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
mublas_int k,
const double * alpha,
const double * A,
mublas_int lda,
mublas_stride strideA,
const double * x,
mublas_int incx,
mublas_stride stridex,
const double * beta,
double * y,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count
)

function mublasSger​

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

BLAS Level 2 API.

Parameters:

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

ger,geru,gerc performs the matrix-vector operations

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

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

function mublasDger​

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

function mublasCgeru​

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

function mublasZgeru​

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

function mublasCgerc​

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

function mublasZgerc​

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

function mublasSgerBatched​

mublasStatus mublasSgerBatched(
mublasHandle_t handle,
mublas_int m,
mublas_int n,
const float * alpha,
const float *const x[],
mublas_int incx,
const float *const y[],
mublas_int incy,
float *const A[],
mublas_int lda,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • m [mublas_int] the number of rows of each matrix A_i.
  • n [mublas_int] the number of columns of eaceh matrix A_i.
  • alpha device pointer or host pointer to scalar alpha.
  • x device array of device pointers storing each vector x_i.
  • incx [mublas_int] specifies the increment for the elements of each vector x_i.
  • y device array of device pointers storing each vector y_i.
  • incy [mublas_int] specifies the increment for the elements of each vector y_i.
  • A device array of device pointers storing each matrix A_i.
  • lda [mublas_int] specifies the leading dimension of each A_i.
  • batch_count [mublas_int] number of instances in the batch

ger_batched,geru_batched,gerc_batched perform a batch of the matrix-vector operations

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

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

function mublasDgerBatched​

mublasStatus mublasDgerBatched(
mublasHandle_t handle,
mublas_int m,
mublas_int n,
const double * alpha,
const double *const x[],
mublas_int incx,
const double *const y[],
mublas_int incy,
double *const A[],
mublas_int lda,
mublas_int batch_count
)

function mublasCgeruBatched​

mublasStatus mublasCgeruBatched(
mublasHandle_t handle,
mublas_int m,
mublas_int n,
const muComplex * alpha,
const muComplex *const x[],
mublas_int incx,
const muComplex *const y[],
mublas_int incy,
muComplex *const A[],
mublas_int lda,
mublas_int batch_count
)

function mublasZgeruBatched​

mublasStatus mublasZgeruBatched(
mublasHandle_t handle,
mublas_int m,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex *const x[],
mublas_int incx,
const muDoubleComplex *const y[],
mublas_int incy,
muDoubleComplex *const A[],
mublas_int lda,
mublas_int batch_count
)

function mublasCgercBatched​

mublasStatus mublasCgercBatched(
mublasHandle_t handle,
mublas_int m,
mublas_int n,
const muComplex * alpha,
const muComplex *const x[],
mublas_int incx,
const muComplex *const y[],
mublas_int incy,
muComplex *const A[],
mublas_int lda,
mublas_int batch_count
)

function mublasZgercBatched​

mublasStatus mublasZgercBatched(
mublasHandle_t handle,
mublas_int m,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex *const x[],
mublas_int incx,
const muDoubleComplex *const y[],
mublas_int incy,
muDoubleComplex *const A[],
mublas_int lda,
mublas_int batch_count
)

function mublasSgerStridedBatched​

mublasStatus mublasSgerStridedBatched(
mublasHandle_t handle,
mublas_int m,
mublas_int n,
const float * alpha,
const float * x,
mublas_int incx,
mublas_stride stridex,
const float * y,
mublas_int incy,
mublas_stride stridey,
float * A,
mublas_int lda,
mublas_stride strideA,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • m [mublas_int] the number of rows of each matrix A_i.
  • n [mublas_int] the number of columns of each matrix A_i.
  • alpha device pointer or host pointer to scalar alpha.
  • x device pointer to the first vector (x_1) in the batch.
  • incx [mublas_int] specifies the increments for the elements of each vector x_i.
  • stridex [mublas_stride] stride from the start of one vector (x_i) and the next one (x_i+1). There are no restrictions placed on stride_x, however the user should take care to ensure that stride_x is of appropriate size, for a typical case this means stride_x >= m * incx.
  • y device pointer to the first vector (y_1) in the batch.
  • incy [mublas_int] specifies the increment for the elements of each vector y_i.
  • stridey [mublas_stride] stride from the start of one vector (y_i) and the next one (y_i+1). There are no restrictions placed on stride_y, however the user should take care to ensure that stride_y is of appropriate size, for a typical case this means stride_y >= n * incy.
  • A device pointer to the first matrix (A_1) in the batch.
  • lda [mublas_int] specifies the leading dimension of each A_i.
  • strideA [mublas_stride] stride from the start of one matrix (A_i) and the next one (A_i+1)
  • batch_count [mublas_int] number of instances in the batch

ger_strided_batched,geru_strided_batched,gerc_strided_batched performs the matrix-vector operations

A_i := A_i + alpha*x_i*y_i**T, OR
A_i := A_i + alpha*x_i*y_i**H for gerc

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

function mublasDgerStridedBatched​

mublasStatus mublasDgerStridedBatched(
mublasHandle_t handle,
mublas_int m,
mublas_int n,
const double * alpha,
const double * x,
mublas_int incx,
mublas_stride stridex,
const double * y,
mublas_int incy,
mublas_stride stridey,
double * A,
mublas_int lda,
mublas_stride strideA,
mublas_int batch_count
)

function mublasCgeruStridedBatched​

mublasStatus mublasCgeruStridedBatched(
mublasHandle_t handle,
mublas_int m,
mublas_int n,
const muComplex * alpha,
const muComplex * x,
mublas_int incx,
mublas_stride stridex,
const muComplex * y,
mublas_int incy,
mublas_stride stridey,
muComplex * A,
mublas_int lda,
mublas_stride strideA,
mublas_int batch_count
)

function mublasZgeruStridedBatched​

mublasStatus mublasZgeruStridedBatched(
mublasHandle_t handle,
mublas_int m,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stridex,
const muDoubleComplex * y,
mublas_int incy,
mublas_stride stridey,
muDoubleComplex * A,
mublas_int lda,
mublas_stride strideA,
mublas_int batch_count
)

function mublasCgercStridedBatched​

mublasStatus mublasCgercStridedBatched(
mublasHandle_t handle,
mublas_int m,
mublas_int n,
const muComplex * alpha,
const muComplex * x,
mublas_int incx,
mublas_stride stridex,
const muComplex * y,
mublas_int incy,
mublas_stride stridey,
muComplex * A,
mublas_int lda,
mublas_stride strideA,
mublas_int batch_count
)

function mublasZgercStridedBatched​

mublasStatus mublasZgercStridedBatched(
mublasHandle_t handle,
mublas_int m,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stridex,
const muDoubleComplex * y,
mublas_int incy,
mublas_stride stridey,
muDoubleComplex * A,
mublas_int lda,
mublas_stride strideA,
mublas_int batch_count
)

function mublasSspr​

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

BLAS Level 2 API.

Parameters:

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

spr performs the matrix-vector operations

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

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

function mublasDspr​

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

function mublasCspr​

mublasStatus mublasCspr(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muComplex * alpha,
const muComplex * x,
mublas_int incx,
muComplex * AP
)

function mublasZspr​

mublasStatus mublasZspr(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex * x,
mublas_int incx,
muDoubleComplex * AP
)

function mublasSsprBatched​

mublasStatus mublasSsprBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const float * alpha,
const float *const x[],
mublas_int incx,
float *const AP[],
mublas_int batch_count
)

Parameters:

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

  • uplo [mublasFillMode_t]: Specifies whether the upper or lower part of matrix AA is referenced.

    • MUBLAS_FILL_MODE_UPPER: The upper triangular part of each AiA_i is supplied in APAP.
    • MUBLAS_FILL_MODE_LOWER: The lower triangular part of each AiA_i is supplied in APAP.
  • n [mublas_int]: The number of rows and columns of each matrix AiA_i, must be at least 0.

  • alpha: Device pointer or host pointer to scalar α\alpha.

  • x: Device array of device pointers storing each vector xix_i.

  • incx [mublas_int]: Specifies the increment for the elements of each xix_i.

  • AP: Device array of device pointers storing the packed version of the specified triangular portion of each symmetric matrix AiA_i, of at least size \frac\{n(n + 1)}\{2}. The array is of at least size batch_count.

    • If uplo == MUBLAS_FILL_MODE_UPPER: The upper triangular portion of each symmetric matrix AiA_i is supplied. The matrix is compacted so that APAP contains the triangular portion column-by-column:

      • AP(0)=A(0,0)AP(0) = A(0,0)
      • AP(1)=A(0,1)AP(1) = A(0,1)
      • AP(2)=A(1,1)AP(2) = A(1,1), etc.

      Example:

      • For MUBLAS_FILL_MODE_UPPER; n = 4:
      \begin\{bmatrix} 1 & 2 & 4 & 7 \\ 2 & 3 & 5 & 8 \\ 4 & 5 & 6 & 9 \\ 7 & 8 & 9 & 0 \end\{bmatrix} \longrightarrow [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
    • If uplo == MUBLAS_FILL_MODE_LOWER: The lower triangular portion of each symmetric matrix AiA_i is supplied. The matrix is compacted so that APAP contains the triangular portion column-by-column:

      • AP(0)=A(0,0)AP(0) = A(0,0)
      • AP(1)=A(1,0)AP(1) = A(1,0)
      • AP(2)=A(2,1)AP(2) = A(2,1), etc.

      Example:

      • For MUBLAS_FILL_MODE_LOWER; n = 4:
      \begin\{bmatrix} 1 & 2 & 3 & 4 \\ 2 & 5 & 6 & 7 \\ 3 & 6 & 8 & 9 \\ 4 & 7 & 9 & 0 \end\{bmatrix} \longrightarrow [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
  • batch_count [mublas_int]: Number of instances in the batch. console.log('Value of i before line 9241:', i); The spr_batched function performs the matrix-vector operations:

Ai:=Ai+αxixiTA_i := A_i + \alpha x_i x_i^T

where α\alpha is a scalar, xix_i is a vector, and AiA_i is an n×nn \times n symmetric matrix supplied in packed form for i = 1, \ldots, \text\{batch\_count}.

function mublasDsprBatched​

mublasStatus mublasDsprBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const double * alpha,
const double *const x[],
mublas_int incx,
double *const AP[],
mublas_int batch_count
)

function mublasCsprBatched​

mublasStatus mublasCsprBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muComplex * alpha,
const muComplex *const x[],
mublas_int incx,
muComplex *const AP[],
mublas_int batch_count
)

function mublasZsprBatched​

mublasStatus mublasZsprBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex *const x[],
mublas_int incx,
muDoubleComplex *const AP[],
mublas_int batch_count
)

function mublasSsprStridedBatched​

mublasStatus mublasSsprStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const float * alpha,
const float * x,
mublas_int incx,
mublas_stride stride_x,
float * AP,
mublas_stride stride_A,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:​

  • handle (mublasHandle_t): Handle to the mublas library context queue.

  • uplo (mublasFillMode_t): Specifies whether to use the upper or lower triangular part of the symmetric matrices:

    • MUBLAS_FILL_MODE_UPPER: The upper triangular part of each AiA_i is supplied in AP.
    • MUBLAS_FILL_MODE_LOWER: The lower triangular part of each AiA_i is supplied in AP.
  • n (mublas_int): The number of rows and columns of each matrix AiA_i; must be at least 0.

  • alpha: Device pointer or host pointer to the scalar α\alpha.

  • x: Device pointer pointing to the first vector x1x_1.

  • incx (mublas_int): Specifies the increment for the elements of each vector xix_i.

  • stride_x (mublas_stride): Stride from the start of one vector xix_i to the next x_\{i+1}.

  • AP: Device pointer storing the packed version of the specified triangular portion of each symmetric matrix AiA_i. Points to the first A1A_1:

    • If uplo == MUBLAS_FILL_MODE_UPPER: The upper triangular portion of each symmetric matrix AiA_i is supplied. The matrix is compacted so that AP contains the triangular portion column-by-column:

      • AP(0)=A(0,0)AP(0) = A(0,0)
      • AP(1)=A(0,1)AP(1) = A(0,1)
      • AP(2)=A(1,1)AP(2) = A(1,1), etc.

      Example (for MUBLAS_FILL_MODE_UPPER and n=4n = 4):

      \begin\{bmatrix} 1 & 2 & 4 & 7 \\ 2 & 3 & 5 & 8 \\ 4 & 5 & 6 & 9 \\ 7 & 8 & 9 & 0 \end\{bmatrix} \quad \rightarrow \quad [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
    • If uplo == MUBLAS_FILL_MODE_LOWER: The lower triangular portion of each symmetric matrix AiA_i is supplied. The matrix is compacted so that AP contains the triangular portion column-by-column:

      • AP(0)=A(0,0)AP(0) = A(0,0)
      • AP(1)=A(1,0)AP(1) = A(1,0)
      • AP(2)=A(2,1)AP(2) = A(2,1), etc.

      Example (for MUBLAS_FILL_MODE_LOWER and n=4n = 4):

      \begin\{bmatrix} 1 & 2 & 3 & 4 \\ 2 & 5 & 6 & 7 \\ 3 & 6 & 8 & 9 \\ 4 & 7 & 9 & 0 \end\{bmatrix} \quad \rightarrow \quad [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
  • stride_A (mublas_stride): Stride from the start of one matrix AiA_i to the next A_\{i+1}.

  • batch_count (mublas_int): Number of instances in the batch.

Operation​

The function mublasSsprStridedBatched performs the matrix-vector operation:

Ai:=Ai+α⋅xi⋅xiTA_i := A_i + \alpha \cdot x_i \cdot x_i^T

where α\alpha is a scalar, xix_i is a vector, and AiA_i is an n×nn \times n symmetric matrix, supplied in packed form, for i = 1, \ldots, \text\{batch count}.

function mublasDsprStridedBatched​

mublasStatus mublasDsprStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const double * alpha,
const double * x,
mublas_int incx,
mublas_stride stride_x,
double * AP,
mublas_stride stride_A,
mublas_int batch_count
)

function mublasCsprStridedBatched​

mublasStatus mublasCsprStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muComplex * alpha,
const muComplex * x,
mublas_int incx,
mublas_stride stride_x,
muComplex * AP,
mublas_stride stride_A,
mublas_int batch_count
)

function mublasZsprStridedBatched​

mublasStatus mublasZsprStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stride_x,
muDoubleComplex * AP,
mublas_stride stride_A,
mublas_int batch_count
)

function mublasSspr2​

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

BLAS Level 2 API.

Parameters:​

  • handle (mublasHandle_t): Handle to the mublas library context queue.
  • uplo (mublasFillMode_t): Specifies whether to use the upper or lower triangular part of the symmetric matrix:
    • MUBLAS_FILL_MODE_UPPER: The upper triangular part of AA is supplied in AP.
    • MUBLAS_FILL_MODE_LOWER: The lower triangular part of AA is supplied in AP.
  • n (mublas_int): The number of rows and columns of the matrix AA; must be at least 0.
  • alpha: Device pointer or host pointer to the scalar α\alpha.
  • x: Device pointer storing vector xx.
  • incx (mublas_int): Specifies the increment for the elements of xx.
  • y: Device pointer storing vector yy.
  • incy (mublas_int): Specifies the increment for the elements of yy.
  • AP: Device pointer storing the packed version of the specified triangular portion of the symmetric matrix AA, which must be of at least size \frac\{n(n + 1)}\{2}:
    • If uplo == MUBLAS_FILL_MODE_UPPER: The upper triangular portion of the symmetric matrix AA is supplied. The matrix is compacted so that AP contains the triangular portion column-by-column:
      • Example (MUBLAS_FILL_MODE_UPPER; n=4n = 4):
        A = | 1 2 4 7 |
        | 2 3 5 8 |
        | 4 5 6 9 |
        | 7 8 9 0 |
        corresponds to:
        AP = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
    • If uplo == MUBLAS_FILL_MODE_LOWER: The lower triangular portion of the symmetric matrix AA is supplied. The matrix is compacted so that AP contains the triangular portion column-by-column:
      • Example (MUBLAS_FILL_MODE_LOWER; n=4n = 4):
        A = | 1 2 3 4 |
        | 2 5 6 7 |
        | 3 6 8 9 |
        | 4 7 9 0 |
        corresponds to:
        AP = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]

Operation​

The function spr2 performs the matrix-vector operation:

A:=A+α⋅x⋅yT+α⋅y⋅xTA := A + \alpha \cdot x \cdot y^T + \alpha \cdot y \cdot x^T

where α\alpha is a scalar, xx and yy are vectors, and AA is an n×nn \times n symmetric matrix, supplied in packed form.

function mublasDspr2​

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

function mublasSspr2Batched​

mublasStatus mublasSspr2Batched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const float * alpha,
const float *const x[],
mublas_int incx,
const float *const y[],
mublas_int incy,
float *const AP[],
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

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

  • uplo [mublasFillMode_t]: Specifies whether to use the upper or lower triangular part of each AiA_i:

    • MUBLAS_FILL_MODE_UPPER: The upper triangular part of each AiA_i is supplied in AP.
    • MUBLAS_FILL_MODE_LOWER: The lower triangular part of each AiA_i is supplied in AP.
  • n [mublas_int]: The number of rows and columns of each matrix AiA_i; must be at least 0.

  • alpha: Device pointer or host pointer to the scalar α\alpha.

  • x: Device array of device pointers storing each vector xix_i.

  • incx [mublas_int]: Specifies the increment for the elements of each xix_i.

  • y: Device array of device pointers storing each vector yiy_i.

  • incy [mublas_int]: Specifies the increment for the elements of each yiy_i.

  • AP: Device array of device pointers storing the packed version of the specified triangular portion of each symmetric matrix AiA_i, which must be of at least size \frac\{n(n + 1)}\{2}. The array is of at least size batch_count.

    • If uplo == MUBLAS_FILL_MODE_UPPER: The upper triangular portion of each symmetric matrix AiA_i is supplied. The matrix is compacted so that AP contains the triangular portion column-by-column, such that:
      • AP(0)=A(0,0)AP(0) = A(0,0)
      • AP(1)=A(0,1)AP(1) = A(0,1)
      • AP(2)=A(1,1)AP(2) = A(1,1), etc.
      • Example (MUBLAS_FILL_MODE_UPPER; n=4n = 4):
        A = | 1 2 4 7 |
        | 2 3 5 8 |
        | 4 5 6 9 |
        | 7 8 9 0 |
        corresponds to:
        AP = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
    • If uplo == MUBLAS_FILL_MODE_LOWER: The lower triangular portion of each symmetric matrix AiA_i is supplied. The matrix is compacted so that AP contains the triangular portion column-by-column, such that:
      • AP(0)=A(0,0)AP(0) = A(0,0)
      • AP(1)=A(1,0)AP(1) = A(1,0)
      • AP(2)=A(2,0)AP(2) = A(2,0), etc.
      • Example (MUBLAS_FILL_MODE_LOWER; n=4n = 4):
        A = | 1 2 3 4 |
        | 2 5 6 7 |
        | 3 6 8 9 |
        | 4 7 9 0 |
        corresponds to:
        AP = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
  • batch_count [mublas_int]: Number of instances in the batch.

Operation​

The function spr2_batched performs the matrix-vector operation:

Ai:=Ai+α⋅xi⋅yiT+α⋅yi⋅xiTA_i := A_i + \alpha \cdot x_i \cdot y_i^T + \alpha \cdot y_i \cdot x_i^T

where α\alpha is a scalar, xix_i and yiy_i are vectors, and AiA_i is an n×nn \times n symmetric matrix, supplied in packed form, for i = 1, \ldots, \text\{batch\_count}.

function mublasDspr2Batched​

mublasStatus mublasDspr2Batched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const double * alpha,
const double *const x[],
mublas_int incx,
const double *const y[],
mublas_int incy,
double *const AP[],
mublas_int batch_count
)

function mublasSspr2StridedBatched​

mublasStatus mublasSspr2StridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const float * alpha,
const float * x,
mublas_int incx,
mublas_stride stride_x,
const float * y,
mublas_int incy,
mublas_stride stride_y,
float * AP,
mublas_stride stride_A,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

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

  • uplo [mublasFillMode_t]: Specifies whether the upper or lower part of matrix AA is referenced.

    • MUBLAS_FILL_MODE_UPPER: The upper triangular part of each AiA_i is supplied in APAP.
    • MUBLAS_FILL_MODE_LOWER: The lower triangular part of each AiA_i is supplied in APAP.
  • n [mublas_int]: The number of rows and columns of each matrix AiA_i, must be at least 0.

  • alpha: Device pointer or host pointer to scalar α\alpha.

  • x: Device pointer pointing to the first vector (x1x_1).

  • incx [mublas_int]: Specifies the increment for the elements of each xix_i.

  • stride_x [mublas_stride]: Stride from the start of one vector (xix_i) to the next one (x_\{i+1}).

  • y: Device pointer pointing to the first vector (y1y_1).

  • incy [mublas_int]: Specifies the increment for the elements of each yiy_i.

  • stride_y [mublas_stride]: Stride from the start of one vector (yiy_i) to the next one (y_\{i+1}).

  • AP: Device pointer storing the packed version of the specified triangular portion of each symmetric matrix AiA_i. Points to the first A1A_1.

    • If uplo == MUBLAS_FILL_MODE_UPPER: The upper triangular portion of each symmetric matrix AiA_i is supplied. The matrix is compacted so that APAP contains the triangular portion column-by-column:

      • AP(0)=A(0,0)AP(0) = A(0,0)
      • AP(1)=A(0,1)AP(1) = A(0,1)
      • AP(2)=A(1,1)AP(2) = A(1,1), etc.

      Example:

      • For MUBLAS_FILL_MODE_UPPER; n = 4:
      \begin\{bmatrix} 1 & 2 & 4 & 7 \\ 2 & 3 & 5 & 8 \\ 4 & 5 & 6 & 9 \\ 7 & 8 & 9 & 0 \end\{bmatrix} \longrightarrow [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
    • If uplo == MUBLAS_FILL_MODE_LOWER: The lower triangular portion of each symmetric matrix AiA_i is supplied. The matrix is compacted so that APAP contains the triangular portion column-by-column:

      • AP(0)=A(0,0)AP(0) = A(0,0)
      • AP(1)=A(1,0)AP(1) = A(1,0)
      • AP(2)=A(2,1)AP(2) = A(2,1), etc.

      Example:

      • For MUBLAS_FILL_MODE_LOWER; n = 4:
      \begin\{bmatrix} 1 & 2 & 3 & 4 \\ 2 & 5 & 6 & 7 \\ 3 & 6 & 8 & 9 \\ 4 & 7 & 9 & 0 \end\{bmatrix} \longrightarrow [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
  • stride_A [mublas_stride]: Stride from the start of one (AiA_i) to the next one (A_\{i+1}).

  • batch_count [mublas_int]: Number of instances in the batch.


The spr2_strided_batched function performs the matrix-vector operation:

Ai:=Ai+α(xiyiT+yixiT)A_i := A_i + \alpha (x_i y_i^T + y_i x_i^T)

where α\alpha is a scalar, xix_i and yiy_i are vectors, and AiA_i is an $n \tim

function mublasDspr2StridedBatched​

mublasStatus mublasDspr2StridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const double * alpha,
const double * x,
mublas_int incx,
mublas_stride stride_x,
const double * y,
mublas_int incy,
mublas_stride stride_y,
double * AP,
mublas_stride stride_A,
mublas_int batch_count
)

function mublasSsyr​

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

BLAS Level 2 API.

Parameters:

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

syr performs the matrix-vector operations

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

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

function mublasDsyr​

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

function mublasCsyr​

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

function mublasZsyr​

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

function mublasSsyrBatched​

mublasStatus mublasSsyrBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const float * alpha,
const float *const x[],
mublas_int incx,
float *const A[],
mublas_int lda,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

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

syr_batched performs a batch of matrix-vector operations

A[i] := A[i] + alpha*x[i]*x[i]**T

where alpha is a scalar, x is an array of vectors, and A is an array of n by n symmetric matrices, for i = 1 , ... , batch_count

function mublasDsyrBatched​

mublasStatus mublasDsyrBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const double * alpha,
const double *const x[],
mublas_int incx,
double *const A[],
mublas_int lda,
mublas_int batch_count
)

function mublasCsyrBatched​

mublasStatus mublasCsyrBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muComplex * alpha,
const muComplex *const x[],
mublas_int incx,
muComplex *const A[],
mublas_int lda,
mublas_int batch_count
)

function mublasZsyrBatched​

mublasStatus mublasZsyrBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex *const x[],
mublas_int incx,
muDoubleComplex *const A[],
mublas_int lda,
mublas_int batch_count
)

function mublasSsyrStridedBatched​

mublasStatus mublasSsyrStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const float * alpha,
const float * x,
mublas_int incx,
mublas_stride stridex,
float * A,
mublas_int lda,
mublas_stride strideA,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] specifies whether the upper 'MUBLAS_FILL_MODE_UPPER' or lower 'MUBLAS_FILL_MODE_LOWER' if MUBLAS_FILL_MODE_UPPER, the lower part of A is not referenced if MUBLAS_FILL_MODE_LOWER, the upper part of A is not referenced
  • n [mublas_int] the number of rows and columns of each matrix A.
  • alpha device pointer or host pointer to scalar alpha.
  • x device pointer to the first vector x_1.
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • stridex [mublas_stride] specifies the pointer increment between vectors (x_i) and (x_i+1).
  • A device pointer to the first matrix A_1.
  • lda [mublas_int] specifies the leading dimension of each A_i.
  • strideA [mublas_stride] stride from the start of one matrix (A_i) and the next one (A_i+1)
  • batch_count [mublas_int] number of instances in the batch

syr_strided_batched performs the matrix-vector operations

A[i] := A[i] + alpha*x[i]*x[i]**T

where alpha is a scalar, vectors, and A is an array of n by n symmetric matrices, for i = 1 , ... , batch_count

function mublasDsyrStridedBatched​

mublasStatus mublasDsyrStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const double * alpha,
const double * x,
mublas_int incx,
mublas_stride stridex,
double * A,
mublas_int lda,
mublas_stride strideA,
mublas_int batch_count
)

function mublasCsyrStridedBatched​

mublasStatus mublasCsyrStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muComplex * alpha,
const muComplex * x,
mublas_int incx,
mublas_stride stridex,
muComplex * A,
mublas_int lda,
mublas_stride strideA,
mublas_int batch_count
)

function mublasZsyrStridedBatched​

mublasStatus mublasZsyrStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stridex,
muDoubleComplex * A,
mublas_int lda,
mublas_stride strideA,
mublas_int batch_count
)

function mublasSsyr2​

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

BLAS Level 2 API.

Parameters:

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

syr2 performs the matrix-vector operations

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

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

function mublasDsyr2​

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

function mublasCsyr2​

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

function mublasZsyr2​

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

function mublasSsyr2Batched​

mublasStatus mublasSsyr2Batched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const float * alpha,
const float *const x[],
mublas_int incx,
const float *const y[],
mublas_int incy,
float *const A[],
mublas_int lda,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

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

syr2_batched performs a batch of matrix-vector operations

A[i] := A[i] + alpha*x[i]*y[i]**T + alpha*y[i]*x[i]**T

where alpha is a scalar, x[i] and y[i] are vectors, and A[i] is a n by n symmetric matrix, for i = 1 , ... , batch_count

function mublasDsyr2Batched​

mublasStatus mublasDsyr2Batched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const double * alpha,
const double *const x[],
mublas_int incx,
const double *const y[],
mublas_int incy,
double *const A[],
mublas_int lda,
mublas_int batch_count
)

function mublasCsyr2Batched​

mublasStatus mublasCsyr2Batched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muComplex * alpha,
const muComplex *const x[],
mublas_int incx,
const muComplex *const y[],
mublas_int incy,
muComplex *const A[],
mublas_int lda,
mublas_int batch_count
)

function mublasZsyr2Batched​

mublasStatus mublasZsyr2Batched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex *const x[],
mublas_int incx,
const muDoubleComplex *const y[],
mublas_int incy,
muDoubleComplex *const A[],
mublas_int lda,
mublas_int batch_count
)

function mublasSsyr2StridedBatched​

mublasStatus mublasSsyr2StridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const float * alpha,
const float * x,
mublas_int incx,
mublas_stride stridex,
const float * y,
mublas_int incy,
mublas_stride stridey,
float * A,
mublas_int lda,
mublas_stride strideA,
mublas_int batch_count
)

BLAS Level 2 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] specifies whether the upper 'MUBLAS_FILL_MODE_UPPER' or lower 'MUBLAS_FILL_MODE_LOWER' if MUBLAS_FILL_MODE_UPPER, the lower part of A is not referenced if MUBLAS_FILL_MODE_LOWER, the upper part of A is not referenced
  • n [mublas_int] the number of rows and columns of each matrix A.
  • alpha device pointer or host pointer to scalar alpha.
  • x device pointer to the first vector x_1.
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • stridex [mublas_stride] specifies the pointer increment between vectors (x_i) and (x_i+1).
  • y device pointer to the first vector y_1.
  • incy [mublas_int] specifies the increment for the elements of each y_i.
  • stridey [mublas_stride] specifies the pointer increment between vectors (y_i) and (y_i+1).
  • A device pointer to the first matrix A_1.
  • lda [mublas_int] specifies the leading dimension of each A_i.
  • strideA [mublas_stride] stride from the start of one matrix (A_i) and the next one (A_i+1)
  • batch_count [mublas_int] number of instances in the batch

syr2_strided_batched the matrix-vector operations

A[i] := A[i] + alpha*x[i]*y[i]**T + alpha*y[i]*x[i]**T

where alpha is a scalar, x[i] and y[i] are vectors, and A[i] is a n by n symmetric matrices, for i = 1 , ... , batch_count

function mublasDsyr2StridedBatched​

mublasStatus mublasDsyr2StridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const double * alpha,
const double * x,
mublas_int incx,
mublas_stride stridex,
const double * y,
mublas_int incy,
mublas_stride stridey,
double * A,
mublas_int lda,
mublas_stride strideA,
mublas_int batch_count
)

function mublasCsyr2StridedBatched​

mublasStatus mublasCsyr2StridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muComplex * alpha,
const muComplex * x,
mublas_int incx,
mublas_stride stridex,
const muComplex * y,
mublas_int incy,
mublas_stride stridey,
muComplex * A,
mublas_int lda,
mublas_stride strideA,
mublas_int batch_count
)

function mublasZsyr2StridedBatched​

mublasStatus mublasZsyr2StridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stridex,
const muDoubleComplex * y,
mublas_int incy,
mublas_stride stridey,
muDoubleComplex * A,
mublas_int lda,
mublas_stride strideA,
mublas_int batch_count
)

function mublasChemm​

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

BLAS Level 3 API.

Parameters:

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

hemm performs one of the matrix-matrix operations:

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

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

function mublasZhemm​

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

function mublasChemmBatched​

mublasStatus mublasChemmBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublas_int m,
mublas_int n,
const muComplex * alpha,
const muComplex *const A[],
mublas_int lda,
const muComplex *const B[],
mublas_int ldb,
const muComplex * beta,
muComplex *const C[],
mublas_int ldc,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

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

  • side [mublasSideMode_t]:

    • MUBLAS_SIDE_LEFT: Ci:=αAiBi+βCiC_i := \alpha A_i B_i + \beta C_i
    • MUBLAS_SIDE_RIGHT: Ci:=αBiAi+βCiC_i := \alpha B_i A_i + \beta C_i
  • uplo [mublasFillMode_t]:

    • MUBLAS_FILL_MODE_UPPER: AiA_i is an upper triangular matrix.
    • MUBLAS_FILL_MODE_LOWER: AiA_i is a lower triangular matrix.
  • m [mublas_int]: Specifies the number of rows of BiB_i and CiC_i. m≥0m \geq 0.

  • n [mublas_int]: Specifies the number of columns of BiB_i and CiC_i. n≥0n \geq 0.

  • alpha: Specifies the scalar α\alpha. When α\alpha is zero, then AiA_i and BiB_i are not referenced.

  • A: Device array of device pointers storing each matrix AiA_i on the GPU.

    • AiA_i is m×mm \times m if side == MUBLAS_SIDE_LEFT.
    • AiA_i is n×nn \times n if side == MUBLAS_SIDE_RIGHT.
    • Only the upper/lower triangular part is accessed. The imaginary component of the diagonal elements is not used.
  • lda [mublas_int]: Specifies the first dimension of AiA_i.

    • If side = MUBLAS_SIDE_LEFT, \text\{lda} \geq \max(1, m), otherwise \text\{lda} \geq \max(1, n).
  • B: Device array of device pointers storing each matrix BiB_i on the GPU. Matrix dimension is m×nm \times n.

  • ldb [mublas_int]: Specifies the first dimension of BiB_i. \text\{ldb} \geq \max(1, m).

  • beta: Specifies the scalar β\beta. When β\beta is zero, then CiC_i need not be set before entry.

  • C: Device array of device pointers storing each matrix CiC_i on the GPU. Matrix dimension is m×nm \times n.

  • ldc [mublas_int]: Specifies the first dimension of CiC_i. \text\{ldc} \geq \max(1, m).

  • batch_count [mublas_int]: Number of instances in the batch.


The hemm_batched function performs a batch of the matrix-matrix operations:

C_i := \alpha A_i B_i + \beta C_i \quad \text\{if } \text\{side} == \text\{MUBLAS\_SIDE\_LEFT} C_i := \alpha B_i A_i + \beta C_i \quad \text\{if } \text\{side} == \text\{MUBLAS\_SIDE\_RIGHT}

where α\alpha and β\beta are scalars, BiB_i and CiC_i are m×nm \times n matrices, and AiA_i is a Hermitian matrix stored as either upper or lower.

function mublasZhemmBatched​

mublasStatus mublasZhemmBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublas_int m,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex *const A[],
mublas_int lda,
const muDoubleComplex *const B[],
mublas_int ldb,
const muDoubleComplex * beta,
muDoubleComplex *const C[],
mublas_int ldc,
mublas_int batch_count
)

function mublasChemmStridedBatched​

mublasStatus mublasChemmStridedBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublas_int m,
mublas_int n,
const muComplex * alpha,
const muComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muComplex * B,
mublas_int ldb,
mublas_stride stride_B,
const muComplex * beta,
muComplex * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

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

  • side [mublasSideMode_t]:

    • MUBLAS_SIDE_LEFT: Ci:=αAiBi+βCiC_i := \alpha A_i B_i + \beta C_i
    • MUBLAS_SIDE_RIGHT: Ci:=αBiAi+βCiC_i := \alpha B_i A_i + \beta C_i
  • uplo [mublasFillMode_t]:

    • MUBLAS_FILL_MODE_UPPER: AiA_i is an upper triangular matrix.
    • MUBLAS_FILL_MODE_LOWER: AiA_i is a lower triangular matrix.
  • m [mublas_int]: Specifies the number of rows of BiB_i and CiC_i. m≥0m \geq 0.

  • n [mublas_int]: Specifies the number of columns of BiB_i and CiC_i. n≥0n \geq 0.

  • alpha: Specifies the scalar α\alpha. When α\alpha is zero, then AiA_i and BiB_i are not referenced.

  • A: Device pointer to the first matrix A1A_1.

    • AiA_i is m×mm \times m if side == MUBLAS_SIDE_LEFT.
    • AiA_i is n×nn \times n if side == MUBLAS_SIDE_RIGHT.
    • Only the upper/lower triangular part is accessed. The imaginary component of the diagonal elements is not used.
  • lda [mublas_int]: Specifies the first dimension of AiA_i.

    • If side = MUBLAS_SIDE_LEFT, \text\{lda} \geq \max(1, m); otherwise, \text\{lda} \geq \max(1, n).
  • stride_A [mublas_stride]: Stride from the start of one matrix (AiA_i) to the next (A_\{i+1}).

  • B: Device pointer to the first matrix B1B_1 of dimension (\text\{ldb}, n) on the GPU.

  • ldb [mublas_int]: Specifies the first dimension of BiB_i.

    • If `side = MUBLAS_OP_N,, \text{ldb} \geq \max(1, m);otherwise,; otherwise, \text{ldb} \geq \max(1, n)$.
  • stride_B [mublas_stride]: Stride from the start of one matrix (BiB_i) to the next (B_\{i+1}).

  • beta: Specifies the scalar β\beta. When β\beta is zero, then CC need not be set before entry.

  • C: Device pointer to the first matrix C1C_1 of dimension (\text\{ldc}, n) on the GPU.

  • ldc [mublas_int]: Specifies the first dimension of CC. \text\{ldc} \geq \max(1, m).

  • stride_C [mublas_stride]: Stride from the start of one matrix (CiC_i) to the next (C_\{i+1}).

  • batch_count [mublas_int]: Number of instances in the batch.


The hemm_strided_batched function performs a batch of the matrix-matrix operations:

C_i := \alpha A_i B_i + \beta C_i \quad \text\{if } \text\{side} == \text\{MUBLAS\_SIDE\_LEFT} C_i := \alpha B_i A_i + \beta C_i \quad \text\{if } \text\{side} == \text\{MUBLAS\_SIDE\_RIGHT}

where α\alpha and β\beta are scalars, BiB_i and CiC_i are m×nm \times n matrices, and AiA_i is a Hermitian matrix stored as either upper or lower.

function mublasZhemmStridedBatched​

mublasStatus mublasZhemmStridedBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublas_int m,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muDoubleComplex * B,
mublas_int ldb,
mublas_stride stride_B,
const muDoubleComplex * beta,
muDoubleComplex * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasCherk​

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

BLAS Level 3 API.

Parameters:

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

  • uplo [mublasFillMode_t]:

    • MUBLAS_FILL_MODE_UPPER: CC is an upper triangular matrix.
    • MUBLAS_FILL_MODE_LOWER: CC is a lower triangular matrix.
  • transA [mublasOperation_t]:

    • MUBLAS_OP_C: op(A)=AHop(A) = A^H
    • MUBLAS_OP_N: op(A)=Aop(A) = A
  • n [mublas_int]: Specifies the number of rows and columns of CC. n≥0n \geq 0.

  • k [mublas_int]: Specifies the number of columns of op(A)op(A). k≥0k \geq 0.

  • alpha: Specifies the scalar α\alpha. When α\alpha is zero, then AA is not referenced and AA need not be set before entry.

  • A: Pointer storing matrix AA on the GPU.

    • Matrix dimension is (\text\{lda}, k) when transA = MUBLAS_OP_N, otherwise (\text\{lda}, n).
    • Only the upper/lower triangular part is accessed.
  • lda [mublas_int]: Specifies the first dimension of AA.

    • If `transA = MUBLAS_OP_N,, \text{lda} \geq \max(1, n);otherwise,; otherwise, \text{lda} \geq \max(1, k)$.
  • beta: Specifies the scalar β\beta. When β\beta is zero, then CC need not be set before entry.

  • C: Pointer storing matrix CC on the GPU. The imaginary component of the diagonal elements is not used but is set to zero unless a quick return.

  • ldc [mublas_int]: Specifies the first dimension of CC. \text\{ldc} \geq \max(1, n).


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

C:=α⋅op(A)⋅op(A)H+β⋅CC := \alpha \cdot op(A) \cdot op(A)^H + \beta \cdot C

where α\alpha and β\beta are scalars, op(A)op(A) is an n×kn \times k matrix, and CC is an n×nn \times n Hermitian matrix stored as either upper or lower.

  • op(A)=Aop(A) = A, and AA is n×kn \times k if `transA == MUBLAS_OP_N$
  • op(A)=AHop(A) = A^H, and AA is k×nk \times n if `transA == MUBLAS_OP_C$

function mublasZherk​

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

function mublasCherkBatched​

mublasStatus mublasCherkBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublas_int n,
mublas_int k,
const float * alpha,
const muComplex *const A[],
mublas_int lda,
const float * beta,
muComplex *const C[],
mublas_int ldc,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

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

  • uplo [mublasFillMode_t]:

    • MUBLAS_FILL_MODE_UPPER: CiC_i is an upper triangular matrix.
    • MUBLAS_FILL_MODE_LOWER: CiC_i is a lower triangular matrix.
  • transA [mublasOperation_t]:

    • MUBLAS_OP_C: op(A)=AHop(A) = A^H
    • MUBLAS_OP_N: op(A)=Aop(A) = A
  • n [mublas_int]: Specifies the number of rows and columns of CiC_i. n≥0n \geq 0.

  • k [mublas_int]: Specifies the number of columns of op(A)op(A). k≥0k \geq 0.

  • alpha: Specifies the scalar α\alpha. When α\alpha is zero, then AA is not referenced and AA need not be set before entry.

  • A: Device array of device pointers storing each matrix AiA_i of dimension (\text\{lda}, k) when transA is MUBLAS_OP_N, otherwise of dimension (\text\{lda}, n).

  • lda [mublas_int]: Specifies the first dimension of AiA_i.

    • If `transA = MUBLAS_OP_N,, \text{lda} \geq \max(1, n);otherwise,; otherwise, \text{lda} \geq \max(1, k)$.
  • beta: Specifies the scalar β\beta. When β\beta is zero, then CC need not be set before entry.

  • C: Device array of device pointers storing each matrix CiC_i on the GPU. The imaginary component of the diagonal elements is not used but is set to zero unless a quick return.

  • ldc [mublas_int]: Specifies the first dimension of CC. \text\{ldc} \geq \max(1, n).

  • batch_count [mublas_int]: Number of instances in the batch.


The herk_batched function performs a batch of the matrix-matrix operations for a Hermitian rank-k update:

Ci:=α⋅op(Ai)⋅op(Ai)H+β⋅CiC_i := \alpha \cdot op(A_i) \cdot op(A_i)^H + \beta \cdot C_i

where α\alpha and β\beta are scalars, op(A)op(A) is an n×kn \times k matrix, and CiC_i is an n×nn \times n Hermitian matrix stored as either upper or lower.

  • op(Ai)=Aiop(A_i) = A_i, and AiA_i is n×kn \times k if transA == MUBLAS_OP_N
  • op(Ai)=AiHop(A_i) = A_i^H, and AiA_i is k×nk \times n if transA == MUBLAS_OP_C

function mublasZherkBatched​

mublasStatus mublasZherkBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublas_int n,
mublas_int k,
const double * alpha,
const muDoubleComplex *const A[],
mublas_int lda,
const double * beta,
muDoubleComplex *const C[],
mublas_int ldc,
mublas_int batch_count
)

function mublasCherkStridedBatched​

mublasStatus mublasCherkStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublas_int n,
mublas_int k,
const float * alpha,
const muComplex * A,
mublas_int lda,
mublas_stride stride_A,
const float * beta,
muComplex * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

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

  • uplo [mublasFillMode_t]:

    • MUBLAS_FILL_MODE_UPPER: CiC_i is an upper triangular matrix.
    • MUBLAS_FILL_MODE_LOWER: CiC_i is a lower triangular matrix.
  • transA [mublasOperation_t]:

    • MUBLAS_OP_C: op(A)=AHop(A) = A^H
    • MUBLAS_OP_N: op(A)=Aop(A) = A
  • n [mublas_int]: Specifies the number of rows and columns of CiC_i. n≥0n \geq 0.

  • k [mublas_int]: Specifies the number of columns of op(A)op(A). k≥0k \geq 0.

  • alpha: Specifies the scalar α\alpha. When α\alpha is zero, then AA is not referenced and AA need not be set before entry.

  • A: Device pointer to the first matrix A1A_1 on the GPU of dimension (\text\{lda}, k) when transA is MUBLAS_OP_N, otherwise of dimension (\text\{lda}, n).

  • lda [mublas_int]: Specifies the first dimension of AiA_i.

    • If `transA = MUBLAS_OP_N,, \text{lda} \geq \max(1, n);otherwise,; otherwise, \text{lda} \geq \max(1, k)$.
  • stride_A [mublas_stride]: Stride from the start of one matrix (AiA_i) to the next one (A_\{i+1}).

  • beta: Specifies the scalar β\beta. When β\beta is zero, then CC need not be set before entry.

  • C: Device pointer to the first matrix C1C_1 on the GPU. The imaginary component of the diagonal elements is not used but is set to zero unless a quick return.

  • ldc [mublas_int]: Specifies the first dimension of CC. \text\{ldc} \geq \max(1, n).

  • stride_C [mublas_stride]: Stride from the start of one matrix (CiC_i) to the next one (C_\{i+1}).

  • batch_count [mublas_int]: Number of instances in the batch.


The herk_strided_batched function performs a batch of the matrix-matrix operations for a Hermitian rank-k update:

Ci:=α⋅op(Ai)⋅op(Ai)H+β⋅CiC_i := \alpha \cdot op(A_i) \cdot op(A_i)^H + \beta \cdot C_i

where α\alpha and β\beta are scalars, op(A)op(A) is an n×kn \times k matrix, and CiC_i is an n×nn \times n Hermitian matrix stored as either upper or lower.

  • op(Ai)=Aiop(A_i) = A_i, and AiA_i is n×kn \times k if transA == MUBLAS_OP_N
  • op(Ai)=AiHop(A_i) = A_i^H, and AiA_i is k×nk \times n if transA == MUBLAS_OP_C

function mublasZherkStridedBatched​

mublasStatus mublasZherkStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublas_int n,
mublas_int k,
const double * alpha,
const muDoubleComplex * A,
mublas_int lda,
mublas_stride stride_A,
const double * beta,
muDoubleComplex * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasCher2k​

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

BLAS Level 3 API.

Parameters:

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

  • uplo [mublasFillMode_t]:

    • MUBLAS_FILL_MODE_UPPER: CC is an upper triangular matrix.
    • MUBLAS_FILL_MODE_LOWER: CC is a lower triangular matrix.
  • trans [mublasOperation_t]:

    • MUBLAS_OP_C: op(A)=AHop(A) = A^H, op(B)=BHop(B) = B^H
    • MUBLAS_OP_N: op(A)=Aop(A) = A, op(B)=Bop(B) = B
  • n [mublas_int]: Specifies the number of rows and columns of CC. n≥0n \geq 0.

  • k [mublas_int]: Specifies the number of columns of op(A)op(A). k≥0k \geq 0.

  • alpha: Specifies the scalar α\alpha. When α\alpha is zero, then AA is not referenced and AA need not be set before entry.

  • A: Pointer storing matrix AA on the GPU. Matrix dimension is (\text\{lda}, k) when trans = MUBLAS_OP_N, otherwise (\text\{lda}, n), accessing only the upper/lower triangular part.

  • lda [mublas_int]: Specifies the first dimension of AA.

    • If `trans = MUBLAS_OP_N,, \text{lda} \geq \max(1, n);otherwise,; otherwise, \text{lda} \geq \max(1, k)$.
  • B: Pointer storing matrix BB on the GPU. Matrix dimension is (\text\{ldb}, k) when trans = MUBLAS_OP_N, otherwise (\text\{ldb}, n), accessing only the upper/lower triangular part.

  • ldb [mublas_int]: Specifies the first dimension of BB.

    • If `trans = MUBLAS_OP_N,, \text{ldb} \geq \max(1, n);otherwise,; otherwise, \text{ldb} \geq \max(1, k)$.
  • beta: Specifies the scalar β\beta. When β\beta is zero, then CC need not be set before entry.

  • C: Pointer storing matrix CC on the GPU. The imaginary component of the diagonal elements is not used but is set to zero unless a quick return.

  • ldc [mublas_int]: Specifies the first dimension of CC. \text\{ldc} \geq \max(1, n).


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

C := \alpha \cdot op(A) \cdot op(B)^H + \overline\{\alpha} \cdot op(B) \cdot op(A)^H + \beta \cdot C

where α\alpha and β\beta are scalars, op(A)op(A) and op(B)op(B) are n×kn \times k matrices, and CC is an n×nn \times n Hermitian matrix stored as either upper or lower.

  • op(A)=Aop(A) = A, op(B)=Bop(B) = B, and AA and BB are n×kn \times k if trans == MUBLAS_OP_N
  • op(A)=AHop(A) = A^H, op(B)=BHop(B) = B^H, and AA and BB are k×nk \times n if trans == MUBLAS_OP_C

function mublasZher2k​

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

function mublasCher2kBatched​

mublasStatus mublasCher2kBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const muComplex * alpha,
const muComplex *const A[],
mublas_int lda,
const muComplex *const B[],
mublas_int ldb,
const float * beta,
muComplex *const C[],
mublas_int ldc,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

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

  • uplo [mublasFillMode_t]:

    • MUBLAS_FILL_MODE_UPPER: CiC_i is an upper triangular matrix.
    • MUBLAS_FILL_MODE_LOWER: CiC_i is a lower triangular matrix.
  • trans [mublasOperation_t]:

    • MUBLAS_OP_C: op(A)=AHop(A) = A^H
    • MUBLAS_OP_N: op(A)=Aop(A) = A
  • n [mublas_int]: Specifies the number of rows and columns of CiC_i. n≥0n \geq 0.

  • k [mublas_int]: Specifies the number of columns of op(A)op(A). k≥0k \geq 0.

  • alpha: Specifies the scalar α\alpha. When α\alpha is zero, then AA is not referenced and AA need not be set before entry.

  • A: Device array of device pointers storing each matrix AiA_i of dimension (\text\{lda}, k) when trans is MUBLAS_OP_N, otherwise of dimension (\text\{lda}, n).

  • lda [mublas_int]: Specifies the first dimension of AiA_i.

    • If `trans = MUBLAS_OP_N,, \text{lda} \geq \max(1, n);otherwise,; otherwise, \text{lda} \geq \max(1, k)$.
  • B: Device array of device pointers storing each matrix BiB_i of dimension (\text\{ldb}, k) when trans is MUBLAS_OP_N, otherwise of dimension (\text\{ldb}, n).

  • ldb [mublas_int]: Specifies the first dimension of BiB_i.

    • If `trans = MUBLAS_OP_N,, \text{ldb} \geq \max(1, n);otherwise,; otherwise, \text{ldb} \geq \max(1, k)$.
  • beta: Specifies the scalar β\beta. When β\beta is zero, then CC need not be set before entry.

  • C: Device array of device pointers storing each matrix CiC_i on the GPU. The imaginary component of the diagonal elements is not used but is set to zero unless a quick return.

  • ldc [mublas_int]: Specifies the first dimension of CC. \text\{ldc} \geq \max(1, n).

  • batch_count [mublas_int]: Number of instances in the batch.


The her2k_batched function performs a batch of the matrix-matrix operations for a Hermitian rank-2k update:

C_i := \alpha \cdot op(A_i) \cdot op(B_i)^H + \overline\{\alpha} \cdot op(B_i) \cdot op(A_i)^H + \beta \cdot C_i

where α\alpha and β\beta are scalars, op(Ai)op(A_i) and op(Bi)op(B_i) are n×kn \times k matrices, and CiC_i is an n×nn \times n Hermitian matrix stored as either upper or lower.

  • op(Ai)=Aiop(A_i) = A_i, op(Bi)=Biop(B_i) = B_i, and AiA_i and BiB_i are n×kn \times k if trans == MUBLAS_OP_N
  • op(Ai)=AiHop(A_i) = A_i^H, op(Bi)=BiHop(B_i) = B_i^H, and AiA_i and BiB_i are k×nk \times n if trans == MUBLAS_OP_C

function mublasZher2kBatched​

mublasStatus mublasZher2kBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const muDoubleComplex * alpha,
const muDoubleComplex *const A[],
mublas_int lda,
const muDoubleComplex *const B[],
mublas_int ldb,
const double * beta,
muDoubleComplex *const C[],
mublas_int ldc,
mublas_int batch_count
)

function mublasCher2kStridedBatched​

mublasStatus mublasCher2kStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const muComplex * alpha,
const muComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muComplex * B,
mublas_int ldb,
mublas_stride stride_B,
const float * beta,
muComplex * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

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

  • uplo [mublasFillMode_t]:

    • MUBLAS_FILL_MODE_UPPER: CiC_i is an upper triangular matrix.
    • MUBLAS_FILL_MODE_LOWER: CiC_i is a lower triangular matrix.
  • trans [mublasOperation_t]:

    • MUBLAS_OP_C: op(Ai)=AiHop(A_i) = A_i^H, op(Bi)=BiHop(B_i) = B_i^H
    • MUBLAS_OP_N: op(Ai)=Aiop(A_i) = A_i, op(Bi)=Biop(B_i) = B_i
  • n [mublas_int]: Specifies the number of rows and columns of CiC_i. n≥0n \geq 0.

  • k [mublas_int]: Specifies the number of columns of op(A)op(A). k≥0k \geq 0.

  • alpha: Specifies the scalar α\alpha. When α\alpha is zero, then AA is not referenced and AA need not be set before entry.

  • A: Device pointer to the first matrix A1A_1 on the GPU of dimension (\text\{lda}, k) when trans is MUBLAS_OP_N, otherwise of dimension (\text\{lda}, n).

  • lda [mublas_int]: Specifies the first dimension of AiA_i.

    • If trans = MUBLAS_OP_N, \text\{lda} \geq \max(1, n); otherwise, \text\{lda} \geq \max(1, k).
  • stride_A [mublas_stride]: Stride from the start of one matrix (AiA_i) to the next one (A_\{i+1}).

  • B: Device pointer to the first matrix B1B_1 on the GPU of dimension (\text\{ldb}, k) when trans is MUBLAS_OP_N, otherwise of dimension (\text\{ldb}, n).

  • ldb [mublas_int]: Specifies the first dimension of BiB_i.

    • If `trans = MUBLAS_OP_N,, \text{ldb} \geq \max(1, n);otherwise,; otherwise, \text{ldb} \geq \max(1, k)$.
  • stride_B [mublas_stride]: Stride from the start of one matrix (BiB_i) to the next one (B_\{i+1}).

  • beta: Specifies the scalar β\beta. When β\beta is zero, then CC need not be set before entry.

  • C: Device pointer to the first matrix C1C_1 on the GPU. The imaginary component of the diagonal elements is not used but is set to zero unless a quick return.

  • ldc [mublas_int]: Specifies the first dimension of CC. \text\{ldc} \geq \max(1, n).

  • stride_C [mublas_stride]: Stride from the start of one matrix (CiC_i) to the next one (C_\{i+1}).

  • batch_count [mublas_int]: Number of instances in the batch.


The her2k_strided_batched function performs a batch of the matrix-matrix operations for a Hermitian rank-2k update:

C_i := \alpha \cdot op(A_i) \cdot op(B_i)^H + \overline\{\alpha} \cdot op(B_i) \cdot op(A_i)^H + \beta \cdot C_i

where α\alpha and β\beta are scalars, op(Ai)op(A_i) and op(Bi)op(B_i) are n×kn \times k matrices, and CiC_i is an n×nn \times n Hermitian matrix stored as either upper or lower.

  • op(Ai)=Aiop(A_i) = A_i, op(Bi)=Biop(B_i) = B_i, and AiA_i and BiB_i are n×kn \times k if trans == MUBLAS_OP_N
  • op(Ai)=AiHop(A_i) = A_i^H, op(Bi)=BiHop(B_i) = B_i^H, and AiA_i and BiB_i are k×nk \times n if trans == MUBLAS_OP_C

function mublasZher2kStridedBatched​

mublasStatus mublasZher2kStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const muDoubleComplex * alpha,
const muDoubleComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muDoubleComplex * B,
mublas_int ldb,
mublas_stride stride_B,
const double * beta,
muDoubleComplex * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasCherkx​

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

BLAS Level 3 API.

Parameters:

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

  • uplo [mublasFillMode_t]:

    • MUBLAS_FILL_MODE_UPPER: CC is an upper triangular matrix.
    • MUBLAS_FILL_MODE_LOWER: CC is a lower triangular matrix.
  • trans [mublasOperation_t]:

    • MUBLAS_OP_C: op(A)=AHop(A) = A^H, op(B)=BHop(B) = B^H
    • MUBLAS_OP_N: op(A)=Aop(A) = A, op(B)=Bop(B) = B
  • n [mublas_int]: Specifies the number of rows and columns of CC. n≥0n \geq 0.

  • k [mublas_int]: Specifies the number of columns of op(A)op(A). k≥0k \geq 0.

  • alpha: Specifies the scalar α\alpha. When α\alpha is zero, then AA is not referenced and AA need not be set before entry.

  • A: Pointer storing matrix AA on the GPU. Matrix dimension is (\text\{lda}, k) when trans = MUBLAS_OP_N, otherwise (\text\{lda}, n), accessing only the upper/lower triangular part.

  • lda [mublas_int]: Specifies the first dimension of AA.

    • If trans = MUBLAS_OP_N, \text\{lda} \geq \max(1, n); otherwise, \text\{lda} \geq \max(1, k).
  • B: Pointer storing matrix BB on the GPU. Matrix dimension is (\text\{ldb}, k) when trans = MUBLAS_OP_N, otherwise (\text\{ldb}, n), accessing only the upper/lower triangular part.

  • ldb [mublas_int]: Specifies the first dimension of BB.

    • If trans = MUBLAS_OP_N, \text\{ldb} \geq \max(1, n); otherwise, \text\{ldb} \geq \max(1, k).
  • beta: Specifies the scalar β\beta. When β\beta is zero, then CC need not be set before entry.

  • C: Pointer storing matrix CC on the GPU. The imaginary component of the diagonal elements is not used but is set to zero unless a quick return.

  • ldc [mublas_int]: Specifies the first dimension of CC. \text\{ldc} \geq \max(1, n).


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

C:=α⋅op(A)⋅op(B)H+β⋅CC := \alpha \cdot op(A) \cdot op(B)^H + \beta \cdot C

where α\alpha and β\beta are scalars, op(A)op(A) and op(B)op(B) are n×kn \times k matrices, and CC is an n×nn \times n Hermitian matrix stored as either upper or lower. This routine should only be used when the caller can guarantee that the result of op(A)⋅op(B)Hop(A) \cdot op(B)^H will be Hermitian.

  • op(A)=Aop(A) = A, op(B)=Bop(B) = B, and AA and BB are n×kn \times k if trans == MUBLAS_OP_N
  • op(A)=AHop(A) = A^H, op(B)=BHop(B) = B^H, and AA and BB are k×nk \times n if trans == MUBLAS_OP_C

function mublasZherkx​

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

function mublasCherkxBatched​

mublasStatus mublasCherkxBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const muComplex * alpha,
const muComplex *const A[],
mublas_int lda,
const muComplex *const B[],
mublas_int ldb,
const float * beta,
muComplex *const C[],
mublas_int ldc,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

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

herkx_batched performs a batch of the matrix-matrix operations for a Hermitian rank-k update

C_i := alpha*op( A_i )op( B_i )^H + betaC_i

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

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

function mublasZherkxBatched​

mublasStatus mublasZherkxBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const muDoubleComplex * alpha,
const muDoubleComplex *const A[],
mublas_int lda,
const muDoubleComplex *const B[],
mublas_int ldb,
const double * beta,
muDoubleComplex *const C[],
mublas_int ldc,
mublas_int batch_count
)

function mublasCherkxStridedBatched​

mublasStatus mublasCherkxStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const muComplex * alpha,
const muComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muComplex * B,
mublas_int ldb,
mublas_stride stride_B,
const float * beta,
muComplex * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

  • handle [mublasHandle_t]: Handle to the mublas library context queue.
  • uplo [mublasFillMode_t]:
    • MUBLAS_FILL_MODE_UPPER: CiC_i is an upper triangular matrix.
    • MUBLAS_FILL_MODE_LOWER: CiC_i is a lower triangular matrix.
  • trans [mublasOperation_t]:
    • MUBLAS_OP_C: op(Ai)=AiHop( A_i ) = A_i^H, op(Bi)=BiHop( B_i ) = B_i^H.
    • MUBLAS_OP_N: op(Ai)=Aiop( A_i ) = A_i, op(Bi)=Biop( B_i ) = B_i.
  • n [mublas_int]: Specifies the number of rows and columns of CiC_i; must satisfy n≥0n \geq 0.
  • k [mublas_int]: Specifies the number of columns of op(A)op(A); must satisfy k≥0k \geq 0.
  • alpha: Specifies the scalar α\alpha. When α\alpha is zero, AA is not referenced, and AA need not be set before entry.
  • A: Device pointer to the first matrix A1A_1 on the GPU, with dimension (lda,k)(lda, k) when trans is MUBLAS_OP_N, otherwise of dimension (lda,n)(lda, n).
  • lda [mublas_int]: Specifies the first dimension of AiA_i. If trans is MUBLAS_OP_N, then lda≥max⁡(1,n)lda \geq \max(1, n); otherwise, lda≥max⁡(1,k)lda \geq \max(1, k).
  • stride_A [mublas_stride]: Stride from the start of one matrix (AiA_i) to the next one (A_\{i+1}).
  • B: Device pointer to the first matrix B1B_1 on the GPU, with dimension (ldb,k)(ldb, k) when trans is MUBLAS_OP_N, otherwise of dimension (ldb,n)(ldb, n).
  • ldb [mublas_int]: Specifies the first dimension of BiB_i. If trans is `MUBLAS_OP_N,then, then ldb \geq \max(1, n);otherwise,; otherwise, ldb \geq \max(1, k)$.
  • stride_B [mublas_stride]: Stride from the start of one matrix (BiB_i) to the next one (B_\{i+1}).
  • beta: Specifies the scalar β\beta. When β\beta is zero, CC need not be set before entry.
  • C: Device pointer to the first matrix C1C_1 on the GPU. The imaginary components of the diagonal elements are not used but are set to zero unless quick return.
  • ldc [mublas_int]: Specifies the first dimension of CC; must satisfy ldc≥max⁡(1,n)ldc \geq \max(1, n).
  • stride_C [mublas_stride]: Stride from the start of one matrix (CiC_i) to the next one (C_\{i+1}).
  • batch_count [mublas_int]: Number of instances in the batch.

Operation​

The function herkx_strided_batched performs a batch of matrix-matrix operations for a Hermitian rank-k update:

Ci:=α⋅op(Ai)⋅op(Bi)H+β⋅CiC_i := \alpha \cdot op( A_i ) \cdot op( B_i )^H + \beta \cdot C_i

where α\alpha and β\beta are scalars, op(Ai)op(A_i) and op(Bi)op(B_i) are n×kn \times k matrices, and CiC_i is an n×nn \times n Hermitian matrix stored as either upper or lower. This routine should only be used when the caller can guarantee that the result of op(A)⋅op(B)Hop( A ) \cdot op( B )^H will be Hermitian.

  • If trans == MUBLAS_OP_N:
    • op(Ai)=Aiop( A_i ) = A_i, op(Bi)=Biop( B_i ) = B_i, and AiA_i and BiB_i are n×kn \times k.
  • If trans == MUBLAS_OP_C:
    • op(Ai)=AiHop( A_i ) = A_i^H, op(Bi)=BiHop( B_i ) = B_i^H, and AiA_i and BiB_i are k×nk \times n.

function mublasZherkxStridedBatched​

mublasStatus mublasZherkxStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const muDoubleComplex * alpha,
const muDoubleComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muDoubleComplex * B,
mublas_int ldb,
mublas_stride stride_B,
const double * beta,
muDoubleComplex * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasSsymm​

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

BLAS Level 3 API.

Parameters:

  • handle [mublasHandle_t]: Handle to the mublas library context queue.
  • side [mublasSideMode_t]:
    • MUBLAS_SIDE_LEFT: C:=αAB+βCC := \alpha A B + \beta C.
    • MUBLAS_SIDE_RIGHT: C:=αBA+βCC := \alpha B A + \beta C.
  • uplo [mublasFillMode_t]:
    • MUBLAS_FILL_MODE_UPPER: AA is an upper triangular matrix.
    • MUBLAS_FILL_MODE_LOWER: AA is a lower triangular matrix.
  • m [mublas_int]: Specifies the number of rows of BB and CC; must satisfy m≥0m \geq 0.
  • n [mublas_int]: Specifies the number of columns of BB and CC; must satisfy n≥0n \geq 0.
  • alpha: Specifies the scalar α\alpha. When α\alpha is zero, then AA and BB are not referenced.
  • A: Pointer to the matrix AA stored on the GPU.
    • If side == MUBLAS_SIDE_LEFT, AA is an m×mm \times m matrix.
    • If `side == MUBLAS_SIDE_RIGHT,, Aisanis ann \times n$ matrix.
    • Only the upper or lower triangular part is accessed.
  • lda [mublas_int]: Specifies the first dimension of AA.
    • If `side = MUBLAS_SIDE_LEFT,then, then lda \geq \max(1, m)$.
    • Otherwise, lda≥max⁡(1,n)lda \geq \max(1, n).
  • B: Pointer to the matrix BB stored on the GPU. The matrix dimension is m×nm \times n.
  • ldb [mublas_int]: Specifies the first dimension of BB; must satisfy ldb≥max⁡(1,m)ldb \geq \max(1, m).
  • beta: Specifies the scalar β\beta. When β\beta is zero, then CC need not be set before entry.
  • C: Pointer to the matrix CC stored on the GPU. The matrix dimension is m×nm \times n.
  • ldc [mublas_int]: Specifies the first dimension of CC; must satisfy ldc≥max⁡(1,m)ldc \geq \max(1, m).

Operation​

The function symm performs one of the following matrix-matrix operations:

  • If side == MUBLAS_SIDE_LEFT:

    C:=αAB+βCC := \alpha A B + \beta C
  • If side == MUBLAS_SIDE_RIGHT:

    C:=αBA+βCC := \alpha B A + \beta C

where α\alpha and β\beta are scalars, BB and CC are m×nm \times n matrices, and AA is a symmetric matrix stored as either upper or lower triangular.

function mublasDsymm​

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

function mublasCsymm​

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

function mublasZsymm​

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

function mublasSsymmBatched​

mublasStatus mublasSsymmBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublas_int m,
mublas_int n,
const float * alpha,
const float *const A[],
mublas_int lda,
const float *const B[],
mublas_int ldb,
const float * beta,
float *const C[],
mublas_int ldc,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

  • handle [mublasHandle_t]: Handle to the mublas library context queue.
  • side [mublasSideMode_t]:
    • MUBLAS_SIDE_LEFT: Ci:=αAiBi+βCiC_i := \alpha A_i B_i + \beta C_i.
    • `MUBLAS_SIDE_RIGHT:: C_i := \alpha B_i A_i + \beta C_i$.
  • uplo [mublasFillMode_t]:
    • MUBLAS_FILL_MODE_UPPER: AiA_i is an upper triangular matrix.
    • MUBLAS_FILL_MODE_LOWER: AiA_i is a lower triangular matrix.
  • m [mublas_int]: Specifies the number of rows of BiB_i and CiC_i; must satisfy m≥0m \geq 0.
  • n [mublas_int]: Specifies the number of columns of BiB_i and CiC_i; must satisfy n≥0n \geq 0.
  • alpha: Specifies the scalar α\alpha. When α\alpha is zero, then AiA_i and BiB_i are not referenced.
  • A: Device array of device pointers storing each matrix AiA_i on the GPU.
    • If `side == MUBLAS_SIDE_LEFT,then, then A_iisanis anm \times m$ matrix.
    • If `side == MUBLAS_SIDE_RIGHT,then, then A_iisanis ann

function mublasDsymmBatched​

mublasStatus mublasDsymmBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublas_int m,
mublas_int n,
const double * alpha,
const double *const A[],
mublas_int lda,
const double *const B[],
mublas_int ldb,
const double * beta,
double *const C[],
mublas_int ldc,
mublas_int batch_count
)

function mublasCsymmBatched​

mublasStatus mublasCsymmBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublas_int m,
mublas_int n,
const muComplex * alpha,
const muComplex *const A[],
mublas_int lda,
const muComplex *const B[],
mublas_int ldb,
const muComplex * beta,
muComplex *const C[],
mublas_int ldc,
mublas_int batch_count
)

function mublasZsymmBatched​

mublasStatus mublasZsymmBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublas_int m,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex *const A[],
mublas_int lda,
const muDoubleComplex *const B[],
mublas_int ldb,
const muDoubleComplex * beta,
muDoubleComplex *const C[],
mublas_int ldc,
mublas_int batch_count
)

function mublasSsymmStridedBatched​

mublasStatus mublasSsymmStridedBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublas_int m,
mublas_int n,
const float * alpha,
const float * A,
mublas_int lda,
mublas_stride stride_A,
const float * B,
mublas_int ldb,
mublas_stride stride_B,
const float * beta,
float * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

  • handle [mublasHandle_t]: Handle to the mublas library context queue.
  • side [mublasSideMode_t]:
    • MUBLAS_SIDE_LEFT: Ci:=αAiBi+βCiC_i := \alpha A_i B_i + \beta C_i.
    • `MUBLAS_SIDE_RIGHT:: C_i := \alpha B_i A_i + \beta C_i$.
  • uplo [mublasFillMode_t]:
    • MUBLAS_FILL_MODE_UPPER: AiA_i is an upper triangular matrix.
    • MUBLAS_FILL_MODE_LOWER: AiA_i is a lower triangular matrix.
  • m [mublas_int]: Specifies the number of rows of BiB_i and CiC_i; must satisfy m≥0m \geq 0.
  • n [mublas_int]: Specifies the number of columns of BiB_i and CiC_i; must satisfy n≥0n \geq 0.
  • alpha: Specifies the scalar α\alpha. When α\alpha is zero, then AiA_i and BiB_i are not referenced.
  • A: Device pointer to the first matrix A1A_1.
    • AiA_i is an m×mm \times m matrix if side == MUBLAS_SIDE_LEFT.
    • AiA_i is an n×nn \times n matrix if side == MUBLAS_SIDE_RIGHT.
    • Only the upper or lower triangular part is accessed.
  • lda [mublas_int]: Specifies the first dimension of AiA_i.
    • If side = MUBLAS_SIDE_LEFT, then lda≥max⁡(1,m)lda \geq \max(1, m).
    • Otherwise, lda≥max⁡(1,n)lda \geq \max(1, n).
  • stride_A [mublas_stride]: Stride from the start of one matrix (AiA_i) to the next one (A_\{i+1}).
  • B: Device pointer to the first matrix B1B_1 of dimension (ldb,n)(ldb, n) on the GPU.
  • ldb [mublas_int]: Specifies the first dimension of BiB_i; must satisfy ldb≥max⁡(1,m)ldb \geq \max(1, m).
  • stride_B [mublas_stride]: Stride from the start of one matrix (BiB_i) to the next one (B_\{i+1}).
  • beta: Specifies the scalar β\beta. When β\beta is zero, then CC need not be set before entry.
  • C: Device pointer to the first matrix C1C_1 of dimension (ldc,n)(ldc, n) on the GPU.
  • ldc [mublas_int]: Specifies the first dimension of CC; must satisfy ldc≥max⁡(1,m)ldc \geq \max(1, m).
  • stride_C [mublas_stride]: Stride from the start of one matrix (CiC_i) to the next one (C_\{i+1}).
  • batch_count [mublas_int]: Number of instances in the batch.

Operation​

The function symm_strided_batched performs a batch of the matrix-matrix operations:

  • If side == MUBLAS_SIDE_LEFT:

    Ci:=αAiBi+βCiC_i := \alpha A_i B_i + \beta C_i
  • If side == MUBLAS_SIDE_RIGHT:

    Ci:=αBiAi+βCiC_i := \alpha B_i A_i + \beta C_i

where α\alpha and β\beta are scalars, BiB_i and CiC_i are m×nm \times n matrices, and AiA_i is a symmetric matrix stored as either upper or lower triangular.

function mublasDsymmStridedBatched​

mublasStatus mublasDsymmStridedBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublas_int m,
mublas_int n,
const double * alpha,
const double * A,
mublas_int lda,
mublas_stride stride_A,
const double * B,
mublas_int ldb,
mublas_stride stride_B,
const double * beta,
double * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasCsymmStridedBatched​

mublasStatus mublasCsymmStridedBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublas_int m,
mublas_int n,
const muComplex * alpha,
const muComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muComplex * B,
mublas_int ldb,
mublas_stride stride_B,
const muComplex * beta,
muComplex * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasZsymmStridedBatched​

mublasStatus mublasZsymmStridedBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublas_int m,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muDoubleComplex * B,
mublas_int ldb,
mublas_stride stride_B,
const muDoubleComplex * beta,
muDoubleComplex * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasSsyrk​

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

BLAS Level 3 API.

Parameters:

  • handle [mublasHandle_t]: Handle to the mublas library context queue.
  • uplo [mublasFillMode_t]:
    • MUBLAS_FILL_MODE_UPPER: CC is an upper triangular matrix.
    • MUBLAS_FILL_MODE_LOWER: CC is a lower triangular matrix.
  • transA [mublasOperation_t]:
    • MUBLAS_OP_T: op(A)=ATop(A) = A^T.
    • MUBLAS_OP_N: op(A)=Aop(A) = A.
    • MUBLAS_OP_C: op(A)=ATop(A) = A^T (not supported for complex types; see cherk and zherk).
  • n [mublas_int]: Specifies the number of rows and columns of CC; must satisfy n≥0n \geq 0.
  • k [mublas_int]: Specifies the number of columns of op(A)op(A); must satisfy k≥0k \geq 0.
  • alpha: Specifies the scalar α\alpha. When α\alpha is zero, then AA is not referenced, and AA need not be set before entry.
  • A: Pointer storing matrix AA on the GPU.
    • Matrix dimension is (lda,k)(lda, k) if transA = MUBLAS_OP_N, otherwise (lda,n)(lda, n).
    • Only the upper/lower triangular part is accessed.
  • lda [mublas_int]: Specifies the first dimension of AA.
    • If transA = MUBLAS_OP_N, then lda≥max⁡(1,n)lda \geq \max(1, n).
    • Otherwise, lda≥max⁡(1,k)lda \geq \max(1, k).
  • beta: Specifies the scalar β\beta. When β\beta is zero, then CC need not be set before entry.
  • C: Pointer storing matrix CC on the GPU.
  • ldc [mublas_int]: Specifies the first dimension of CC; must satisfy ldc≥max⁡(1,n)ldc \geq \max(1, n).

Operation​

The function syrk performs a symmetric rank-k update:

C:=α⋅op(A)⋅op(A)T+β⋅CC := \alpha \cdot op(A) \cdot op(A)^T + \beta \cdot C

where α\alpha and β\beta are scalars, op(A)op(A) is an n×kn \times k matrix, and CC is a symmetric n×nn \times n matrix stored as either upper or lower triangular.

  • If transA == MUBLAS_OP_N, then:

    op(A) = A, \text\{ and } A \text\{ is } n \times k.
  • If transA == MUBLAS_OP_T, then:

    op(A) = A^T, \text\{ and } A \text\{ is } k \times n.

Note​

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

function mublasDsyrk​

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

function mublasCsyrk​

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

function mublasZsyrk​

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

function mublasSsyrkBatched​

mublasStatus mublasSsyrkBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublas_int n,
mublas_int k,
const float * alpha,
const float *const A[],
mublas_int lda,
const float * beta,
float *const C[],
mublas_int ldc,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

  • handle [mublasHandle_t]: Handle to the mublas library context queue.
  • uplo [mublasFillMode_t]:
    • MUBLAS_FILL_MODE_UPPER: CiC_i is an upper triangular matrix.
    • MUBLAS_FILL_MODE_LOWER: CiC_i is a lower triangular matrix.
  • transA [mublasOperation_t]:
    • MUBLAS_OP_T: op(Ai)=AiTop(A_i) = A_i^T.
    • MUBLAS_OP_N: op(Ai)=Aiop(A_i) = A_i.
    • MUBLAS_OP_C: op(Ai)=AiTop(A_i) = A_i^T (not supported for complex types; see cherk and zherk).
  • n [mublas_int]: Specifies the number of rows and columns of CiC_i; must satisfy n≥0n \geq 0.
  • k [mublas_int]: Specifies the number of columns of op(Ai)op(A_i); must satisfy k≥0k \geq 0.
  • alpha: Specifies the scalar α\alpha. When α\alpha is zero, then AiA_i is not referenced, and AiA_i need not be set before entry.
  • A: Device array of device pointers storing each matrix AiA_i.
    • Dimension is (lda,k)(lda, k) when transA = MUBLAS_OP_N, otherwise (lda,n)(lda, n).
  • lda [mublas_int]: Specifies the first dimension of AiA_i.
    • If transA = MUBLAS_OP_N, then lda≥max⁡(1,n)lda \geq \max(1, n).
    • Otherwise, lda≥max⁡(1,k)lda \geq \max(1, k).
  • beta: Specifies the scalar β\beta. When β\beta is zero, then CiC_i need not be set before entry.
  • C: Device array of device pointers storing each matrix CiC_i on the GPU.
  • ldc [mublas_int]: Specifies the first dimension of CC; must satisfy ldc≥max⁡(1,n)ldc \geq \max(1, n).
  • batch_count [mublas_int]: Number of instances in the batch.

Operation​

The function syrk_batched performs a batch of the matrix-matrix operations for a symmetric rank-k update:

Ci:=α⋅op(Ai)⋅op(Ai)T+β⋅CiC_i := \alpha \cdot op(A_i) \cdot op(A_i)^T + \beta \cdot C_i

where α\alpha and β\beta are scalars, op(Ai)op(A_i) is an n×kn \times k matrix, and CiC_i is a symmetric n×nn \times n matrix stored as either upper or lower triangular.

  • If transA == MUBLAS_OP_N, then:

    op(A_i) = A_i, \text\{ and } A_i \text\{ is } n \times k.
  • If transA == MUBLAS_OP_T, then:

    op(A_i) = A_i^T, \text\{ and } A_i \text\{ is } k \times n.

Note​

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

function mublasDsyrkBatched​

mublasStatus mublasDsyrkBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublas_int n,
mublas_int k,
const double * alpha,
const double *const A[],
mublas_int lda,
const double * beta,
double *const C[],
mublas_int ldc,
mublas_int batch_count
)

function mublasCsyrkBatched​

mublasStatus mublasCsyrkBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublas_int n,
mublas_int k,
const muComplex * alpha,
const muComplex *const A[],
mublas_int lda,
const muComplex * beta,
muComplex *const C[],
mublas_int ldc,
mublas_int batch_count
)

function mublasZsyrkBatched​

mublasStatus mublasZsyrkBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublas_int n,
mublas_int k,
const muDoubleComplex * alpha,
const muDoubleComplex *const A[],
mublas_int lda,
const muDoubleComplex * beta,
muDoubleComplex *const C[],
mublas_int ldc,
mublas_int batch_count
)

function mublasSsyrkStridedBatched​

mublasStatus mublasSsyrkStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublas_int n,
mublas_int k,
const float * alpha,
const float * A,
mublas_int lda,
mublas_stride stride_A,
const float * beta,
float * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

  • handle [mublasHandle_t]: Handle to the mublas library context queue.
  • uplo [mublasFillMode_t]:
    • MUBLAS_FILL_MODE_UPPER: CiC_i is an upper triangular matrix.
    • MUBLAS_FILL_MODE_LOWER: CiC_i is a lower triangular matrix.
  • transA [mublasOperation_t]:
    • MUBLAS_OP_T: op(Ai)=AiTop(A_i) = A_i^T.
    • MUBLAS_OP_N: op(Ai)=Aiop(A_i) = A_i.
    • MUBLAS_OP_C: op(Ai)=AiTop(A_i) = A_i^T (not supported for complex types; see cherk and zherk).
  • n [mublas_int]: Specifies the number of rows and columns of CiC_i; must satisfy n≥0n \geq 0.
  • k [mublas_int]: Specifies the number of columns of op(Ai)op(A_i); must satisfy k≥0k \geq 0.
  • alpha: Specifies the scalar α\alpha. When α\alpha is zero, then AiA_i is not referenced, and AiA_i need not be set before entry.
  • A: Device pointer to the first matrix A1A_1 on the GPU.
    • Dimension is (lda,k)(lda, k) when transA = MUBLAS_OP_N, otherwise (lda,n)(lda, n).
  • lda [mublas_int]: Specifies the first dimension of AiA_i.
    • If transA = MUBLAS_OP_N, then lda≥max⁡(1,n)lda \geq \max(1, n).
    • Otherwise, lda≥max⁡(1,k)lda \geq \max(1, k).
  • stride_A [mublas_stride]: Stride from the start of one matrix AiA_i to the next matrix A_\{i+1}.
  • beta: Specifies the scalar β\beta. When β\beta is zero, then CiC_i need not be set before entry.
  • C: Device pointer to the first matrix C1C_1 on the GPU.
  • ldc [mublas_int]: Specifies the first dimension of CC; must satisfy ldc≥max⁡(1,n)ldc \geq \max(1, n).
  • stride_C [mublas_stride]: Stride from the start of one matrix CiC_i to the next matrix C_\{i+1}.
  • batch_count [mublas_int]: Number of instances in the batch.

Operation​

The function syrk_strided_batched performs a batch of the matrix-matrix operations for a symmetric rank-k update:

Ci:=α⋅op(Ai)⋅op(Ai)T+β⋅CiC_i := \alpha \cdot op(A_i) \cdot op(A_i)^T + \beta \cdot C_i

where α\alpha and β\beta are scalars, op(Ai)op(A_i) is an n×kn \times k matrix, and CiC_i is a symmetric n×nn \times n matrix stored as either upper or lower triangular.

  • If transA == MUBLAS_OP_N, then:

    op(A_i) = A_i, \text\{ and } A_i \text\{ is } n \times k.
  • If transA == MUBLAS_OP_T, then:

    op(A_i) = A_i^T, \text\{ and } A_i \text\{ is } k \times n.

Note​

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

function mublasDsyrkStridedBatched​

mublasStatus mublasDsyrkStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublas_int n,
mublas_int k,
const double * alpha,
const double * A,
mublas_int lda,
mublas_stride stride_A,
const double * beta,
double * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasCsyrkStridedBatched​

mublasStatus mublasCsyrkStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublas_int n,
mublas_int k,
const muComplex * alpha,
const muComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muComplex * beta,
muComplex * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasZsyrkStridedBatched​

mublasStatus mublasZsyrkStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublas_int n,
mublas_int k,
const muDoubleComplex * alpha,
const muDoubleComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muDoubleComplex * beta,
muDoubleComplex * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasSsyr2k​

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

BLAS Level 3 API.

Parameters:

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

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

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

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

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

function mublasDsyr2k​

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

function mublasCsyr2k​

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

function mublasZsyr2k​

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

function mublasSsyr2kBatched​

mublasStatus mublasSsyr2kBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const float * alpha,
const float *const A[],
mublas_int lda,
const float *const B[],
mublas_int ldb,
const float * beta,
float *const C[],
mublas_int ldc,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: C_i is an upper triangular matrix MUBLAS_FILL_MODE_LOWER: C_i is a lower triangular matrix
  • trans [mublasOperation_t] MUBLAS_OP_T: op( A_i ) = A_i^T, op( B_i ) = B_i^T MUBLAS_OP_N: op( A_i ) = A_i, op( B_i ) = B_i
  • n [mublas_int] n specifies the number of rows and columns of C_i. n >= 0.
  • k [mublas_int] k specifies the number of columns of op(A). k >= 0.
  • alpha alpha specifies the scalar alpha. When alpha is zero then A is not referenced and A need not be set before entry.
  • A device array of device pointers storing each matrix_i A of dimension (lda, k) when trans is MUBLAS_OP_N, otherwise of dimension (lda, n)
  • lda [mublas_int] lda specifies the first dimension of A_i. if trans = MUBLAS_OP_N, lda >= max( 1, n ), otherwise lda >= max( 1, k ).
  • B device array of device pointers storing each matrix_i B of dimension (ldb, k) when trans is MUBLAS_OP_N, otherwise of dimension (ldb, n)
  • ldb [mublas_int] ldb specifies the first dimension of B. if trans = MUBLAS_OP_N, ldb >= max( 1, n ), otherwise ldb >= max( 1, k ).
  • beta beta specifies the scalar beta. When beta is zero then C need not be set before entry.
  • C device array of device pointers storing each matrix C_i on the GPU.
  • ldc [mublas_int] ldc specifies the first dimension of C. ldc >= max( 1, n ).
  • batch_count [mublas_int] number of instances in the batch.

syr2k_batched performs a batch of the matrix-matrix operations for a symmetric rank-2k update

C_i := alpha*(op( A_i )*op( B_i )^T + op( B_i )op( A_i )^T) + betaC_i

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

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

function mublasDsyr2kBatched​

mublasStatus mublasDsyr2kBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const double * alpha,
const double *const A[],
mublas_int lda,
const double *const B[],
mublas_int ldb,
const double * beta,
double *const C[],
mublas_int ldc,
mublas_int batch_count
)

function mublasCsyr2kBatched​

mublasStatus mublasCsyr2kBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const muComplex * alpha,
const muComplex *const A[],
mublas_int lda,
const muComplex *const B[],
mublas_int ldb,
const muComplex * beta,
muComplex *const C[],
mublas_int ldc,
mublas_int batch_count
)

function mublasZsyr2kBatched​

mublasStatus mublasZsyr2kBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const muDoubleComplex * alpha,
const muDoubleComplex *const A[],
mublas_int lda,
const muDoubleComplex *const B[],
mublas_int ldb,
const muDoubleComplex * beta,
muDoubleComplex *const C[],
mublas_int ldc,
mublas_int batch_count
)

function mublasSsyr2kStridedBatched​

mublasStatus mublasSsyr2kStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const float * alpha,
const float * A,
mublas_int lda,
mublas_stride stride_A,
const float * B,
mublas_int ldb,
mublas_stride stride_B,
const float * beta,
float * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: C_i is an upper triangular matrix MUBLAS_FILL_MODE_LOWER: C_i is a lower triangular matrix
  • trans [mublasOperation_t] MUBLAS_OP_T: op( A_i ) = A_i^T, op( B_i ) = B_i^T MUBLAS_OP_N: op( A_i ) = A_i, op( B_i ) = B_i
  • n [mublas_int] n specifies the number of rows and columns of C_i. n >= 0.
  • k [mublas_int] k specifies the number of columns of op(A). k >= 0.
  • alpha alpha specifies the scalar alpha. When alpha is zero then A is not referenced and A need not be set before entry.
  • A Device pointer to the first matrix A_1 on the GPU of dimension (lda, k) when trans is MUBLAS_OP_N, otherwise of dimension (lda, n)
  • lda [mublas_int] lda specifies the first dimension of A_i. if trans = MUBLAS_OP_N, lda >= max( 1, n ), otherwise lda >= max( 1, k ).
  • stride_A [mublas_stride] stride from the start of one matrix (A_i) and the next one (A_i+1)
  • B Device pointer to the first matrix B_1 on the GPU of dimension (ldb, k) when trans is MUBLAS_OP_N, otherwise of dimension (ldb, n)
  • ldb [mublas_int] ldb specifies the first dimension of B_i. if trans = MUBLAS_OP_N, ldb >= max( 1, n ), otherwise ldb >= max( 1, k ).
  • stride_B [mublas_stride] stride from the start of one matrix (B_i) and the next one (B_i+1)
  • beta beta specifies the scalar beta. When beta is zero then C need not be set before entry.
  • C Device pointer to the first matrix C_1 on the GPU.
  • ldc [mublas_int] ldc specifies the first dimension of C. ldc >= max( 1, n ).
  • stride_C [mublas_stride] stride from the start of one matrix (C_i) and the next one (C_i+1)
  • batch_count [mublas_int] number of instances in the batch.

syr2k_strided_batched performs a batch of the matrix-matrix operations for a symmetric rank-2k update

C_i := alpha*(op( A_i )*op( B_i )^T + op( B_i )op( A_i )^T) + betaC_i

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

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

function mublasDsyr2k_strided_batched​

mublasStatus mublasDsyr2k_strided_batched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const double * alpha,
const double * A,
mublas_int lda,
mublas_stride stride_A,
const double * B,
mublas_int ldb,
mublas_stride stride_B,
const double * beta,
double * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasCsyr2kStridedBatched​

mublasStatus mublasCsyr2kStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const muComplex * alpha,
const muComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muComplex * B,
mublas_int ldb,
mublas_stride stride_B,
const muComplex * beta,
muComplex * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasZsyr2kStridedBatched​

mublasStatus mublasZsyr2kStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const muDoubleComplex * alpha,
const muDoubleComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muDoubleComplex * B,
mublas_int ldb,
mublas_stride stride_B,
const muDoubleComplex * beta,
muDoubleComplex * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasSsyrkx​

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

BLAS Level 3 API.

Parameters:

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

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

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

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

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

function mublasDsyrkx​

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

function mublasCsyrkx​

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

function mublasZsyrkx​

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

function mublasSsyrkxBatched​

mublasStatus mublasSsyrkxBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const float * alpha,
const float *const A[],
mublas_int lda,
const float *const B[],
mublas_int ldb,
const float * beta,
float *const C[],
mublas_int ldc,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: C_i is an upper triangular matrix MUBLAS_FILL_MODE_LOWER: C_i is a lower triangular matrix
  • trans [mublasOperation_t] MUBLAS_OP_T: op( A_i ) = A_i^T, op( B_i ) = B_i^T MUBLAS_OP_N: op( A_i ) = A_i, op( B_i ) = B_i
  • n [mublas_int] n specifies the number of rows and columns of C_i. n >= 0.
  • k [mublas_int] k specifies the number of columns of op(A). k >= 0.
  • alpha alpha specifies the scalar alpha. When alpha is zero then A is not referenced and A need not be set before entry.
  • A device array of device pointers storing each matrix_i A of dimension (lda, k) when trans is MUBLAS_OP_N, otherwise of dimension (lda, n)
  • lda [mublas_int] lda specifies the first dimension of A_i. if trans = MUBLAS_OP_N, lda >= max( 1, n ), otherwise lda >= max( 1, k ).
  • B device array of device pointers storing each matrix_i B of dimension (ldb, k) when trans is MUBLAS_OP_N, otherwise of dimension (ldb, n)
  • ldb [mublas_int] ldb specifies the first dimension of B. if trans = MUBLAS_OP_N, ldb >= max( 1, n ), otherwise ldb >= max( 1, k ).
  • beta beta specifies the scalar beta. When beta is zero then C need not be set before entry.
  • C device array of device pointers storing each matrix C_i on the GPU.
  • ldc [mublas_int] ldc specifies the first dimension of C. ldc >= max( 1, n ).
  • batch_count [mublas_int] number of instances in the batch.

syrkx_batched performs a batch of the matrix-matrix operations for a symmetric rank-k update

C_i := alpha*op( A_i )op( B_i )^T + betaC_i

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

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

function mublasDsyrkxBatched​

mublasStatus mublasDsyrkxBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const double * alpha,
const double *const A[],
mublas_int lda,
const double *const B[],
mublas_int ldb,
const double * beta,
double *const C[],
mublas_int ldc,
mublas_int batch_count
)

function mublasCsyrkxBatched​

mublasStatus mublasCsyrkxBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const muComplex * alpha,
const muComplex *const A[],
mublas_int lda,
const muComplex *const B[],
mublas_int ldb,
const muComplex * beta,
muComplex *const C[],
mublas_int ldc,
mublas_int batch_count
)

function mublasZsyrkxBatched​

mublasStatus mublasZsyrkxBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const muDoubleComplex * alpha,
const muDoubleComplex *const A[],
mublas_int lda,
const muDoubleComplex *const B[],
mublas_int ldb,
const muDoubleComplex * beta,
muDoubleComplex *const C[],
mublas_int ldc,
mublas_int batch_count
)

function mublasSsyrkxStridedBatched​

mublasStatus mublasSsyrkxStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const float * alpha,
const float * A,
mublas_int lda,
mublas_stride stride_A,
const float * B,
mublas_int ldb,
mublas_stride stride_B,
const float * beta,
float * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: C_i is an upper triangular matrix MUBLAS_FILL_MODE_LOWER: C_i is a lower triangular matrix
  • trans [mublasOperation_t] MUBLAS_OP_T: op( A_i ) = A_i^T, op( B_i ) = B_i^T MUBLAS_OP_N: op( A_i ) = A_i, op( B_i ) = B_i
  • n [mublas_int] n specifies the number of rows and columns of C_i. n >= 0.
  • k [mublas_int] k specifies the number of columns of op(A). k >= 0.
  • alpha alpha specifies the scalar alpha. When alpha is zero then A is not referenced and A need not be set before entry.
  • A Device pointer to the first matrix A_1 on the GPU of dimension (lda, k) when trans is MUBLAS_OP_N, otherwise of dimension (lda, n)
  • lda [mublas_int] lda specifies the first dimension of A_i. if trans = MUBLAS_OP_N, lda >= max( 1, n ), otherwise lda >= max( 1, k ).
  • stride_A [mublas_stride] stride from the start of one matrix (A_i) and the next one (A_i+1)
  • B Device pointer to the first matrix B_1 on the GPU of dimension (ldb, k) when trans is MUBLAS_OP_N, otherwise of dimension (ldb, n)
  • ldb [mublas_int] ldb specifies the first dimension of B_i. if trans = MUBLAS_OP_N, ldb >= max( 1, n ), otherwise ldb >= max( 1, k ).
  • stride_B [mublas_stride] stride from the start of one matrix (B_i) and the next one (B_i+1)
  • beta beta specifies the scalar beta. When beta is zero then C need not be set before entry.
  • C Device pointer to the first matrix C_1 on the GPU.
  • ldc [mublas_int] ldc specifies the first dimension of C. ldc >= max( 1, n ).
  • stride_C [mublas_stride] stride from the start of one matrix (C_i) and the next one (C_i+1)
  • batch_count [mublas_int] number of instances in the batch.

syrkx_strided_batched performs a batch of the matrix-matrix operations for a symmetric rank-k update

C_i := alpha*op( A_i )op( B_i )^T + betaC_i

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

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

function mublasDsyrkxStridedBatched​

mublasStatus mublasDsyrkxStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const double * alpha,
const double * A,
mublas_int lda,
mublas_stride stride_A,
const double * B,
mublas_int ldb,
mublas_stride stride_B,
const double * beta,
double * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasCsyrkxStridedBatched​

mublasStatus mublasCsyrkxStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const muComplex * alpha,
const muComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muComplex * B,
mublas_int ldb,
mublas_stride stride_B,
const muComplex * beta,
muComplex * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasZsyrkxStridedBatched​

mublasStatus mublasZsyrkxStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasOperation_t trans,
mublas_int n,
mublas_int k,
const muDoubleComplex * alpha,
const muDoubleComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muDoubleComplex * B,
mublas_int ldb,
mublas_stride stride_B,
const muDoubleComplex * beta,
muDoubleComplex * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasStrmm​

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

BLAS Level 3 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • side [mublasSideMode_t] Specifies whether op(A) multiplies B from the left or right as follows: MUBLAS_SIDE_LEFT: B := alphaop( A )B. MUBLAS_SIDE_RIGHT: B := 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 [mublas_int] m specifies the number of rows of B. m >= 0.
  • n [mublas_int] n specifies the number of columns of B. n >= 0.
  • alpha alpha specifies the scalar alpha. When alpha is zero then A is not referenced and B need not be set before entry.
  • A Device pointer to matrix A on the GPU. A has dimension ( lda, k ), where k is m when side == MUBLAS_SIDE_LEFT and is n when side == MUBLAS_SIDE_RIGHT.
  • lda [mublas_int] lda specifies the first dimension of A. if side == MUBLAS_SIDE_LEFT, lda >= max( 1, m ), if side == MUBLAS_SIDE_RIGHT, lda >= max( 1, n ).
  • B Device pointer to the first matrix B_0 on the GPU. On entry, the leading m by n part of the array B must contain the matrix B, and on exit is overwritten by the transformed matrix.
  • ldb [mublas_int] ldb specifies the first dimension of B. ldb >= max( 1, m ).

trmm performs one of the matrix-matrix operations

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

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

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

When uplo == MUBLAS_FILL_MODE_UPPER the leading k by k upper triangular part of the array A must contain the upper triangular matrix and the strictly lower triangular part of A is not referenced. Here k is m when side == MUBLAS_SIDE_LEFT and is n when side == MUBLAS_SIDE_RIGHT.

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. Here k is m when side == MUBLAS_SIDE_LEFT and is n when side == MUBLAS_SIDE_RIGHT.

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

function mublasDtrmm​

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

function mublasCtrmm​

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

function mublasZtrmm​

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

function mublasStrmmBatched​

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

BLAS Level 3 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • side [mublasSideMode_t] Specifies whether op(A_i) multiplies B_i from the left or right as follows: MUBLAS_SIDE_LEFT: B_i := alphaop( A_i )B_i. MUBLAS_SIDE_RIGHT: B_i := alphaB_iop( A_i ).
  • 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_i) to be used in the matrix multiplication as follows: MUBLAS_OP_N: op(A_i) = A_i. MUBLAS_OP_T: op(A_i) = A_i^T. MUBLAS_OP_C: op(A_i) = A_i^H.
  • diag [mublasDiagType_t] Specifies whether or not A_i is unit triangular as follows: MUBLAS_DIAG_UNIT: A_i is assumed to be unit triangular. MUBLAS_DIAG_NON_UNIT: A_i is not assumed to be unit triangular.
  • m [mublas_int] m specifies the number of rows of B_i. m >= 0.
  • n [mublas_int] n specifies the number of columns of B_i. n >= 0.
  • alpha alpha specifies the scalar alpha. When alpha is zero then A_i is not referenced and B_i need not be set before entry.
  • A Device array of device pointers storing each matrix A_i on the GPU. Each A_i is of dimension ( lda, k ), where k is m when side == MUBLAS_SIDE_LEFT and is n when side == MUBLAS_SIDE_RIGHT.
  • lda [mublas_int] lda specifies the first dimension of A. if side == MUBLAS_SIDE_LEFT, lda >= max( 1, m ), if side == MUBLAS_SIDE_RIGHT, lda >= max( 1, n ).
  • B device array of device pointers storing each matrix B_i on the GPU. On entry, the leading m by n part of the array B_i must contain the matrix B_i, and on exit is overwritten by the transformed matrix.
  • ldb [mublas_int] ldb specifies the first dimension of B_i. ldb >= max( 1, m ).
  • batch_count [mublas_int] number of instances i in the batch.

trmm_batched performs one of the batched matrix-matrix operations

B_i := alphaop( A_i )B_i, or B_i := alphaB_iop( A_i ) for i = 0, 1, ... batch_count -1

where alpha is a scalar, B_i is an m by n matrix, A_i is a unit, or non-unit, upper or lower triangular matrix and op( A_i ) is one of

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

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

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

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

function mublasDtrmmBatched​

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

function mublasCtrmmBatched​

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

function mublasZtrmmBatched​

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

function mublasStrmmStridedBatched​

mublasStatus mublasStrmmStridedBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
mublas_int n,
const float * alpha,
const float * A,
mublas_int lda,
mublas_stride stride_A,
float * B,
mublas_int ldb,
mublas_stride stride_B,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • side [mublasSideMode_t] Specifies whether op(A_i) multiplies B_i from the left or right as follows: MUBLAS_SIDE_LEFT: B_i := alphaop( A_i )B_i. MUBLAS_SIDE_RIGHT: B_i := alphaB_iop( A_i ).
  • 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_i) to be used in the matrix multiplication as follows: MUBLAS_OP_N: op(A_i) = A_i. MUBLAS_OP_T: op(A_i) = A_i^T. MUBLAS_OP_C: op(A_i) = A_i^H.
  • diag [mublasDiagType_t] Specifies whether or not A_i is unit triangular as follows: MUBLAS_DIAG_UNIT: A_i is assumed to be unit triangular. MUBLAS_DIAG_NON_UNIT: A_i is not assumed to be unit triangular.
  • m [mublas_int] m specifies the number of rows of B_i. m >= 0.
  • n [mublas_int] n specifies the number of columns of B_i. n >= 0.
  • alpha alpha specifies the scalar alpha. When alpha is zero then A_i is not referenced and B_i need not be set before entry.
  • A Device pointer to the first matrix A_0 on the GPU. Each A_i is of dimension ( lda, k ), where k is m when side == MUBLAS_SIDE_LEFT and is n when side == MUBLAS_SIDE_RIGHT.
  • lda [mublas_int] lda specifies the first dimension of A. if side == MUBLAS_SIDE_LEFT, lda >= max( 1, m ), if side == MUBLAS_SIDE_RIGHT, lda >= max( 1, n ).
  • stride_A [mublas_stride] stride from the start of one matrix (A_i) and the next one (A_i+1)
  • B Device pointer to the first matrix B_0 on the GPU. On entry, the leading m by n part of the array B_i must contain the matrix B_i, and on exit is overwritten by the transformed matrix.
  • ldb [mublas_int] ldb specifies the first dimension of B_i. ldb >= max( 1, m ).
  • stride_B [mublas_stride] stride from the start of one matrix (B_i) and the next one (B_i+1)
  • batch_count [mublas_int] number of instances i in the batch.

trmm_strided_batched performs one of the strided_batched matrix-matrix operations

B_i := alphaop( A_i )B_i, or B_i := alphaB_iop( A_i ) for i = 0, 1, ... batch_count -1

where alpha is a scalar, B_i is an m by n matrix, A_i is a unit, or non-unit, upper or lower triangular matrix and op( A_i ) is one of

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

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

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

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

function mublasDtrmmStridedBatched​

mublasStatus mublasDtrmmStridedBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
mublas_int n,
const double * alpha,
const double * A,
mublas_int lda,
mublas_stride stride_A,
double * B,
mublas_int ldb,
mublas_stride stride_B,
mublas_int batch_count
)

function mublasCtrmmStridedBatched​

mublasStatus mublasCtrmmStridedBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
mublas_int n,
const muComplex * alpha,
const muComplex * A,
mublas_int lda,
mublas_stride stride_A,
muComplex * B,
mublas_int ldb,
mublas_stride stride_B,
mublas_int batch_count
)

function mublasZtrmmStridedBatched​

mublasStatus mublasZtrmmStridedBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex * A,
mublas_int lda,
mublas_stride stride_A,
muDoubleComplex * B,
mublas_int ldb,
mublas_stride stride_B,
mublas_int batch_count
)

function mublasStrmmOutofplace​

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

BLAS Level 3 API.

Parameters:

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

trmm_outofplace performs one of the matrix-matrix operations

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

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

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

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

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

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

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

function mublasDtrmmOutofplace​

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

function mublasCtrmmOutofplace​

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

function mublasZtrmmOutofplace​

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

function mublasStrmmOutofplaceBatched​

mublasStatus mublasStrmmOutofplaceBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
mublas_int n,
const float * alpha,
const float *const A[],
mublas_int lda,
const float *const B[],
mublas_int ldb,
float *const C[],
mublas_int ldc,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • side [mublasSideMode_t] Specifies whether op(A_i) multiplies B_i from the left or right as follows: MUBLAS_SIDE_LEFT: C_i := alphaop( A_i )B_i. MUBLAS_SIDE_RIGHT: C_i := alphaB_iop( A_i ).
  • 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_i) to be used in the matrix multiplication as follows: MUBLAS_OP_N: op(A_i) = A_i. MUBLAS_OP_T: op(A_i) = A_i^T. MUBLAS_OP_C: op(A_i) = A_i^H.
  • diag [mublasDiagType_t] Specifies whether or not A_i is unit triangular as follows: MUBLAS_DIAG_UNIT: A_i is assumed to be unit triangular. MUBLAS_DIAG_NON_UNIT: A_i is not assumed to be unit triangular.
  • m [mublas_int] m specifies the number of rows of B_i. m >= 0.
  • n [mublas_int] n specifies the number of columns of B_i. n >= 0.
  • alpha alpha specifies the scalar alpha. When alpha is zero then A_i is not referenced and B_i need not be set before entry.
  • A Device array of device pointers storing each matrix A_i on the GPU. Each A_i is of dimension ( lda, k ), where k is m when side == MUBLAS_SIDE_LEFT and is n when side == MUBLAS_SIDE_RIGHT.
  • lda [mublas_int] lda specifies the first dimension of A. if side == MUBLAS_SIDE_LEFT, lda >= max( 1, m ), if side == MUBLAS_SIDE_RIGHT, lda >= max( 1, n ).
  • B device array of device pointers storing each matrix B_i on the GPU.
  • ldb [mublas_int] ldb specifies the first dimension of B_i. ldb >= max( 1, m ).
  • C device array of device pointers storing each matrix C_i on the GPU.
  • ldc [mublas_int] ldc specifies the first dimension of C. ldc >= max( 1, m).
  • batch_count [mublas_int] number of instances i in the batch.

trmm_outofplace_batched performs one of the batched matrix-matrix operations

C_i := alphaop( A_i )B_i, or C_i := alphaB_iop( A_i ) for i = 0, 1, ... batch_count -1

where alpha is a scalar, B_i is an m by n matrix, A_i is a unit, or non-unit, upper or lower triangular matrix and op( A_i ) is one of

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

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

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

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

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

function mublasDtrmmOutofplaceBatched​

mublasStatus mublasDtrmmOutofplaceBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
mublas_int n,
const double * alpha,
const double *const A[],
mublas_int lda,
const double *const B[],
mublas_int ldb,
double *const C[],
mublas_int ldc,
mublas_int batch_count
)

function mublasCtrmmOutofplaceBatched​

mublasStatus mublasCtrmmOutofplaceBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
mublas_int n,
const muComplex * alpha,
const muComplex *const A[],
mublas_int lda,
const muComplex *const B[],
mublas_int ldb,
muComplex *const C[],
mublas_int ldc,
mublas_int batch_count
)

function mublasZtrmmOutofplaceBatched​

mublasStatus mublasZtrmmOutofplaceBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex *const A[],
mublas_int lda,
const muDoubleComplex *const B[],
mublas_int ldb,
muDoubleComplex *const C[],
mublas_int ldc,
mublas_int batch_count
)

function mublasStrmmOutofplaceStridedBatched​

mublasStatus mublasStrmmOutofplaceStridedBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
mublas_int n,
const float * alpha,
const float * A,
mublas_int lda,
mublas_stride stride_A,
const float * B,
mublas_int ldb,
mublas_stride stride_B,
float * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • side [mublasSideMode_t] Specifies whether op(A_i) multiplies B_i from the left or right as follows: MUBLAS_SIDE_LEFT: C_i := alphaop( A_i )B_i. MUBLAS_SIDE_RIGHT: C_i := alphaB_iop( A_i ).
  • 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_i) to be used in the matrix multiplication as follows: MUBLAS_OP_N: op(A_i) = A_i. MUBLAS_OP_T: op(A_i) = A_i^T. MUBLAS_OP_C: op(A_i) = A_i^H.
  • diag [mublasDiagType_t] Specifies whether or not A_i is unit triangular as follows: MUBLAS_DIAG_UNIT: A_i is assumed to be unit triangular. MUBLAS_DIAG_NON_UNIT: A_i is not assumed to be unit triangular.
  • m [mublas_int] m specifies the number of rows of B_i. m >= 0.
  • n [mublas_int] n specifies the number of columns of B_i. n >= 0.
  • alpha alpha specifies the scalar alpha. When alpha is zero then A_i is not referenced and B_i need not be set before entry.
  • A Device pointer to the first matrix A_0 on the GPU. Each A_i is of dimension ( lda, k ), where k is m when side == MUBLAS_SIDE_LEFT and is n when side == MUBLAS_SIDE_RIGHT.
  • lda [mublas_int] lda specifies the first dimension of A. if side == MUBLAS_SIDE_LEFT, lda >= max( 1, m ), if side == MUBLAS_SIDE_RIGHT, lda >= max( 1, n ).
  • stride_A [mublas_stride] stride from the start of one matrix (A_i) and the next one (A_i+1)
  • B Device pointer to the first matrix B_0 on the GPU.
  • ldb [mublas_int] ldb specifies the first dimension of B_i. ldb >= max( 1, m ).
  • stride_B [mublas_stride] stride from the start of one matrix (B_i) and the next one (B_i+1)
  • C Device pointer to the first matrix C_0 on the GPU.
  • ldc [mublas_int] ldc specifies the first dimension of C_i. ldc >= max( 1, m).
  • stride_C [mublas_stride] stride from the start of one matrix (C_i) and the next one (C_i+1)
  • batch_count [mublas_int] number of instances i in the batch.

trmm_outofplace_strided_batched performs one of the strided_batched matrix-matrix operations

C_i := alphaop( A_i )B_i, or C_i := alphaB_iop( A_i ) for i = 0, 1, ... batch_count -1

where alpha is a scalar, B_i is an m by n matrix, A_i is a unit, or non-unit, upper or lower triangular matrix and op( A_i ) is one of

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

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

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

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

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

function mublasDtrmmOutofplaceStridedBatched​

mublasStatus mublasDtrmmOutofplaceStridedBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
mublas_int n,
const double * alpha,
const double * A,
mublas_int lda,
mublas_stride stride_A,
const double * B,
mublas_int ldb,
mublas_stride stride_B,
double * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasCtrmmOutofplaceStridedBatched​

mublasStatus mublasCtrmmOutofplaceStridedBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
mublas_int n,
const muComplex * alpha,
const muComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muComplex * B,
mublas_int ldb,
mublas_stride stride_B,
muComplex * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasZtrmmOutofplaceStridedBatched​

mublasStatus mublasZtrmmOutofplaceStridedBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muDoubleComplex * B,
mublas_int ldb,
mublas_stride stride_B,
muDoubleComplex * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasStrtri​

mublasStatus mublasStrtri(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasDiagType_t diag,
mublas_int n,
const float * A,
mublas_int lda,
float * invA,
mublas_int ldinvA
)

BLAS Level 3 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] specifies whether the upper 'MUBLAS_FILL_MODE_UPPER' or lower 'MUBLAS_FILL_MODE_LOWER' if MUBLAS_FILL_MODE_UPPER, the lower part of A is not referenced if MUBLAS_FILL_MODE_LOWER, the upper part of A is not referenced
  • diag [mublasDiagType_t] = 'MUBLAS_DIAG_NON_UNIT', A is non-unit triangular; = 'MUBLAS_DIAG_UNIT', A is unit triangular;
  • n [mublas_int] size of matrix A and invA
  • A device pointer storing matrix A.
  • lda [mublas_int] specifies the leading dimension of A.
  • invA device pointer storing matrix invA.
  • ldinvA [mublas_int] specifies the leading dimension of invA.

trtri compute the inverse of a matrix A, namely, invA

and write the result into invA;

function mublasDtrtri​

mublasStatus mublasDtrtri(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasDiagType_t diag,
mublas_int n,
const double * A,
mublas_int lda,
double * invA,
mublas_int ldinvA
)

function mublasCtrtri​

mublasStatus mublasCtrtri(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasDiagType_t diag,
mublas_int n,
const muComplex * A,
mublas_int lda,
muComplex * invA,
mublas_int ldinvA
)

function mublasZtrtri​

mublasStatus mublasZtrtri(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasDiagType_t diag,
mublas_int n,
const muDoubleComplex * A,
mublas_int lda,
muDoubleComplex * invA,
mublas_int ldinvA
)

function mublasStrtriBatched​

mublasStatus mublasStrtriBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasDiagType_t diag,
mublas_int n,
const float *const A[],
mublas_int lda,
float *const invA[],
mublas_int ldinvA,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] specifies whether the upper 'MUBLAS_FILL_MODE_UPPER' or lower 'MUBLAS_FILL_MODE_LOWER'
  • diag [mublasDiagType_t] = 'MUBLAS_DIAG_NON_UNIT', A is non-unit triangular; = 'MUBLAS_DIAG_UNIT', A is unit triangular;
  • n [mublas_int]
  • A device array of device pointers storing each matrix A_i.
  • lda [mublas_int] specifies the leading dimension of each A_i.
  • invA device array of device pointers storing the inverse of each matrix A_i. Partial inplace operation is supported, see below. If UPLO = 'U', the leading N-by-N upper triangular part of the invA will store the inverse of the upper triangular matrix, and the strictly lower triangular part of invA is cleared. If UPLO = 'L', the leading N-by-N lower triangular part of the invA will store the inverse of the lower triangular matrix, and the strictly upper triangular part of invA is cleared.
  • ldinvA [mublas_int] specifies the leading dimension of each invA_i.
  • batch_count [mublas_int] numbers of matrices in the batch

trtri_batched compute the inverse of A_i and write into invA_i where A_i and invA_i are the i-th matrices in the batch, for i = 1, ..., batch_count.

function mublasDtrtriBatched​

mublasStatus mublasDtrtriBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasDiagType_t diag,
mublas_int n,
const double *const A[],
mublas_int lda,
double *const invA[],
mublas_int ldinvA,
mublas_int batch_count
)

function mublasCtrtriBatched​

mublasStatus mublasCtrtriBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasDiagType_t diag,
mublas_int n,
const muComplex *const A[],
mublas_int lda,
muComplex *const invA[],
mublas_int ldinvA,
mublas_int batch_count
)

function mublasZtrtriBatched​

mublasStatus mublasZtrtriBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasDiagType_t diag,
mublas_int n,
const muDoubleComplex *const A[],
mublas_int lda,
muDoubleComplex *const invA[],
mublas_int ldinvA,
mublas_int batch_count
)

function mublasStrtriStridedBatched​

mublasStatus mublasStrtriStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasDiagType_t diag,
mublas_int n,
const float * A,
mublas_int lda,
mublas_stride stride_a,
float * invA,
mublas_int ldinvA,
mublas_stride stride_invA,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • uplo [mublasFillMode_t] specifies whether the upper 'MUBLAS_FILL_MODE_UPPER' or lower 'MUBLAS_FILL_MODE_LOWER'
  • diag [mublasDiagType_t] = 'MUBLAS_DIAG_NON_UNIT', A is non-unit triangular; = 'MUBLAS_DIAG_UNIT', A is unit triangular;
  • n [mublas_int]
  • A device pointer pointing to address of first matrix A_1.
  • lda [mublas_int] specifies the leading dimension of each A.
  • stride_a [mublas_stride] "batch stride a": stride from the start of one A_i matrix to the next A_(i + 1).
  • invA device pointer storing the inverses of each matrix A_i. Partial inplace operation is supported, see below. If UPLO = 'U', the leading N-by-N upper triangular part of the invA will store the inverse of the upper triangular matrix, and the strictly lower triangular part of invA is cleared. If UPLO = 'L', the leading N-by-N lower triangular part of the invA will store the inverse of the lower triangular matrix, and the strictly upper triangular part of invA is cleared.
  • ldinvA [mublas_int] specifies the leading dimension of each invA_i.
  • stride_invA [mublas_stride] "batch stride invA": stride from the start of one invA_i matrix to the next invA_(i + 1).
  • batch_count [mublas_int] numbers of matrices in the batch

trtri_strided_batched compute the inverse of A_i and write into invA_i where A_i and invA_i are the i-th matrices in the batch, for i = 1, ..., batch_count

function mublasDtrtriStridedBatched​

mublasStatus mublasDtrtriStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasDiagType_t diag,
mublas_int n,
const double * A,
mublas_int lda,
mublas_stride stride_a,
double * invA,
mublas_int ldinvA,
mublas_stride stride_invA,
mublas_int batch_count
)

function mublasCtrtriStridedBatched​

mublasStatus mublasCtrtriStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasDiagType_t diag,
mublas_int n,
const muComplex * A,
mublas_int lda,
mublas_stride stride_a,
muComplex * invA,
mublas_int ldinvA,
mublas_stride stride_invA,
mublas_int batch_count
)

function mublasZtrtriStridedBatched​

mublasStatus mublasZtrtriStridedBatched(
mublasHandle_t handle,
mublasFillMode_t uplo,
mublasDiagType_t diag,
mublas_int n,
const muDoubleComplex * A,
mublas_int lda,
mublas_stride stride_a,
muDoubleComplex * invA,
mublas_int ldinvA,
mublas_stride stride_invA,
mublas_int batch_count
)

function mublasStrsm​

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

BLAS Level 3 API.

Parameters:

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

trsm solves

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

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

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

The matrix X is overwritten on B.

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

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

function mublasDtrsm​

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

function mublasCtrsm​

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

function mublasZtrsm​

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

function mublasStrsmBatched​

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

BLAS Level 3 API.

Parameters:

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

trsm_batched performs the following batched operation:

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

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

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

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

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

function mublasDtrsmBatched​

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

function mublasCtrsmBatched​

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

function mublasZtrsmBatched​

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

function mublasStrsmStridedBatched​

mublasStatus mublasStrsmStridedBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
mublas_int n,
const float * alpha,
const float * A,
mublas_int lda,
mublas_stride stride_a,
float * B,
mublas_int ldb,
mublas_stride stride_b,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

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

trsm_srided_batched performs the following strided batched operation:

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

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

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

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

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

function mublasDtrsmStridedBatched​

mublasStatus mublasDtrsmStridedBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
mublas_int n,
const double * alpha,
const double * A,
mublas_int lda,
mublas_stride stride_a,
double * B,
mublas_int ldb,
mublas_stride stride_b,
mublas_int batch_count
)

function mublasCtrsmStridedBatched​

mublasStatus mublasCtrsmStridedBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
mublas_int n,
const muComplex * alpha,
const muComplex * A,
mublas_int lda,
mublas_stride stride_a,
muComplex * B,
mublas_int ldb,
mublas_stride stride_b,
mublas_int batch_count
)

function mublasZtrsmStridedBatched​

mublasStatus mublasZtrsmStridedBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex * A,
mublas_int lda,
mublas_stride stride_a,
muDoubleComplex * B,
mublas_int ldb,
mublas_stride stride_b,
mublas_int batch_count
)

function mublasSgemm​

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

BLAS Level 3 API.

Parameters:

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

gemm performs one of the matrix-matrix operations

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

where op( X ) is one of

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

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

function mublasDgemm​

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

function mublasCgemm​

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

function mublasZgemm​

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

function mublasSgemmBatched​

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

BLAS Level 3 API.

Parameters:

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

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

function mublasDgemmBatched​

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

function mublasCgemmBatched​

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

function mublasZgemmBatched​

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

function mublasSgemmStridedBatched​

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

BLAS Level 3 API.

Parameters:

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

gemm_strided_batched performs one of the strided batched matrix-matrix operations

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

where op( X ) is one of

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

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

function mublasDgemmStridedBatched​

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

function mublasHgemm_kernel_name​

mublasStatus mublasHgemm_kernel_name(
mublasHandle_t handle,
mublasOperation_t transA,
mublasOperation_t transB,
mublas_int m,
mublas_int n,
mublas_int k,
const mublas_half * alpha,
const mublas_half * A,
mublas_int lda,
mublas_stride stride_a,
const mublas_half * B,
mublas_int ldb,
mublas_stride stride_b,
const mublas_half * beta,
mublas_half * C,
mublas_int ldc,
mublas_stride stride_c,
mublas_int batch_count
)

function mublasSgemm_kernel_name​

mublasStatus mublasSgemm_kernel_name(
mublasHandle_t handle,
mublasOperation_t transA,
mublasOperation_t transB,
mublas_int m,
mublas_int n,
mublas_int k,
const float * alpha,
const float * A,
mublas_int lda,
mublas_stride stride_a,
const float * B,
mublas_int ldb,
mublas_stride stride_b,
const float * beta,
float * C,
mublas_int ldc,
mublas_stride stride_c,
mublas_int batch_count
)

function mublasDgemm_kernel_name​

mublasStatus mublasDgemm_kernel_name(
mublasHandle_t handle,
mublasOperation_t transA,
mublasOperation_t transB,
mublas_int m,
mublas_int n,
mublas_int k,
const double * alpha,
const double * A,
mublas_int lda,
mublas_stride stride_a,
const double * B,
mublas_int ldb,
mublas_stride stride_b,
const double * beta,
double * C,
mublas_int ldc,
mublas_stride stride_c,
mublas_int batch_count
)

function mublasCgemmStridedBatched​

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

function mublasZgemmStridedBatched​

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

function mublasSdgmm​

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

BLAS Level 3 API.

Parameters:

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

dgmm performs one of the matrix-matrix operations

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

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

function mublasDdgmm​

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

function mublasCdgmm​

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

function mublasZdgmm​

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

function mublasSdgmmBatched​

mublasStatus mublasSdgmmBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublas_int m,
mublas_int n,
const float *const A[],
mublas_int lda,
const float *const x[],
mublas_int incx,
float *const C[],
mublas_int ldc,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • side [mublasSideMode_t] specifies the side of diag(x)
  • m [mublas_int] matrix dimension m.
  • n [mublas_int] matrix dimension n.
  • A device array of device pointers storing each matrix A_i on the GPU. Each A_i is of dimension ( lda, n )
  • lda [mublas_int] specifies the leading dimension of A_i.
  • x device array of device pointers storing each vector x_i on the GPU. Each x_i is of dimension n if side == MUBLAS_SIDE_RIGHT and dimension m if side == MUBLAS_SIDE_LEFT
  • incx [mublas_int] specifies the increment between values of x_i
  • C device array of device pointers storing each matrix C_i on the GPU. Each C_i is of dimension ( ldc, n ).
  • ldc [mublas_int] specifies the leading dimension of C_i.
  • batch_count [mublas_int] number of instances in the batch.

dgmm_batched performs one of the batched matrix-matrix operations

C_i = A_i * diag(x_i) for i = 0, 1, ... batch_count-1 if side == MUBLAS_SIDE_RIGHT
C_i = diag(x_i) * A_i for i = 0, 1, ... batch_count-1 if side == MUBLAS_SIDE_LEFT

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

function mublasDdgmmBatched​

mublasStatus mublasDdgmmBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublas_int m,
mublas_int n,
const double *const A[],
mublas_int lda,
const double *const x[],
mublas_int incx,
double *const C[],
mublas_int ldc,
mublas_int batch_count
)

function mublasCdgmmBatched​

mublasStatus mublasCdgmmBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublas_int m,
mublas_int n,
const muComplex *const A[],
mublas_int lda,
const muComplex *const x[],
mublas_int incx,
muComplex *const C[],
mublas_int ldc,
mublas_int batch_count
)

function mublasZdgmmBatched​

mublasStatus mublasZdgmmBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublas_int m,
mublas_int n,
const muDoubleComplex *const A[],
mublas_int lda,
const muDoubleComplex *const x[],
mublas_int incx,
muDoubleComplex *const C[],
mublas_int ldc,
mublas_int batch_count
)

function mublasSdgmmStridedBatched​

mublasStatus mublasSdgmmStridedBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublas_int m,
mublas_int n,
const float * A,
mublas_int lda,
mublas_stride stride_A,
const float * x,
mublas_int incx,
mublas_stride stride_x,
float * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • side [mublasSideMode_t] specifies the side of diag(x)
  • m [mublas_int] matrix dimension m.
  • n [mublas_int] matrix dimension n.
  • A device pointer to the first matrix A_0 on the GPU. Each A_i is of dimension ( lda, n )
  • lda [mublas_int] specifies the leading dimension of A.
  • stride_A [mublas_stride] stride from the start of one matrix (A_i) and the next one (A_i+1)
  • x pointer to the first vector x_0 on the GPU. Each x_i is of dimension n if side == MUBLAS_SIDE_RIGHT and dimension m if side == MUBLAS_SIDE_LEFT
  • incx [mublas_int] specifies the increment between values of x
  • stride_x [mublas_stride] stride from the start of one vector(x_i) and the next one (x_i+1)
  • C device pointer to the first matrix C_0 on the GPU. Each C_i is of dimension ( ldc, n ).
  • ldc [mublas_int] specifies the leading dimension of C.
  • stride_C [mublas_stride] stride from the start of one matrix (C_i) and the next one (C_i+1)
  • batch_count [mublas_int] number of instances i in the batch.

dgmm_strided_batched performs one of the batched matrix-matrix operations

C_i = A_i * diag(x_i) if side == MUBLAS_SIDE_RIGHT for i = 0, 1, ... batch_count-1
C_i = diag(x_i) * A_i if side == MUBLAS_SIDE_LEFT for i = 0, 1, ... batch_count-1

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

function mublasDdgmmStridedBatched​

mublasStatus mublasDdgmmStridedBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublas_int m,
mublas_int n,
const double * A,
mublas_int lda,
mublas_stride stride_A,
const double * x,
mublas_int incx,
mublas_stride stride_x,
double * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasCdgmmStridedBatched​

mublasStatus mublasCdgmmStridedBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublas_int m,
mublas_int n,
const muComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muComplex * x,
mublas_int incx,
mublas_stride stride_x,
muComplex * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasZdgmmStridedBatched​

mublasStatus mublasZdgmmStridedBatched(
mublasHandle_t handle,
mublasSideMode_t side,
mublas_int m,
mublas_int n,
const muDoubleComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muDoubleComplex * x,
mublas_int incx,
mublas_stride stride_x,
muDoubleComplex * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasSgeam​

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

BLAS Level 3 API.

Parameters:

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

geam performs one of the matrix-matrix operations

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

where op( X ) is one of

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

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

function mublasDgeam​

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

function mublasCgeam​

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

function mublasZgeam​

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

function mublasSgeamBatched​

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

BLAS Level 3 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • transA [mublasOperation_t] specifies the form of op( A )
  • transB [mublasOperation_t] specifies the form of op( B )
  • m [mublas_int] matrix dimension m.
  • n [mublas_int] matrix dimension n.
  • alpha device pointer or host pointer specifying the scalar alpha.
  • A device array of device pointers storing each matrix A_i on the GPU. Each A_i is of dimension ( lda, k ), where k is m when transA == MUBLAS_OP_N and is n when transA == MUBLAS_OP_T.
  • lda [mublas_int] specifies the leading dimension of A.
  • beta device pointer or host pointer specifying the scalar beta.
  • B device array of device pointers storing each matrix B_i on the GPU. Each B_i is of dimension ( ldb, k ), where k is m when transB == MUBLAS_OP_N and is n when transB == MUBLAS_OP_T.
  • ldb [mublas_int] specifies the leading dimension of B.
  • C device array of device pointers storing each matrix C_i on the GPU. Each C_i is of dimension ( ldc, n ).
  • ldc [mublas_int] specifies the leading dimension of C.
  • batch_count [mublas_int] number of instances i in the batch.

geam_batched performs one of the batched matrix-matrix operations

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

where alpha and beta are scalars, and op(A_i), op(B_i) and C_i are m by n matrices and op( X ) is one of

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

function mublasDgeamBatched​

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

function mublasCgeamBatched​

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

function mublasZgeamBatched​

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

function mublasSgeamStridedBatched​

mublasStatus mublasSgeamStridedBatched(
mublasHandle_t handle,
mublasOperation_t transA,
mublasOperation_t transB,
mublas_int m,
mublas_int n,
const float * alpha,
const float * A,
mublas_int lda,
mublas_stride stride_A,
const float * beta,
const float * B,
mublas_int ldb,
mublas_stride stride_B,
float * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

BLAS Level 3 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • transA [mublasOperation_t] specifies the form of op( A )
  • transB [mublasOperation_t] specifies the form of op( B )
  • m [mublas_int] matrix dimension m.
  • n [mublas_int] matrix dimension n.
  • alpha device pointer or host pointer specifying the scalar alpha.
  • A device pointer to the first matrix A_0 on the GPU. Each A_i is of dimension ( lda, k ), where k is m when transA == MUBLAS_OP_N and is n when transA == MUBLAS_OP_T.
  • lda [mublas_int] specifies the leading dimension of A.
  • stride_A [mublas_stride] stride from the start of one matrix (A_i) and the next one (A_i+1)
  • beta device pointer or host pointer specifying the scalar beta.
  • B pointer to the first matrix B_0 on the GPU. Each B_i is of dimension ( ldb, k ), where k is m when transB == MUBLAS_OP_N and is n when transB == MUBLAS_OP_T.
  • ldb [mublas_int] specifies the leading dimension of B.
  • stride_B [mublas_stride] stride from the start of one matrix (B_i) and the next one (B_i+1)
  • C pointer to the first matrix C_0 on the GPU. Each C_i is of dimension ( ldc, n ).
  • ldc [mublas_int] specifies the leading dimension of C.
  • stride_C [mublas_stride] stride from the start of one matrix (C_i) and the next one (C_i+1)
  • batch_count [mublas_int] number of instances i in the batch.

geam_strided_batched performs one of the batched matrix-matrix operations

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

where alpha and beta are scalars, and op(A_i), op(B_i) and C_i are m by n matrices and op( X ) is one of

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

function mublasDgeamStridedBatched​

mublasStatus mublasDgeamStridedBatched(
mublasHandle_t handle,
mublasOperation_t transA,
mublasOperation_t transB,
mublas_int m,
mublas_int n,
const double * alpha,
const double * A,
mublas_int lda,
mublas_stride stride_A,
const double * beta,
const double * B,
mublas_int ldb,
mublas_stride stride_B,
double * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasCgeamStridedBatched​

mublasStatus mublasCgeamStridedBatched(
mublasHandle_t handle,
mublasOperation_t transA,
mublasOperation_t transB,
mublas_int m,
mublas_int n,
const muComplex * alpha,
const muComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muComplex * beta,
const muComplex * B,
mublas_int ldb,
mublas_stride stride_B,
muComplex * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasZgeamStridedBatched​

mublasStatus mublasZgeamStridedBatched(
mublasHandle_t handle,
mublasOperation_t transA,
mublasOperation_t transB,
mublas_int m,
mublas_int n,
const muDoubleComplex * alpha,
const muDoubleComplex * A,
mublas_int lda,
mublas_stride stride_A,
const muDoubleComplex * beta,
const muDoubleComplex * B,
mublas_int ldb,
mublas_stride stride_B,
muDoubleComplex * C,
mublas_int ldc,
mublas_stride stride_C,
mublas_int batch_count
)

function mublasGemmEx​

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

BLAS EX API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • transA [mublasOperation_t] specifies the form of op( A ).
  • transB [mublasOperation_t] specifies the form of op( B ).
  • m [mublas_int] matrix dimension m.
  • n [mublas_int] matrix dimension n.
  • k [mublas_int] matrix dimension k.
  • alpha [const void *] device pointer or host pointer specifying the scalar alpha. Same datatype as compute_type.
  • a [void *] device pointer storing matrix A.
  • a_type [musaDataType_t] specifies the datatype of matrix A.
  • lda [mublas_int] specifies the leading dimension of A.
  • b [void *] device pointer storing matrix B.
  • b_type [musaDataType_t] specifies the datatype of matrix B.
  • ldb [mublas_int] specifies the leading dimension of B.
  • beta [const void *] device pointer or host pointer specifying the scalar beta. Same datatype as compute_type.
  • c [void *] device pointer storing matrix C.
  • c_type [musaDataType_t] specifies the datatype of matrix C.
  • ldc [mublas_int] specifies the leading dimension of C.
  • d [void *] device pointer storing matrix D. If d and c pointers are to the same matrix then d_type must equal c_type and ldd must equal ldc or the respective invalid status will be returned.
  • d_type [musaDataType_t] specifies the datatype of matrix D.
  • ldd [mublas_int] specifies the leading dimension of D.
  • compute_type [musaDataType_t] specifies the datatype of computation.
  • algo [mublasGemmAlgo_t] enumerant specifying the algorithm type.
  • solution_index [int32_t] reserved for future use.
  • flags [uint32_t] optional gemm flags.

gemm_ex performs one of the matrix-matrix operations

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

where op( X ) is one of

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

alpha and beta are scalars, and A, B, C, and D are matrices, with op( A ) an m by k matrix, op( B ) a k by n matrix and C and D are m by n matrices. C and D may point to the same matrix if their parameters are identical.

Supported types are as follows:

  • MUSA_R_64F = a_type = b_type = c_type = d_type = compute_type
  • MUSA_R_32F = a_type = b_type = c_type = d_type = compute_type
  • MUSA_R_16F = a_type = b_type = c_type = d_type = compute_type
  • MUSA_R_16F = a_type = b_type = c_type = d_type; MUSA_R_32F = compute_type
  • MUSA_R_16F = a_type = b_type; MUSA_R_32F = c_type = d_type = compute_type
  • MUSA_R_16BF = a_type = b_type = c_type = d_type; MUSA_R_32F = compute_type
  • MUSA_R_16BF = a_type = b_type; MUSA_R_32F = c_type = d_type = compute_type
  • MUSA_R_8I = a_type = b_type; MUSA_R_32I = c_type = d_type = compute_type
  • MUSA_C_32F = a_type = b_type = c_type = d_type = compute_type
  • MUSA_C_64F = a_type = b_type = c_type = d_type = compute_type

ROCm 4.2 supports two different versions of a = b = i8_r (in) and c = d = i32_r (out):

  • Both versions are MUSA_R_8I = a_type = b_type; MUSA_R_32I = c_type = d_type = compute_type, in addition to a last flag param indicating packing input or not.
- Without setting the last param 'flags' (default=none), this is supported for gfx908 or

later GPUs only. Input a/b won't be packed into int8x4. So the following size restrictions and packing pseudo-code is not neccessary.

- Set the last param 'flags' |= MUBLAS_GEMM_FLAGS_PACK_INT8x4. Input a/b would be packed

into int8x4, and this will impose some size restrictions on A or B (See below.) For GPUs before gfx908, only packed-int8 version is supported so this flag and packing is required, while gfx908 GPUs support both versions.

Below are restrictions for MUSA_R_8I = a_type = b_type; MUSA_R_32I = c_type = d_type = compute_type; flags |= MUBLAS_GEMM_FLAGS_PACK_INT8x4:

  • k must be a multiple of 4
  • lda must be a multiple of 4 if transA == MUBLAS_OP_T
  • ldb must be a multiple of 4 if transB == MUBLAS_OP_N
  • for transA == MUBLAS_OP_N or transB == MUBLAS_OP_T the matrices A and B must have each 4 consecutive values in the k dimension packed. This packing can be achieved with the following pseudo-code. The code assumes the original matrices are in A and B, and the packed matrices are A_packed and B_packed. The size of the A_packed matrix is the same as the size of the A matrix, and the size of the B_packed matrix is the same as the size of the B matrix.
if(transA == MUBLAS_OP_N)
{
int nb = 4;
for(int i_m = 0; i_m < m; i_m++)
{
for(int i_k = 0; i_k < k; i_k++)
{
A_packed[i_k % nb + (i_m + (i_k / nb) * lda) * nb] = A[i_m + i_k * lda];
}
}
}
else
{
A_packed = A;
}
if(transB == MUBLAS_OP_T)
{
int nb = 4;
for(int i_n = 0; i_n < m; i_n++)
{
for(int i_k = 0; i_k < k; i_k++)
{
B_packed[i_k % nb + (i_n + (i_k / nb) * ldb) * nb] = B[i_n + i_k * ldb];
}
}
}
else
{
B_packed = B;
}

function mublasGemmEx​

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

function mublasGemmBatchedEx​

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

BLAS EX API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • transA [mublasOperation_t] specifies the form of op( A ).
  • transB [mublasOperation_t] specifies the form of op( B ).
  • m [mublas_int] matrix dimension m.
  • n [mublas_int] matrix dimension n.
  • k [mublas_int] matrix dimension k.
  • alpha [const void *] device pointer or host pointer specifying the scalar alpha. Same datatype as compute_type.
  • a [void *] device pointer storing array of pointers to each matrix A_i.
  • a_type [musaDataType_t] specifies the datatype of each matrix A_i.
  • lda [mublas_int] specifies the leading dimension of each A_i.
  • b [void *] device pointer storing array of pointers to each matrix B_i.
  • b_type [musaDataType_t] specifies the datatype of each matrix B_i.
  • ldb [mublas_int] specifies the leading dimension of each B_i.
  • beta [const void *] device pointer or host pointer specifying the scalar beta. Same datatype as compute_type.
  • c [void *] device array of device pointers to each matrix C_i.
  • c_type [musaDataType_t] specifies the datatype of each matrix C_i.
  • ldc [mublas_int] specifies the leading dimension of each C_i.
  • d [void *] device array of device pointers to each matrix D_i. If d and c are the same array of matrix pointers then d_type must equal c_type and ldd must equal ldc or the respective invalid status will be returned.
  • d_type [musaDataType_t] specifies the datatype of each matrix D_i.
  • ldd [mublas_int] specifies the leading dimension of each D_i.
  • batch_count [mublas_int] number of gemm operations in the batch.
  • compute_type [musaDataType_t] specifies the datatype of computation.
  • algo [mublasGemmAlgo_t] enumerant specifying the algorithm type.
  • solution_index [int32_t] reserved for future use.
  • flags [uint32_t] optional gemm flags.

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

Supported types are as follows:

  • MUSA_R_64F = a_type = b_type = c_type = d_type = compute_type
  • MUSA_R_32F = a_type = b_type = c_type = d_type = compute_type
  • MUSA_R_16F = a_type = b_type = c_type = d_type = compute_type
  • MUSA_R_16F = a_type = b_type = c_type = d_type; MUSA_R_32F = compute_type
  • MUSA_R_16BF = a_type = b_type = c_type = d_type; MUSA_R_32F = compute_type
  • MUSA_R_8I = a_type = b_type; MUSA_R_32I = c_type = d_type = compute_type
  • MUSA_C_32F = a_type = b_type = c_type = d_type = compute_type
  • MUSA_C_64F = a_type = b_type = c_type = d_type = compute_type

ROCm 4.2 supports two different versions of a = b = i8_r (in) and c = d = i32_r (out):

  • Both versions are MUSA_R_8I = a_type = b_type; MUSA_R_32I = c_type = d_type = compute_type, in addition to a last flag param indicating packing input or not.
- Without setting the last param 'flags' (default=none), this is supported for gfx908 or

later GPUs only. Input a/b won't be packed into int8x4. So the following size restrictions and packing pseudo-code is not neccessary.

- Set the last param 'flags' |= MUBLAS_GEMM_FLAGS_PACK_INT8x4. Input a/b would be packed

into int8x4, and this will impose some size restrictions on A or B (See below.) For GPUs before gfx908, only packed-int8 version is supported so this flag and packing is required, while gfx908 GPUs support both versions.

Below are restrictions for MUSA_R_8I = a_type = b_type; MUSA_R_32I = c_type = d_type = compute_type; flags |= MUBLAS_GEMM_FLAGS_PACK_INT8x4:

  • k must be a multiple of 4
  • lda must be a multiple of 4 if transA == MUBLAS_OP_T
  • ldb must be a multiple of 4 if transB == MUBLAS_OP_N
  • for transA == MUBLAS_OP_N or transB == MUBLAS_OP_T the matrices A and B must have each 4 consecutive values in the k dimension packed. This packing can be achieved with the following pseudo-code. The code assumes the original matrices are in A and B, and the packed matrices are A_packed and B_packed. The size of the A_packed matrix is the same as the size of the A matrix, and the size of the B_packed matrix is the same as the size of the B matrix.
if(transA == MUBLAS_OP_N)
{
int nb = 4;
for(int i_m = 0; i_m < m; i_m++)
{
for(int i_k = 0; i_k < k; i_k++)
{
A_packed[i_k % nb + (i_m + (i_k / nb) * lda) * nb] = A[i_m + i_k * lda];
}
}
}
else
{
A_packed = A;
}
if(transB == MUBLAS_OP_T)
{
int nb = 4;
for(int i_n = 0; i_n < m; i_n++)
{
for(int i_k = 0; i_k < k; i_k++)
{
B_packed[i_k % nb + (i_n + (i_k / nb) * ldb) * nb] = B[i_n + i_k * ldb];
}
}
}
else
{
B_packed = B;
}

function mublasGemmBatchedEx​

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

function mublasGemmStridedBatchedEx​

mublasStatus mublasGemmStridedBatchedEx(
mublasHandle_t handle,
mublasOperation_t transA,
mublasOperation_t transB,
mublas_int m,
mublas_int n,
mublas_int k,
const void * alpha,
const void * a,
musaDataType_t a_type,
mublas_int lda,
mublas_stride stride_a,
const void * b,
musaDataType_t b_type,
mublas_int ldb,
mublas_stride stride_b,
const void * beta,
void * c,
musaDataType_t c_type,
mublas_int ldc,
mublas_stride stride_c,
mublas_int batch_count,
musaDataType_t compute_type,
mublasGemmAlgo_t algo
)

BLAS EX API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • transA [mublasOperation_t] specifies the form of op( A ).
  • transB [mublasOperation_t] specifies the form of op( B ).
  • m [mublas_int] matrix dimension m.
  • n [mublas_int] matrix dimension n.
  • k [mublas_int] matrix dimension k.
  • alpha [const void *] device pointer or host pointer specifying the scalar alpha. Same datatype as compute_type.
  • a [void *] device pointer pointing to first matrix A_1.
  • a_type [musaDataType_t] specifies the datatype of each matrix A_i.
  • lda [mublas_int] specifies the leading dimension of each A_i.
  • stride_a [mublas_stride] specifies stride from start of one A_i matrix to the next A_(i + 1).
  • b [void *] device pointer pointing to first matrix B_1.
  • b_type [musaDataType_t] specifies the datatype of each matrix B_i.
  • ldb [mublas_int] specifies the leading dimension of each B_i.
  • stride_b [mublas_stride] specifies stride from start of one B_i matrix to the next B_(i + 1).
  • beta [const void *] device pointer or host pointer specifying the scalar beta. Same datatype as compute_type.
  • c [void *] device pointer pointing to first matrix C_1.
  • c_type [musaDataType_t] specifies the datatype of each matrix C_i.
  • ldc [mublas_int] specifies the leading dimension of each C_i.
  • stride_c [mublas_stride] specifies stride from start of one C_i matrix to the next C_(i + 1).
  • d [void *] device pointer storing each matrix D_i. If d and c pointers are to the same matrix then d_type must equal c_type and ldd must equal ldc and stride_d must equal stride_c or the respective invalid status will be returned.
  • d_type [musaDataType_t] specifies the datatype of each matrix D_i.
  • ldd [mublas_int] specifies the leading dimension of each D_i.
  • stride_d [mublas_stride] specifies stride from start of one D_i matrix to the next D_(i + 1).
  • batch_count [mublas_int] number of gemm operations in the batch.
  • compute_type [musaDataType_t] specifies the datatype of computation.
  • algo [mublasGemmAlgo_t] enumerant specifying the algorithm type.
  • solution_index [int32_t] reserved for future use.
  • flags [uint32_t] optional gemm flags.

gemm_strided_batched_ex performs one of the strided_batched matrix-matrix operations

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

where op( X ) is one of

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

alpha and beta are scalars, and A, B, C, and D are strided_batched matrices, with op( A ) an m by k by batch_count strided_batched matrix, op( B ) a k by n by batch_count strided_batched matrix and C and D are m by n by batch_count strided_batched matrices. C and D may point to the same matrices if their parameters are identical.

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

Supported types are as follows:

  • MUSA_R_64F = a_type = b_type = c_type = d_type = compute_type
  • MUSA_R_32F = a_type = b_type = c_type = d_type = compute_type
  • MUSA_R_16F = a_type = b_type = c_type = d_type = compute_type
  • MUSA_R_16F = a_type = b_type = c_type = d_type; MUSA_R_32F = compute_type
  • MUSA_R_16BF = a_type = b_type = c_type = d_type; MUSA_R_32F = compute_type
  • MUSA_R_8I = a_type = b_type; MUSA_R_32I = c_type = d_type = compute_type
  • MUSA_C_32F = a_type = b_type = c_type = d_type = compute_type
  • MUSA_C_64F = a_type = b_type = c_type = d_type = compute_type

ROCm 4.2 supports two different versions of a = b = i8_r (in) and c = d = i32_r (out):

  • Both versions are MUSA_R_8I = a_type = b_type; MUSA_R_32I = c_type = d_type = compute_type, in addition to a last flag param indicating packing input or not.
- Without setting the last param 'flags' (default=none), this is supported for gfx908 or

later GPUs only. Input a/b won't be packed into int8x4. So the following size restrictions and packing pseudo-code is not neccessary.

- Set the last param 'flags' |= MUBLAS_GEMM_FLAGS_PACK_INT8x4. Input a/b would be packed

into int8x4, and this will impose some size restrictions on A or B (See below.) For GPUs before gfx908, only packed-int8 version is supported so this flag and packing is required, while gfx908 GPUs support both versions.

Below are restrictions for MUSA_R_8I = a_type = b_type; MUSA_R_32I = c_type = d_type = compute_type; flags |= MUBLAS_GEMM_FLAGS_PACK_INT8x4:

  • k must be a multiple of 4
  • lda must be a multiple of 4 if transA == MUBLAS_OP_T
  • ldb must be a multiple of 4 if transB == MUBLAS_OP_N
  • for transA == MUBLAS_OP_N or transB == MUBLAS_OP_T the matrices A and B must have each 4 consecutive values in the k dimension packed. This packing can be achieved with the following pseudo-code. The code assumes the original matrices are in A and B, and the packed matrices are A_packed and B_packed. The size of the A_packed matrix is the same as the size of the A matrix, and the size of the B_packed matrix is the same as the size of the B matrix.
if(transA == MUBLAS_OP_N)
{
int nb = 4;
for(int i_m = 0; i_m < m; i_m++)
{
for(int i_k = 0; i_k < k; i_k++)
{
A_packed[i_k % nb + (i_m + (i_k / nb) * lda) * nb] = A[i_m + i_k * lda];
}
}
}
else
{
A_packed = A;
}
if(transB == MUBLAS_OP_T)
{
int nb = 4;
for(int i_n = 0; i_n < m; i_n++)
{
for(int i_k = 0; i_k < k; i_k++)
{
B_packed[i_k % nb + (i_n + (i_k / nb) * ldb) * nb] = B[i_n + i_k * ldb];
}
}
}
else
{
B_packed = B;
}

function mublasGemmStridedBatchedEx​

mublasStatus mublasGemmStridedBatchedEx(
mublasHandle_t handle,
mublasOperation_t transA,
mublasOperation_t transB,
mublas_int m,
mublas_int n,
mublas_int k,
const void * alpha,
const void * a,
musaDataType_t a_type,
mublas_int lda,
mublas_stride stride_a,
const void * b,
musaDataType_t b_type,
mublas_int ldb,
mublas_stride stride_b,
const void * beta,
void * c,
musaDataType_t c_type,
mublas_int ldc,
mublas_stride stride_c,
mublas_int batch_count,
mublasComputeType_t compute_type,
mublasGemmAlgo_t algo
)

function mublasGemmExt2​

mublasStatus mublasGemmExt2(
mublasHandle_t handle,
mublas_int m,
mublas_int n,
mublas_int k,
const void * alpha,
const void * a,
musaDataType_t a_type,
mublas_stride row_stride_a,
mublas_stride col_stride_a,
const void * b,
musaDataType_t b_type,
mublas_stride row_stride_b,
mublas_stride col_stride_b,
const void * beta,
const void * c,
musaDataType_t c_type,
mublas_stride row_stride_c,
mublas_stride col_stride_c,
void * d,
musaDataType_t d_type,
mublas_stride row_stride_d,
mublas_stride col_stride_d,
musaDataType_t compute_type,
mublasGemmAlgo_t algo,
int32_t solution_index,
uint32_t flags
)

BLAS EX API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • m [mublas_int] matrix dimension m.
  • n [mublas_int] matrix dimension n.
  • k [mublas_int] matrix dimension k.
  • alpha [const void *] device pointer or host pointer specifying the scalar alpha. Same datatype as compute_type.
  • a [void *] device pointer storing matrix A.
  • a_type [musaDataType_t] specifies the datatype of matrix A.
  • row_stride_a [mublas_int] specifies the row stride of A.
  • col_stride_a [mublas_int] specifies the column stride of A.
  • b [void *] device pointer storing matrix B.
  • b_type [musaDataType_t] specifies the datatype of matrix B.
  • row_stride_b [mublas_int] specifies the row stride of B.
  • col_stride_b [mublas_int] specifies the column stride of B.
  • beta [const void *] device pointer or host pointer specifying the scalar beta. Same datatype as compute_type.
  • c [void *] device pointer storing matrix C.
  • c_type [musaDataType_t] specifies the datatype of matrix C.
  • row_stride_c [mublas_int] specifies the row stride of C.
  • col_stride_c [mublas_int] specifies the column stride of C.
  • d [void *] device pointer storing matrix D.
  • d_type [musaDataType_t] specifies the datatype of matrix D.
  • row_stride_d [mublas_int] specifies the row stride of D.
  • col_stride_d [mublas_int] specifies the column stride of D.
  • compute_type [musaDataType_t] specifies the datatype of computation.
  • algo [mublasGemmAlgo_t] enumerant specifying the algorithm type.
  • solution_index [int32_t] reserved for future use.
  • flags [uint32_t] optional gemm flags.

For backward compatiblity, unused workspace_size and workspace arguments are ignored

gemm_ext2 performs the matrix-matrix operations

D = alpha * A * B + beta * C,

alpha and beta are scalars, and A, B, C, and D are matrices, with A a m by k matrtix, B a k by n matrix, and C and D are m by n matrices. Each matrix A, B, C, D has independent row and column strides.

This is a beta feature.

function mublas_trsm_ex​

mublasStatus mublas_trsm_ex(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
mublas_int n,
const void * alpha,
const void * A,
mublas_int lda,
void * B,
mublas_int ldb,
const void * invA,
mublas_int invA_size,
musaDataType_t compute_type
)

BLAS EX API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • side [mublasSideMode_t] MUBLAS_SIDE_LEFT: op(A)X = alphaB. MUBLAS_SIDE_RIGHT: Xop(A) = alphaB.
  • uplo [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: A is an upper triangular matrix. MUBLAS_FILL_MODE_LOWER: A is a lower triangular matrix.
  • transA [mublasOperation_t] transB: op(A) = A. MUBLAS_OP_T: op(A) = A^T. MUBLAS_OP_C: op(A) = A^H.
  • diag [mublasDiagType_t] MUBLAS_DIAG_UNIT: A is assumed to be unit triangular. MUBLAS_DIAG_NON_UNIT: A is not assumed to be unit triangular.
  • m [mublas_int] m specifies the number of rows of B. m >= 0.
  • n [mublas_int] n specifies the number of columns of B. n >= 0.
  • alpha [void *] device pointer or host pointer specifying the scalar alpha. When alpha is &zero then A is not referenced, and B need not be set before entry.
  • A [void *] device pointer storing matrix A. of dimension ( lda, k ), where k is m when MUBLAS_SIDE_LEFT and is n when MUBLAS_SIDE_RIGHT only the upper/lower triangular part is accessed.
  • lda [mublas_int] lda specifies the first dimension of A. if side = MUBLAS_SIDE_LEFT, lda >= max( 1, m ), if side = MUBLAS_SIDE_RIGHT, lda >= max( 1, n ).
  • B [void *] device pointer storing matrix B. B is of dimension ( ldb, n ). Before entry, the leading m by n part of the array B must contain the right-hand side matrix B, and on exit is overwritten by the solution matrix X.
  • ldb [mublas_int] ldb specifies the first dimension of B. ldb >= max( 1, m ).
  • invA [void *] device pointer storing the inverse diagonal blocks of A. invA is of dimension ( ld_invA, k ), where k is m when MUBLAS_SIDE_LEFT and is n when MUBLAS_SIDE_RIGHT. ld_invA must be equal to 128.
  • invA_size [mublas_int] invA_size specifies the number of elements of device memory in invA.
  • compute_type [musaDataType_t] specifies the datatype of computation

trsm_ex solves

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

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

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

The matrix X is overwritten on B.

This function gives the user the ability to reuse the invA matrix between runs. If invA == NULL, mublas_trsm_ex will automatically calculate invA on every run.

Setting up invA: The accepted invA matrix consists of the packed 128x128 inverses of the diagonal blocks of matrix A, followed by any smaller diagonal block that remains. To set up invA it is recommended that mublas_trtri_batched be used with matrix A as the input.

Device memory of size 128 x k should be allocated for invA ahead of time, where k is m when MUBLAS_SIDE_LEFT and is n when MUBLAS_SIDE_RIGHT. The actual number of elements in invA should be passed as invA_size.

To begin, mublas_trtri_batched must be called on the full 128x128 sized diagonal blocks of matrix A. Below are the restricted parameters:

  • n = 128
  • ldinvA = 128
  • stride_invA = 128x128
  • batch_count = k / 128,

Then any remaining block may be added:

  • n = k % 128
  • invA = invA + stride_invA * previous_batch_count
  • ldinvA = 128
  • batch_count = 1

function mublas_trsm_batched_ex​

mublasStatus mublas_trsm_batched_ex(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
mublas_int n,
const void * alpha,
const void * A,
mublas_int lda,
void * B,
mublas_int ldb,
mublas_int batch_count,
const void * invA,
mublas_int invA_size,
musaDataType_t compute_type
)

BLAS EX API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • side [mublasSideMode_t] MUBLAS_SIDE_LEFT: op(A)X = alphaB. MUBLAS_SIDE_RIGHT: Xop(A) = alphaB.
  • uplo [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: each A_i is an upper triangular matrix. MUBLAS_FILL_MODE_LOWER: each A_i is a lower triangular matrix.
  • transA [mublasOperation_t] transB: op(A) = A. MUBLAS_OP_T: op(A) = A^T. MUBLAS_OP_C: op(A) = A^H.
  • diag [mublasDiagType_t] MUBLAS_DIAG_UNIT: each A_i is assumed to be unit triangular. MUBLAS_DIAG_NON_UNIT: each A_i is not assumed to be unit triangular.
  • m [mublas_int] m specifies the number of rows of each B_i. m >= 0.
  • n [mublas_int] n specifies the number of columns of each B_i. n >= 0.
  • alpha [void *] device pointer or host pointer alpha specifying the scalar alpha. When alpha is &zero then A is not referenced, and B need not be set before entry.
  • A [void *] device array of device pointers storing each matrix A_i. each A_i is of dimension ( lda, k ), where k is m when MUBLAS_SIDE_LEFT and is n when MUBLAS_SIDE_RIGHT only the upper/lower triangular part is accessed.
  • lda [mublas_int] lda specifies the first dimension of each A_i. if side = MUBLAS_SIDE_LEFT, lda >= max( 1, m ), if side = MUBLAS_SIDE_RIGHT, lda >= max( 1, n ).
  • B [void *] device array of device pointers storing each matrix B_i. each B_i is of dimension ( ldb, n ). Before entry, the leading m by n part of the array B_i must contain the right-hand side matrix B_i, and on exit is overwritten by the solution matrix X_i
  • ldb [mublas_int] ldb specifies the first dimension of each B_i. ldb >= max( 1, m ).
  • batch_count [mublas_int] specifies how many batches.
  • invA [void *] device array of device pointers storing the inverse diagonal blocks of each A_i. each invA_i is of dimension ( ld_invA, k ), where k is m when MUBLAS_SIDE_LEFT and is n when MUBLAS_SIDE_RIGHT. ld_invA must be equal to 128.
  • invA_size [mublas_int] invA_size specifies the number of elements of device memory in each invA_i.
  • compute_type [musaDataType_t] specifies the datatype of computation

trsm_batched_ex solves

op(A_i)*X_i = alpha*B_i or X_i*op(A_i) = alpha*B_i,

for i = 1, ..., batch_count; and where alpha is a scalar, X and B are arrays of m by n matrices, A is an array of triangular matrix and each op(A_i) is one of

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

Each matrix X_i is overwritten on B_i.

This function gives the user the ability to reuse the invA matrix between runs. If invA == NULL, mublas_trsm_batched_ex will automatically calculate each invA_i on every run.

Setting up invA: Each accepted invA_i matrix consists of the packed 128x128 inverses of the diagonal blocks of matrix A_i, followed by any smaller diagonal block that remains. To set up each invA_i it is recommended that mublas_trtri_batched be used with matrix A_i as the input. invA is an array of pointers of batch_count length holding each invA_i.

Device memory of size 128 x k should be allocated for each invA_i ahead of time, where k is m when MUBLAS_SIDE_LEFT and is n when MUBLAS_SIDE_RIGHT. The actual number of elements in each invA_i should be passed as invA_size.

To begin, mublas_trtri_batched must be called on the full 128x128 sized diagonal blocks of each matrix A_i. Below are the restricted parameters:

  • n = 128
  • ldinvA = 128
  • stride_invA = 128x128
  • batch_count = k / 128,

Then any remaining block may be added:

  • n = k % 128
  • invA = invA + stride_invA * previous_batch_count
  • ldinvA = 128
  • batch_count = 1

function mublas_trsm_strided_batched_ex​

mublasStatus mublas_trsm_strided_batched_ex(
mublasHandle_t handle,
mublasSideMode_t side,
mublasFillMode_t uplo,
mublasOperation_t transA,
mublasDiagType_t diag,
mublas_int m,
mublas_int n,
const void * alpha,
const void * A,
mublas_int lda,
mublas_stride stride_A,
void * B,
mublas_int ldb,
mublas_stride stride_B,
mublas_int batch_count,
const void * invA,
mublas_int invA_size,
mublas_stride stride_invA,
musaDataType_t compute_type
)

BLAS EX API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • side [mublasSideMode_t] MUBLAS_SIDE_LEFT: op(A)X = alphaB. MUBLAS_SIDE_RIGHT: Xop(A) = alphaB.
  • uplo [mublasFillMode_t] MUBLAS_FILL_MODE_UPPER: each A_i is an upper triangular matrix. MUBLAS_FILL_MODE_LOWER: each A_i is a lower triangular matrix.
  • transA [mublasOperation_t] transB: op(A) = A. MUBLAS_OP_T: op(A) = A^T. MUBLAS_OP_C: op(A) = A^H.
  • diag [mublasDiagType_t] MUBLAS_DIAG_UNIT: each A_i is assumed to be unit triangular. MUBLAS_DIAG_NON_UNIT: each A_i is not assumed to be unit triangular.
  • m [mublas_int] m specifies the number of rows of each B_i. m >= 0.
  • n [mublas_int] n specifies the number of columns of each B_i. n >= 0.
  • alpha [void *] device pointer or host pointer specifying the scalar alpha. When alpha is &zero then A is not referenced, and B need not be set before entry.
  • A [void *] device pointer storing matrix A. of dimension ( lda, k ), where k is m when MUBLAS_SIDE_LEFT and is n when MUBLAS_SIDE_RIGHT only the upper/lower triangular part is accessed.
  • lda [mublas_int] lda specifies the first dimension of A. if side = MUBLAS_SIDE_LEFT, lda >= max( 1, m ), if side = MUBLAS_SIDE_RIGHT, lda >= max( 1, n ).
  • stride_A [mublas_stride] The stride between each A matrix.
  • B [void *] device pointer pointing to first matrix B_i. each B_i is of dimension ( ldb, n ). Before entry, the leading m by n part of each array B_i must contain the right-hand side of matrix B_i, and on exit is overwritten by the solution matrix X_i.
  • ldb [mublas_int] ldb specifies the first dimension of each B_i. ldb >= max( 1, m ).
  • stride_B [mublas_stride] The stride between each B_i matrix.
  • batch_count [mublas_int] specifies how many batches.
  • invA [void *] device pointer storing the inverse diagonal blocks of each A_i. invA points to the first invA_1. each invA_i is of dimension ( ld_invA, k ), where k is m when MUBLAS_SIDE_LEFT and is n when MUBLAS_SIDE_RIGHT. ld_invA must be equal to 128.
  • invA_size [mublas_int] invA_size specifies the number of elements of device memory in each invA_i.
  • stride_invA [mublas_stride] The stride between each invA matrix.
  • compute_type [musaDataType_t] specifies the datatype of computation

trsm_strided_batched_ex solves

op(A_i)*X_i = alpha*B_i or X_i*op(A_i) = alpha*B_i,

for i = 1, ..., batch_count; and where alpha is a scalar, X and B are strided batched m by n matrices, A is a strided batched triangular matrix and op(A_i) is one of

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

Each matrix X_i is overwritten on B_i.

This function gives the user the ability to reuse each invA_i matrix between runs. If invA == NULL, mublas_trsm_batched_ex will automatically calculate each invA_i on every run.

Setting up invA: Each accepted invA_i matrix consists of the packed 128x128 inverses of the diagonal blocks of matrix A_i, followed by any smaller diagonal block that remains. To set up invA_i it is recommended that mublas_trtri_batched be used with matrix A_i as the input. invA is a contiguous piece of memory holding each invA_i.

Device memory of size 128 x k should be allocated for each invA_i ahead of time, where k is m when MUBLAS_SIDE_LEFT and is n when MUBLAS_SIDE_RIGHT. The actual number of elements in each invA_i should be passed as invA_size.

To begin, mublas_trtri_batched must be called on the full 128x128 sized diagonal blocks of each matrix A_i. Below are the restricted parameters:

  • n = 128
  • ldinvA = 128
  • stride_invA = 128x128
  • batch_count = k / 128,

Then any remaining block may be added:

  • n = k % 128
  • invA = invA + stride_invA * previous_batch_count
  • ldinvA = 128
  • batch_count = 1

function mublasAxpyEx​

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

BLAS EX API.

Parameters:

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

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

y := alpha * x + y

Currently supported datatypes are as follows:

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

function mublas_axpy_batched_ex​

mublasStatus mublas_axpy_batched_ex(
mublasHandle_t handle,
mublas_int n,
const void * alpha,
musaDataType_t alpha_type,
const void * x,
musaDataType_t x_type,
mublas_int incx,
void * y,
musaDataType_t y_type,
mublas_int incy,
mublas_int batch_count,
musaDataType_t execution_type
)

BLAS EX API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] the number of elements in each x_i and y_i.
  • alpha device pointer or host pointer to specify the scalar alpha.
  • alpha_type [musaDataType_t] specifies the datatype of alpha.
  • x device array of device pointers storing each vector x_i.
  • x_type [musaDataType_t] specifies the datatype of each vector x_i.
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • y device array of device pointers storing each vector y_i.
  • y_type [musaDataType_t] specifies the datatype of each vector y_i.
  • incy [mublas_int] specifies the increment for the elements of each y_i.
  • batch_count [mublas_int] number of instances in the batch.
  • execution_type [musaDataType_t] specifies the datatype of computation.

axpy_batched_ex computes constant alpha multiplied by vector x, plus vector y over a set of batched vectors.

y := alpha * x + y

Currently supported datatypes are as follows:


alpha_typex_typey_typeexecution_type
f16_rf16_rf16_rf16_r
f16_rf16_rf16_rf32_r
f32_rf16_rf16_rf32_r
f32_rf32_rf32_rf32_r
f64_rf64_rf64_rf64_r
f32_cf32_cf32_cf32_c
f64_cf64_cf64_cf64_c

function mublas_axpy_strided_batched_ex​

mublasStatus mublas_axpy_strided_batched_ex(
mublasHandle_t handle,
mublas_int n,
const void * alpha,
musaDataType_t alpha_type,
const void * x,
musaDataType_t x_type,
mublas_int incx,
mublas_stride stridex,
void * y,
musaDataType_t y_type,
mublas_int incy,
mublas_stride stridey,
mublas_int batch_count,
musaDataType_t execution_type
)

BLAS EX API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] the number of elements in each x_i and y_i.
  • alpha device pointer or host pointer to specify the scalar alpha.
  • alpha_type [musaDataType_t] specifies the datatype of alpha.
  • x device pointer to the first vector x_1.
  • x_type [musaDataType_t] specifies the datatype of each vector x_i.
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • stridex [mublas_stride] stride from the start of one vector (x_i) to the next one (x_i+1). There are no restrictions placed on stridex, however the user should take care to ensure that stridex is of appropriate size, for a typical case this means stridex >= n * incx.
  • y device pointer to the first vector y_1.
  • y_type [musaDataType_t] specifies the datatype of each vector y_i.
  • incy [mublas_int] specifies the increment for the elements of each y_i.
  • stridey [mublas_stride] stride from the start of one vector (y_i) to the next one (y_i+1). There are no restrictions placed on stridey, however the user should take care to ensure that stridey is of appropriate size, for a typical case this means stridey >= n * incy.
  • batch_count [mublas_int] number of instances in the batch.
  • execution_type [musaDataType_t] specifies the datatype of computation.

axpy_strided_batched_ex computes constant alpha multiplied by vector x, plus vector y over a set of strided batched vectors.

y := alpha * x + y

Currently supported datatypes are as follows:


alpha_typex_typey_typeexecution_type
f16_rf16_rf16_rf16_r
f16_rf16_rf16_rf32_r
f32_rf16_rf16_rf32_r
f32_rf32_rf32_rf32_r
f64_rf64_rf64_rf64_r
f32_cf32_cf32_cf32_c
f64_cf64_cf64_cf64_c

function mublasDotEx​

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

BLAS EX API.

Parameters:

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

dot_ex performs the dot product of vectors x and y

result = x * y;

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

result = conjugate (x) * y;

Currently supported datatypes are as follows:

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

function mublasDotcEx​

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

function mublas_dot_batched_ex​

mublasStatus mublas_dot_batched_ex(
mublasHandle_t handle,
mublas_int n,
const void * x,
musaDataType_t x_type,
mublas_int incx,
const void * y,
musaDataType_t y_type,
mublas_int incy,
mublas_int batch_count,
void * result,
musaDataType_t result_type,
musaDataType_t execution_type
)

BLAS EX API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] the number of elements in each x_i and y_i.
  • x device array of device pointers storing each vector x_i.
  • x_type [musaDataType_t] specifies the datatype of each vector x_i.
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • y device array of device pointers storing each vector y_i.
  • y_type [musaDataType_t] specifies the datatype of each vector y_i.
  • incy [mublas_int] specifies the increment for the elements of each y_i.
  • batch_count [mublas_int] number of instances in the batch
  • result device array or host array of batch_count size to store the dot products of each batch. return 0.0 for each element if n \<= 0.
  • result_type [musaDataType_t] specifies the datatype of the result.
  • execution_type [musaDataType_t] specifies the datatype of computation.

dot_batched_ex performs a batch of dot products of vectors x and y

result_i = x_i * y_i;

dotc_batched_ex performs a batch of dot products of the conjugate of complex vector x and complex vector y

result_i = conjugate (x_i) * y_i;

where (x_i, y_i) is the i-th instance of the batch. x_i and y_i are vectors, for i = 1, ..., batch_count

Currently supported datatypes are as follows:

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

function mublas_dotc_batched_ex​

mublasStatus mublas_dotc_batched_ex(
mublasHandle_t handle,
mublas_int n,
const void * x,
musaDataType_t x_type,
mublas_int incx,
const void * y,
musaDataType_t y_type,
mublas_int incy,
mublas_int batch_count,
void * result,
musaDataType_t result_type,
musaDataType_t execution_type
)

function mublas_dot_strided_batched_ex​

mublasStatus mublas_dot_strided_batched_ex(
mublasHandle_t handle,
mublas_int n,
const void * x,
musaDataType_t x_type,
mublas_int incx,
mublas_stride stride_x,
const void * y,
musaDataType_t y_type,
mublas_int incy,
mublas_stride stride_y,
mublas_int batch_count,
void * result,
musaDataType_t result_type,
musaDataType_t execution_type
)

BLAS EX API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] the number of elements in each x_i and y_i.
  • x device pointer to the first vector (x_1) in the batch.
  • x_type [musaDataType_t] specifies the datatype of each vector x_i.
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • stride_x [mublas_stride] stride from the start of one vector (x_i) and the next one (x_i+1)
  • y device pointer to the first vector (y_1) in the batch.
  • y_type [musaDataType_t] specifies the datatype of each vector y_i.
  • incy [mublas_int] specifies the increment for the elements of each y_i.
  • stride_y [mublas_stride] stride from the start of one vector (y_i) and the next one (y_i+1)
  • batch_count [mublas_int] number of instances in the batch
  • result device array or host array of batch_count size to store the dot products of each batch. return 0.0 for each element if n \<= 0.
  • result_type [musaDataType_t] specifies the datatype of the result.
  • execution_type [musaDataType_t] specifies the datatype of computation.

dot_strided_batched_ex performs a batch of dot products of vectors x and y

result_i = x_i * y_i;

dotc_strided_batched_ex performs a batch of dot products of the conjugate of complex vector x and complex vector y

result_i = conjugate (x_i) * y_i;

where (x_i, y_i) is the i-th instance of the batch. x_i and y_i are vectors, for i = 1, ..., batch_count

Currently supported datatypes are as follows:

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

function mublas_dotc_strided_batched_ex​

mublasStatus mublas_dotc_strided_batched_ex(
mublasHandle_t handle,
mublas_int n,
const void * x,
musaDataType_t x_type,
mublas_int incx,
mublas_stride stride_x,
const void * y,
musaDataType_t y_type,
mublas_int incy,
mublas_stride stride_y,
mublas_int batch_count,
void * result,
musaDataType_t result_type,
musaDataType_t execution_type
)

function mublasNrm2Ex​

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

BLAS_EX API.

Parameters:

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

nrm2_ex computes the euclidean norm of a real or complex vector

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

Currently supported datatypes are as follows:


x_typeresultexecution_type
f16_rf16_rf32_r
f32_rf32_rf32_r
f64_rf64_rf64_r
f32_cf32_rf32_r
f64_cf64_rf64_r

function mublas_nrm2_batched_ex​

mublasStatus mublas_nrm2_batched_ex(
mublasHandle_t handle,
mublas_int n,
const void * x,
musaDataType_t x_type,
mublas_int incx,
mublas_int batch_count,
void * results,
musaDataType_t result_type,
musaDataType_t execution_type
)

BLAS_EX API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] number of elements in each x_i.
  • x device array of device pointers storing each vector x_i.
  • x_type [musaDataType_t] specifies the datatype of each vector x_i.
  • incx [mublas_int] specifies the increment for the elements of each x_i. incx must be > 0.
  • batch_count [mublas_int] number of instances in the batch
  • results device pointer or host pointer to array of batch_count size for nrm2 results. return is 0.0 for each element if n \<= 0, incx\<=0.
  • result_type [musaDataType_t] specifies the datatype of the result.
  • execution_type [musaDataType_t] specifies the datatype of computation.

nrm2_batched_ex computes the euclidean norm over a batch of real or complex vectors

result := sqrt( x_i'*x_i ) for real vectors x, for i = 1, ..., batch_count
result := sqrt( x_i**H*x_i ) for complex vectors x, for i = 1, ..., batch_count

Currently supported datatypes are as follows:


x_typeresultexecution_type
f16_rf16_rf32_r
f32_rf32_rf32_r
f64_rf64_rf64_r
f32_cf32_rf32_r
f64_cf64_rf64_r

function mublas_nrm2_strided_batched_ex​

mublasStatus mublas_nrm2_strided_batched_ex(
mublasHandle_t handle,
mublas_int n,
const void * x,
musaDataType_t x_type,
mublas_int incx,
mublas_stride stride_x,
mublas_int batch_count,
void * results,
musaDataType_t result_type,
musaDataType_t execution_type
)

BLAS_EX API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] number of elements in each x_i.
  • x device pointer to the first vector x_1.
  • x_type [musaDataType_t] specifies the datatype of each vector x_i.
  • incx [mublas_int] specifies the increment for the elements of each x_i. incx must be > 0.
  • stride_x [mublas_stride] stride from the start of one vector (x_i) and the next one (x_i+1). There are no restrictions placed on stride_x, however the user should take care to ensure that stride_x is of appropriate size, for a typical case this means stride_x >= n * incx.
  • batch_count [mublas_int] number of instances in the batch
  • results device pointer or host pointer to array for storing contiguous batch_count results. return is 0.0 for each element if n \<= 0, incx\<=0.
  • result_type [musaDataType_t] specifies the datatype of the result.
  • execution_type [musaDataType_t] specifies the datatype of computation.

nrm2_strided_batched_ex computes the euclidean norm over a batch of real or complex vectors

:= sqrt( x_i'*x_i ) for real vectors x, for i = 1, ..., batch_count
:= sqrt( x_i**H*x_i ) for complex vectors, for i = 1, ..., batch_count

Currently supported datatypes are as follows:


x_typeresultexecution_type
f16_rf16_rf32_r
f32_rf32_rf32_r
f64_rf64_rf64_r
f32_cf32_rf32_r
f64_cf64_rf64_r

function mublasRotEx​

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

BLAS EX API.

Parameters:

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

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

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

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

Currently supported datatypes are as follows:


x_typey_typecs_typeexecution_type
bf16_rbf16_rbf16_rf32_r
f16_rf16_rf16_rf32_r
f32_rf32_rf32_rf32_r
f64_rf64_rf64_rf64_r
f32_cf32_cf32_cf32_c
f32_cf32_cf32_rf32_c
f64_cf64_cf64_cf64_c
f64_cf64_cf64_rf64_c

function mublas_rot_batched_ex​

mublasStatus mublas_rot_batched_ex(
mublasHandle_t handle,
mublas_int n,
void * x,
musaDataType_t x_type,
mublas_int incx,
void * y,
musaDataType_t y_type,
mublas_int incy,
const void * c,
const void * s,
musaDataType_t cs_type,
mublas_int batch_count,
musaDataType_t execution_type
)

BLAS EX API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] number of elements in each x_i and y_i vectors.
  • x device array of deivce pointers storing each vector x_i.
  • x_type [musaDataType_t] specifies the datatype of each vector x_i.
  • incx [mublas_int] specifies the increment between elements of each x_i.
  • y device array of device pointers storing each vector y_i.
  • y_type [musaDataType_t] specifies the datatype of each vector y_i.
  • incy [mublas_int] specifies the increment between elements of each y_i.
  • c device pointer or host pointer to scalar cosine component of the rotation matrix.
  • s device pointer or host pointer to scalar sine component of the rotation matrix.
  • cs_type [musaDataType_t] specifies the datatype of c and s.
  • batch_count [mublas_int] the number of x and y arrays, i.e. the number of batches.
  • execution_type [musaDataType_t] specifies the datatype of computation.

rot_batched_ex applies the Givens rotation matrix defined by c=cos(alpha) and s=sin(alpha) to batched vectors x_i and y_i, for i = 1, ..., batch_count. Scalars c and s may be stored in either host or device memory, location is specified by calling mublasSetPointerMode.

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

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

Currently supported datatypes are as follows:


x_typey_typecs_typeexecution_type
bf16_rbf16_rbf16_rf32_r
f16_rf16_rf16_rf32_r
f32_rf32_rf32_rf32_r
f64_rf64_rf64_rf64_r
f32_cf32_cf32_cf32_c
f32_cf32_cf32_rf32_c
f64_cf64_cf64_cf64_c
f64_cf64_cf64_rf64_c

function mublas_rot_strided_batched_ex​

mublasStatus mublas_rot_strided_batched_ex(
mublasHandle_t handle,
mublas_int n,
void * x,
musaDataType_t x_type,
mublas_int incx,
mublas_stride stride_x,
void * y,
musaDataType_t y_type,
mublas_int incy,
mublas_stride stride_y,
const void * c,
const void * s,
musaDataType_t cs_type,
mublas_int batch_count,
musaDataType_t execution_type
)

BLAS Level 1 API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] number of elements in each x_i and y_i vectors.
  • x device pointer to the first vector x_1.
  • x_type [musaDataType_t] specifies the datatype of each vector x_i.
  • incx [mublas_int] specifies the increment between elements of each x_i.
  • stride_x [mublas_stride] specifies the increment from the beginning of x_i to the beginning of x_(i+1)
  • y device pointer to the first vector y_1.
  • y_type [musaDataType_t] specifies the datatype of each vector y_i.
  • incy [mublas_int] specifies the increment between elements of each y_i.
  • stride_y [mublas_stride] specifies the increment from the beginning of y_i to the beginning of y_(i+1)
  • c device pointer or host pointer to scalar cosine component of the rotation matrix.
  • s device pointer or host pointer to scalar sine component of the rotation matrix.
  • cs_type [musaDataType_t] specifies the datatype of c and s.
  • batch_count [mublas_int] the number of x and y arrays, i.e. the number of batches.
  • execution_type [musaDataType_t] specifies the datatype of computation.

rot_strided_batched_ex applies the Givens rotation matrix defined by c=cos(alpha) and s=sin(alpha) to strided batched vectors x_i and y_i, for i = 1, ..., batch_count. Scalars c and s may be stored in either host or device memory, location is specified by calling mublasSetPointerMode.

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

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

Currently supported datatypes are as follows:


x_typey_typecs_typeexecution_type
bf16_rbf16_rbf16_rf32_r
f16_rf16_rf16_rf32_r
f32_rf32_rf32_rf32_r
f64_rf64_rf64_rf64_r
f32_cf32_cf32_cf32_c
f32_cf32_cf32_rf32_c
f64_cf64_cf64_cf64_c
f64_cf64_cf64_rf64_c

function mublasScalEx​

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

BLAS EX API.

Parameters:

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

scal_ex scales each element of vector x with scalar alpha.

x := alpha * x

Currently supported datatypes are as follows:


alpha_typex_typeexecution_type
f16_rf16_rf16_r
f16_rf16_rf32_r
f32_rf16_rf32_r
f32_rf32_rf32_r
f64_rf64_rf64_r
f32_cf32_cf32_c
f64_cf64_cf64_c
f32_rf32_cf32_c
f64_rf64_cf64_c

function mublas_scal_batched_ex​

mublasStatus mublas_scal_batched_ex(
mublasHandle_t handle,
mublas_int n,
const void * alpha,
musaDataType_t alpha_type,
void * x,
musaDataType_t x_type,
mublas_int incx,
mublas_int batch_count,
musaDataType_t execution_type
)

BLAS EX API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] the number of elements in x.
  • alpha device pointer or host pointer for the scalar alpha.
  • alpha_type [musaDataType_t] specifies the datatype of alpha.
  • x device array of device pointers storing each vector x_i.
  • x_type [musaDataType_t] specifies the datatype of each vector x_i.
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • batch_count [mublas_int] number of instances in the batch.
  • execution_type [musaDataType_t] specifies the datatype of computation.

scal_batched_ex scales each element of each vector x_i with scalar alpha.

x_i := alpha * x_i

Currently supported datatypes are as follows:


alpha_typex_typeexecution_type
f16_rf16_rf16_r
f16_rf16_rf32_r
f32_rf16_rf32_r
f32_rf32_rf32_r
f64_rf64_rf64_r
f32_cf32_cf32_c
f64_cf64_cf64_c
f32_rf32_cf32_c
f64_rf64_cf64_c

function mublas_scal_strided_batched_ex​

mublasStatus mublas_scal_strided_batched_ex(
mublasHandle_t handle,
mublas_int n,
const void * alpha,
musaDataType_t alpha_type,
void * x,
musaDataType_t x_type,
mublas_int incx,
mublas_stride stridex,
mublas_int batch_count,
musaDataType_t execution_type
)

BLAS EX API.

Parameters:

  • handle [mublasHandle_t] handle to the mublas library context queue.
  • n [mublas_int] the number of elements in x.
  • alpha device pointer or host pointer for the scalar alpha.
  • alpha_type [musaDataType_t] specifies the datatype of alpha.
  • x device pointer to the first vector x_1.
  • x_type [musaDataType_t] specifies the datatype of each vector x_i.
  • incx [mublas_int] specifies the increment for the elements of each x_i.
  • stridex [mublas_stride] stride from the start of one vector (x_i) to the next one (x_i+1). There are no restrictions placed on stridex, however the user should take care to ensure that stridex is of appropriate size, for a typical case this means stridex >= n * incx.
  • batch_count [mublas_int] number of instances in the batch.
  • execution_type [musaDataType_t] specifies the datatype of computation.

scal_strided_batched_ex scales each element of vector x with scalar alpha over a set of strided batched vectors.

x := alpha * x

Currently supported datatypes are as follows:


alpha_typex_typeexecution_type
f16_rf16_rf16_r
f16_rf16_rf32_r
f32_rf16_rf32_r
f32_rf32_rf32_r
f64_rf64_rf64_r
f32_cf32_cf32_c
f64_cf64_cf64_c
f32_rf32_cf32_c
f64_rf64_cf64_c

function mublasStatus_to_string​

const char * mublasStatus_to_string(
mublasStatus status
)

Parameters:

  • status [mublasStatus] muBLAS status to convert to string

BLAS Auxiliary API

mublasStatus_to_string

Returns string representing mublasStatus value

function mublas_initialize​

void mublas_initialize(
void
)

Initialize muBLAS on the current HIP device, to avoid costly startup time at the first call on that device.

Calling `mublas_initialize()`` allows upfront intialization including device specific kernel setup, otherwise this function is automatically called on the first function call that requires these initializations (mainly GEMM).

function mublas_get_version_string​

mublasStatus mublas_get_version_string(
char * buf,
size_t len
)

loads char* buf with the mublas library version. size_t len is the maximum length of char* buf.

Parameters:

  • buf pointer to buffer for version string
  • len length of buf

function mublas_get_version_string_size​

mublasStatus mublas_get_version_string_size(
size_t * len
)

Queries the minimum buffer size for a successful call to mublas_get_version_string.

Parameters:

  • len pointer to size_t for storing the length

function mublas_start_device_memory_size_query​

mublasStatus mublas_start_device_memory_size_query(
mublasHandle_t handle
)

Parameters:

  • handle mublas handle

Indicates that subsequent muBLAS kernel calls should collect the optimal device memory size in bytes for their given kernel arguments, and keep track of the maximum. Each kernel call can reuse temporary device memory on the same stream, so the maximum is collected. Returns MUBLAS_STATUS_SIZE_QUERY_MISMATCH if another size query is already in progress; returns MUBLAS_STATUS_SUCCESS otherwise.

function mublas_stop_device_memory_size_query​

mublasStatus mublas_stop_device_memory_size_query(
mublasHandle_t handle,
size_t * size
)

Parameters:

  • handle mublas handle
  • size maximum of the optimal sizes collected

Stops collecting optimal device memory size information Returns MUBLAS_STATUS_SIZE_QUERY_MISMATCH if a collection is not underway; MUBLAS_STATUS_INVALID_HANDLE if handle is nullptr; MUBLAS_STATUS_INVALID_POINTER if size is nullptr; MUBLAS_STATUS_SUCCESS otherwise

function mublas_is_device_memory_size_query​

bool mublas_is_device_memory_size_query(
mublasHandle_t handle
)

function mublas_set_optimal_device_memory_size_impl​

mublasStatus mublas_set_optimal_device_memory_size_impl(
mublasHandle_t handle,
size_t count,
...
)

function mublas_device_malloc__alloc​

mublasStatus mublas_device_malloc__alloc(
mublasHandle_t handle,
struct mublas_device_malloc_base ** res,
size_t count,
...
)

function mublas_device_malloc_success​

bool mublas_device_malloc_success(
struct mublas_device_malloc_base * ptr
)

function mublas_device_malloc__ptr​

mublasStatus mublas_device_malloc__ptr(
struct mublas_device_malloc_base * ptr,
void ** res
)

function mublas_device_malloc__get​

mublasStatus mublas_device_malloc__get(
struct mublas_device_malloc_base * ptr,
size_t index,
void ** res
)

function mublas_device_malloc__free​

mublasStatus mublas_device_malloc__free(
struct mublas_device_malloc_base * ptr
)

function mublas_device_malloc__set_default_memory_size​

void mublas_device_malloc__set_default_memory_size(
size_t size
)

function mublas_get_device_memory_size​

mublasStatus mublas_get_device_memory_size(
mublasHandle_t handle,
size_t * size
)

Parameters:

  • handle mublas handle
  • size current device memory size for the handle

Gets the current device memory size for the handle Returns MUBLAS_STATUS_INVALID_HANDLE if handle is nullptr; MUBLAS_STATUS_INVALID_POINTER if size is nullptr; MUBLAS_STATUS_SUCCESS otherwise

function mublas_set_device_memory_size​

mublasStatus mublas_set_device_memory_size(
mublasHandle_t handle,
size_t size
)

Parameters:

  • handle mublas handle
  • size size of allocated device memory

Changes the size of allocated device memory at runtime.

Any previously allocated device memory managed by the handle is freed.

If size > 0 sets the device memory size to the specified size (in bytes) If size == 0 frees the memory allocated so far, and lets muBLAS manage device memory in the future, expanding it when necessary Returns MUBLAS_STATUS_INVALID_HANDLE if handle is nullptr; MUBLAS_STATUS_INVALID_POINTER if size is nullptr; MUBLAS_STATUS_SUCCESS otherwise

function mublas_set_workspace​

mublasStatus mublas_set_workspace(
mublasHandle_t handle,
void * addr,
size_t size
)

Parameters:

  • handle mublas handle
  • addr address of workspace memory
  • size size of workspace memory

Sets the device workspace for the handle to use.

Any previously allocated device memory managed by the handle is freed.

Returns MUBLAS_STATUS_INVALID_HANDLE if handle is nullptr; MUBLAS_STATUS_SUCCESS otherwise

function mublas_is_managing_device_memory​

bool mublas_is_managing_device_memory(
mublasHandle_t handle
)

Parameters:

  • handle mublas handle

Returns true when device memory in handle is managed by muBLAS

function mublas_is_user_managing_device_memory​

bool mublas_is_user_managing_device_memory(
mublasHandle_t handle
)

Parameters:

  • handle mublas handle

Returns true when device memory in handle is managed by the user

function mublas_abort​

void mublas_abort(
void
)

Abort function which safely flushes all IO

Macros Documentation​

define MUBLAS_VA_OPT_3RD_ARG​

#define MUBLAS_VA_OPT_3RD_ARG(
_1,
_2,
_3,
...
)
_3

define MUBLAS_VA_OPT_SUPPORTED​

#define MUBLAS_VA_OPT_SUPPORTED(
...
)
MUBLAS_VA_OPT_3RD_ARG(__VA_OPT__(, ), 1, 0, )

define MUBLAS_VA_OPT_COUNT_IMPL​

#define MUBLAS_VA_OPT_COUNT_IMPL(
X,
_1,
_2,
_3,
_4,
_5,
_6,
_7,
_8,
_9,
_10,
N,
...
)
N

define MUBLAS_VA_OPT_COUNT​

#define MUBLAS_VA_OPT_COUNT(
...
)
MUBLAS_VA_OPT_COUNT_IMPL(, ##__VA_ARGS__, N, N, N, N, N, N, N, N, N, N, 0)

define MUBLAS_VA_OPT_PRAGMA_SELECT0​

#define MUBLAS_VA_OPT_PRAGMA_SELECT0(
...
)

define MUBLAS_VA_OPT_PRAGMA_SELECTN​

#define MUBLAS_VA_OPT_PRAGMA_SELECTN(
pragma,
...
)
_Pragma(#pragma)

define MUBLAS_VA_OPT_PRAGMA_IMPL2​

#define MUBLAS_VA_OPT_PRAGMA_IMPL2(
pragma,
count
)
MUBLAS_VA_OPT_PRAGMA_SELECT##count(pragma)

define MUBLAS_VA_OPT_PRAGMA_IMPL​

#define MUBLAS_VA_OPT_PRAGMA_IMPL(
pragma,
count
)
MUBLAS_VA_OPT_PRAGMA_IMPL2(pragma, count)

define MUBLAS_VA_OPT_PRAGMA​

#define MUBLAS_VA_OPT_PRAGMA(
pragma,
...
)
MUBLAS_VA_OPT_PRAGMA_IMPL(pragma, MUBLAS_VA_OPT_COUNT(__VA_ARGS__))

define mublas_trsm_ex​

#define mublas_trsm_ex(
handle,
side,
uplo,
transA,
diag,
m,
n,
alpha,
A,
lda,
B,
ldb,
invA,
invA_size,
compute_type,
...
)
MUBLAS_VA_OPT_PRAGMA(GCC warning "mublas_trsm_ex: The option, x_temp_size and x_temp_workspace arguments are obsolete, and will be ignored", __VA_ARGS__) \
mublas_trsm_ex(handle, \
side, \
uplo, \
transA, \
diag, \
m, \
n, \
alpha, \
A, \
lda, \
B, \
ldb, \
invA, \
invA_size, \
compute_type)

For backward compatiblity, option, x_temp_size and x_temp_workspace arguments are ignored

mublas-types.h defines data types used by mublas

Types Documentation​

enum mublasOperation_t​

EnumeratorValueDescription
MUBLAS_OP_N111Operate with the matrix.
MUBLAS_OP_T112Operate with the transpose of the matrix.
MUBLAS_OP_C113Operate with the conjugate transpose of the matrix.

Used to specify whether the matrix is to be transposed or not.

enum mublasFillMode_t​

EnumeratorValueDescription
MUBLAS_FILL_MODE_UPPER121Upper triangle.
MUBLAS_FILL_MODE_LOWER122Lower triangle.
MUBLAS_FILL_MODE_FULL123

Used by the Hermitian, symmetric and triangular matrix routines to specify whether the upper or lower triangle is being referenced.

enum mublasDiagType_t​

EnumeratorValueDescription
MUBLAS_DIAG_NON_UNIT131Non-unit triangular.
MUBLAS_DIAG_UNIT132Unit triangular.

It is used by the triangular matrix routines to specify whether the matrix is unit triangular.

enum mublasSideMode_t​

EnumeratorValueDescription
MUBLAS_SIDE_LEFT141Multiply general matrix by symmetric, Hermitian or triangular matrix on the left.
MUBLAS_SIDE_RIGHT142Multiply general matrix by symmetric, Hermitian or triangular matrix on the right.
MUBLAS_SIDE_MODE_BOTH143

Indicates the side matrix A is located relative to matrix B during multiplication.

enum mublasStatus_t​

EnumeratorValueDescription
MUBLAS_STATUS_SUCCESS0success
MUBLAS_STATUS_INVALID_HANDLE1handle not initialized, invalid or null
MUBLAS_STATUS_NOT_IMPLEMENTED2function is not implemented
MUBLAS_STATUS_INVALID_POINTER3invalid pointer argument
MUBLAS_STATUS_INVALID_SIZE4invalid size argument
MUBLAS_STATUS_MEMORY_ERROR5failed internal memory allocation, copy or dealloc
MUBLAS_STATUS_INTERNAL_ERROR6other internal library failure
MUBLAS_STATUS_PERF_DEGRADED7performance degraded due to low device memory
MUBLAS_STATUS_SIZE_QUERY_MISMATCH8unmatched start/stop size query
MUBLAS_STATUS_SIZE_INCREASED9queried device memory size increased
MUBLAS_STATUS_SIZE_UNCHANGED10queried device memory size unchanged
MUBLAS_STATUS_INVALID_VALUE11passed argument not valid
MUBLAS_STATUS_CONTINUE12nothing preventing function to proceed
MUBLAS_STATUS_CHECK_NUMERICS_FAIL13will be set if the vector/matrix has a NaN or an Infinity

mublas status codes definition

enum mublasPointerMode_t​

EnumeratorValueDescription
MUBLAS_POINTER_MODE_HOST0Scalar values affected by this variable will be located on the host.
MUBLAS_POINTER_MODE_DEVICE1Scalar values affected by this variable will be located on the device.

Indicates if scalar pointers are on host or device. This is used for scalars alpha and beta and for scalar function return values.

enum mublasMathMode_t​

EnumeratorValueDescription
MUBLAS_MATH_MODE_DEFAULT0todo.
MUBLAS_MATH_MODE_PEDANTIC1todo.
MUBLAS_MATH_MODE_TP32_TENSOR2todo.
MUBLAS_MATH_MODE_DISALLOW_REDUCED_PRECISION_REDUCTION3todo.
MUBLAS_MATH_MODE_TENSOR_OP4todo.

Indicates the math mode.

enum mublasAtomicsMode_t​

EnumeratorValueDescription
MUBLAS_ATOMICS_NOT_ALLOWED0Algorithms will refrain from atomics where applicable.
MUBLAS_ATOMICS_ALLOWED1Algorithms will take advantage of atomics where applicable.

Indicates if atomics operations are allowed. Not allowing atomic operations may generally improve determinism and repeatability of results at a cost of performance.

enum mublas_performance_metric_t​

EnumeratorValueDescription
MUBLAS_DEFAULT_PERFORMANCE_METRIC0Use Tensile's default performance metric for solution selection.
MUBLAS_DEVICE_EFFICIENCY_PERFORMANCE_METRIC1Select the solution with the highest GFlops across all compute units.
MUBLAS_CU_EFFICIENCY_PERFORMANCE_METRIC2Select the solution with the highest GFlops per compute unit it uses. This may be useful when running multiple small gemm problems simultaneously

Indicates which performance metric Tensile uses when selecting the optimal solution for gemm problems.

enum mublas_layer_mode_t​

EnumeratorValueDescription
MUBLAS_LAYER_MODE_NONE0x0No logging will take place.
MUBLAS_LAYER_MODE_LOG_TRACE0x1A line containing the function name and value of arguments passed will be printed with each muBLAS function call.
MUBLAS_LAYER_MODE_LOG_BENCH0x2Outputs a line each time a muBLAS function is called, this line can be used with mublas-bench to make the same call again.
MUBLAS_LAYER_MODE_LOG_PROFILE0x4Outputs a YAML description of each muBLAS function called, along with its arguments and number of times it was called.

Indicates if layer is active with bitmask.

enum mublasGemmAlgo_t​

EnumeratorValueDescription
MUBLAS_GEMM_DEFAULT0x0
MUBLAS_GEMM_DEFAULT_TENSOR_OP0x1

Indicates if layer is active with bitmask.

enum mublas_gemm_flags_t​

EnumeratorValueDescription
MUBLAS_GEMM_FLAGS_NONE0x0Default empty flags.
MUBLAS_GEMM_FLAGS_PACK_INT8x40x1Before ROCm 4.2, this flags is not implemented and mublas uses packed-Int8x4 by default. After ROCm 4.2, set flag is neccesary if we want packed-Int8x4. Default (0x0) uses unpacked and is for gfx908 GPUs only.
MUBLAS_GEMM_FLAGS_USE_CU_EFFICIENCY0x2Select the gemm problem with the highest efficiency per compute unit used. Useful for running multiple smaller problems simultaneously. This takes precedence over the performance metric set in mublasHandle_t and currently only works for gemm_*_ex problems.
MUBLAS_GEMM_FLAGS_FP16_ALT_IMPL0x4Select an alternate implementation for the MI200 FP16 HPA (High Precision Accumulate) GEMM kernel utilizing the BF16 matrix instructions with reduced accuracy in cases where computation cannot tolerate the FP16 matrix instructions flushing subnormal FP16 input/output data to zero. See "MI200 (gfx90a) Considerations" section for more details.

Control flags passed into gemm algorithms invoked by Tensile Host.

enum mublas_check_numerics_mode_t​

EnumeratorValueDescription
MUBLAS_CHECK_NUMERICS_MODE_NO_CHECK0x0
MUBLAS_CHECK_NUMERICS_MODE_INFO0x1
MUBLAS_CHECK_NUMERICS_MODE_WARN0x2
MUBLAS_CHECK_NUMERICS_MODE_FAIL0x4

Numerical checking for verifying the Input and Output vector/matrix of the muBLAS functions for a NaN, zero and infinity.

enum mublasComputeType_t​

EnumeratorValueDescription
MUBLAS_COMPUTE_16F64
MUBLAS_COMPUTE_16F_PEDANTIC65
MUBLAS_COMPUTE_32F68
MUBLAS_COMPUTE_32F_PEDANTIC69
MUBLAS_COMPUTE_32F_FAST_16F74
MUBLAS_COMPUTE_32F_FAST_16BF75
MUBLAS_COMPUTE_32F_FAST_TF3277
MUBLAS_COMPUTE_64F70
MUBLAS_COMPUTE_64F_PEDANTIC71
MUBLAS_COMPUTE_32I72
MUBLAS_COMPUTE_32I_PEDANTIC73

typedef mublasHandle_t​

typedef struct _mublasHandle_t* mublasHandle_t;

mublasHandle_t is a structure holding the mublas library context. It must be initialized using mublasCreate() and the returned handle must be passed to all subsequent library function calls. It should be destroyed at the end using mublasDestroy().

typedef MUstream​

typedef struct MUstream_st* MUstream;

Forward declaration of MUstream.

typedef MUevent​

typedef struct MUevent_st* MUevent;

Forward declaration of MUevent.

typedef mublas_int​

typedef int32_t mublas_int;

To specify whether int32 is used for LP64 or int64 is used for ILP64.

typedef mublas_stride​

typedef int64_t mublas_stride;

Stride between matrices or vectors in strided_batched functions.

typedef mublas_float​

typedef float mublas_float;

Single precision floating point type.

typedef mublas_double​

typedef double mublas_double;

Double precision floating point type.

typedef mublas_half​

typedef uint16_t mublas_half;

typedef mublas_tfloat32​

typedef float mublas_tfloat32;

typedef mublasOperation​

typedef enum mublasOperation_t mublasOperation;

Used to specify whether the matrix is to be transposed or not.

typedef mublasFillMode​

typedef enum mublasFillMode_t mublasFillMode;

Used by the Hermitian, symmetric and triangular matrix routines to specify whether the upper or lower triangle is being referenced.

typedef mublasDiagType​

typedef enum mublasDiagType_t mublasDiagType;

It is used by the triangular matrix routines to specify whether the matrix is unit triangular.

typedef mublasSideMode​

typedef enum mublasSideMode_t mublasSideMode;

Indicates the side matrix A is located relative to matrix B during multiplication.

typedef mublasStatus​

typedef enum mublasStatus_t mublasStatus;

mublas status codes definition

typedef mublasPointerMode​

typedef enum mublasPointerMode_t mublasPointerMode;

Indicates if scalar pointers are on host or device. This is used for scalars alpha and beta and for scalar function return values.

typedef mublasMathMode​

typedef enum mublasMathMode_t mublasMathMode;

Indicates the math mode.

typedef mublasAtomicsMode​

typedef enum mublasAtomicsMode_t mublasAtomicsMode;

Indicates if atomics operations are allowed. Not allowing atomic operations may generally improve determinism and repeatability of results at a cost of performance.

typedef mublas_performance_metric​

typedef enum mublas_performance_metric_t mublas_performance_metric;

Indicates which performance metric Tensile uses when selecting the optimal solution for gemm problems.

typedef mublas_layer_mode​

typedef enum mublas_layer_mode_t mublas_layer_mode;

Indicates if layer is active with bitmask.

typedef mublasGemmAlgo​

typedef enum mublasGemmAlgo_t mublasGemmAlgo;

Indicates if layer is active with bitmask.

typedef mublas_gemm_flags​

typedef enum mublas_gemm_flags_t mublas_gemm_flags;

Control flags passed into gemm algorithms invoked by Tensile Host.

typedef mublas_check_numerics_mode​

typedef enum mublas_check_numerics_mode_t mublas_check_numerics_mode;

Numerical checking for verifying the Input and Output vector/matrix of the muBLAS functions for a NaN, zero and infinity.

Macros Documentation​

define STDC_WANT_IEC_60559_TYPES_EXT​

#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1

define MUBLAS_INTERNAL_DEPRECATION​

#define MUBLAS_INTERNAL_DEPRECATION __attribute__(( \
deprecated("muBLAS internal API may change each release. Advise against using.")))

define MUBLAS_INTERNAL_EXPORT​

#define MUBLAS_INTERNAL_EXPORT MUBLAS_EXPORT MUBLAS_INTERNAL_DEPRECATION

define MUBLAS_INTERNAL_EXPORT_NOINLINE​

#define MUBLAS_INTERNAL_EXPORT_NOINLINE MUBLAS_EXPORT __attribute__((noinline)) MUBLAS_INTERNAL_DEPRECATION