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 (resp. ) from x_\{i-1} (resp. ).
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:
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: is an upper triangular matrix.MUBLAS_FILL_MODE_LOWER: is a lower triangular matrix.
- transA [
mublasOperation_t] - diag [
mublasDiagType_t]:MUBLAS_DIAG_UNIT: is assumed to be unit triangular.MUBLAS_DIAG_NON_UNIT: is not assumed to be unit triangular.
- m [
mublas_int]: specifies the number of rows of matrices . . - A: Device pointer storing pointers of matrices , of dimension .
- x: Device pointer storing vectors .
- incx [
mublas_int]: Specifies the increment for the elements of vectors . - batch_count [
mublas_int]: The number of batched matrices/vectors.
tpmv_batched performs one of the matrix-vector operations:
where is an -element vector and is an (unit or non-unit, upper or lower triangular matrix).
The vectors 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 (resp. ) from x_\{i-1} (resp. ).
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 .- \text\{MUBLAS\_FILL\_MODE\_UPPER}: is an upper triangular matrix.
- \text\{MUBLAS\_FILL\_MODE\_LOWER}: is a lower triangular matrix.
-
transA [
mublasOperation_t]: Specifies the operation to be performed on matrix (not explicitly defined in your input; consider including specific options such as transposition). -
diag [
mublasDiagType_t]: Specifies the diagonal properties of matrix .- \text\{MUBLAS\_DIAG\_UNIT}: is assumed to be unit triangular (diagonal entries are assumed to be 1).
- \text\{MUBLAS\_DIAG\_NON\_UNIT}: is not assumed to be unit triangular.
-
m [
mublas_int]: Specifies the number of rows of vector . Must be greater than or equal to 0 (). -
A: Device array of device pointers storing each matrix .
-
lda [
mublas_int]: Specifies the leading dimension of each . Must be greater than or equal to . -
x: Device array of device pointers storing each vector .
-
incx [
mublas_int]: Specifies the increment for the elements of vector . -
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 is the -th instance of the batch. Here, and are vectors, and is an triangular matrix.
The vector is overwritten on .
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 .
- 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 .
- 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:
where and are scalars, and are -element vectors, and should contain an upper or lower triangular 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 . -
alpha: Device pointer or host pointer to scalar .
-
A: Device array of device pointers storing each matrix .
-
lda [
mublas_int]: Specifies the leading dimension of each matrix . -
x: Device array of device pointers storing each vector .
-
incx [
mublas_int]: Specifies the increment for the elements of each vector . -
beta: Device pointer or host pointer to scalar .
-
y: Device array of device pointers storing each vector .
-
incy [
mublas_int]: Specifies the increment for the elements of each vector . -
batch_count [
mublas_int]: Number of instances in the batch.
The symv_batched function performs the matrix-vector operation:
where is the -th instance of the batch. and are scalars, and are vectors, and is an symmetric matrix for i = 1, \ldots, \text\{batch\_count}. The matrix should contain an upper or lower triangular symmetric matrix, and the opposing triangular part of 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 . -
alpha: Device pointer or host pointer to scalar .
-
A: Device pointer to the first matrix on the GPU.
-
lda [
mublas_int]: Specifies the leading dimension of each matrix . -
strideA [
mublas_stride]: Stride from the start of one matrix () to the next one (A_\{i+1}). -
x: Device pointer to the first vector on the GPU.
-
incx [
mublas_int]: Specifies the increment for the elements of each vector . -
stridex [
mublas_stride]: Stride from the start of one vector () to the next one (x_\{i+1}). There are no restrictions placed onstridex, however, the user should take care to ensure thatstridexis of appropriate size. This typically meansstridex >= n \cdot incx.stridexshould be non-zero. -
beta: Device pointer or host pointer to scalar .
-
y: Device pointer to the first vector on the GPU.
-
incy [
mublas_int]: Specifies the increment for the elements of each vector . -
stridey [
mublas_stride]: Stride from the start of one vector () to the next one (y_\{i+1}). There are no restrictions placed onstridey, however, the user should take care to ensure thatstrideyis of appropriate size. This typically meansstridey >= n \cdot incy.strideyshould be non-zero. -
batch_count [
mublas_int]: Number of instances in the batch.
The symv_strided_batched function performs the matrix-vector operation:
where is the -th instance of the batch. and are scalars, and are vectors, and is an symmetric matrix for i = 1, \ldots, \text\{batch\_count}. The matrix should contain an upper or lower triangular symmetric matrix, and the opposing triangular part of 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 is referenced.MUBLAS_FILL_MODE_UPPER: If this option is selected, the lower part of is not referenced.MUBLAS_FILL_MODE_LOWER: If this option is selected, the upper part of is not referenced.
-
n [
mublas_int]: Number of rows and columns of the matrix . -
alpha: Specifies the scalar .
-
A: Pointer storing matrix on the GPU.
-
x: Pointer storing vector on the GPU.
-
incx [
mublas_int]: Specifies the increment for the elements of vector . -
beta: Specifies the scalar .
-
y: Pointer storing vector on the GPU.
-
incy [
mublas_int]: Specifies the increment for the elements of vector .
The spmv function performs the matrix-vector operation:
where and are scalars, and are -element vectors, and should contain an upper or lower triangular 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 is referenced.MUBLAS_FILL_MODE_UPPER: If this option is selected, the lower part of is not referenced.MUBLAS_FILL_MODE_LOWER: If this option is selected, the upper part of is not referenced.
-
n [
mublas_int]: Number of rows and columns of each matrix . -
alpha: Device pointer or host pointer to scalar .
-
A: Device array of device pointers storing each matrix .
-
x: Device array of device pointers storing each vector .
-
incx [
mublas_int]: Specifies the increment for the elements of each vector . -
beta: Device pointer or host pointer to scalar .
-
y: Device array of device pointers storing each vector .
-
incy [
mublas_int]: Specifies the increment for the elements of each vector . -
batch_count [
mublas_int]: Number of instances in the batch.
The spmv_batched function performs the matrix-vector operation:
where is the -th instance of the batch. and are scalars, and are vectors, and is an symmetric matrix for i = 1, \ldots, \text\{batch\_count}. should contain an upper or lower triangular 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 is referenced.MUBLAS_FILL_MODE_UPPER: If this option is selected, the lower part of is not referenced.MUBLAS_FILL_MODE_LOWER: If this option is selected, the upper part of is not referenced.
-
n [
mublas_int]: Number of rows and columns of each matrix . -
alpha: Device pointer or host pointer to scalar .
-
A: Device pointer to the first matrix on the GPU.
-
strideA [
mublas_stride]: Stride from the start of one matrix () to the next one (A_\{i+1}). -
x: Device pointer to the first vector on the GPU.
-
incx [
mublas_int]: Specifies the increment for the elements of each vector . -
stridex [
mublas_stride]: Stride from the start of one vector () to the next one (x_\{i+1}). There are no restrictions placed onstridex; however, the user should ensure thatstridexis of appropriate size. This typically meansstridex \geq n \cdot incx.stridexshould be non-zero. -
beta: Device pointer or host pointer to scalar .
-
y: Device pointer to the first vector on the GPU.
-
incy [
mublas_int]: Specifies the increment for the elements of each vector . -
stridey [
mublas_stride]: Stride from the start of one vector () to the next one (y_\{i+1}). There are no restrictions placed onstridey; however, the user should ensure thatstrideyis of appropriate size. This typically meansstridey \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:
where is the -th instance of the batch. and are scalars, and are vectors, and is an symmetric matrix for i = 1, \ldots, \text\{batch\_count}. should contain an upper or lower triangular 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 is referenced.MUBLAS_FILL_MODE_UPPER: The upper triangular part of each is supplied in .MUBLAS_FILL_MODE_LOWER: The lower triangular part of each is supplied in .
-
n [
mublas_int]: The number of rows and columns of each matrix , must be at least 0. -
alpha: Device pointer or host pointer to scalar .
-
x: Device array of device pointers storing each vector .
-
incx [
mublas_int]: Specifies the increment for the elements of each . -
AP: Device array of device pointers storing the packed version of the specified triangular portion of each symmetric matrix , 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 is supplied. The matrix is compacted so that contains the triangular portion column-by-column:- , etc.
Example:
- For
MUBLAS_FILL_MODE_UPPER; n = 4:
-
If
uplo == MUBLAS_FILL_MODE_LOWER: The lower triangular portion of each symmetric matrix is supplied. The matrix is compacted so that contains the triangular portion column-by-column:- , etc.
Example:
- For
MUBLAS_FILL_MODE_LOWER; n = 4:
-
-
batch_count [
mublas_int]: Number of instances in the batch. console.log('Value of i before line 9241:', i); Thespr_batchedfunction performs the matrix-vector operations:
where is a scalar, is a vector, and is an 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 is supplied inAP.MUBLAS_FILL_MODE_LOWER: The lower triangular part of each is supplied inAP.
-
n (
mublas_int): The number of rows and columns of each matrix ; must be at least 0. -
alpha: Device pointer or host pointer to the scalar .
-
x: Device pointer pointing to the first vector .
-
incx (
mublas_int): Specifies the increment for the elements of each vector . -
stride_x (
mublas_stride): Stride from the start of one vector to the next x_\{i+1}. -
AP: Device pointer storing the packed version of the specified triangular portion of each symmetric matrix . Points to the first :
-
If
uplo == MUBLAS_FILL_MODE_UPPER: The upper triangular portion of each symmetric matrix is supplied. The matrix is compacted so thatAPcontains the triangular portion column-by-column:- , etc.
Example (for
\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]MUBLAS_FILL_MODE_UPPERand ): -
If
uplo == MUBLAS_FILL_MODE_LOWER: The lower triangular portion of each symmetric matrix is supplied. The matrix is compacted so thatAPcontains the triangular portion column-by-column:- , etc.
Example (for
\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]MUBLAS_FILL_MODE_LOWERand ):
-
-
stride_A (
mublas_stride): Stride from the start of one matrix 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:
where is a scalar, is a vector, and is an 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 is supplied inAP.MUBLAS_FILL_MODE_LOWER: The lower triangular part of is supplied inAP.
- n (
mublas_int): The number of rows and columns of the matrix ; must be at least 0. - alpha: Device pointer or host pointer to the scalar .
- x: Device pointer storing vector .
- incx (
mublas_int): Specifies the increment for the elements of . - y: Device pointer storing vector .
- incy (
mublas_int): Specifies the increment for the elements of . - AP: Device pointer storing the packed version of the specified triangular portion of the symmetric matrix , 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 is supplied. The matrix is compacted so thatAPcontains the triangular portion column-by-column:- Example (MUBLAS_FILL_MODE_UPPER; ):
corresponds to:A = | 1 2 4 7 || 2 3 5 8 || 4 5 6 9 || 7 8 9 0 |AP = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
- Example (MUBLAS_FILL_MODE_UPPER; ):
- If
uplo == MUBLAS_FILL_MODE_LOWER: The lower triangular portion of the symmetric matrix is supplied. The matrix is compacted so thatAPcontains the triangular portion column-by-column:- Example (MUBLAS_FILL_MODE_LOWER; ):
corresponds to:A = | 1 2 3 4 || 2 5 6 7 || 3 6 8 9 || 4 7 9 0 |AP = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
- Example (MUBLAS_FILL_MODE_LOWER; ):
- If
Operation
The function spr2 performs the matrix-vector operation:
where is a scalar, and are vectors, and is an 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 :MUBLAS_FILL_MODE_UPPER: The upper triangular part of each is supplied inAP.MUBLAS_FILL_MODE_LOWER: The lower triangular part of each is supplied inAP.
-
n [
mublas_int]: The number of rows and columns of each matrix ; must be at least 0. -
alpha: Device pointer or host pointer to the scalar .
-
x: Device array of device pointers storing each vector .
-
incx [
mublas_int]: Specifies the increment for the elements of each . -
y: Device array of device pointers storing each vector .
-
incy [
mublas_int]: Specifies the increment for the elements of each . -
AP: Device array of device pointers storing the packed version of the specified triangular portion of each symmetric matrix , 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 is supplied. The matrix is compacted so thatAPcontains the triangular portion column-by-column, such that:- , etc.
- Example (MUBLAS_FILL_MODE_UPPER; ):
corresponds to:A = | 1 2 4 7 || 2 3 5 8 || 4 5 6 9 || 7 8 9 0 |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 is supplied. The matrix is compacted so thatAPcontains the triangular portion column-by-column, such that:- , etc.
- Example (MUBLAS_FILL_MODE_LOWER; ):
corresponds to:A = | 1 2 3 4 || 2 5 6 7 || 3 6 8 9 || 4 7 9 0 |AP = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]
- If
-
batch_count [
mublas_int]: Number of instances in the batch.
Operation
The function spr2_batched performs the matrix-vector operation:
where is a scalar, and are vectors, and is an 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 is referenced.MUBLAS_FILL_MODE_UPPER: The upper triangular part of each is supplied in .MUBLAS_FILL_MODE_LOWER: The lower triangular part of each is supplied in .
-
n [
mublas_int]: The number of rows and columns of each matrix , must be at least 0. -
alpha: Device pointer or host pointer to scalar .
-
x: Device pointer pointing to the first vector ().
-
incx [
mublas_int]: Specifies the increment for the elements of each . -
stride_x [
mublas_stride]: Stride from the start of one vector () to the next one (x_\{i+1}). -
y: Device pointer pointing to the first vector ().
-
incy [
mublas_int]: Specifies the increment for the elements of each . -
stride_y [
mublas_stride]: Stride from the start of one vector () to the next one (y_\{i+1}). -
AP: Device pointer storing the packed version of the specified triangular portion of each symmetric matrix . Points to the first .
-
If
uplo == MUBLAS_FILL_MODE_UPPER: The upper triangular portion of each symmetric matrix is supplied. The matrix is compacted so that contains the triangular portion column-by-column:- , etc.
Example:
- For
MUBLAS_FILL_MODE_UPPER; n = 4:
-
If
uplo == MUBLAS_FILL_MODE_LOWER: The lower triangular portion of each symmetric matrix is supplied. The matrix is compacted so that contains the triangular portion column-by-column:- , etc.
Example:
- For
MUBLAS_FILL_MODE_LOWER; n = 4:
-
-
stride_A [
mublas_stride]: Stride from the start of one () 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:
where is a scalar, and are vectors, and 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:MUBLAS_SIDE_RIGHT:
-
uplo [
mublasFillMode_t]:MUBLAS_FILL_MODE_UPPER: is an upper triangular matrix.MUBLAS_FILL_MODE_LOWER: is a lower triangular matrix.
-
m [
mublas_int]: Specifies the number of rows of and . . -
n [
mublas_int]: Specifies the number of columns of and . . -
alpha: Specifies the scalar . When is zero, then and are not referenced.
-
A: Device array of device pointers storing each matrix on the GPU.
- is if
side == MUBLAS_SIDE_LEFT. - is if
side == MUBLAS_SIDE_RIGHT. - Only the upper/lower triangular part is accessed. The imaginary component of the diagonal elements is not used.
- is if
-
lda [
mublas_int]: Specifies the first dimension of .- If
side = MUBLAS_SIDE_LEFT, \text\{lda} \geq \max(1, m), otherwise \text\{lda} \geq \max(1, n).
- If
-
B: Device array of device pointers storing each matrix on the GPU. Matrix dimension is .
-
ldb [
mublas_int]: Specifies the first dimension of . \text\{ldb} \geq \max(1, m). -
beta: Specifies the scalar . When is zero, then need not be set before entry.
-
C: Device array of device pointers storing each matrix on the GPU. Matrix dimension is .
-
ldc [
mublas_int]: Specifies the first dimension of . \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:
where and are scalars, and are matrices, and is a Hermitian matrix stored as either upper or lower.