cublas

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2026 License: Apache-2.0 Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cublas provides low-level Go bindings for cuBLAS (CUDA Basic Linear Algebra Subroutines).

cuBLAS implements BLAS (Basic Linear Algebra Subprograms) on NVIDIA GPUs. It provides routines for vector/vector (BLAS1), matrix/vector (BLAS2), and matrix/matrix (BLAS3) operations in single, double, and half precision.

The central type is Handle, which manages a cuBLAS context. All BLAS operations are methods on Handle. Create one with Create and clean up with [Handle.Destroy].

This package provides bindings generated from cublas_api.h using github.com/ebitengine/purego for cgo-free dynamic loading of libcublas. Functions returning a C status report errors wrapping cublasStatus_t with descriptive messages from cublasGetStatusName.

64-bit Integer Interface

A function whose name ends in 64, such as Handle.Saxpy64, takes its sizes and strides as int64, for problems where n or a stride exceeds the int32 range. It is otherwise the same as the function without the suffix.

BLAS3

Lifecycle

  • Create: initializes the cuBLAS library and creates a handle to an opaque structure holding the cuBLAS library context.
  • Handle.Close: releases hardware resources used by the cuBLAS library.

BLAS1

  • Handle.Daxpy: multiplies the vector x by the scalar α and adds it to the vector y overwriting the latest vector with the result.
  • Handle.Daxpy64: multiplies the vector x by the scalar α and adds it to the vector y overwriting the latest vector with the result.
  • Handle.Dnrm2: computes the Euclidean norm of the vector x.
  • Handle.Dnrm264: computes the Euclidean norm of the vector x.
  • Handle.Dscal: scales the vector x by the scalar α and overwrites it with the result.
  • Handle.Dscal64: scales the vector x by the scalar α and overwrites it with the result.
  • Handle.Saxpy: multiplies the vector x by the scalar α and adds it to the vector y overwriting the latest vector with the result.
  • Handle.Saxpy64: multiplies the vector x by the scalar α and adds it to the vector y overwriting the latest vector with the result.
  • Handle.Snrm2: computes the Euclidean norm of the vector x.
  • Handle.Snrm264: computes the Euclidean norm of the vector x.
  • Handle.Sscal: scales the vector x by the scalar α and overwrites it with the result.
  • Handle.Sscal64: scales the vector x by the scalar α and overwrites it with the result.

BLAS2

Configuration

Stream Management

  • Handle.Stream: gets the cuBLAS library stream, which is being used to execute all calls to the cuBLAS library functions.
  • Handle.SetStream: sets the cuBLAS library stream, which will be used to execute all subsequent calls to the cuBLAS library functions.

Other

  • Handle.AxpyEx: is an API generalization of the routine cublasaxpy() where input data, output data and compute type can be specified independently.
  • Handle.AxpyEx64: is an API generalization of the routine cublasaxpy() where input data, output data and compute type can be specified independently.
  • Handle.Caxpy: multiplies the vector x by the scalar α and adds it to the vector y overwriting the latest vector with the result.
  • Handle.Caxpy64: multiplies the vector x by the scalar α and adds it to the vector y overwriting the latest vector with the result.
  • Handle.Ccopy: copies the vector x into the vector y.
  • Handle.Ccopy64: copies the vector x into the vector y.
  • Handle.Cdgmm: performs the matrix-matrix multiplication.
  • Handle.Cdgmm64: performs the matrix-matrix multiplication.
  • Handle.Cdotc: computes the dot product of vectors x and y.
  • Handle.Cdotc64: computes the dot product of vectors x and y.
  • Handle.Cdotu: computes the dot product of vectors x and y.
  • Handle.Cdotu64: computes the dot product of vectors x and y.
  • Handle.Cgbmv: performs the banded matrix-vector multiplication.
  • Handle.Cgbmv64: performs the banded matrix-vector multiplication.
  • Handle.Cgeam: performs the matrix-matrix addition/transposition.
  • Handle.Cgeam64: performs the matrix-matrix addition/transposition.
  • Handle.CgelsBatched: Aarray is an array of pointers to matrices stored in column-major format.
  • Handle.CgemvBatched: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.CgemvBatched64: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.CgemvStridedBatched: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.CgemvStridedBatched64: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.Cgemv: performs the matrix-vector multiplication.
  • Handle.Cgemv64: performs the matrix-vector multiplication.
  • Handle.CgeqrfBatched: Aarray is an array of pointers to matrices stored in column-major format with dimensions m x n and leading dimension lda.
  • Handle.Cgerc: performs the rank-1 update.
  • Handle.Cgerc64: performs the rank-1 update.
  • Handle.Cgeru: performs the rank-1 update.
  • Handle.Cgeru64: performs the rank-1 update.
  • Handle.CgetrfBatched: Aarray is an array of pointers to matrices stored in column-major format with dimensions nxn and leading dimension lda.
  • Handle.CgetriBatched: Aarray and Carray are arrays of pointers to matrices stored in column-major format with dimensions n*n and leading dimension lda and ldc respectively.
  • Handle.CgetrsBatched: solves an array of systems of linear equations of the form:
  • Handle.Chbmv: performs the Hermitian banded matrix-vector multiplication.
  • Handle.Chbmv64: performs the Hermitian banded matrix-vector multiplication.
  • Handle.Chemm: performs the Hermitian matrix-matrix multiplication.
  • Handle.Chemm64: performs the Hermitian matrix-matrix multiplication.
  • Handle.Chemv: performs the Hermitian matrix-vector multiplication.
  • Handle.Chemv64: performs the Hermitian matrix-vector multiplication.
  • Handle.Cher2: performs the Hermitian rank-2 update.
  • Handle.Cher264: performs the Hermitian rank-2 update.
  • Handle.Cher2k: performs the Hermitian rank- 2k update.
  • Handle.Cher2k64: performs the Hermitian rank- 2k update.
  • Handle.Cher: performs the Hermitian rank-1 update.
  • Handle.Cher64: performs the Hermitian rank-1 update.
  • Handle.Cherk3mEx: is an extension of Handle.Cherk where the input matrix and output matrix can have a lower precision but the computation is still done in the type cuComplex.
  • Handle.Cherk3mEx64: is an extension of Handle.Cherk where the input matrix and output matrix can have a lower precision but the computation is still done in the type cuComplex.
  • Handle.CherkEx: is an extension of Handle.Cherk where the input matrix and output matrix can have a lower precision but the computation is still done in the type cuComplex.
  • Handle.CherkEx64: is an extension of Handle.Cherk where the input matrix and output matrix can have a lower precision but the computation is still done in the type cuComplex.
  • Handle.Cherk: performs the Hermitian rank- k update.
  • Handle.Cherk64: performs the Hermitian rank- k update.
  • Handle.Cherkx: performs a variation of the Hermitian rank- k update.
  • Handle.Cherkx64: performs a variation of the Hermitian rank- k update.
  • Handle.Chpmv: performs the Hermitian packed matrix-vector multiplication.
  • Handle.Chpmv64: performs the Hermitian packed matrix-vector multiplication.
  • Handle.Chpr2: performs the packed Hermitian rank-2 update.
  • Handle.Chpr264: performs the packed Hermitian rank-2 update.
  • Handle.Chpr: performs the packed Hermitian rank-1 update.
  • Handle.Chpr64: performs the packed Hermitian rank-1 update.
  • Handle.CmatinvBatched: A and Ainv are arrays of pointers to matrices stored in column-major format with dimensions n*n and leading dimension lda and lda_inv respectively.
  • Handle.Crot: applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):
  • Handle.Crot64: applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):
  • Handle.Crotg: constructs the Givens rotation matrix.
  • Handle.Cscal: scales the vector x by the scalar α and overwrites it with the result.
  • Handle.Cscal64: scales the vector x by the scalar α and overwrites it with the result.
  • Handle.Csrot: applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):
  • Handle.Csrot64: applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):
  • Handle.Csscal: scales the vector x by the scalar α and overwrites it with the result.
  • Handle.Csscal64: scales the vector x by the scalar α and overwrites it with the result.
  • Handle.Cswap: interchanges the elements of vector x and y.
  • Handle.Cswap64: interchanges the elements of vector x and y.
  • Handle.Csymm: performs the symmetric matrix-matrix multiplication.
  • Handle.Csymm64: performs the symmetric matrix-matrix multiplication.
  • Handle.Csymv: performs the symmetric matrix-vector multiplication.
  • Handle.Csymv64: performs the symmetric matrix-vector multiplication.
  • Handle.Csyr2: performs the symmetric rank-2 update.
  • Handle.Csyr264: performs the symmetric rank-2 update.
  • Handle.Csyr2k: performs the symmetric rank- 2k update.
  • Handle.Csyr2k64: performs the symmetric rank- 2k update.
  • Handle.Csyr: performs the symmetric rank-1 update.
  • Handle.Csyr64: performs the symmetric rank-1 update.
  • Handle.Csyrk3mEx: is an extension of Handle.Csyrk where the input matrix and output matrix can have a lower precision but the computation is still done in the type cuComplex.
  • Handle.Csyrk3mEx64: is an extension of Handle.Csyrk where the input matrix and output matrix can have a lower precision but the computation is still done in the type cuComplex.
  • Handle.CsyrkEx: is an extension of Handle.Csyrk where the input matrix and output matrix can have a lower precision but the computation is still done in the type cuComplex.
  • Handle.CsyrkEx64: is an extension of Handle.Csyrk where the input matrix and output matrix can have a lower precision but the computation is still done in the type cuComplex.
  • Handle.Csyrk: performs the symmetric rank- k update.
  • Handle.Csyrk64: performs the symmetric rank- k update.
  • Handle.Csyrkx: performs a variation of the symmetric rank- k update.
  • Handle.Csyrkx64: performs a variation of the symmetric rank- k update.
  • Handle.Ctbmv: performs the triangular banded matrix-vector multiplication.
  • Handle.Ctbmv64: performs the triangular banded matrix-vector multiplication.
  • Handle.Ctbsv: solves the triangular banded linear system with a single right-hand-side.
  • Handle.Ctbsv64: solves the triangular banded linear system with a single right-hand-side.
  • Handle.Ctpmv: performs the triangular packed matrix-vector multiplication.
  • Handle.Ctpmv64: performs the triangular packed matrix-vector multiplication.
  • Handle.Ctpsv: solves the packed triangular linear system with a single right-hand-side.
  • Handle.Ctpsv64: solves the packed triangular linear system with a single right-hand-side.
  • Handle.Ctpttr: performs the conversion from the triangular packed format to the triangular format.
  • Handle.Ctrmm: performs the triangular matrix-matrix multiplication.
  • Handle.Ctrmm64: performs the triangular matrix-matrix multiplication.
  • Handle.Ctrmv: performs the triangular matrix-vector multiplication.
  • Handle.Ctrmv64: performs the triangular matrix-vector multiplication.
  • Handle.CtrsmBatched: solves an array of triangular linear systems with multiple right-hand-sides.
  • Handle.CtrsmBatched64: solves an array of triangular linear systems with multiple right-hand-sides.
  • Handle.Ctrsm: solves the triangular linear system with multiple right-hand-sides.
  • Handle.Ctrsm64: solves the triangular linear system with multiple right-hand-sides.
  • Handle.Ctrsv: solves the triangular linear system with a single right-hand-side.
  • Handle.Ctrsv64: solves the triangular linear system with a single right-hand-side.
  • Handle.Ctrttp: performs the conversion from the triangular format to the triangular packed format.
  • Handle.Dasum: computes the sum of the absolute values of the elements of vector x.
  • Handle.Dasum64: computes the sum of the absolute values of the elements of vector x.
  • Handle.Dcopy: copies the vector x into the vector y.
  • Handle.Dcopy64: copies the vector x into the vector y.
  • Handle.Ddgmm: performs the matrix-matrix multiplication.
  • Handle.Ddgmm64: performs the matrix-matrix multiplication.
  • Handle.Ddot: computes the dot product of vectors x and y.
  • Handle.Ddot64: computes the dot product of vectors x and y.
  • Handle.Dgbmv: performs the banded matrix-vector multiplication.
  • Handle.Dgbmv64: performs the banded matrix-vector multiplication.
  • Handle.Dgeam: performs the matrix-matrix addition/transposition.
  • Handle.Dgeam64: performs the matrix-matrix addition/transposition.
  • Handle.DgelsBatched: Aarray is an array of pointers to matrices stored in column-major format.
  • Handle.DgeqrfBatched: Aarray is an array of pointers to matrices stored in column-major format with dimensions m x n and leading dimension lda.
  • Handle.Dger: performs the rank-1 update.
  • Handle.Dger64: performs the rank-1 update.
  • Handle.DgetrfBatched: Aarray is an array of pointers to matrices stored in column-major format with dimensions nxn and leading dimension lda.
  • Handle.DgetriBatched: Aarray and Carray are arrays of pointers to matrices stored in column-major format with dimensions n*n and leading dimension lda and ldc respectively.
  • Handle.DgetrsBatched: solves an array of systems of linear equations of the form:
  • Handle.DmatinvBatched: A and Ainv are arrays of pointers to matrices stored in column-major format with dimensions n*n and leading dimension lda and lda_inv respectively.
  • Handle.DotEx: These functions are an API generalization of the routines cublasdot() and cublasdotc() where input data, output data and compute type can be specified independently.
  • Handle.DotEx64: These functions are an API generalization of the routines cublasdot() and cublasdotc() where input data, output data and compute type can be specified independently.
  • Handle.DotcEx: These functions are an API generalization of the routines cublasdot() and cublasdotc() where input data, output data and compute type can be specified independently.
  • Handle.DotcEx64: These functions are an API generalization of the routines cublasdot() and cublasdotc() where input data, output data and compute type can be specified independently.
  • Handle.Drot: applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):
  • Handle.Drot64: applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):
  • Handle.Drotg: constructs the Givens rotation matrix.
  • Handle.Drotm: applies the modified Givens transformation.
  • Handle.Drotm64: applies the modified Givens transformation.
  • Handle.Drotmg: constructs the modified Givens transformation.
  • Handle.Dsbmv: performs the symmetric banded matrix-vector multiplication.
  • Handle.Dsbmv64: performs the symmetric banded matrix-vector multiplication.
  • Handle.Dspmv: performs the symmetric packed matrix-vector multiplication.
  • Handle.Dspmv64: performs the symmetric packed matrix-vector multiplication.
  • Handle.Dspr2: performs the packed symmetric rank-2 update.
  • Handle.Dspr264: performs the packed symmetric rank-2 update.
  • Handle.Dspr: performs the packed symmetric rank-1 update.
  • Handle.Dspr64: performs the packed symmetric rank-1 update.
  • Handle.Dswap: interchanges the elements of vector x and y.
  • Handle.Dswap64: interchanges the elements of vector x and y.
  • Handle.Dsymm: performs the symmetric matrix-matrix multiplication.
  • Handle.Dsymm64: performs the symmetric matrix-matrix multiplication.
  • Handle.Dsymv: performs the symmetric matrix-vector multiplication.
  • Handle.Dsymv64: performs the symmetric matrix-vector multiplication.
  • Handle.Dsyr2: performs the symmetric rank-2 update.
  • Handle.Dsyr264: performs the symmetric rank-2 update.
  • Handle.Dsyr2k: performs the symmetric rank- 2k update.
  • Handle.Dsyr2k64: performs the symmetric rank- 2k update.
  • Handle.Dsyr: performs the symmetric rank-1 update.
  • Handle.Dsyr64: performs the symmetric rank-1 update.
  • Handle.Dsyrk: performs the symmetric rank- k update.
  • Handle.Dsyrk64: performs the symmetric rank- k update.
  • Handle.Dsyrkx: performs a variation of the symmetric rank- k update.
  • Handle.Dsyrkx64: performs a variation of the symmetric rank- k update.
  • Handle.Dtbmv: performs the triangular banded matrix-vector multiplication.
  • Handle.Dtbmv64: performs the triangular banded matrix-vector multiplication.
  • Handle.Dtbsv: solves the triangular banded linear system with a single right-hand-side.
  • Handle.Dtbsv64: solves the triangular banded linear system with a single right-hand-side.
  • Handle.Dtpmv: performs the triangular packed matrix-vector multiplication.
  • Handle.Dtpmv64: performs the triangular packed matrix-vector multiplication.
  • Handle.Dtpsv: solves the packed triangular linear system with a single right-hand-side.
  • Handle.Dtpsv64: solves the packed triangular linear system with a single right-hand-side.
  • Handle.Dtpttr: performs the conversion from the triangular packed format to the triangular format.
  • Handle.Dtrmm: performs the triangular matrix-matrix multiplication.
  • Handle.Dtrmm64: performs the triangular matrix-matrix multiplication.
  • Handle.Dtrmv: performs the triangular matrix-vector multiplication.
  • Handle.Dtrmv64: performs the triangular matrix-vector multiplication.
  • Handle.Dtrsv: solves the triangular linear system with a single right-hand-side.
  • Handle.Dtrsv64: solves the triangular linear system with a single right-hand-side.
  • Handle.Dtrttp: performs the conversion from the triangular format to the triangular packed format.
  • Handle.Dzasum: computes the sum of the absolute values of the elements of vector x.
  • Handle.Dzasum64: computes the sum of the absolute values of the elements of vector x.
  • Handle.Dznrm2: computes the Euclidean norm of the vector x.
  • Handle.Dznrm264: computes the Euclidean norm of the vector x.
  • Handle.GemmBatchedEx: is an extension of cublasgemmBatched() that performs the matrix-matrix multiplication of a batch of matrices and allows the user to individually specify the data types for each of the A, B and C matrix arrays, the precision of computation and the GEMM algorithm to be run.
  • Handle.GemmBatchedEx64: is an extension of cublasgemmBatched() that performs the matrix-matrix multiplication of a batch of matrices and allows the user to individually specify the data types for each of the A, B and C matrix arrays, the precision of computation and the GEMM algorithm to be run.
  • Handle.GemmEx: is an extension of cublasgemm() that allows the user to individually specify the data types for each of the A, B and C matrices, the precision of computation and the GEMM algorithm to be run.
  • Handle.GemmEx64: is an extension of cublasgemm() that allows the user to individually specify the data types for each of the A, B and C matrices, the precision of computation and the GEMM algorithm to be run.
  • Handle.GemmGroupedBatchedEx: performs the matrix-matrix multiplication on groups of matrices.
  • Handle.GemmGroupedBatchedEx64: performs the matrix-matrix multiplication on groups of matrices.
  • Handle.GemmStridedBatchedEx: is an extension of cublasgemmStridedBatched() that performs the matrix-matrix multiplication of a batch of matrices and allows the user to individually specify the data types for each of the A, B and C matrices, the precision of computation and the GEMM algorithm to be run.
  • Handle.GemmStridedBatchedEx64: is an extension of cublasgemmStridedBatched() that performs the matrix-matrix multiplication of a batch of matrices and allows the user to individually specify the data types for each of the A, B and C matrices, the precision of computation and the GEMM algorithm to be run.
  • Handle.AtomicsMode: queries the atomic mode of a specific cuBLAS context.
  • Handle.EmulationSpecialValuesSupport: obtains the value previously programmed to the library handle.
  • Handle.EmulationStrategy: obtains the value previously programmed to the library handle.
  • Handle.FixedPointEmulationMantissaBitCountPointer: obtains the value previously programmed to the library handle.
  • Handle.FixedPointEmulationMantissaBitOffset: obtains the value previously programmed to the library handle.
  • Handle.FixedPointEmulationMantissaControl: obtains the value previously programmed to the library handle.
  • Handle.FixedPointEmulationMaxMantissaBitCount: obtains the value previously programmed to the library handle.
  • GetLoggerCallback: retrieves function pointer to previously installed custom user defined callback function via SetLoggerCallback or zero otherwise.
  • GetMatrix: copies a tile of rows x cols elements from a matrix A in GPU memory space to a matrix B in host memory space.
  • GetMatrixAsync: has the same functionality as GetMatrix, with the exception that the data transfer is done asynchronously (with respect to the host) using the given CUDA™ stream parameter.
  • GetMatrixAsync64: has the same functionality as GetMatrix, with the exception that the data transfer is done asynchronously (with respect to the host) using the given CUDA™ stream parameter.
  • GetMatrix64: copies a tile of rows x cols elements from a matrix A in GPU memory space to a matrix B in host memory space.
  • GetProperty: returns the value of the requested property in memory pointed to by value.
  • Handle.SmCountTarget: obtains the value previously programmed to the library handle.
  • GetVector: copies n elements from a vector x in GPU memory space to a vector y in host memory space.
  • GetVectorAsync: has the same functionality as GetVector, with the exception that the data transfer is done asynchronously (with respect to the host) using the given CUDA™ stream parameter.
  • GetVectorAsync64: has the same functionality as GetVector, with the exception that the data transfer is done asynchronously (with respect to the host) using the given CUDA™ stream parameter.
  • GetVector64: copies n elements from a vector x in GPU memory space to a vector y in host memory space.
  • Handle.Version: returns the version number of the cuBLAS library.
  • Handle.HSHgemvBatched: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.HSHgemvBatched64: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.HSHgemvStridedBatched: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.HSHgemvStridedBatched64: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.HSSgemvBatched: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.HSSgemvBatched64: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.HSSgemvStridedBatched: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.HSSgemvStridedBatched64: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.Hgemm: performs the matrix-matrix multiplication.
  • Handle.HgemmBatched: performs the matrix-matrix multiplication of a batch of matrices.
  • Handle.HgemmBatched64: performs the matrix-matrix multiplication of a batch of matrices.
  • Handle.HgemmStridedBatched: performs the matrix-matrix multiplication of a batch of matrices.
  • Handle.HgemmStridedBatched64: performs the matrix-matrix multiplication of a batch of matrices.
  • Handle.Hgemm64: performs the matrix-matrix multiplication.
  • Handle.Icamax: finds the (smallest) index of the element of the maximum magnitude.
  • Handle.Icamax64: finds the (smallest) index of the element of the maximum magnitude.
  • Handle.Icamin: finds the (smallest) index of the element of the minimum magnitude.
  • Handle.Icamin64: finds the (smallest) index of the element of the minimum magnitude.
  • Handle.Idamax: finds the (smallest) index of the element of the maximum magnitude.
  • Handle.Idamax64: finds the (smallest) index of the element of the maximum magnitude.
  • Handle.Idamin: finds the (smallest) index of the element of the minimum magnitude.
  • Handle.Idamin64: finds the (smallest) index of the element of the minimum magnitude.
  • Handle.Isamax: finds the (smallest) index of the element of the maximum magnitude.
  • Handle.Isamax64: finds the (smallest) index of the element of the maximum magnitude.
  • Handle.Isamin: finds the (smallest) index of the element of the minimum magnitude.
  • Handle.Isamin64: finds the (smallest) index of the element of the minimum magnitude.
  • Handle.Izamax: finds the (smallest) index of the element of the maximum magnitude.
  • Handle.Izamax64: finds the (smallest) index of the element of the maximum magnitude.
  • Handle.Izamin: finds the (smallest) index of the element of the minimum magnitude.
  • Handle.Izamin64: finds the (smallest) index of the element of the minimum magnitude.
  • LoggerConfigure: configures logging during runtime.
  • Handle.Nrm2Ex: is an API generalization of the routine cublasnrm2() where input data, output data and compute type can be specified independently.
  • Handle.Nrm2Ex64: is an API generalization of the routine cublasnrm2() where input data, output data and compute type can be specified independently.
  • Handle.RotEx: is an extension to the routine cublasrot() where input data, output data, cosine/sine type, and compute type can be specified independently.
  • Handle.RotEx64: is an extension to the routine cublasrot() where input data, output data, cosine/sine type, and compute type can be specified independently.
  • Handle.Sasum: computes the sum of the absolute values of the elements of vector x.
  • Handle.Sasum64: computes the sum of the absolute values of the elements of vector x.
  • Handle.ScalEx: scales the vector x by the scalar α and overwrites it with the result.
  • Handle.ScalEx64: scales the vector x by the scalar α and overwrites it with the result.
  • Handle.Scasum: computes the sum of the absolute values of the elements of vector x.
  • Handle.Scasum64: computes the sum of the absolute values of the elements of vector x.
  • Handle.Scnrm2: computes the Euclidean norm of the vector x.
  • Handle.Scnrm264: computes the Euclidean norm of the vector x.
  • Handle.Scopy: copies the vector x into the vector y.
  • Handle.Scopy64: copies the vector x into the vector y.
  • Handle.Sdgmm: performs the matrix-matrix multiplication.
  • Handle.Sdgmm64: performs the matrix-matrix multiplication.
  • Handle.Sdot: computes the dot product of vectors x and y.
  • Handle.Sdot64: computes the dot product of vectors x and y.
  • Handle.SetAtomicsMode: Some routines like cublassymv() and cublashemv() have an alternate implementation that use atomics to cumulate results.
  • Handle.SetEmulationSpecialValuesSupport: sets the value previously programmed to the library handle.
  • Handle.SetEmulationStrategy: The Handle.SetEmulationStrategy function enables you to select how the library should make use of floating point emulation.
  • Handle.SetFixedPointEmulationMantissaBitCountPointer: sets the value previously programmed to the library handle.
  • Handle.SetFixedPointEmulationMantissaBitOffset: sets the value previously programmed to the library handle.
  • Handle.SetFixedPointEmulationMantissaControl: sets the value previously programmed to the library handle.
  • Handle.SetFixedPointEmulationMaxMantissaBitCount: sets the value previously programmed to the library handle.
  • SetLoggerCallback: installs a custom user defined callback function via cublas C public API.
  • SetMatrix: copies a tile of rows x cols elements from a matrix A in host memory space to a matrix B in GPU memory space.
  • SetMatrixAsync: has the same functionality as SetMatrix, with the exception that the data transfer is done asynchronously (with respect to the host) using the given CUDA™ stream parameter.
  • SetMatrixAsync64: has the same functionality as SetMatrix, with the exception that the data transfer is done asynchronously (with respect to the host) using the given CUDA™ stream parameter.
  • SetMatrix64: copies a tile of rows x cols elements from a matrix A in host memory space to a matrix B in GPU memory space.
  • Handle.SetSmCountTarget: The Handle.SetSmCountTarget function allows overriding the number of multiprocessors available to the library during kernels execution.
  • SetVector: copies n elements from a vector x in host memory space to a vector y in GPU memory space.
  • SetVectorAsync: has the same functionality as SetVector, with the exception that the data transfer is done asynchronously (with respect to the host) using the given CUDA™ stream parameter.
  • SetVectorAsync64: has the same functionality as SetVector, with the exception that the data transfer is done asynchronously (with respect to the host) using the given CUDA™ stream parameter.
  • SetVector64: copies n elements from a vector x in host memory space to a vector y in GPU memory space.
  • Handle.SetWorkspace: sets the cuBLAS library workspace to a user-owned device buffer, which will be used to execute all subsequent calls to the cuBLAS library functions (on the currently set stream).
  • Handle.Sgbmv: performs the banded matrix-vector multiplication.
  • Handle.Sgbmv64: performs the banded matrix-vector multiplication.
  • Handle.Sgeam: performs the matrix-matrix addition/transposition.
  • Handle.Sgeam64: performs the matrix-matrix addition/transposition.
  • Handle.SgelsBatched: Aarray is an array of pointers to matrices stored in column-major format.
  • Handle.SgeqrfBatched: Aarray is an array of pointers to matrices stored in column-major format with dimensions m x n and leading dimension lda.
  • Handle.Sger: performs the rank-1 update.
  • Handle.Sger64: performs the rank-1 update.
  • Handle.SgetrfBatched: Aarray is an array of pointers to matrices stored in column-major format with dimensions nxn and leading dimension lda.
  • Handle.SgetriBatched: Aarray and Carray are arrays of pointers to matrices stored in column-major format with dimensions n*n and leading dimension lda and ldc respectively.
  • Handle.SgetrsBatched: solves an array of systems of linear equations of the form:
  • Handle.SmatinvBatched: A and Ainv are arrays of pointers to matrices stored in column-major format with dimensions n*n and leading dimension lda and lda_inv respectively.
  • Handle.Srot: applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):
  • Handle.Srot64: applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):
  • Handle.Srotg: constructs the Givens rotation matrix.
  • Handle.Srotm: applies the modified Givens transformation.
  • Handle.Srotm64: applies the modified Givens transformation.
  • Handle.Srotmg: constructs the modified Givens transformation.
  • Handle.Ssbmv: performs the symmetric banded matrix-vector multiplication.
  • Handle.Ssbmv64: performs the symmetric banded matrix-vector multiplication.
  • Handle.Sspmv: performs the symmetric packed matrix-vector multiplication.
  • Handle.Sspmv64: performs the symmetric packed matrix-vector multiplication.
  • Handle.Sspr2: performs the packed symmetric rank-2 update.
  • Handle.Sspr264: performs the packed symmetric rank-2 update.
  • Handle.Sspr: performs the packed symmetric rank-1 update.
  • Handle.Sspr64: performs the packed symmetric rank-1 update.
  • Handle.Sswap: interchanges the elements of vector x and y.
  • Handle.Sswap64: interchanges the elements of vector x and y.
  • Handle.Ssymm: performs the symmetric matrix-matrix multiplication.
  • Handle.Ssymm64: performs the symmetric matrix-matrix multiplication.
  • Handle.Ssymv: performs the symmetric matrix-vector multiplication.
  • Handle.Ssymv64: performs the symmetric matrix-vector multiplication.
  • Handle.Ssyr2: performs the symmetric rank-2 update.
  • Handle.Ssyr264: performs the symmetric rank-2 update.
  • Handle.Ssyr2k: performs the symmetric rank- 2k update.
  • Handle.Ssyr2k64: performs the symmetric rank- 2k update.
  • Handle.Ssyr: performs the symmetric rank-1 update.
  • Handle.Ssyr64: performs the symmetric rank-1 update.
  • Handle.Ssyrk: performs the symmetric rank- k update.
  • Handle.Ssyrk64: performs the symmetric rank- k update.
  • Handle.Ssyrkx: performs a variation of the symmetric rank- k update.
  • Handle.Ssyrkx64: performs a variation of the symmetric rank- k update.
  • Handle.Stbmv: performs the triangular banded matrix-vector multiplication.
  • Handle.Stbmv64: performs the triangular banded matrix-vector multiplication.
  • Handle.Stbsv: solves the triangular banded linear system with a single right-hand-side.
  • Handle.Stbsv64: solves the triangular banded linear system with a single right-hand-side.
  • Handle.Stpmv: performs the triangular packed matrix-vector multiplication.
  • Handle.Stpmv64: performs the triangular packed matrix-vector multiplication.
  • Handle.Stpsv: solves the packed triangular linear system with a single right-hand-side.
  • Handle.Stpsv64: solves the packed triangular linear system with a single right-hand-side.
  • Handle.Stpttr: performs the conversion from the triangular packed format to the triangular format.
  • Handle.Strmm: performs the triangular matrix-matrix multiplication.
  • Handle.Strmm64: performs the triangular matrix-matrix multiplication.
  • Handle.Strmv: performs the triangular matrix-vector multiplication.
  • Handle.Strmv64: performs the triangular matrix-vector multiplication.
  • Handle.Strsv: solves the triangular linear system with a single right-hand-side.
  • Handle.Strsv64: solves the triangular linear system with a single right-hand-side.
  • Handle.Strttp: performs the conversion from the triangular format to the triangular packed format.
  • Handle.TSSgemvBatched: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.TSSgemvBatched64: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.TSSgemvStridedBatched: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.TSSgemvStridedBatched64: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.TSTgemvBatched: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.TSTgemvBatched64: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.TSTgemvStridedBatched: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.TSTgemvStridedBatched64: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.Zaxpy: multiplies the vector x by the scalar α and adds it to the vector y overwriting the latest vector with the result.
  • Handle.Zaxpy64: multiplies the vector x by the scalar α and adds it to the vector y overwriting the latest vector with the result.
  • Handle.Zcopy: copies the vector x into the vector y.
  • Handle.Zcopy64: copies the vector x into the vector y.
  • Handle.Zdgmm: performs the matrix-matrix multiplication.
  • Handle.Zdgmm64: performs the matrix-matrix multiplication.
  • Handle.Zdotc: computes the dot product of vectors x and y.
  • Handle.Zdotc64: computes the dot product of vectors x and y.
  • Handle.Zdotu: computes the dot product of vectors x and y.
  • Handle.Zdotu64: computes the dot product of vectors x and y.
  • Handle.Zdrot: applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):
  • Handle.Zdrot64: applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):
  • Handle.Zdscal: scales the vector x by the scalar α and overwrites it with the result.
  • Handle.Zdscal64: scales the vector x by the scalar α and overwrites it with the result.
  • Handle.Zgbmv: performs the banded matrix-vector multiplication.
  • Handle.Zgbmv64: performs the banded matrix-vector multiplication.
  • Handle.Zgeam: performs the matrix-matrix addition/transposition.
  • Handle.Zgeam64: performs the matrix-matrix addition/transposition.
  • Handle.ZgelsBatched: Aarray is an array of pointers to matrices stored in column-major format.
  • Handle.ZgemvBatched: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.ZgemvBatched64: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.ZgemvStridedBatched: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.ZgemvStridedBatched64: performs the matrix-vector multiplication of a batch of matrices and vectors.
  • Handle.Zgemv: performs the matrix-vector multiplication.
  • Handle.Zgemv64: performs the matrix-vector multiplication.
  • Handle.ZgeqrfBatched: Aarray is an array of pointers to matrices stored in column-major format with dimensions m x n and leading dimension lda.
  • Handle.Zgerc: performs the rank-1 update.
  • Handle.Zgerc64: performs the rank-1 update.
  • Handle.Zgeru: performs the rank-1 update.
  • Handle.Zgeru64: performs the rank-1 update.
  • Handle.ZgetrfBatched: Aarray is an array of pointers to matrices stored in column-major format with dimensions nxn and leading dimension lda.
  • Handle.ZgetriBatched: Aarray and Carray are arrays of pointers to matrices stored in column-major format with dimensions n*n and leading dimension lda and ldc respectively.
  • Handle.ZgetrsBatched: solves an array of systems of linear equations of the form:
  • Handle.Zhbmv: performs the Hermitian banded matrix-vector multiplication.
  • Handle.Zhbmv64: performs the Hermitian banded matrix-vector multiplication.
  • Handle.Zhemm: performs the Hermitian matrix-matrix multiplication.
  • Handle.Zhemm64: performs the Hermitian matrix-matrix multiplication.
  • Handle.Zhemv: performs the Hermitian matrix-vector multiplication.
  • Handle.Zhemv64: performs the Hermitian matrix-vector multiplication.
  • Handle.Zher2: performs the Hermitian rank-2 update.
  • Handle.Zher264: performs the Hermitian rank-2 update.
  • Handle.Zher2k: performs the Hermitian rank- 2k update.
  • Handle.Zher2k64: performs the Hermitian rank- 2k update.
  • Handle.Zher: performs the Hermitian rank-1 update.
  • Handle.Zher64: performs the Hermitian rank-1 update.
  • Handle.Zherk: performs the Hermitian rank- k update.
  • Handle.Zherk64: performs the Hermitian rank- k update.
  • Handle.Zherkx: performs a variation of the Hermitian rank- k update.
  • Handle.Zherkx64: performs a variation of the Hermitian rank- k update.
  • Handle.Zhpmv: performs the Hermitian packed matrix-vector multiplication.
  • Handle.Zhpmv64: performs the Hermitian packed matrix-vector multiplication.
  • Handle.Zhpr2: performs the packed Hermitian rank-2 update.
  • Handle.Zhpr264: performs the packed Hermitian rank-2 update.
  • Handle.Zhpr: performs the packed Hermitian rank-1 update.
  • Handle.Zhpr64: performs the packed Hermitian rank-1 update.
  • Handle.ZmatinvBatched: A and Ainv are arrays of pointers to matrices stored in column-major format with dimensions n*n and leading dimension lda and lda_inv respectively.
  • Handle.Zrot: applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):
  • Handle.Zrot64: applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):
  • Handle.Zrotg: constructs the Givens rotation matrix.
  • Handle.Zscal: scales the vector x by the scalar α and overwrites it with the result.
  • Handle.Zscal64: scales the vector x by the scalar α and overwrites it with the result.
  • Handle.Zswap: interchanges the elements of vector x and y.
  • Handle.Zswap64: interchanges the elements of vector x and y.
  • Handle.Zsymm: performs the symmetric matrix-matrix multiplication.
  • Handle.Zsymm64: performs the symmetric matrix-matrix multiplication.
  • Handle.Zsymv: performs the symmetric matrix-vector multiplication.
  • Handle.Zsymv64: performs the symmetric matrix-vector multiplication.
  • Handle.Zsyr2: performs the symmetric rank-2 update.
  • Handle.Zsyr264: performs the symmetric rank-2 update.
  • Handle.Zsyr2k: performs the symmetric rank- 2k update.
  • Handle.Zsyr2k64: performs the symmetric rank- 2k update.
  • Handle.Zsyr: performs the symmetric rank-1 update.
  • Handle.Zsyr64: performs the symmetric rank-1 update.
  • Handle.Zsyrk: performs the symmetric rank- k update.
  • Handle.Zsyrk64: performs the symmetric rank- k update.
  • Handle.Zsyrkx: performs a variation of the symmetric rank- k update.
  • Handle.Zsyrkx64: performs a variation of the symmetric rank- k update.
  • Handle.Ztbmv: performs the triangular banded matrix-vector multiplication.
  • Handle.Ztbmv64: performs the triangular banded matrix-vector multiplication.
  • Handle.Ztbsv: solves the triangular banded linear system with a single right-hand-side.
  • Handle.Ztbsv64: solves the triangular banded linear system with a single right-hand-side.
  • Handle.Ztpmv: performs the triangular packed matrix-vector multiplication.
  • Handle.Ztpmv64: performs the triangular packed matrix-vector multiplication.
  • Handle.Ztpsv: solves the packed triangular linear system with a single right-hand-side.
  • Handle.Ztpsv64: solves the packed triangular linear system with a single right-hand-side.
  • Handle.Ztpttr: performs the conversion from the triangular packed format to the triangular format.
  • Handle.Ztrmm: performs the triangular matrix-matrix multiplication.
  • Handle.Ztrmm64: performs the triangular matrix-matrix multiplication.
  • Handle.Ztrmv: performs the triangular matrix-vector multiplication.
  • Handle.Ztrmv64: performs the triangular matrix-vector multiplication.
  • Handle.ZtrsmBatched: solves an array of triangular linear systems with multiple right-hand-sides.
  • Handle.ZtrsmBatched64: solves an array of triangular linear systems with multiple right-hand-sides.
  • Handle.Ztrsm: solves the triangular linear system with multiple right-hand-sides.
  • Handle.Ztrsm64: solves the triangular linear system with multiple right-hand-sides.
  • Handle.Ztrsv: solves the triangular linear system with a single right-hand-side.
  • Handle.Ztrsv64: solves the triangular linear system with a single right-hand-side.
  • Handle.Ztrttp: performs the conversion from the triangular format to the triangular packed format.
Example

Example creates a cuBLAS handle and queries the library version. It returns early when the cuBLAS library is not available.

package main

import (
	"fmt"

	"github.com/tmc/lib/nvidia/cublas"
)

func main() {
	h, err := cublas.Create()
	if err != nil {
		fmt.Println("cuBLAS unavailable:", err)
		return
	}
	defer h.Close()

	major, err := cublas.GetProperty(cublas.MajorVersion)
	if err != nil {
		fmt.Println("property:", err)
		return
	}
	fmt.Println("cuBLAS major version:", major)
}

Index

Examples

Constants

View Source
const (
	// Version is CUBLAS_VERSION. This is the version of the headers the bindings were generated from, not of the library loaded at run time. [Handle.Version] reports that.
	Version = 131000
	// VerBuild is CUBLAS_VER_BUILD. This is the version of the headers the bindings were generated from, not of the library loaded at run time. [Handle.Version] reports that.
	VerBuild = 20
	// VerMajor is CUBLAS_VER_MAJOR. This is the version of the headers the bindings were generated from, not of the library loaded at run time. [Handle.Version] reports that.
	VerMajor = 13
	// VerMinor is CUBLAS_VER_MINOR. This is the version of the headers the bindings were generated from, not of the library loaded at run time. [Handle.Version] reports that.
	VerMinor = 10
	// VerPatch is CUBLAS_VER_PATCH. This is the version of the headers the bindings were generated from, not of the library loaded at run time. [Handle.Version] reports that.
	VerPatch = 0
)

Variables

This section is empty.

Functions

func Close

func Close() error

Close unloads the library and clears all bound function pointers.

The function pointers are package-level state, so Close must not be called concurrently with any other call into this package: doing so is a use-after-free. It is intended for test teardown, not for reclaiming a live library.

func GetLoggerCallback

func GetLoggerCallback(userCallback *LogCallback) error

GetLoggerCallback retrieves function pointer to previously installed custom user defined callback function via SetLoggerCallback or zero otherwise.

  • userCallback: Pointer to user defined callback function (see LogCallback)

Errors:

Wraps cublasGetLoggerCallback.

func GetMatrix

func GetMatrix(rows int32, cols int32, elemSize int32, a driver.DevicePtr, lda int32, b unsafe.Pointer, ldb int32) error

GetMatrix copies a tile of rows x cols elements from a matrix A in GPU memory space to a matrix B in host memory space.

It is assumed that each element requires storage of elemSize bytes and that both matrices are stored in column-major format, with the leading dimension of the source matrix A and destination matrix B given in lda and ldb, respectively. The leading dimension indicates the number of rows of the allocated matrix, even if only a submatrix of it is being used.

GetMatrix64 takes 64-bit sizes.

Errors:

  • ErrInvalidValue: The parameters rows or cols are negative, or elemSize, lda ldb are not positive.
  • ErrMappingError: There was an error accessing GPU memory

Wraps cublasGetMatrix.

func GetMatrix64

func GetMatrix64(rows int64, cols int64, elemSize int64, a driver.DevicePtr, lda int64, b unsafe.Pointer, ldb int64) error

GetMatrix64 copies a tile of rows x cols elements from a matrix A in GPU memory space to a matrix B in host memory space.

It is assumed that each element requires storage of elemSize bytes and that both matrices are stored in column-major format, with the leading dimension of the source matrix A and destination matrix B given in lda and ldb, respectively. The leading dimension indicates the number of rows of the allocated matrix, even if only a submatrix of it is being used.

It is GetMatrix with int64 sizes and strides.

Errors:

  • ErrInvalidValue: The parameters rows or cols are negative, or elemSize, lda ldb are not positive.
  • ErrMappingError: There was an error accessing GPU memory

Wraps cublasGetMatrix_64.

func GetMatrixAsync

func GetMatrixAsync(rows int32, cols int32, elemSize int32, a driver.DevicePtr, lda int32, b uintptr, ldb int32, stream driver.Stream) error

GetMatrixAsync has the same functionality as GetMatrix, with the exception that the data transfer is done asynchronously (with respect to the host) using the given CUDA™ stream parameter.

GetMatrixAsync64 takes 64-bit sizes.

Errors:

  • ErrInvalidValue: The parameters rows or cols are negative, or elemSize, lda ldb are not positive.
  • ErrMappingError: There was an error accessing GPU memory

b must remain valid, unmoved, and neither read nor modified until the stream work completes. The memory must be pinned (page-locked, or a Go value pinned with runtime.Pinner) and kept alive until the stream work completes. Do not pass stack memory.

Wraps cublasGetMatrixAsync.

func GetMatrixAsync64

func GetMatrixAsync64(rows int64, cols int64, elemSize int64, a driver.DevicePtr, lda int64, b uintptr, ldb int64, stream driver.Stream) error

GetMatrixAsync64 has the same functionality as GetMatrix, with the exception that the data transfer is done asynchronously (with respect to the host) using the given CUDA™ stream parameter.

It is GetMatrixAsync with int64 sizes and strides.

Errors:

  • ErrInvalidValue: The parameters rows or cols are negative, or elemSize, lda ldb are not positive.
  • ErrMappingError: There was an error accessing GPU memory

b must remain valid, unmoved, and neither read nor modified until the stream work completes. The memory must be pinned (page-locked, or a Go value pinned with runtime.Pinner) and kept alive until the stream work completes. Do not pass stack memory.

Wraps cublasGetMatrixAsync_64.

func GetProperty

func GetProperty(type_ LibraryPropertyType) (int32, error)

GetProperty returns the value of the requested property.

Refer to libraryPropertyType for supported types.

Errors:

  • ErrInvalidValue: Invalid type or value: If type has an invalid value, or if value is NULL

Wraps cublasGetProperty.

func GetVector

func GetVector(n int32, elemSize int32, x driver.DevicePtr, incx int32, y unsafe.Pointer, incy int32) error

GetVector copies n elements from a vector x in GPU memory space to a vector y in host memory space.

Elements in both vectors are assumed to have a size of elemSize bytes. The storage spacing between consecutive elements is given by incx for the source vector and incy for the destination vector y. Since column-major format for two-dimensional matrices is assumed, if a vector is part of a matrix, a vector increment equal to 1 accesses a (partial) column of that matrix. Similarly, using an increment equal to the leading dimension of the matrix results in accesses to a (partial) row of that matrix.

GetVector64 takes 64-bit sizes.

Errors:

Wraps cublasGetVector.

func GetVector64

func GetVector64(n int64, elemSize int64, x driver.DevicePtr, incx int64, y unsafe.Pointer, incy int64) error

GetVector64 copies n elements from a vector x in GPU memory space to a vector y in host memory space.

Elements in both vectors are assumed to have a size of elemSize bytes. The storage spacing between consecutive elements is given by incx for the source vector and incy for the destination vector y. Since column-major format for two-dimensional matrices is assumed, if a vector is part of a matrix, a vector increment equal to 1 accesses a (partial) column of that matrix. Similarly, using an increment equal to the leading dimension of the matrix results in accesses to a (partial) row of that matrix.

It is GetVector with int64 sizes and strides.

Errors:

Wraps cublasGetVector_64.

func GetVectorAsync

func GetVectorAsync(n int32, elemSize int32, devicePtr driver.DevicePtr, incx int32, hostPtr unsafe.Pointer, incy int32, stream driver.Stream) error

GetVectorAsync has the same functionality as GetVector, with the exception that the data transfer is done asynchronously (with respect to the host) using the given CUDA™ stream parameter.

GetVectorAsync64 takes 64-bit sizes.

Errors:

hostPtr must remain valid, unmoved, and neither read nor modified until the stream work completes. The memory must be pinned (page-locked, or a Go value pinned with runtime.Pinner) and kept alive until the stream work completes. Do not pass stack memory.

Wraps cublasGetVectorAsync.

func GetVectorAsync64

func GetVectorAsync64(n int64, elemSize int64, devicePtr driver.DevicePtr, incx int64, hostPtr unsafe.Pointer, incy int64, stream driver.Stream) error

GetVectorAsync64 has the same functionality as GetVector, with the exception that the data transfer is done asynchronously (with respect to the host) using the given CUDA™ stream parameter.

It is GetVectorAsync with int64 sizes and strides.

Errors:

hostPtr must remain valid, unmoved, and neither read nor modified until the stream work completes. The memory must be pinned (page-locked, or a Go value pinned with runtime.Pinner) and kept alive until the stream work completes. Do not pass stack memory.

Wraps cublasGetVectorAsync_64.

func Has

func Has(symbol string) bool

Has reports whether the named C symbol resolved in the loaded library, loading it first if necessary. It returns false if the library failed to load. Use it to gate on capabilities before calling into them.

func HasAsumEx

func HasAsumEx() bool

HasAsumEx reports whether cublasAsumEx resolved in the loaded library.

func HasAsumEx64

func HasAsumEx64() bool

HasAsumEx64 reports whether cublasAsumEx_64 resolved in the loaded library.

func HasAxpyEx

func HasAxpyEx() bool

HasAxpyEx reports whether cublasAxpyEx resolved in the loaded library.

func HasAxpyEx64

func HasAxpyEx64() bool

HasAxpyEx64 reports whether cublasAxpyEx_64 resolved in the loaded library.

func HasCaxpy

func HasCaxpy() bool

HasCaxpy reports whether cublasCaxpy_v2 resolved in the loaded library.

func HasCaxpy64

func HasCaxpy64() bool

HasCaxpy64 reports whether cublasCaxpy_v2_64 resolved in the loaded library.

func HasCcopy

func HasCcopy() bool

HasCcopy reports whether cublasCcopy_v2 resolved in the loaded library.

func HasCcopy64

func HasCcopy64() bool

HasCcopy64 reports whether cublasCcopy_v2_64 resolved in the loaded library.

func HasCdgmm

func HasCdgmm() bool

HasCdgmm reports whether cublasCdgmm resolved in the loaded library.

func HasCdgmm64

func HasCdgmm64() bool

HasCdgmm64 reports whether cublasCdgmm_64 resolved in the loaded library.

func HasCdotc

func HasCdotc() bool

HasCdotc reports whether cublasCdotc_v2 resolved in the loaded library.

func HasCdotc64

func HasCdotc64() bool

HasCdotc64 reports whether cublasCdotc_v2_64 resolved in the loaded library.

func HasCdotu

func HasCdotu() bool

HasCdotu reports whether cublasCdotu_v2 resolved in the loaded library.

func HasCdotu64

func HasCdotu64() bool

HasCdotu64 reports whether cublasCdotu_v2_64 resolved in the loaded library.

func HasCgbmv

func HasCgbmv() bool

HasCgbmv reports whether cublasCgbmv_v2 resolved in the loaded library.

func HasCgbmv64

func HasCgbmv64() bool

HasCgbmv64 reports whether cublasCgbmv_v2_64 resolved in the loaded library.

func HasCgeam

func HasCgeam() bool

HasCgeam reports whether cublasCgeam resolved in the loaded library.

func HasCgeam64

func HasCgeam64() bool

HasCgeam64 reports whether cublasCgeam_64 resolved in the loaded library.

func HasCgelsBatched

func HasCgelsBatched() bool

HasCgelsBatched reports whether cublasCgelsBatched resolved in the loaded library.

func HasCgemm

func HasCgemm() bool

HasCgemm reports whether cublasCgemm_v2 resolved in the loaded library.

func HasCgemm3m

func HasCgemm3m() bool

HasCgemm3m reports whether cublasCgemm3m resolved in the loaded library.

func HasCgemm3m64

func HasCgemm3m64() bool

HasCgemm3m64 reports whether cublasCgemm3m_64 resolved in the loaded library.

func HasCgemm3mBatched

func HasCgemm3mBatched() bool

HasCgemm3mBatched reports whether cublasCgemm3mBatched resolved in the loaded library.

func HasCgemm3mBatched64

func HasCgemm3mBatched64() bool

HasCgemm3mBatched64 reports whether cublasCgemm3mBatched_64 resolved in the loaded library.

func HasCgemm3mEx

func HasCgemm3mEx() bool

HasCgemm3mEx reports whether cublasCgemm3mEx resolved in the loaded library.

func HasCgemm3mEx64

func HasCgemm3mEx64() bool

HasCgemm3mEx64 reports whether cublasCgemm3mEx_64 resolved in the loaded library.

func HasCgemm3mStridedBatched

func HasCgemm3mStridedBatched() bool

HasCgemm3mStridedBatched reports whether cublasCgemm3mStridedBatched resolved in the loaded library.

func HasCgemm3mStridedBatched64

func HasCgemm3mStridedBatched64() bool

HasCgemm3mStridedBatched64 reports whether cublasCgemm3mStridedBatched_64 resolved in the loaded library.

func HasCgemm64

func HasCgemm64() bool

HasCgemm64 reports whether cublasCgemm_v2_64 resolved in the loaded library.

func HasCgemmBatched

func HasCgemmBatched() bool

HasCgemmBatched reports whether cublasCgemmBatched resolved in the loaded library.

func HasCgemmBatched64

func HasCgemmBatched64() bool

HasCgemmBatched64 reports whether cublasCgemmBatched_64 resolved in the loaded library.

func HasCgemmEx

func HasCgemmEx() bool

HasCgemmEx reports whether cublasCgemmEx resolved in the loaded library.

func HasCgemmEx64

func HasCgemmEx64() bool

HasCgemmEx64 reports whether cublasCgemmEx_64 resolved in the loaded library.

func HasCgemmStridedBatched

func HasCgemmStridedBatched() bool

HasCgemmStridedBatched reports whether cublasCgemmStridedBatched resolved in the loaded library.

func HasCgemmStridedBatched64

func HasCgemmStridedBatched64() bool

HasCgemmStridedBatched64 reports whether cublasCgemmStridedBatched_64 resolved in the loaded library.

func HasCgemv

func HasCgemv() bool

HasCgemv reports whether cublasCgemv_v2 resolved in the loaded library.

func HasCgemv64

func HasCgemv64() bool

HasCgemv64 reports whether cublasCgemv_v2_64 resolved in the loaded library.

func HasCgemvBatched

func HasCgemvBatched() bool

HasCgemvBatched reports whether cublasCgemvBatched resolved in the loaded library.

func HasCgemvBatched64

func HasCgemvBatched64() bool

HasCgemvBatched64 reports whether cublasCgemvBatched_64 resolved in the loaded library.

func HasCgemvStridedBatched

func HasCgemvStridedBatched() bool

HasCgemvStridedBatched reports whether cublasCgemvStridedBatched resolved in the loaded library.

func HasCgemvStridedBatched64

func HasCgemvStridedBatched64() bool

HasCgemvStridedBatched64 reports whether cublasCgemvStridedBatched_64 resolved in the loaded library.

func HasCgeqrfBatched

func HasCgeqrfBatched() bool

HasCgeqrfBatched reports whether cublasCgeqrfBatched resolved in the loaded library.

func HasCgerc

func HasCgerc() bool

HasCgerc reports whether cublasCgerc_v2 resolved in the loaded library.

func HasCgerc64

func HasCgerc64() bool

HasCgerc64 reports whether cublasCgerc_v2_64 resolved in the loaded library.

func HasCgeru

func HasCgeru() bool

HasCgeru reports whether cublasCgeru_v2 resolved in the loaded library.

func HasCgeru64

func HasCgeru64() bool

HasCgeru64 reports whether cublasCgeru_v2_64 resolved in the loaded library.

func HasCgetrfBatched

func HasCgetrfBatched() bool

HasCgetrfBatched reports whether cublasCgetrfBatched resolved in the loaded library.

func HasCgetriBatched

func HasCgetriBatched() bool

HasCgetriBatched reports whether cublasCgetriBatched resolved in the loaded library.

func HasCgetrsBatched

func HasCgetrsBatched() bool

HasCgetrsBatched reports whether cublasCgetrsBatched resolved in the loaded library.

func HasChbmv

func HasChbmv() bool

HasChbmv reports whether cublasChbmv_v2 resolved in the loaded library.

func HasChbmv64

func HasChbmv64() bool

HasChbmv64 reports whether cublasChbmv_v2_64 resolved in the loaded library.

func HasChemm

func HasChemm() bool

HasChemm reports whether cublasChemm_v2 resolved in the loaded library.

func HasChemm64

func HasChemm64() bool

HasChemm64 reports whether cublasChemm_v2_64 resolved in the loaded library.

func HasChemv

func HasChemv() bool

HasChemv reports whether cublasChemv_v2 resolved in the loaded library.

func HasChemv64

func HasChemv64() bool

HasChemv64 reports whether cublasChemv_v2_64 resolved in the loaded library.

func HasCher

func HasCher() bool

HasCher reports whether cublasCher_v2 resolved in the loaded library.

func HasCher2

func HasCher2() bool

HasCher2 reports whether cublasCher2_v2 resolved in the loaded library.

func HasCher2k

func HasCher2k() bool

HasCher2k reports whether cublasCher2k_v2 resolved in the loaded library.

func HasCher2k64

func HasCher2k64() bool

HasCher2k64 reports whether cublasCher2k_v2_64 resolved in the loaded library.

func HasCher64

func HasCher64() bool

HasCher64 reports whether cublasCher_v2_64 resolved in the loaded library.

func HasCher264

func HasCher264() bool

HasCher264 reports whether cublasCher2_v2_64 resolved in the loaded library.

func HasCherk

func HasCherk() bool

HasCherk reports whether cublasCherk_v2 resolved in the loaded library.

func HasCherk3mEx

func HasCherk3mEx() bool

HasCherk3mEx reports whether cublasCherk3mEx resolved in the loaded library.

func HasCherk3mEx64

func HasCherk3mEx64() bool

HasCherk3mEx64 reports whether cublasCherk3mEx_64 resolved in the loaded library.

func HasCherk64

func HasCherk64() bool

HasCherk64 reports whether cublasCherk_v2_64 resolved in the loaded library.

func HasCherkEx

func HasCherkEx() bool

HasCherkEx reports whether cublasCherkEx resolved in the loaded library.

func HasCherkEx64

func HasCherkEx64() bool

HasCherkEx64 reports whether cublasCherkEx_64 resolved in the loaded library.

func HasCherkx

func HasCherkx() bool

HasCherkx reports whether cublasCherkx resolved in the loaded library.

func HasCherkx64

func HasCherkx64() bool

HasCherkx64 reports whether cublasCherkx_64 resolved in the loaded library.

func HasChpmv

func HasChpmv() bool

HasChpmv reports whether cublasChpmv_v2 resolved in the loaded library.

func HasChpmv64

func HasChpmv64() bool

HasChpmv64 reports whether cublasChpmv_v2_64 resolved in the loaded library.

func HasChpr

func HasChpr() bool

HasChpr reports whether cublasChpr_v2 resolved in the loaded library.

func HasChpr2

func HasChpr2() bool

HasChpr2 reports whether cublasChpr2_v2 resolved in the loaded library.

func HasChpr64

func HasChpr64() bool

HasChpr64 reports whether cublasChpr_v2_64 resolved in the loaded library.

func HasChpr264

func HasChpr264() bool

HasChpr264 reports whether cublasChpr2_v2_64 resolved in the loaded library.

func HasCmatinvBatched

func HasCmatinvBatched() bool

HasCmatinvBatched reports whether cublasCmatinvBatched resolved in the loaded library.

func HasCopyEx

func HasCopyEx() bool

HasCopyEx reports whether cublasCopyEx resolved in the loaded library.

func HasCopyEx64

func HasCopyEx64() bool

HasCopyEx64 reports whether cublasCopyEx_64 resolved in the loaded library.

func HasCreate

func HasCreate() bool

HasCreate reports whether cublasCreate_v2 resolved in the loaded library.

func HasCrot

func HasCrot() bool

HasCrot reports whether cublasCrot_v2 resolved in the loaded library.

func HasCrot64

func HasCrot64() bool

HasCrot64 reports whether cublasCrot_v2_64 resolved in the loaded library.

func HasCrotg

func HasCrotg() bool

HasCrotg reports whether cublasCrotg_v2 resolved in the loaded library.

func HasCscal

func HasCscal() bool

HasCscal reports whether cublasCscal_v2 resolved in the loaded library.

func HasCscal64

func HasCscal64() bool

HasCscal64 reports whether cublasCscal_v2_64 resolved in the loaded library.

func HasCsrot

func HasCsrot() bool

HasCsrot reports whether cublasCsrot_v2 resolved in the loaded library.

func HasCsrot64

func HasCsrot64() bool

HasCsrot64 reports whether cublasCsrot_v2_64 resolved in the loaded library.

func HasCsscal

func HasCsscal() bool

HasCsscal reports whether cublasCsscal_v2 resolved in the loaded library.

func HasCsscal64

func HasCsscal64() bool

HasCsscal64 reports whether cublasCsscal_v2_64 resolved in the loaded library.

func HasCswap

func HasCswap() bool

HasCswap reports whether cublasCswap_v2 resolved in the loaded library.

func HasCswap64

func HasCswap64() bool

HasCswap64 reports whether cublasCswap_v2_64 resolved in the loaded library.

func HasCsymm

func HasCsymm() bool

HasCsymm reports whether cublasCsymm_v2 resolved in the loaded library.

func HasCsymm64

func HasCsymm64() bool

HasCsymm64 reports whether cublasCsymm_v2_64 resolved in the loaded library.

func HasCsymv

func HasCsymv() bool

HasCsymv reports whether cublasCsymv_v2 resolved in the loaded library.

func HasCsymv64

func HasCsymv64() bool

HasCsymv64 reports whether cublasCsymv_v2_64 resolved in the loaded library.

func HasCsyr

func HasCsyr() bool

HasCsyr reports whether cublasCsyr_v2 resolved in the loaded library.

func HasCsyr2

func HasCsyr2() bool

HasCsyr2 reports whether cublasCsyr2_v2 resolved in the loaded library.

func HasCsyr2k

func HasCsyr2k() bool

HasCsyr2k reports whether cublasCsyr2k_v2 resolved in the loaded library.

func HasCsyr2k64

func HasCsyr2k64() bool

HasCsyr2k64 reports whether cublasCsyr2k_v2_64 resolved in the loaded library.

func HasCsyr64

func HasCsyr64() bool

HasCsyr64 reports whether cublasCsyr_v2_64 resolved in the loaded library.

func HasCsyr264

func HasCsyr264() bool

HasCsyr264 reports whether cublasCsyr2_v2_64 resolved in the loaded library.

func HasCsyrk

func HasCsyrk() bool

HasCsyrk reports whether cublasCsyrk_v2 resolved in the loaded library.

func HasCsyrk3mEx

func HasCsyrk3mEx() bool

HasCsyrk3mEx reports whether cublasCsyrk3mEx resolved in the loaded library.

func HasCsyrk3mEx64

func HasCsyrk3mEx64() bool

HasCsyrk3mEx64 reports whether cublasCsyrk3mEx_64 resolved in the loaded library.

func HasCsyrk64

func HasCsyrk64() bool

HasCsyrk64 reports whether cublasCsyrk_v2_64 resolved in the loaded library.

func HasCsyrkEx

func HasCsyrkEx() bool

HasCsyrkEx reports whether cublasCsyrkEx resolved in the loaded library.

func HasCsyrkEx64

func HasCsyrkEx64() bool

HasCsyrkEx64 reports whether cublasCsyrkEx_64 resolved in the loaded library.

func HasCsyrkx

func HasCsyrkx() bool

HasCsyrkx reports whether cublasCsyrkx resolved in the loaded library.

func HasCsyrkx64

func HasCsyrkx64() bool

HasCsyrkx64 reports whether cublasCsyrkx_64 resolved in the loaded library.

func HasCtbmv

func HasCtbmv() bool

HasCtbmv reports whether cublasCtbmv_v2 resolved in the loaded library.

func HasCtbmv64

func HasCtbmv64() bool

HasCtbmv64 reports whether cublasCtbmv_v2_64 resolved in the loaded library.

func HasCtbsv

func HasCtbsv() bool

HasCtbsv reports whether cublasCtbsv_v2 resolved in the loaded library.

func HasCtbsv64

func HasCtbsv64() bool

HasCtbsv64 reports whether cublasCtbsv_v2_64 resolved in the loaded library.

func HasCtpmv

func HasCtpmv() bool

HasCtpmv reports whether cublasCtpmv_v2 resolved in the loaded library.

func HasCtpmv64

func HasCtpmv64() bool

HasCtpmv64 reports whether cublasCtpmv_v2_64 resolved in the loaded library.

func HasCtpsv

func HasCtpsv() bool

HasCtpsv reports whether cublasCtpsv_v2 resolved in the loaded library.

func HasCtpsv64

func HasCtpsv64() bool

HasCtpsv64 reports whether cublasCtpsv_v2_64 resolved in the loaded library.

func HasCtpttr

func HasCtpttr() bool

HasCtpttr reports whether cublasCtpttr resolved in the loaded library.

func HasCtrmm

func HasCtrmm() bool

HasCtrmm reports whether cublasCtrmm_v2 resolved in the loaded library.

func HasCtrmm64

func HasCtrmm64() bool

HasCtrmm64 reports whether cublasCtrmm_v2_64 resolved in the loaded library.

func HasCtrmv

func HasCtrmv() bool

HasCtrmv reports whether cublasCtrmv_v2 resolved in the loaded library.

func HasCtrmv64

func HasCtrmv64() bool

HasCtrmv64 reports whether cublasCtrmv_v2_64 resolved in the loaded library.

func HasCtrsm

func HasCtrsm() bool

HasCtrsm reports whether cublasCtrsm_v2 resolved in the loaded library.

func HasCtrsm64

func HasCtrsm64() bool

HasCtrsm64 reports whether cublasCtrsm_v2_64 resolved in the loaded library.

func HasCtrsmBatched

func HasCtrsmBatched() bool

HasCtrsmBatched reports whether cublasCtrsmBatched resolved in the loaded library.

func HasCtrsmBatched64

func HasCtrsmBatched64() bool

HasCtrsmBatched64 reports whether cublasCtrsmBatched_64 resolved in the loaded library.

func HasCtrsv

func HasCtrsv() bool

HasCtrsv reports whether cublasCtrsv_v2 resolved in the loaded library.

func HasCtrsv64

func HasCtrsv64() bool

HasCtrsv64 reports whether cublasCtrsv_v2_64 resolved in the loaded library.

func HasCtrttp

func HasCtrttp() bool

HasCtrttp reports whether cublasCtrttp resolved in the loaded library.

func HasDasum

func HasDasum() bool

HasDasum reports whether cublasDasum_v2 resolved in the loaded library.

func HasDasum64

func HasDasum64() bool

HasDasum64 reports whether cublasDasum_v2_64 resolved in the loaded library.

func HasDaxpy

func HasDaxpy() bool

HasDaxpy reports whether cublasDaxpy_v2 resolved in the loaded library.

func HasDaxpy64

func HasDaxpy64() bool

HasDaxpy64 reports whether cublasDaxpy_v2_64 resolved in the loaded library.

func HasDcopy

func HasDcopy() bool

HasDcopy reports whether cublasDcopy_v2 resolved in the loaded library.

func HasDcopy64

func HasDcopy64() bool

HasDcopy64 reports whether cublasDcopy_v2_64 resolved in the loaded library.

func HasDdgmm

func HasDdgmm() bool

HasDdgmm reports whether cublasDdgmm resolved in the loaded library.

func HasDdgmm64

func HasDdgmm64() bool

HasDdgmm64 reports whether cublasDdgmm_64 resolved in the loaded library.

func HasDdot

func HasDdot() bool

HasDdot reports whether cublasDdot_v2 resolved in the loaded library.

func HasDdot64

func HasDdot64() bool

HasDdot64 reports whether cublasDdot_v2_64 resolved in the loaded library.

func HasDestroy

func HasDestroy() bool

HasDestroy reports whether cublasDestroy_v2 resolved in the loaded library.

func HasDgbmv

func HasDgbmv() bool

HasDgbmv reports whether cublasDgbmv_v2 resolved in the loaded library.

func HasDgbmv64

func HasDgbmv64() bool

HasDgbmv64 reports whether cublasDgbmv_v2_64 resolved in the loaded library.

func HasDgeam

func HasDgeam() bool

HasDgeam reports whether cublasDgeam resolved in the loaded library.

func HasDgeam64

func HasDgeam64() bool

HasDgeam64 reports whether cublasDgeam_64 resolved in the loaded library.

func HasDgelsBatched

func HasDgelsBatched() bool

HasDgelsBatched reports whether cublasDgelsBatched resolved in the loaded library.

func HasDgemm

func HasDgemm() bool

HasDgemm reports whether cublasDgemm_v2 resolved in the loaded library.

func HasDgemm64

func HasDgemm64() bool

HasDgemm64 reports whether cublasDgemm_v2_64 resolved in the loaded library.

func HasDgemmBatched

func HasDgemmBatched() bool

HasDgemmBatched reports whether cublasDgemmBatched resolved in the loaded library.

func HasDgemmBatched64

func HasDgemmBatched64() bool

HasDgemmBatched64 reports whether cublasDgemmBatched_64 resolved in the loaded library.

func HasDgemmGroupedBatched

func HasDgemmGroupedBatched() bool

HasDgemmGroupedBatched reports whether cublasDgemmGroupedBatched resolved in the loaded library.

func HasDgemmGroupedBatched64

func HasDgemmGroupedBatched64() bool

HasDgemmGroupedBatched64 reports whether cublasDgemmGroupedBatched_64 resolved in the loaded library.

func HasDgemmStridedBatched

func HasDgemmStridedBatched() bool

HasDgemmStridedBatched reports whether cublasDgemmStridedBatched resolved in the loaded library.

func HasDgemmStridedBatched64

func HasDgemmStridedBatched64() bool

HasDgemmStridedBatched64 reports whether cublasDgemmStridedBatched_64 resolved in the loaded library.

func HasDgemv

func HasDgemv() bool

HasDgemv reports whether cublasDgemv_v2 resolved in the loaded library.

func HasDgemv64

func HasDgemv64() bool

HasDgemv64 reports whether cublasDgemv_v2_64 resolved in the loaded library.

func HasDgemvBatched

func HasDgemvBatched() bool

HasDgemvBatched reports whether cublasDgemvBatched resolved in the loaded library.

func HasDgemvBatched64

func HasDgemvBatched64() bool

HasDgemvBatched64 reports whether cublasDgemvBatched_64 resolved in the loaded library.

func HasDgemvStridedBatched

func HasDgemvStridedBatched() bool

HasDgemvStridedBatched reports whether cublasDgemvStridedBatched resolved in the loaded library.

func HasDgemvStridedBatched64

func HasDgemvStridedBatched64() bool

HasDgemvStridedBatched64 reports whether cublasDgemvStridedBatched_64 resolved in the loaded library.

func HasDgeqrfBatched

func HasDgeqrfBatched() bool

HasDgeqrfBatched reports whether cublasDgeqrfBatched resolved in the loaded library.

func HasDger

func HasDger() bool

HasDger reports whether cublasDger_v2 resolved in the loaded library.

func HasDger64

func HasDger64() bool

HasDger64 reports whether cublasDger_v2_64 resolved in the loaded library.

func HasDgetrfBatched

func HasDgetrfBatched() bool

HasDgetrfBatched reports whether cublasDgetrfBatched resolved in the loaded library.

func HasDgetriBatched

func HasDgetriBatched() bool

HasDgetriBatched reports whether cublasDgetriBatched resolved in the loaded library.

func HasDgetrsBatched

func HasDgetrsBatched() bool

HasDgetrsBatched reports whether cublasDgetrsBatched resolved in the loaded library.

func HasDmatinvBatched

func HasDmatinvBatched() bool

HasDmatinvBatched reports whether cublasDmatinvBatched resolved in the loaded library.

func HasDnrm2

func HasDnrm2() bool

HasDnrm2 reports whether cublasDnrm2_v2 resolved in the loaded library.

func HasDnrm264

func HasDnrm264() bool

HasDnrm264 reports whether cublasDnrm2_v2_64 resolved in the loaded library.

func HasDotEx

func HasDotEx() bool

HasDotEx reports whether cublasDotEx resolved in the loaded library.

func HasDotEx64

func HasDotEx64() bool

HasDotEx64 reports whether cublasDotEx_64 resolved in the loaded library.

func HasDotcEx

func HasDotcEx() bool

HasDotcEx reports whether cublasDotcEx resolved in the loaded library.

func HasDotcEx64

func HasDotcEx64() bool

HasDotcEx64 reports whether cublasDotcEx_64 resolved in the loaded library.

func HasDrot

func HasDrot() bool

HasDrot reports whether cublasDrot_v2 resolved in the loaded library.

func HasDrot64

func HasDrot64() bool

HasDrot64 reports whether cublasDrot_v2_64 resolved in the loaded library.

func HasDrotg

func HasDrotg() bool

HasDrotg reports whether cublasDrotg_v2 resolved in the loaded library.

func HasDrotm

func HasDrotm() bool

HasDrotm reports whether cublasDrotm_v2 resolved in the loaded library.

func HasDrotm64

func HasDrotm64() bool

HasDrotm64 reports whether cublasDrotm_v2_64 resolved in the loaded library.

func HasDrotmg

func HasDrotmg() bool

HasDrotmg reports whether cublasDrotmg_v2 resolved in the loaded library.

func HasDsbmv

func HasDsbmv() bool

HasDsbmv reports whether cublasDsbmv_v2 resolved in the loaded library.

func HasDsbmv64

func HasDsbmv64() bool

HasDsbmv64 reports whether cublasDsbmv_v2_64 resolved in the loaded library.

func HasDscal

func HasDscal() bool

HasDscal reports whether cublasDscal_v2 resolved in the loaded library.

func HasDscal64

func HasDscal64() bool

HasDscal64 reports whether cublasDscal_v2_64 resolved in the loaded library.

func HasDspmv

func HasDspmv() bool

HasDspmv reports whether cublasDspmv_v2 resolved in the loaded library.

func HasDspmv64

func HasDspmv64() bool

HasDspmv64 reports whether cublasDspmv_v2_64 resolved in the loaded library.

func HasDspr

func HasDspr() bool

HasDspr reports whether cublasDspr_v2 resolved in the loaded library.

func HasDspr2

func HasDspr2() bool

HasDspr2 reports whether cublasDspr2_v2 resolved in the loaded library.

func HasDspr64

func HasDspr64() bool

HasDspr64 reports whether cublasDspr_v2_64 resolved in the loaded library.

func HasDspr264

func HasDspr264() bool

HasDspr264 reports whether cublasDspr2_v2_64 resolved in the loaded library.

func HasDswap

func HasDswap() bool

HasDswap reports whether cublasDswap_v2 resolved in the loaded library.

func HasDswap64

func HasDswap64() bool

HasDswap64 reports whether cublasDswap_v2_64 resolved in the loaded library.

func HasDsymm

func HasDsymm() bool

HasDsymm reports whether cublasDsymm_v2 resolved in the loaded library.

func HasDsymm64

func HasDsymm64() bool

HasDsymm64 reports whether cublasDsymm_v2_64 resolved in the loaded library.

func HasDsymv

func HasDsymv() bool

HasDsymv reports whether cublasDsymv_v2 resolved in the loaded library.

func HasDsymv64

func HasDsymv64() bool

HasDsymv64 reports whether cublasDsymv_v2_64 resolved in the loaded library.

func HasDsyr

func HasDsyr() bool

HasDsyr reports whether cublasDsyr_v2 resolved in the loaded library.

func HasDsyr2

func HasDsyr2() bool

HasDsyr2 reports whether cublasDsyr2_v2 resolved in the loaded library.

func HasDsyr2k

func HasDsyr2k() bool

HasDsyr2k reports whether cublasDsyr2k_v2 resolved in the loaded library.

func HasDsyr2k64

func HasDsyr2k64() bool

HasDsyr2k64 reports whether cublasDsyr2k_v2_64 resolved in the loaded library.

func HasDsyr64

func HasDsyr64() bool

HasDsyr64 reports whether cublasDsyr_v2_64 resolved in the loaded library.

func HasDsyr264

func HasDsyr264() bool

HasDsyr264 reports whether cublasDsyr2_v2_64 resolved in the loaded library.

func HasDsyrk

func HasDsyrk() bool

HasDsyrk reports whether cublasDsyrk_v2 resolved in the loaded library.

func HasDsyrk64

func HasDsyrk64() bool

HasDsyrk64 reports whether cublasDsyrk_v2_64 resolved in the loaded library.

func HasDsyrkx

func HasDsyrkx() bool

HasDsyrkx reports whether cublasDsyrkx resolved in the loaded library.

func HasDsyrkx64

func HasDsyrkx64() bool

HasDsyrkx64 reports whether cublasDsyrkx_64 resolved in the loaded library.

func HasDtbmv

func HasDtbmv() bool

HasDtbmv reports whether cublasDtbmv_v2 resolved in the loaded library.

func HasDtbmv64

func HasDtbmv64() bool

HasDtbmv64 reports whether cublasDtbmv_v2_64 resolved in the loaded library.

func HasDtbsv

func HasDtbsv() bool

HasDtbsv reports whether cublasDtbsv_v2 resolved in the loaded library.

func HasDtbsv64

func HasDtbsv64() bool

HasDtbsv64 reports whether cublasDtbsv_v2_64 resolved in the loaded library.

func HasDtpmv

func HasDtpmv() bool

HasDtpmv reports whether cublasDtpmv_v2 resolved in the loaded library.

func HasDtpmv64

func HasDtpmv64() bool

HasDtpmv64 reports whether cublasDtpmv_v2_64 resolved in the loaded library.

func HasDtpsv

func HasDtpsv() bool

HasDtpsv reports whether cublasDtpsv_v2 resolved in the loaded library.

func HasDtpsv64

func HasDtpsv64() bool

HasDtpsv64 reports whether cublasDtpsv_v2_64 resolved in the loaded library.

func HasDtpttr

func HasDtpttr() bool

HasDtpttr reports whether cublasDtpttr resolved in the loaded library.

func HasDtrmm

func HasDtrmm() bool

HasDtrmm reports whether cublasDtrmm_v2 resolved in the loaded library.

func HasDtrmm64

func HasDtrmm64() bool

HasDtrmm64 reports whether cublasDtrmm_v2_64 resolved in the loaded library.

func HasDtrmv

func HasDtrmv() bool

HasDtrmv reports whether cublasDtrmv_v2 resolved in the loaded library.

func HasDtrmv64

func HasDtrmv64() bool

HasDtrmv64 reports whether cublasDtrmv_v2_64 resolved in the loaded library.

func HasDtrsm

func HasDtrsm() bool

HasDtrsm reports whether cublasDtrsm_v2 resolved in the loaded library.

func HasDtrsm64

func HasDtrsm64() bool

HasDtrsm64 reports whether cublasDtrsm_v2_64 resolved in the loaded library.

func HasDtrsmBatched

func HasDtrsmBatched() bool

HasDtrsmBatched reports whether cublasDtrsmBatched resolved in the loaded library.

func HasDtrsmBatched64

func HasDtrsmBatched64() bool

HasDtrsmBatched64 reports whether cublasDtrsmBatched_64 resolved in the loaded library.

func HasDtrsv

func HasDtrsv() bool

HasDtrsv reports whether cublasDtrsv_v2 resolved in the loaded library.

func HasDtrsv64

func HasDtrsv64() bool

HasDtrsv64 reports whether cublasDtrsv_v2_64 resolved in the loaded library.

func HasDtrttp

func HasDtrttp() bool

HasDtrttp reports whether cublasDtrttp resolved in the loaded library.

func HasDzasum

func HasDzasum() bool

HasDzasum reports whether cublasDzasum_v2 resolved in the loaded library.

func HasDzasum64

func HasDzasum64() bool

HasDzasum64 reports whether cublasDzasum_v2_64 resolved in the loaded library.

func HasDznrm2

func HasDznrm2() bool

HasDznrm2 reports whether cublasDznrm2_v2 resolved in the loaded library.

func HasDznrm264

func HasDznrm264() bool

HasDznrm264 reports whether cublasDznrm2_v2_64 resolved in the loaded library.

func HasGemmBatchedEx

func HasGemmBatchedEx() bool

HasGemmBatchedEx reports whether cublasGemmBatchedEx resolved in the loaded library.

func HasGemmBatchedEx64

func HasGemmBatchedEx64() bool

HasGemmBatchedEx64 reports whether cublasGemmBatchedEx_64 resolved in the loaded library.

func HasGemmEx

func HasGemmEx() bool

HasGemmEx reports whether cublasGemmEx resolved in the loaded library.

func HasGemmEx64

func HasGemmEx64() bool

HasGemmEx64 reports whether cublasGemmEx_64 resolved in the loaded library.

func HasGemmGroupedBatchedEx

func HasGemmGroupedBatchedEx() bool

HasGemmGroupedBatchedEx reports whether cublasGemmGroupedBatchedEx resolved in the loaded library.

func HasGemmGroupedBatchedEx64

func HasGemmGroupedBatchedEx64() bool

HasGemmGroupedBatchedEx64 reports whether cublasGemmGroupedBatchedEx_64 resolved in the loaded library.

func HasGemmStridedBatchedEx

func HasGemmStridedBatchedEx() bool

HasGemmStridedBatchedEx reports whether cublasGemmStridedBatchedEx resolved in the loaded library.

func HasGemmStridedBatchedEx64

func HasGemmStridedBatchedEx64() bool

HasGemmStridedBatchedEx64 reports whether cublasGemmStridedBatchedEx_64 resolved in the loaded library.

func HasGetAtomicsMode

func HasGetAtomicsMode() bool

HasGetAtomicsMode reports whether cublasGetAtomicsMode resolved in the loaded library.

func HasGetEmulationSpecialValuesSupport

func HasGetEmulationSpecialValuesSupport() bool

HasGetEmulationSpecialValuesSupport reports whether cublasGetEmulationSpecialValuesSupport resolved in the loaded library.

func HasGetEmulationStrategy

func HasGetEmulationStrategy() bool

HasGetEmulationStrategy reports whether cublasGetEmulationStrategy resolved in the loaded library.

func HasGetFixedPointEmulationMantissaBitCountPointer

func HasGetFixedPointEmulationMantissaBitCountPointer() bool

HasGetFixedPointEmulationMantissaBitCountPointer reports whether cublasGetFixedPointEmulationMantissaBitCountPointer resolved in the loaded library.

func HasGetFixedPointEmulationMantissaBitOffset

func HasGetFixedPointEmulationMantissaBitOffset() bool

HasGetFixedPointEmulationMantissaBitOffset reports whether cublasGetFixedPointEmulationMantissaBitOffset resolved in the loaded library.

func HasGetFixedPointEmulationMantissaControl

func HasGetFixedPointEmulationMantissaControl() bool

HasGetFixedPointEmulationMantissaControl reports whether cublasGetFixedPointEmulationMantissaControl resolved in the loaded library.

func HasGetFixedPointEmulationMaxMantissaBitCount

func HasGetFixedPointEmulationMaxMantissaBitCount() bool

HasGetFixedPointEmulationMaxMantissaBitCount reports whether cublasGetFixedPointEmulationMaxMantissaBitCount resolved in the loaded library.

func HasGetLoggerCallback

func HasGetLoggerCallback() bool

HasGetLoggerCallback reports whether cublasGetLoggerCallback resolved in the loaded library.

func HasGetMathMode

func HasGetMathMode() bool

HasGetMathMode reports whether cublasGetMathMode resolved in the loaded library.

func HasGetMatrix

func HasGetMatrix() bool

HasGetMatrix reports whether cublasGetMatrix resolved in the loaded library.

func HasGetMatrix64

func HasGetMatrix64() bool

HasGetMatrix64 reports whether cublasGetMatrix_64 resolved in the loaded library.

func HasGetMatrixAsync

func HasGetMatrixAsync() bool

HasGetMatrixAsync reports whether cublasGetMatrixAsync resolved in the loaded library.

func HasGetMatrixAsync64

func HasGetMatrixAsync64() bool

HasGetMatrixAsync64 reports whether cublasGetMatrixAsync_64 resolved in the loaded library.

func HasGetPointerMode

func HasGetPointerMode() bool

HasGetPointerMode reports whether cublasGetPointerMode_v2 resolved in the loaded library.

func HasGetProperty

func HasGetProperty() bool

HasGetProperty reports whether cublasGetProperty resolved in the loaded library.

func HasGetSmCountTarget

func HasGetSmCountTarget() bool

HasGetSmCountTarget reports whether cublasGetSmCountTarget resolved in the loaded library.

func HasGetStatusName

func HasGetStatusName() bool

HasGetStatusName reports whether cublasGetStatusName resolved in the loaded library.

func HasGetStatusString

func HasGetStatusString() bool

HasGetStatusString reports whether cublasGetStatusString resolved in the loaded library.

func HasGetStream

func HasGetStream() bool

HasGetStream reports whether cublasGetStream_v2 resolved in the loaded library.

func HasGetVector

func HasGetVector() bool

HasGetVector reports whether cublasGetVector resolved in the loaded library.

func HasGetVector64

func HasGetVector64() bool

HasGetVector64 reports whether cublasGetVector_64 resolved in the loaded library.

func HasGetVectorAsync

func HasGetVectorAsync() bool

HasGetVectorAsync reports whether cublasGetVectorAsync resolved in the loaded library.

func HasGetVectorAsync64

func HasGetVectorAsync64() bool

HasGetVectorAsync64 reports whether cublasGetVectorAsync_64 resolved in the loaded library.

func HasGetVersion

func HasGetVersion() bool

HasGetVersion reports whether cublasGetVersion_v2 resolved in the loaded library.

func HasHSHgemvBatched

func HasHSHgemvBatched() bool

HasHSHgemvBatched reports whether cublasHSHgemvBatched resolved in the loaded library.

func HasHSHgemvBatched64

func HasHSHgemvBatched64() bool

HasHSHgemvBatched64 reports whether cublasHSHgemvBatched_64 resolved in the loaded library.

func HasHSHgemvStridedBatched

func HasHSHgemvStridedBatched() bool

HasHSHgemvStridedBatched reports whether cublasHSHgemvStridedBatched resolved in the loaded library.

func HasHSHgemvStridedBatched64

func HasHSHgemvStridedBatched64() bool

HasHSHgemvStridedBatched64 reports whether cublasHSHgemvStridedBatched_64 resolved in the loaded library.

func HasHSSgemvBatched

func HasHSSgemvBatched() bool

HasHSSgemvBatched reports whether cublasHSSgemvBatched resolved in the loaded library.

func HasHSSgemvBatched64

func HasHSSgemvBatched64() bool

HasHSSgemvBatched64 reports whether cublasHSSgemvBatched_64 resolved in the loaded library.

func HasHSSgemvStridedBatched

func HasHSSgemvStridedBatched() bool

HasHSSgemvStridedBatched reports whether cublasHSSgemvStridedBatched resolved in the loaded library.

func HasHSSgemvStridedBatched64

func HasHSSgemvStridedBatched64() bool

HasHSSgemvStridedBatched64 reports whether cublasHSSgemvStridedBatched_64 resolved in the loaded library.

func HasHgemm

func HasHgemm() bool

HasHgemm reports whether cublasHgemm resolved in the loaded library.

func HasHgemm64

func HasHgemm64() bool

HasHgemm64 reports whether cublasHgemm_64 resolved in the loaded library.

func HasHgemmBatched

func HasHgemmBatched() bool

HasHgemmBatched reports whether cublasHgemmBatched resolved in the loaded library.

func HasHgemmBatched64

func HasHgemmBatched64() bool

HasHgemmBatched64 reports whether cublasHgemmBatched_64 resolved in the loaded library.

func HasHgemmStridedBatched

func HasHgemmStridedBatched() bool

HasHgemmStridedBatched reports whether cublasHgemmStridedBatched resolved in the loaded library.

func HasHgemmStridedBatched64

func HasHgemmStridedBatched64() bool

HasHgemmStridedBatched64 reports whether cublasHgemmStridedBatched_64 resolved in the loaded library.

func HasIamaxEx

func HasIamaxEx() bool

HasIamaxEx reports whether cublasIamaxEx resolved in the loaded library.

func HasIamaxEx64

func HasIamaxEx64() bool

HasIamaxEx64 reports whether cublasIamaxEx_64 resolved in the loaded library.

func HasIaminEx

func HasIaminEx() bool

HasIaminEx reports whether cublasIaminEx resolved in the loaded library.

func HasIaminEx64

func HasIaminEx64() bool

HasIaminEx64 reports whether cublasIaminEx_64 resolved in the loaded library.

func HasIcamax

func HasIcamax() bool

HasIcamax reports whether cublasIcamax_v2 resolved in the loaded library.

func HasIcamax64

func HasIcamax64() bool

HasIcamax64 reports whether cublasIcamax_v2_64 resolved in the loaded library.

func HasIcamin

func HasIcamin() bool

HasIcamin reports whether cublasIcamin_v2 resolved in the loaded library.

func HasIcamin64

func HasIcamin64() bool

HasIcamin64 reports whether cublasIcamin_v2_64 resolved in the loaded library.

func HasIdamax

func HasIdamax() bool

HasIdamax reports whether cublasIdamax_v2 resolved in the loaded library.

func HasIdamax64

func HasIdamax64() bool

HasIdamax64 reports whether cublasIdamax_v2_64 resolved in the loaded library.

func HasIdamin

func HasIdamin() bool

HasIdamin reports whether cublasIdamin_v2 resolved in the loaded library.

func HasIdamin64

func HasIdamin64() bool

HasIdamin64 reports whether cublasIdamin_v2_64 resolved in the loaded library.

func HasIsamax

func HasIsamax() bool

HasIsamax reports whether cublasIsamax_v2 resolved in the loaded library.

func HasIsamax64

func HasIsamax64() bool

HasIsamax64 reports whether cublasIsamax_v2_64 resolved in the loaded library.

func HasIsamin

func HasIsamin() bool

HasIsamin reports whether cublasIsamin_v2 resolved in the loaded library.

func HasIsamin64

func HasIsamin64() bool

HasIsamin64 reports whether cublasIsamin_v2_64 resolved in the loaded library.

func HasIzamax

func HasIzamax() bool

HasIzamax reports whether cublasIzamax_v2 resolved in the loaded library.

func HasIzamax64

func HasIzamax64() bool

HasIzamax64 reports whether cublasIzamax_v2_64 resolved in the loaded library.

func HasIzamin

func HasIzamin() bool

HasIzamin reports whether cublasIzamin_v2 resolved in the loaded library.

func HasIzamin64

func HasIzamin64() bool

HasIzamin64 reports whether cublasIzamin_v2_64 resolved in the loaded library.

func HasLoggerConfigure

func HasLoggerConfigure() bool

HasLoggerConfigure reports whether cublasLoggerConfigure resolved in the loaded library.

func HasNrm2Ex

func HasNrm2Ex() bool

HasNrm2Ex reports whether cublasNrm2Ex resolved in the loaded library.

func HasNrm2Ex64

func HasNrm2Ex64() bool

HasNrm2Ex64 reports whether cublasNrm2Ex_64 resolved in the loaded library.

func HasRotEx

func HasRotEx() bool

HasRotEx reports whether cublasRotEx resolved in the loaded library.

func HasRotEx64

func HasRotEx64() bool

HasRotEx64 reports whether cublasRotEx_64 resolved in the loaded library.

func HasRotgEx

func HasRotgEx() bool

HasRotgEx reports whether cublasRotgEx resolved in the loaded library.

func HasRotmEx

func HasRotmEx() bool

HasRotmEx reports whether cublasRotmEx resolved in the loaded library.

func HasRotmEx64

func HasRotmEx64() bool

HasRotmEx64 reports whether cublasRotmEx_64 resolved in the loaded library.

func HasRotmgEx

func HasRotmgEx() bool

HasRotmgEx reports whether cublasRotmgEx resolved in the loaded library.

func HasSasum

func HasSasum() bool

HasSasum reports whether cublasSasum_v2 resolved in the loaded library.

func HasSasum64

func HasSasum64() bool

HasSasum64 reports whether cublasSasum_v2_64 resolved in the loaded library.

func HasSaxpy

func HasSaxpy() bool

HasSaxpy reports whether cublasSaxpy_v2 resolved in the loaded library.

func HasSaxpy64

func HasSaxpy64() bool

HasSaxpy64 reports whether cublasSaxpy_v2_64 resolved in the loaded library.

func HasScalEx

func HasScalEx() bool

HasScalEx reports whether cublasScalEx resolved in the loaded library.

func HasScalEx64

func HasScalEx64() bool

HasScalEx64 reports whether cublasScalEx_64 resolved in the loaded library.

func HasScasum

func HasScasum() bool

HasScasum reports whether cublasScasum_v2 resolved in the loaded library.

func HasScasum64

func HasScasum64() bool

HasScasum64 reports whether cublasScasum_v2_64 resolved in the loaded library.

func HasScnrm2

func HasScnrm2() bool

HasScnrm2 reports whether cublasScnrm2_v2 resolved in the loaded library.

func HasScnrm264

func HasScnrm264() bool

HasScnrm264 reports whether cublasScnrm2_v2_64 resolved in the loaded library.

func HasScopy

func HasScopy() bool

HasScopy reports whether cublasScopy_v2 resolved in the loaded library.

func HasScopy64

func HasScopy64() bool

HasScopy64 reports whether cublasScopy_v2_64 resolved in the loaded library.

func HasSdgmm

func HasSdgmm() bool

HasSdgmm reports whether cublasSdgmm resolved in the loaded library.

func HasSdgmm64

func HasSdgmm64() bool

HasSdgmm64 reports whether cublasSdgmm_64 resolved in the loaded library.

func HasSdot

func HasSdot() bool

HasSdot reports whether cublasSdot_v2 resolved in the loaded library.

func HasSdot64

func HasSdot64() bool

HasSdot64 reports whether cublasSdot_v2_64 resolved in the loaded library.

func HasSetAtomicsMode

func HasSetAtomicsMode() bool

HasSetAtomicsMode reports whether cublasSetAtomicsMode resolved in the loaded library.

func HasSetEmulationSpecialValuesSupport

func HasSetEmulationSpecialValuesSupport() bool

HasSetEmulationSpecialValuesSupport reports whether cublasSetEmulationSpecialValuesSupport resolved in the loaded library.

func HasSetEmulationStrategy

func HasSetEmulationStrategy() bool

HasSetEmulationStrategy reports whether cublasSetEmulationStrategy resolved in the loaded library.

func HasSetFixedPointEmulationMantissaBitCountPointer

func HasSetFixedPointEmulationMantissaBitCountPointer() bool

HasSetFixedPointEmulationMantissaBitCountPointer reports whether cublasSetFixedPointEmulationMantissaBitCountPointer resolved in the loaded library.

func HasSetFixedPointEmulationMantissaBitOffset

func HasSetFixedPointEmulationMantissaBitOffset() bool

HasSetFixedPointEmulationMantissaBitOffset reports whether cublasSetFixedPointEmulationMantissaBitOffset resolved in the loaded library.

func HasSetFixedPointEmulationMantissaControl

func HasSetFixedPointEmulationMantissaControl() bool

HasSetFixedPointEmulationMantissaControl reports whether cublasSetFixedPointEmulationMantissaControl resolved in the loaded library.

func HasSetFixedPointEmulationMaxMantissaBitCount

func HasSetFixedPointEmulationMaxMantissaBitCount() bool

HasSetFixedPointEmulationMaxMantissaBitCount reports whether cublasSetFixedPointEmulationMaxMantissaBitCount resolved in the loaded library.

func HasSetLoggerCallback

func HasSetLoggerCallback() bool

HasSetLoggerCallback reports whether cublasSetLoggerCallback resolved in the loaded library.

func HasSetMathMode

func HasSetMathMode() bool

HasSetMathMode reports whether cublasSetMathMode resolved in the loaded library.

func HasSetMatrix

func HasSetMatrix() bool

HasSetMatrix reports whether cublasSetMatrix resolved in the loaded library.

func HasSetMatrix64

func HasSetMatrix64() bool

HasSetMatrix64 reports whether cublasSetMatrix_64 resolved in the loaded library.

func HasSetMatrixAsync

func HasSetMatrixAsync() bool

HasSetMatrixAsync reports whether cublasSetMatrixAsync resolved in the loaded library.

func HasSetMatrixAsync64

func HasSetMatrixAsync64() bool

HasSetMatrixAsync64 reports whether cublasSetMatrixAsync_64 resolved in the loaded library.

func HasSetPointerMode

func HasSetPointerMode() bool

HasSetPointerMode reports whether cublasSetPointerMode_v2 resolved in the loaded library.

func HasSetSmCountTarget

func HasSetSmCountTarget() bool

HasSetSmCountTarget reports whether cublasSetSmCountTarget resolved in the loaded library.

func HasSetStream

func HasSetStream() bool

HasSetStream reports whether cublasSetStream_v2 resolved in the loaded library.

func HasSetVector

func HasSetVector() bool

HasSetVector reports whether cublasSetVector resolved in the loaded library.

func HasSetVector64

func HasSetVector64() bool

HasSetVector64 reports whether cublasSetVector_64 resolved in the loaded library.

func HasSetVectorAsync

func HasSetVectorAsync() bool

HasSetVectorAsync reports whether cublasSetVectorAsync resolved in the loaded library.

func HasSetVectorAsync64

func HasSetVectorAsync64() bool

HasSetVectorAsync64 reports whether cublasSetVectorAsync_64 resolved in the loaded library.

func HasSetWorkspace

func HasSetWorkspace() bool

HasSetWorkspace reports whether cublasSetWorkspace_v2 resolved in the loaded library.

func HasSgbmv

func HasSgbmv() bool

HasSgbmv reports whether cublasSgbmv_v2 resolved in the loaded library.

func HasSgbmv64

func HasSgbmv64() bool

HasSgbmv64 reports whether cublasSgbmv_v2_64 resolved in the loaded library.

func HasSgeam

func HasSgeam() bool

HasSgeam reports whether cublasSgeam resolved in the loaded library.

func HasSgeam64

func HasSgeam64() bool

HasSgeam64 reports whether cublasSgeam_64 resolved in the loaded library.

func HasSgelsBatched

func HasSgelsBatched() bool

HasSgelsBatched reports whether cublasSgelsBatched resolved in the loaded library.

func HasSgemm

func HasSgemm() bool

HasSgemm reports whether cublasSgemm_v2 resolved in the loaded library.

func HasSgemm64

func HasSgemm64() bool

HasSgemm64 reports whether cublasSgemm_v2_64 resolved in the loaded library.

func HasSgemmBatched

func HasSgemmBatched() bool

HasSgemmBatched reports whether cublasSgemmBatched resolved in the loaded library.

func HasSgemmBatched64

func HasSgemmBatched64() bool

HasSgemmBatched64 reports whether cublasSgemmBatched_64 resolved in the loaded library.

func HasSgemmEx

func HasSgemmEx() bool

HasSgemmEx reports whether cublasSgemmEx resolved in the loaded library.

func HasSgemmEx64

func HasSgemmEx64() bool

HasSgemmEx64 reports whether cublasSgemmEx_64 resolved in the loaded library.

func HasSgemmGroupedBatched

func HasSgemmGroupedBatched() bool

HasSgemmGroupedBatched reports whether cublasSgemmGroupedBatched resolved in the loaded library.

func HasSgemmGroupedBatched64

func HasSgemmGroupedBatched64() bool

HasSgemmGroupedBatched64 reports whether cublasSgemmGroupedBatched_64 resolved in the loaded library.

func HasSgemmStridedBatched

func HasSgemmStridedBatched() bool

HasSgemmStridedBatched reports whether cublasSgemmStridedBatched resolved in the loaded library.

func HasSgemmStridedBatched64

func HasSgemmStridedBatched64() bool

HasSgemmStridedBatched64 reports whether cublasSgemmStridedBatched_64 resolved in the loaded library.

func HasSgemv

func HasSgemv() bool

HasSgemv reports whether cublasSgemv_v2 resolved in the loaded library.

func HasSgemv64

func HasSgemv64() bool

HasSgemv64 reports whether cublasSgemv_v2_64 resolved in the loaded library.

func HasSgemvBatched

func HasSgemvBatched() bool

HasSgemvBatched reports whether cublasSgemvBatched resolved in the loaded library.

func HasSgemvBatched64

func HasSgemvBatched64() bool

HasSgemvBatched64 reports whether cublasSgemvBatched_64 resolved in the loaded library.

func HasSgemvStridedBatched

func HasSgemvStridedBatched() bool

HasSgemvStridedBatched reports whether cublasSgemvStridedBatched resolved in the loaded library.

func HasSgemvStridedBatched64

func HasSgemvStridedBatched64() bool

HasSgemvStridedBatched64 reports whether cublasSgemvStridedBatched_64 resolved in the loaded library.

func HasSgeqrfBatched

func HasSgeqrfBatched() bool

HasSgeqrfBatched reports whether cublasSgeqrfBatched resolved in the loaded library.

func HasSger

func HasSger() bool

HasSger reports whether cublasSger_v2 resolved in the loaded library.

func HasSger64

func HasSger64() bool

HasSger64 reports whether cublasSger_v2_64 resolved in the loaded library.

func HasSgetrfBatched

func HasSgetrfBatched() bool

HasSgetrfBatched reports whether cublasSgetrfBatched resolved in the loaded library.

func HasSgetriBatched

func HasSgetriBatched() bool

HasSgetriBatched reports whether cublasSgetriBatched resolved in the loaded library.

func HasSgetrsBatched

func HasSgetrsBatched() bool

HasSgetrsBatched reports whether cublasSgetrsBatched resolved in the loaded library.

func HasSmatinvBatched

func HasSmatinvBatched() bool

HasSmatinvBatched reports whether cublasSmatinvBatched resolved in the loaded library.

func HasSnrm2

func HasSnrm2() bool

HasSnrm2 reports whether cublasSnrm2_v2 resolved in the loaded library.

func HasSnrm264

func HasSnrm264() bool

HasSnrm264 reports whether cublasSnrm2_v2_64 resolved in the loaded library.

func HasSrot

func HasSrot() bool

HasSrot reports whether cublasSrot_v2 resolved in the loaded library.

func HasSrot64

func HasSrot64() bool

HasSrot64 reports whether cublasSrot_v2_64 resolved in the loaded library.

func HasSrotg

func HasSrotg() bool

HasSrotg reports whether cublasSrotg_v2 resolved in the loaded library.

func HasSrotm

func HasSrotm() bool

HasSrotm reports whether cublasSrotm_v2 resolved in the loaded library.

func HasSrotm64

func HasSrotm64() bool

HasSrotm64 reports whether cublasSrotm_v2_64 resolved in the loaded library.

func HasSrotmg

func HasSrotmg() bool

HasSrotmg reports whether cublasSrotmg_v2 resolved in the loaded library.

func HasSsbmv

func HasSsbmv() bool

HasSsbmv reports whether cublasSsbmv_v2 resolved in the loaded library.

func HasSsbmv64

func HasSsbmv64() bool

HasSsbmv64 reports whether cublasSsbmv_v2_64 resolved in the loaded library.

func HasSscal

func HasSscal() bool

HasSscal reports whether cublasSscal_v2 resolved in the loaded library.

func HasSscal64

func HasSscal64() bool

HasSscal64 reports whether cublasSscal_v2_64 resolved in the loaded library.

func HasSspmv

func HasSspmv() bool

HasSspmv reports whether cublasSspmv_v2 resolved in the loaded library.

func HasSspmv64

func HasSspmv64() bool

HasSspmv64 reports whether cublasSspmv_v2_64 resolved in the loaded library.

func HasSspr

func HasSspr() bool

HasSspr reports whether cublasSspr_v2 resolved in the loaded library.

func HasSspr2

func HasSspr2() bool

HasSspr2 reports whether cublasSspr2_v2 resolved in the loaded library.

func HasSspr64

func HasSspr64() bool

HasSspr64 reports whether cublasSspr_v2_64 resolved in the loaded library.

func HasSspr264

func HasSspr264() bool

HasSspr264 reports whether cublasSspr2_v2_64 resolved in the loaded library.

func HasSswap

func HasSswap() bool

HasSswap reports whether cublasSswap_v2 resolved in the loaded library.

func HasSswap64

func HasSswap64() bool

HasSswap64 reports whether cublasSswap_v2_64 resolved in the loaded library.

func HasSsymm

func HasSsymm() bool

HasSsymm reports whether cublasSsymm_v2 resolved in the loaded library.

func HasSsymm64

func HasSsymm64() bool

HasSsymm64 reports whether cublasSsymm_v2_64 resolved in the loaded library.

func HasSsymv

func HasSsymv() bool

HasSsymv reports whether cublasSsymv_v2 resolved in the loaded library.

func HasSsymv64

func HasSsymv64() bool

HasSsymv64 reports whether cublasSsymv_v2_64 resolved in the loaded library.

func HasSsyr

func HasSsyr() bool

HasSsyr reports whether cublasSsyr_v2 resolved in the loaded library.

func HasSsyr2

func HasSsyr2() bool

HasSsyr2 reports whether cublasSsyr2_v2 resolved in the loaded library.

func HasSsyr2k

func HasSsyr2k() bool

HasSsyr2k reports whether cublasSsyr2k_v2 resolved in the loaded library.

func HasSsyr2k64

func HasSsyr2k64() bool

HasSsyr2k64 reports whether cublasSsyr2k_v2_64 resolved in the loaded library.

func HasSsyr64

func HasSsyr64() bool

HasSsyr64 reports whether cublasSsyr_v2_64 resolved in the loaded library.

func HasSsyr264

func HasSsyr264() bool

HasSsyr264 reports whether cublasSsyr2_v2_64 resolved in the loaded library.

func HasSsyrk

func HasSsyrk() bool

HasSsyrk reports whether cublasSsyrk_v2 resolved in the loaded library.

func HasSsyrk64

func HasSsyrk64() bool

HasSsyrk64 reports whether cublasSsyrk_v2_64 resolved in the loaded library.

func HasSsyrkx

func HasSsyrkx() bool

HasSsyrkx reports whether cublasSsyrkx resolved in the loaded library.

func HasSsyrkx64

func HasSsyrkx64() bool

HasSsyrkx64 reports whether cublasSsyrkx_64 resolved in the loaded library.

func HasStbmv

func HasStbmv() bool

HasStbmv reports whether cublasStbmv_v2 resolved in the loaded library.

func HasStbmv64

func HasStbmv64() bool

HasStbmv64 reports whether cublasStbmv_v2_64 resolved in the loaded library.

func HasStbsv

func HasStbsv() bool

HasStbsv reports whether cublasStbsv_v2 resolved in the loaded library.

func HasStbsv64

func HasStbsv64() bool

HasStbsv64 reports whether cublasStbsv_v2_64 resolved in the loaded library.

func HasStpmv

func HasStpmv() bool

HasStpmv reports whether cublasStpmv_v2 resolved in the loaded library.

func HasStpmv64

func HasStpmv64() bool

HasStpmv64 reports whether cublasStpmv_v2_64 resolved in the loaded library.

func HasStpsv

func HasStpsv() bool

HasStpsv reports whether cublasStpsv_v2 resolved in the loaded library.

func HasStpsv64

func HasStpsv64() bool

HasStpsv64 reports whether cublasStpsv_v2_64 resolved in the loaded library.

func HasStpttr

func HasStpttr() bool

HasStpttr reports whether cublasStpttr resolved in the loaded library.

func HasStrmm

func HasStrmm() bool

HasStrmm reports whether cublasStrmm_v2 resolved in the loaded library.

func HasStrmm64

func HasStrmm64() bool

HasStrmm64 reports whether cublasStrmm_v2_64 resolved in the loaded library.

func HasStrmv

func HasStrmv() bool

HasStrmv reports whether cublasStrmv_v2 resolved in the loaded library.

func HasStrmv64

func HasStrmv64() bool

HasStrmv64 reports whether cublasStrmv_v2_64 resolved in the loaded library.

func HasStrsm

func HasStrsm() bool

HasStrsm reports whether cublasStrsm_v2 resolved in the loaded library.

func HasStrsm64

func HasStrsm64() bool

HasStrsm64 reports whether cublasStrsm_v2_64 resolved in the loaded library.

func HasStrsmBatched

func HasStrsmBatched() bool

HasStrsmBatched reports whether cublasStrsmBatched resolved in the loaded library.

func HasStrsmBatched64

func HasStrsmBatched64() bool

HasStrsmBatched64 reports whether cublasStrsmBatched_64 resolved in the loaded library.

func HasStrsv

func HasStrsv() bool

HasStrsv reports whether cublasStrsv_v2 resolved in the loaded library.

func HasStrsv64

func HasStrsv64() bool

HasStrsv64 reports whether cublasStrsv_v2_64 resolved in the loaded library.

func HasStrttp

func HasStrttp() bool

HasStrttp reports whether cublasStrttp resolved in the loaded library.

func HasSwapEx

func HasSwapEx() bool

HasSwapEx reports whether cublasSwapEx resolved in the loaded library.

func HasSwapEx64

func HasSwapEx64() bool

HasSwapEx64 reports whether cublasSwapEx_64 resolved in the loaded library.

func HasTSSgemvBatched

func HasTSSgemvBatched() bool

HasTSSgemvBatched reports whether cublasTSSgemvBatched resolved in the loaded library.

func HasTSSgemvBatched64

func HasTSSgemvBatched64() bool

HasTSSgemvBatched64 reports whether cublasTSSgemvBatched_64 resolved in the loaded library.

func HasTSSgemvStridedBatched

func HasTSSgemvStridedBatched() bool

HasTSSgemvStridedBatched reports whether cublasTSSgemvStridedBatched resolved in the loaded library.

func HasTSSgemvStridedBatched64

func HasTSSgemvStridedBatched64() bool

HasTSSgemvStridedBatched64 reports whether cublasTSSgemvStridedBatched_64 resolved in the loaded library.

func HasTSTgemvBatched

func HasTSTgemvBatched() bool

HasTSTgemvBatched reports whether cublasTSTgemvBatched resolved in the loaded library.

func HasTSTgemvBatched64

func HasTSTgemvBatched64() bool

HasTSTgemvBatched64 reports whether cublasTSTgemvBatched_64 resolved in the loaded library.

func HasTSTgemvStridedBatched

func HasTSTgemvStridedBatched() bool

HasTSTgemvStridedBatched reports whether cublasTSTgemvStridedBatched resolved in the loaded library.

func HasTSTgemvStridedBatched64

func HasTSTgemvStridedBatched64() bool

HasTSTgemvStridedBatched64 reports whether cublasTSTgemvStridedBatched_64 resolved in the loaded library.

func HasUint8gemmBias

func HasUint8gemmBias() bool

HasUint8gemmBias reports whether cublasUint8gemmBias resolved in the loaded library.

func HasZaxpy

func HasZaxpy() bool

HasZaxpy reports whether cublasZaxpy_v2 resolved in the loaded library.

func HasZaxpy64

func HasZaxpy64() bool

HasZaxpy64 reports whether cublasZaxpy_v2_64 resolved in the loaded library.

func HasZcopy

func HasZcopy() bool

HasZcopy reports whether cublasZcopy_v2 resolved in the loaded library.

func HasZcopy64

func HasZcopy64() bool

HasZcopy64 reports whether cublasZcopy_v2_64 resolved in the loaded library.

func HasZdgmm

func HasZdgmm() bool

HasZdgmm reports whether cublasZdgmm resolved in the loaded library.

func HasZdgmm64

func HasZdgmm64() bool

HasZdgmm64 reports whether cublasZdgmm_64 resolved in the loaded library.

func HasZdotc

func HasZdotc() bool

HasZdotc reports whether cublasZdotc_v2 resolved in the loaded library.

func HasZdotc64

func HasZdotc64() bool

HasZdotc64 reports whether cublasZdotc_v2_64 resolved in the loaded library.

func HasZdotu

func HasZdotu() bool

HasZdotu reports whether cublasZdotu_v2 resolved in the loaded library.

func HasZdotu64

func HasZdotu64() bool

HasZdotu64 reports whether cublasZdotu_v2_64 resolved in the loaded library.

func HasZdrot

func HasZdrot() bool

HasZdrot reports whether cublasZdrot_v2 resolved in the loaded library.

func HasZdrot64

func HasZdrot64() bool

HasZdrot64 reports whether cublasZdrot_v2_64 resolved in the loaded library.

func HasZdscal

func HasZdscal() bool

HasZdscal reports whether cublasZdscal_v2 resolved in the loaded library.

func HasZdscal64

func HasZdscal64() bool

HasZdscal64 reports whether cublasZdscal_v2_64 resolved in the loaded library.

func HasZgbmv

func HasZgbmv() bool

HasZgbmv reports whether cublasZgbmv_v2 resolved in the loaded library.

func HasZgbmv64

func HasZgbmv64() bool

HasZgbmv64 reports whether cublasZgbmv_v2_64 resolved in the loaded library.

func HasZgeam

func HasZgeam() bool

HasZgeam reports whether cublasZgeam resolved in the loaded library.

func HasZgeam64

func HasZgeam64() bool

HasZgeam64 reports whether cublasZgeam_64 resolved in the loaded library.

func HasZgelsBatched

func HasZgelsBatched() bool

HasZgelsBatched reports whether cublasZgelsBatched resolved in the loaded library.

func HasZgemm

func HasZgemm() bool

HasZgemm reports whether cublasZgemm_v2 resolved in the loaded library.

func HasZgemm3m

func HasZgemm3m() bool

HasZgemm3m reports whether cublasZgemm3m resolved in the loaded library.

func HasZgemm3m64

func HasZgemm3m64() bool

HasZgemm3m64 reports whether cublasZgemm3m_64 resolved in the loaded library.

func HasZgemm64

func HasZgemm64() bool

HasZgemm64 reports whether cublasZgemm_v2_64 resolved in the loaded library.

func HasZgemmBatched

func HasZgemmBatched() bool

HasZgemmBatched reports whether cublasZgemmBatched resolved in the loaded library.

func HasZgemmBatched64

func HasZgemmBatched64() bool

HasZgemmBatched64 reports whether cublasZgemmBatched_64 resolved in the loaded library.

func HasZgemmStridedBatched

func HasZgemmStridedBatched() bool

HasZgemmStridedBatched reports whether cublasZgemmStridedBatched resolved in the loaded library.

func HasZgemmStridedBatched64

func HasZgemmStridedBatched64() bool

HasZgemmStridedBatched64 reports whether cublasZgemmStridedBatched_64 resolved in the loaded library.

func HasZgemv

func HasZgemv() bool

HasZgemv reports whether cublasZgemv_v2 resolved in the loaded library.

func HasZgemv64

func HasZgemv64() bool

HasZgemv64 reports whether cublasZgemv_v2_64 resolved in the loaded library.

func HasZgemvBatched

func HasZgemvBatched() bool

HasZgemvBatched reports whether cublasZgemvBatched resolved in the loaded library.

func HasZgemvBatched64

func HasZgemvBatched64() bool

HasZgemvBatched64 reports whether cublasZgemvBatched_64 resolved in the loaded library.

func HasZgemvStridedBatched

func HasZgemvStridedBatched() bool

HasZgemvStridedBatched reports whether cublasZgemvStridedBatched resolved in the loaded library.

func HasZgemvStridedBatched64

func HasZgemvStridedBatched64() bool

HasZgemvStridedBatched64 reports whether cublasZgemvStridedBatched_64 resolved in the loaded library.

func HasZgeqrfBatched

func HasZgeqrfBatched() bool

HasZgeqrfBatched reports whether cublasZgeqrfBatched resolved in the loaded library.

func HasZgerc

func HasZgerc() bool

HasZgerc reports whether cublasZgerc_v2 resolved in the loaded library.

func HasZgerc64

func HasZgerc64() bool

HasZgerc64 reports whether cublasZgerc_v2_64 resolved in the loaded library.

func HasZgeru

func HasZgeru() bool

HasZgeru reports whether cublasZgeru_v2 resolved in the loaded library.

func HasZgeru64

func HasZgeru64() bool

HasZgeru64 reports whether cublasZgeru_v2_64 resolved in the loaded library.

func HasZgetrfBatched

func HasZgetrfBatched() bool

HasZgetrfBatched reports whether cublasZgetrfBatched resolved in the loaded library.

func HasZgetriBatched

func HasZgetriBatched() bool

HasZgetriBatched reports whether cublasZgetriBatched resolved in the loaded library.

func HasZgetrsBatched

func HasZgetrsBatched() bool

HasZgetrsBatched reports whether cublasZgetrsBatched resolved in the loaded library.

func HasZhbmv

func HasZhbmv() bool

HasZhbmv reports whether cublasZhbmv_v2 resolved in the loaded library.

func HasZhbmv64

func HasZhbmv64() bool

HasZhbmv64 reports whether cublasZhbmv_v2_64 resolved in the loaded library.

func HasZhemm

func HasZhemm() bool

HasZhemm reports whether cublasZhemm_v2 resolved in the loaded library.

func HasZhemm64

func HasZhemm64() bool

HasZhemm64 reports whether cublasZhemm_v2_64 resolved in the loaded library.

func HasZhemv

func HasZhemv() bool

HasZhemv reports whether cublasZhemv_v2 resolved in the loaded library.

func HasZhemv64

func HasZhemv64() bool

HasZhemv64 reports whether cublasZhemv_v2_64 resolved in the loaded library.

func HasZher

func HasZher() bool

HasZher reports whether cublasZher_v2 resolved in the loaded library.

func HasZher2

func HasZher2() bool

HasZher2 reports whether cublasZher2_v2 resolved in the loaded library.

func HasZher2k

func HasZher2k() bool

HasZher2k reports whether cublasZher2k_v2 resolved in the loaded library.

func HasZher2k64

func HasZher2k64() bool

HasZher2k64 reports whether cublasZher2k_v2_64 resolved in the loaded library.

func HasZher64

func HasZher64() bool

HasZher64 reports whether cublasZher_v2_64 resolved in the loaded library.

func HasZher264

func HasZher264() bool

HasZher264 reports whether cublasZher2_v2_64 resolved in the loaded library.

func HasZherk

func HasZherk() bool

HasZherk reports whether cublasZherk_v2 resolved in the loaded library.

func HasZherk64

func HasZherk64() bool

HasZherk64 reports whether cublasZherk_v2_64 resolved in the loaded library.

func HasZherkx

func HasZherkx() bool

HasZherkx reports whether cublasZherkx resolved in the loaded library.

func HasZherkx64

func HasZherkx64() bool

HasZherkx64 reports whether cublasZherkx_64 resolved in the loaded library.

func HasZhpmv

func HasZhpmv() bool

HasZhpmv reports whether cublasZhpmv_v2 resolved in the loaded library.

func HasZhpmv64

func HasZhpmv64() bool

HasZhpmv64 reports whether cublasZhpmv_v2_64 resolved in the loaded library.

func HasZhpr

func HasZhpr() bool

HasZhpr reports whether cublasZhpr_v2 resolved in the loaded library.

func HasZhpr2

func HasZhpr2() bool

HasZhpr2 reports whether cublasZhpr2_v2 resolved in the loaded library.

func HasZhpr64

func HasZhpr64() bool

HasZhpr64 reports whether cublasZhpr_v2_64 resolved in the loaded library.

func HasZhpr264

func HasZhpr264() bool

HasZhpr264 reports whether cublasZhpr2_v2_64 resolved in the loaded library.

func HasZmatinvBatched

func HasZmatinvBatched() bool

HasZmatinvBatched reports whether cublasZmatinvBatched resolved in the loaded library.

func HasZrot

func HasZrot() bool

HasZrot reports whether cublasZrot_v2 resolved in the loaded library.

func HasZrot64

func HasZrot64() bool

HasZrot64 reports whether cublasZrot_v2_64 resolved in the loaded library.

func HasZrotg

func HasZrotg() bool

HasZrotg reports whether cublasZrotg_v2 resolved in the loaded library.

func HasZscal

func HasZscal() bool

HasZscal reports whether cublasZscal_v2 resolved in the loaded library.

func HasZscal64

func HasZscal64() bool

HasZscal64 reports whether cublasZscal_v2_64 resolved in the loaded library.

func HasZswap

func HasZswap() bool

HasZswap reports whether cublasZswap_v2 resolved in the loaded library.

func HasZswap64

func HasZswap64() bool

HasZswap64 reports whether cublasZswap_v2_64 resolved in the loaded library.

func HasZsymm

func HasZsymm() bool

HasZsymm reports whether cublasZsymm_v2 resolved in the loaded library.

func HasZsymm64

func HasZsymm64() bool

HasZsymm64 reports whether cublasZsymm_v2_64 resolved in the loaded library.

func HasZsymv

func HasZsymv() bool

HasZsymv reports whether cublasZsymv_v2 resolved in the loaded library.

func HasZsymv64

func HasZsymv64() bool

HasZsymv64 reports whether cublasZsymv_v2_64 resolved in the loaded library.

func HasZsyr

func HasZsyr() bool

HasZsyr reports whether cublasZsyr_v2 resolved in the loaded library.

func HasZsyr2

func HasZsyr2() bool

HasZsyr2 reports whether cublasZsyr2_v2 resolved in the loaded library.

func HasZsyr2k

func HasZsyr2k() bool

HasZsyr2k reports whether cublasZsyr2k_v2 resolved in the loaded library.

func HasZsyr2k64

func HasZsyr2k64() bool

HasZsyr2k64 reports whether cublasZsyr2k_v2_64 resolved in the loaded library.

func HasZsyr64

func HasZsyr64() bool

HasZsyr64 reports whether cublasZsyr_v2_64 resolved in the loaded library.

func HasZsyr264

func HasZsyr264() bool

HasZsyr264 reports whether cublasZsyr2_v2_64 resolved in the loaded library.

func HasZsyrk

func HasZsyrk() bool

HasZsyrk reports whether cublasZsyrk_v2 resolved in the loaded library.

func HasZsyrk64

func HasZsyrk64() bool

HasZsyrk64 reports whether cublasZsyrk_v2_64 resolved in the loaded library.

func HasZsyrkx

func HasZsyrkx() bool

HasZsyrkx reports whether cublasZsyrkx resolved in the loaded library.

func HasZsyrkx64

func HasZsyrkx64() bool

HasZsyrkx64 reports whether cublasZsyrkx_64 resolved in the loaded library.

func HasZtbmv

func HasZtbmv() bool

HasZtbmv reports whether cublasZtbmv_v2 resolved in the loaded library.

func HasZtbmv64

func HasZtbmv64() bool

HasZtbmv64 reports whether cublasZtbmv_v2_64 resolved in the loaded library.

func HasZtbsv

func HasZtbsv() bool

HasZtbsv reports whether cublasZtbsv_v2 resolved in the loaded library.

func HasZtbsv64

func HasZtbsv64() bool

HasZtbsv64 reports whether cublasZtbsv_v2_64 resolved in the loaded library.

func HasZtpmv

func HasZtpmv() bool

HasZtpmv reports whether cublasZtpmv_v2 resolved in the loaded library.

func HasZtpmv64

func HasZtpmv64() bool

HasZtpmv64 reports whether cublasZtpmv_v2_64 resolved in the loaded library.

func HasZtpsv

func HasZtpsv() bool

HasZtpsv reports whether cublasZtpsv_v2 resolved in the loaded library.

func HasZtpsv64

func HasZtpsv64() bool

HasZtpsv64 reports whether cublasZtpsv_v2_64 resolved in the loaded library.

func HasZtpttr

func HasZtpttr() bool

HasZtpttr reports whether cublasZtpttr resolved in the loaded library.

func HasZtrmm

func HasZtrmm() bool

HasZtrmm reports whether cublasZtrmm_v2 resolved in the loaded library.

func HasZtrmm64

func HasZtrmm64() bool

HasZtrmm64 reports whether cublasZtrmm_v2_64 resolved in the loaded library.

func HasZtrmv

func HasZtrmv() bool

HasZtrmv reports whether cublasZtrmv_v2 resolved in the loaded library.

func HasZtrmv64

func HasZtrmv64() bool

HasZtrmv64 reports whether cublasZtrmv_v2_64 resolved in the loaded library.

func HasZtrsm

func HasZtrsm() bool

HasZtrsm reports whether cublasZtrsm_v2 resolved in the loaded library.

func HasZtrsm64

func HasZtrsm64() bool

HasZtrsm64 reports whether cublasZtrsm_v2_64 resolved in the loaded library.

func HasZtrsmBatched

func HasZtrsmBatched() bool

HasZtrsmBatched reports whether cublasZtrsmBatched resolved in the loaded library.

func HasZtrsmBatched64

func HasZtrsmBatched64() bool

HasZtrsmBatched64 reports whether cublasZtrsmBatched_64 resolved in the loaded library.

func HasZtrsv

func HasZtrsv() bool

HasZtrsv reports whether cublasZtrsv_v2 resolved in the loaded library.

func HasZtrsv64

func HasZtrsv64() bool

HasZtrsv64 reports whether cublasZtrsv_v2_64 resolved in the loaded library.

func HasZtrttp

func HasZtrttp() bool

HasZtrttp reports whether cublasZtrttp resolved in the loaded library.

func Load

func Load(path string) error

Load opens the shared library from path, or from the default search list when path is empty, and binds all symbols. Callers that need to direct loading should call Load before any other function; otherwise the first call loads from the default search list.

Load is idempotent: calling it again with the same path, or with an empty path, returns nil. Calling it with a different path after a successful load returns *LibraryConflictError rather than replacing the library. After a failed load, Load retries.

func Loaded

func Loaded() bool

Loaded reports whether the library is currently loaded. It does not trigger a load.

func LoggerConfigure

func LoggerConfigure(logIsOn int32, logToStdOut int32, logToStdErr int32, logFileName string) error

LoggerConfigure configures logging during runtime.

Besides this type of configuration, it is possible to configure logging with special environment variables which will be checked by libcublas:

  • CUBLAS_LOGINFO_DBG - setting this environment variable to 1 means turning logging on (by default logging is off).
  • CUBLAS_LOGDEST_DBG - this environment variable encodes where to write the log to: stdout, stderr mean to write log messages to standard output or error streams, respectively. Other values are interpreted as file names.

Parameters:

  • logIsOn: Turn on/off logging completely. By default is off, but is turned on by calling SetLoggerCallback to user defined callback function
  • logToStdOut: Turn on/off logging to standard output I/O stream. By default is off
  • logToStdErr: Turn on/off logging to standard error I/O stream. By default is off
  • logFileName: Turn on/off logging to file in filesystem specified by it’s name. LoggerConfigure copies the content of logFileName. You should provide null pointer if you are not interested in this type of logging

Wraps cublasLoggerConfigure.

func Path

func Path() string

Path returns the path or name the loaded library was opened from, or the empty string if no library is loaded.

func SetLoggerCallback

func SetLoggerCallback(userCallback LogCallback) error

SetLoggerCallback installs a custom user defined callback function via cublas C public API.

  • userCallback: Pointer to user defined callback function (see LogCallback)

Wraps cublasSetLoggerCallback.

func SetMatrix

func SetMatrix(rows int32, cols int32, elemSize int32, a unsafe.Pointer, lda int32, b driver.DevicePtr, ldb int32) error

SetMatrix copies a tile of rows x cols elements from a matrix A in host memory space to a matrix B in GPU memory space.

It is assumed that each element requires storage of elemSize bytes and that both matrices are stored in column-major format, with the leading dimension of the source matrix A and destination matrix B given in lda and ldb, respectively. The leading dimension indicates the number of rows of the allocated matrix, even if only a submatrix of it is being used.

SetMatrix64 takes 64-bit sizes.

Errors:

  • ErrInvalidValue: The parameters rows or cols are negative, or elemSize, lda ldb are not positive.
  • ErrMappingError: There was an error accessing GPU memory

Wraps cublasSetMatrix.

func SetMatrix64

func SetMatrix64(rows int64, cols int64, elemSize int64, a unsafe.Pointer, lda int64, b driver.DevicePtr, ldb int64) error

SetMatrix64 copies a tile of rows x cols elements from a matrix A in host memory space to a matrix B in GPU memory space.

It is assumed that each element requires storage of elemSize bytes and that both matrices are stored in column-major format, with the leading dimension of the source matrix A and destination matrix B given in lda and ldb, respectively. The leading dimension indicates the number of rows of the allocated matrix, even if only a submatrix of it is being used.

It is SetMatrix with int64 sizes and strides.

Errors:

  • ErrInvalidValue: The parameters rows or cols are negative, or elemSize, lda ldb are not positive.
  • ErrMappingError: There was an error accessing GPU memory

Wraps cublasSetMatrix_64.

func SetMatrixAsync

func SetMatrixAsync(rows int32, cols int32, elemSize int32, a uintptr, lda int32, b driver.DevicePtr, ldb int32, stream driver.Stream) error

SetMatrixAsync has the same functionality as SetMatrix, with the exception that the data transfer is done asynchronously (with respect to the host) using the given CUDA™ stream parameter.

SetMatrixAsync64 takes 64-bit sizes.

Errors:

  • ErrInvalidValue: The parameters rows or cols are negative, or elemSize, lda ldb are not positive.
  • ErrMappingError: There was an error accessing GPU memory

a must remain valid, unmoved, and unmodified until the stream work completes. The memory must be pinned (page-locked, or a Go value pinned with runtime.Pinner) and kept alive until the stream work completes. Do not pass stack memory.

Wraps cublasSetMatrixAsync.

func SetMatrixAsync64

func SetMatrixAsync64(rows int64, cols int64, elemSize int64, a uintptr, lda int64, b driver.DevicePtr, ldb int64, stream driver.Stream) error

SetMatrixAsync64 has the same functionality as SetMatrix, with the exception that the data transfer is done asynchronously (with respect to the host) using the given CUDA™ stream parameter.

It is SetMatrixAsync with int64 sizes and strides.

Errors:

  • ErrInvalidValue: The parameters rows or cols are negative, or elemSize, lda ldb are not positive.
  • ErrMappingError: There was an error accessing GPU memory

a must remain valid, unmoved, and unmodified until the stream work completes. The memory must be pinned (page-locked, or a Go value pinned with runtime.Pinner) and kept alive until the stream work completes. Do not pass stack memory.

Wraps cublasSetMatrixAsync_64.

func SetVector

func SetVector(n int32, elemSize int32, x unsafe.Pointer, incx int32, devicePtr driver.DevicePtr, incy int32) error

SetVector copies n elements from a vector x in host memory space to a vector y in GPU memory space.

Elements in both vectors are assumed to have a size of elemSize bytes. The storage spacing between consecutive elements is given by incx for the source vector x and by incy for the destination vector y. Since column-major format for two-dimensional matrices is assumed, if a vector is part of a matrix, a vector increment equal to 1 accesses a (partial) column of that matrix. Similarly, using an increment equal to the leading dimension of the matrix results in accesses to a (partial) row of that matrix.

SetVector64 takes 64-bit sizes.

Errors:

Wraps cublasSetVector.

func SetVector64

func SetVector64(n int64, elemSize int64, x unsafe.Pointer, incx int64, devicePtr driver.DevicePtr, incy int64) error

SetVector64 copies n elements from a vector x in host memory space to a vector y in GPU memory space.

Elements in both vectors are assumed to have a size of elemSize bytes. The storage spacing between consecutive elements is given by incx for the source vector x and by incy for the destination vector y. Since column-major format for two-dimensional matrices is assumed, if a vector is part of a matrix, a vector increment equal to 1 accesses a (partial) column of that matrix. Similarly, using an increment equal to the leading dimension of the matrix results in accesses to a (partial) row of that matrix.

It is SetVector with int64 sizes and strides.

Errors:

Wraps cublasSetVector_64.

func SetVectorAsync

func SetVectorAsync(n int32, elemSize int32, hostPtr unsafe.Pointer, incx int32, devicePtr driver.DevicePtr, incy int32, stream driver.Stream) error

SetVectorAsync has the same functionality as SetVector, with the exception that the data transfer is done asynchronously (with respect to the host) using the given CUDA™ stream parameter.

SetVectorAsync64 takes 64-bit sizes.

Errors:

hostPtr must remain valid, unmoved, and unmodified until the stream work completes. The memory must be pinned (page-locked, or a Go value pinned with runtime.Pinner) and kept alive until the stream work completes. Do not pass stack memory.

Wraps cublasSetVectorAsync.

func SetVectorAsync64

func SetVectorAsync64(n int64, elemSize int64, hostPtr unsafe.Pointer, incx int64, devicePtr driver.DevicePtr, incy int64, stream driver.Stream) error

SetVectorAsync64 has the same functionality as SetVector, with the exception that the data transfer is done asynchronously (with respect to the host) using the given CUDA™ stream parameter.

It is SetVectorAsync with int64 sizes and strides.

Errors:

hostPtr must remain valid, unmoved, and unmodified until the stream work completes. The memory must be pinned (page-locked, or a Go value pinned with runtime.Pinner) and kept alive until the stream work completes. Do not pass stack memory.

Wraps cublasSetVectorAsync_64.

Types

type AtomicsMode

type AtomicsMode int32

AtomicsMode indicates whether cuBLAS routines which has an alternate implementation using atomics can be used.

The atomics mode can be set and queried using Handle.SetAtomicsMode and Handle.AtomicsMode and routines, respectively.

const (
	AtomicsNotAllowed AtomicsMode = 0
	AtomicsAllowed    AtomicsMode = 1
)

func (AtomicsMode) String

func (e AtomicsMode) String() string

String returns the constant name, or a numeric representation for unknown values.

type BFloat16

type BFloat16 uint16

BFloat16 represents a 16-bit brain floating-point value.

type BindFailure

type BindFailure struct {
	Symbol string
	Err    error
}

BindFailure names a symbol the loaded library exports but that could not be bound, and why.

func BindFailures

func BindFailures() []BindFailure

BindFailures returns the symbols the loaded library exports that could not be bound, sorted by symbol name, or nil if every exported symbol bound. Calling one of these reports *SymbolError with the same Err.

A load that reports no error can still leave symbols unbound: the library is fine and the signatures are not representable here. Call this after Load to find that out at once rather than one call site at a time. It does not trigger a load, and returns nil if none has happened.

type CallError

type CallError struct {
	Func   string // the C symbol called
	Result Result
}

CallError reports that a library call returned a failure result.

Unwrap returns Result, so errors.Is(err, c) reports whether the call returned the Result constant c, and errors.As(err, &r) with r of type Result recovers the code.

func (*CallError) Error

func (e *CallError) Error() string

Error reports the C symbol called and the result it returned.

func (*CallError) Unwrap

func (e *CallError) Unwrap() error

Unwrap returns the result the call reported.

type Complex64

type Complex64 struct {
	X float32
	Y float32
	// contains filtered or unexported fields
}

Complex64 represents a single-precision complex number.

type Complex128

type Complex128 struct {
	X float64
	Y float64
}

Complex128 represents a double-precision complex number.

type ComputeType

type ComputeType int32

ComputeType is used in Handle.GemmEx and cublasLtMatmul() (including all batched and strided batched variants) to choose compute precision modes as defined below. Note Setting the environment variable NVIDIA_TF32_OVERRIDE = 0 will override any defaults or programmatic configuration of NVIDIA libraries, and consequently, cuBLAS will not accelerate single-precision computations with TF32 tensor cores.

const (
	Compute16F                   ComputeType = 64 // half - default
	Compute16FPedantic           ComputeType = 65 // half - pedantic
	Compute32F                   ComputeType = 68 // float - default
	Compute32FPedantic           ComputeType = 69 // float - pedantic
	Compute32FFast16F            ComputeType = 74 // float - fast, allows down-converting inputs to half or TF32
	Compute32FFast16BF           ComputeType = 75 // float - fast, allows down-converting inputs to bfloat16 or TF32
	Compute32FFastTF32           ComputeType = 77 // float - fast, allows down-converting inputs to TF32
	Compute32FEmulated16bfx9     ComputeType = 78 // float - emulated, converts inputs into 3xBF16 values
	Compute64F                   ComputeType = 70 // double - default
	Compute64FPedantic           ComputeType = 71 // double - pedantic
	Compute64FEmulatedFixedpoint ComputeType = 79 // double - emulated, converts inputs into fixed-point
	Compute32I                   ComputeType = 72 // signed 32-bit int - default
	Compute32IPedantic           ComputeType = 73 // signed 32-bit int - pedantic
)

func (ComputeType) String

func (e ComputeType) String() string

String returns the constant name, or a numeric representation for unknown values.

type CudaEmulationMantissaControl

type CudaEmulationMantissaControl int32

CudaEmulationMantissaControl controls fixed-point emulation mantissa bits.

type CudaEmulationSpecialValuesSupport

type CudaEmulationSpecialValuesSupport int32

CudaEmulationSpecialValuesSupport controls emulation of special float values.

type DataType

type DataType int32

DataType represents a CUDA data type enumeration.

const (
	// 32-bit real float.
	R32F DataType = 0
	// 64-bit real double.
	R64F DataType = 1
	// 16-bit real half.
	R16F DataType = 2
	// 8-bit real signed int.
	R8I DataType = 3
	// 32-bit complex float pair.
	C32F DataType = 4
	// 64-bit complex double pair.
	C64F DataType = 5
	// 16-bit complex half pair.
	C16F DataType = 6
	// 8-bit complex signed int pair.
	C8I DataType = 7
	// 8-bit real unsigned int.
	R8U DataType = 8
	// 8-bit complex unsigned int pair.
	C8U DataType = 9
	// 32-bit real signed int.
	R32I DataType = 10
	// 32-bit complex signed int pair.
	C32I DataType = 11
	// 32-bit real unsigned int.
	R32U DataType = 12
	// 32-bit complex unsigned int pair.
	C32U DataType = 13
	// 16-bit real bfloat16.
	R16BF DataType = 14
	// 16-bit complex bfloat16 pair.
	C16BF DataType = 15
	// 4-bit real signed int.
	R4I DataType = 16
	// 4-bit complex signed int pair.
	C4I DataType = 17
	// 4-bit real unsigned int.
	R4U DataType = 18
	// 4-bit complex unsigned int pair.
	C4U DataType = 19
	// 16-bit real signed int.
	R16I DataType = 20
	// 16-bit complex signed int pair.
	C16I DataType = 21
	// 16-bit real unsigned int.
	R16U DataType = 22
	// 16-bit complex unsigned int pair.
	C16U DataType = 23
	// 64-bit real signed int.
	R64I DataType = 24
	// 64-bit complex signed int pair.
	C64I DataType = 25
	// 64-bit real unsigned int.
	R64U DataType = 26
	// 64-bit complex unsigned int pair.
	C64U DataType = 27
	// 8-bit real fp8 e4m3.
	R8F_E4M3 DataType = 28
	// 8-bit real fp8 e5m2.
	R8F_E5M2 DataType = 29
	// 8-bit real unsigned fp8 e8m0 (exponent-only).
	R8F_UE8M0 DataType = 30
	// 6-bit real fp6 e2m3.
	R6F_E2M3 DataType = 31
	// 6-bit real fp6 e3m2.
	R6F_E3M2 DataType = 32
	// 4-bit real fp4 e2m1.
	R4F_E2M1 DataType = 33
	// real as an unsigned nv_fp8_e4m3
	R8F_UE4M3 DataType = R8F_E4M3
	// real as an unsigned nv_fp8_ue5m3
	R8FUe5m3 DataType = 34
)

DataType constants.

type DiagType

type DiagType int32

DiagType indicates whether the main diagonal of the dense matrix is unity and consequently should not be touched or modified by the function. Its values correspond to Fortran characters ‘N’ or ‘n’ (non-unit) and ‘U’ or ‘u’ (unit) that are often used as parameters to legacy BLAS implementations.

const (
	DiagNonUnit DiagType = 0
	DiagUnit    DiagType = 1
)

func (DiagType) String

func (e DiagType) String() string

String returns the constant name, or a numeric representation for unknown values.

type EmulationStrategy

type EmulationStrategy int32

EmulationStrategy is used in Handle.SetEmulationStrategy to choose how to leverage floating point emulation algorithms. Note In general, the Handle.SetEmulationStrategy function takes precedence over the environment variable setting. However, setting the environment variable EmulationStrategy to performant or eager will override the default emulation strategy with the corresponding emulation strategy, even if the default strategy was set by the function call.

const (
	EmulationStrategyDefault    EmulationStrategy = 0
	EmulationStrategyPerformant EmulationStrategy = 1
	EmulationStrategyEager      EmulationStrategy = 2
)

func (EmulationStrategy) String

func (e EmulationStrategy) String() string

String returns the constant name, or a numeric representation for unknown values.

type FillMode

type FillMode int32

FillMode indicates which part (lower or upper) of the dense matrix was filled and consequently should be used by the function. Its values correspond to Fortran characters L or l (lower) and U or u (upper) that are often used as parameters to legacy BLAS implementations.

const (
	FillModeLower FillMode = 0
	FillModeUpper FillMode = 1
	FillModeFull  FillMode = 2
)

func (FillMode) String

func (e FillMode) String() string

String returns the constant name, or a numeric representation for unknown values.

type GemmAlgo

type GemmAlgo int32

GemmAlgo is an enumerant to specify the algorithm for matrix-matrix multiplication on GPU architectures up to sm_75. On sm_80 and newer GPU architectures, this enumerant has no effect. cuBLAS has the following algorithm options.

const (
	GemmDfalt           GemmAlgo = -1
	GemmDefault         GemmAlgo = -1
	GemmAlgo0           GemmAlgo = 0
	GemmAlgo1           GemmAlgo = 1
	GemmAlgo2           GemmAlgo = 2
	GemmAlgo3           GemmAlgo = 3
	GemmAlgo4           GemmAlgo = 4
	GemmAlgo5           GemmAlgo = 5
	GemmAlgo6           GemmAlgo = 6
	GemmAlgo7           GemmAlgo = 7
	GemmAlgo8           GemmAlgo = 8
	GemmAlgo9           GemmAlgo = 9
	GemmAlgo10          GemmAlgo = 10
	GemmAlgo11          GemmAlgo = 11
	GemmAlgo12          GemmAlgo = 12
	GemmAlgo13          GemmAlgo = 13
	GemmAlgo14          GemmAlgo = 14
	GemmAlgo15          GemmAlgo = 15
	GemmAlgo16          GemmAlgo = 16
	GemmAlgo17          GemmAlgo = 17
	GemmAlgo18          GemmAlgo = 18 // sliced 32x32
	GemmAlgo19          GemmAlgo = 19 // sliced 64x32
	GemmAlgo20          GemmAlgo = 20 // sliced 128x32
	GemmAlgo21          GemmAlgo = 21 // sliced 32x32 -splitK
	GemmAlgo22          GemmAlgo = 22 // sliced 64x32 -splitK
	GemmAlgo23          GemmAlgo = 23 // sliced 128x32 -splitK
	GemmDefaultTensorOp GemmAlgo = 99
	GemmDfaltTensorOp   GemmAlgo = 99
	GemmAlgo0TensorOp   GemmAlgo = 100
	GemmAlgo1TensorOp   GemmAlgo = 101
	GemmAlgo2TensorOp   GemmAlgo = 102
	GemmAlgo3TensorOp   GemmAlgo = 103
	GemmAlgo4TensorOp   GemmAlgo = 104
	GemmAlgo5TensorOp   GemmAlgo = 105
	GemmAlgo6TensorOp   GemmAlgo = 106
	GemmAlgo7TensorOp   GemmAlgo = 107
	GemmAlgo8TensorOp   GemmAlgo = 108
	GemmAlgo9TensorOp   GemmAlgo = 109
	GemmAlgo10TensorOp  GemmAlgo = 110
	GemmAlgo11TensorOp  GemmAlgo = 111
	GemmAlgo12TensorOp  GemmAlgo = 112
	GemmAlgo13TensorOp  GemmAlgo = 113
	GemmAlgo14TensorOp  GemmAlgo = 114
	GemmAlgo15TensorOp  GemmAlgo = 115
	GemmAutotune        GemmAlgo = 999 // benchmark available algorithms and choose optimal one, cached in handle
)

func (GemmAlgo) String

func (e GemmAlgo) String() string

String returns the constant name, or a numeric representation for unknown values.

type Half

type Half uint16

Half represents a 16-bit IEEE 754 half-precision float.

type Handle

type Handle uintptr

Handle is an opaque handle for cublasHandle_t.

func Create

func Create() (Handle, error)

Create initializes the cuBLAS library and creates a handle to an opaque structure holding the cuBLAS library context.

It allocates hardware resources on the host and device and must be called prior to making any other cuBLAS library calls. The cuBLAS library context is tied to the current CUDA device. To use the library on multiple devices, one cuBLAS handle needs to be created for each device. See also cuBLAS Context. For a given device, multiple cuBLAS handles with different configurations can be created. For multi-threaded applications that use the same device from different threads, the recommended programming model is to create one cuBLAS handle per thread and use that cuBLAS handle for the entire life of the thread. Because Create allocates some internal resources and the release of those resources by calling Handle.Close will implicitly call cudaDeviceSynchronize(), it is recommended to minimize the number of times these functions are called.

A nil error means the initialization succeeded.

Errors:

Wraps cublasCreate_v2.

func (Handle) AsumEx

func (h Handle) AsumEx(n int32, x driver.DevicePtr, xType DataType, incx int32, result unsafe.Pointer, resultType DataType, executiontype DataType) error

AsumEx wraps cublasAsumEx.

Handle.AsumEx64 takes 64-bit sizes.

The library writes result before the call returns or, under Handle.SetPointerMode with PointerModeDevice, to the device address d passed as unsafe.Pointer(uintptr(d)) by the time the stream work completes, so device memory must stay valid until then.

func (Handle) AsumEx64

func (h Handle) AsumEx64(n int64, x driver.DevicePtr, xType DataType, incx int64, result unsafe.Pointer, resultType DataType, executiontype DataType) error

AsumEx64 wraps cublasAsumEx_64.

It is Handle.AsumEx with int64 sizes and strides.

The library writes result before the call returns or, under Handle.SetPointerMode with PointerModeDevice, to the device address d passed as unsafe.Pointer(uintptr(d)) by the time the stream work completes, so device memory must stay valid until then.

func (Handle) AtomicsMode

func (h Handle) AtomicsMode() (AtomicsMode, error)

AtomicsMode queries the atomic mode of a specific cuBLAS context.

The default atomics mode of default initialized Handle object is AtomicsNotAllowed. Please see the section on the type for more details.

A nil error means the atomics mode was queried successfully.

Errors:

Wraps cublasGetAtomicsMode.

func (Handle) AxpyEx

func (h Handle) AxpyEx(n int32, alpha Scalar, alphaType DataType, x driver.DevicePtr, xType DataType, incx int32, y driver.DevicePtr, yType DataType, incy int32, executiontype DataType) error

AxpyEx is an API generalization of the routine cublasaxpy() where input data, output data and compute type can be specified independently.

This function multiplies the vector x by the scalar α and adds it to the vector y overwriting the latest vector with the result. Hence, the performed operation is y[j]=α×x[k]+y[j] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. The datatypes combinations currently supported for Handle.AxpyEx are listed in the following table:

alpha       x            y            execution
CUDA_R_32F  CUDA_R_16F   CUDA_R_16F   CUDA_R_32F
CUDA_R_32F  CUDA_R_16BF  CUDA_R_16BF  CUDA_R_32F
CUDA_R_32F  CUDA_R_32F   CUDA_R_32F   CUDA_R_32F
CUDA_R_64F  CUDA_R_64F   CUDA_R_64F   CUDA_R_64F
CUDA_C_32F  CUDA_C_32F   CUDA_C_32F   CUDA_C_32F
CUDA_C_64F  CUDA_C_64F   CUDA_C_64F   CUDA_C_64F

For references please refer to NETLIB documentation: saxpy(), daxpy(), caxpy(), zaxpy()

Handle.AxpyEx64 takes 64-bit sizes.

  • n: Number of elements in the vector x and y
  • alpha: Scalar used for multiplication. Its kind must match alphaType; a host Scalar of another kind is a *ScalarError. It holds a host value or, under Handle.SetPointerMode with PointerModeDevice, a device address made with DeviceScalar.
  • alphaType: Enumerant specifying the datatype of scalar alpha
  • x: < type > vector with n elements
  • xType: Enumerant specifying the datatype of vector x
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • yType: Enumerant specifying the datatype of vector y
  • incy: Stride between consecutive elements of y
  • executiontype: Enumerant specifying the datatype in which the computation is executed

Errors:

Wraps cublasAxpyEx.

func (Handle) AxpyEx64

func (h Handle) AxpyEx64(n int64, alpha Scalar, alphaType DataType, x driver.DevicePtr, xType DataType, incx int64, y driver.DevicePtr, yType DataType, incy int64, executiontype DataType) error

AxpyEx64 is an API generalization of the routine cublasaxpy() where input data, output data and compute type can be specified independently.

This function multiplies the vector x by the scalar α and adds it to the vector y overwriting the latest vector with the result. Hence, the performed operation is y[j]=α×x[k]+y[j] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. The datatypes combinations currently supported for Handle.AxpyEx are listed in the following table:

alpha       x            y            execution
CUDA_R_32F  CUDA_R_16F   CUDA_R_16F   CUDA_R_32F
CUDA_R_32F  CUDA_R_16BF  CUDA_R_16BF  CUDA_R_32F
CUDA_R_32F  CUDA_R_32F   CUDA_R_32F   CUDA_R_32F
CUDA_R_64F  CUDA_R_64F   CUDA_R_64F   CUDA_R_64F
CUDA_C_32F  CUDA_C_32F   CUDA_C_32F   CUDA_C_32F
CUDA_C_64F  CUDA_C_64F   CUDA_C_64F   CUDA_C_64F

For references please refer to NETLIB documentation: saxpy(), daxpy(), caxpy(), zaxpy()

It is Handle.AxpyEx with int64 sizes and strides.

  • n: Number of elements in the vector x and y
  • alpha: Scalar used for multiplication. Its kind must match alphaType; a host Scalar of another kind is a *ScalarError. It holds a host value or, under Handle.SetPointerMode with PointerModeDevice, a device address made with DeviceScalar.
  • alphaType: Enumerant specifying the datatype of scalar alpha
  • x: < type > vector with n elements
  • xType: Enumerant specifying the datatype of vector x
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • yType: Enumerant specifying the datatype of vector y
  • incy: Stride between consecutive elements of y
  • executiontype: Enumerant specifying the datatype in which the computation is executed

Errors:

Wraps cublasAxpyEx_64.

func (Handle) Caxpy

func (h Handle) Caxpy(n int32, alpha *Complex64, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32) error

Caxpy multiplies the vector x by the scalar α and adds it to the vector y overwriting the latest vector with the result.

Hence, the performed operation is y[j]=α×x[k]+y[j] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: saxpy(), daxpy(), caxpy(), zaxpy()

Handle.Caxpy64 takes 64-bit sizes.

  • n: Number of elements in the vector x and y
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasCaxpy_v2.

func (Handle) Caxpy64

func (h Handle) Caxpy64(n int64, alpha *Complex64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64) error

Caxpy64 multiplies the vector x by the scalar α and adds it to the vector y overwriting the latest vector with the result.

Hence, the performed operation is y[j]=α×x[k]+y[j] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: saxpy(), daxpy(), caxpy(), zaxpy()

It is Handle.Caxpy with int64 sizes and strides.

  • n: Number of elements in the vector x and y
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasCaxpy_v2_64.

func (Handle) Ccopy

func (h Handle) Ccopy(n int32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32) error

Ccopy copies the vector x into the vector y.

Hence, the performed operation is y[j]=x[k] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: scopy(), dcopy(), ccopy(), zcopy()

Handle.Ccopy64 takes 64-bit sizes.

  • n: Number of elements in the vector x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasCcopy_v2.

func (Handle) Ccopy64

func (h Handle) Ccopy64(n int64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64) error

Ccopy64 copies the vector x into the vector y.

Hence, the performed operation is y[j]=x[k] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: scopy(), dcopy(), ccopy(), zcopy()

It is Handle.Ccopy with int64 sizes and strides.

  • n: Number of elements in the vector x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasCcopy_v2_64.

func (Handle) Cdgmm

func (h Handle) Cdgmm(mode SideMode, m int32, n int32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32, c driver.DevicePtr, ldc int32) error

Cdgmm performs the matrix-matrix multiplication.

C={A×diag(X)if mode == CUBLAS_SIDE_RIGHTdiag(X)×Aif mode == SideLeft where A and C are matrices stored in column-major format with dimensions m×n . X is a vector of size n if mode == SideRight and of size m if mode == SideLeft. X is gathered from one-dimensional array x with stride incx. The absolute value of incx is the stride and the sign of incx is direction of the stride. If incx is positive, then we forward x from the first element. Otherwise, we backward x from the last element. The formula of X is X[j]={x[j×incx]if incx≥0x[(χ−1)×|incx|−j×|incx|]if incx<0 where χ=m if mode == SideLeft and χ=n if mode == SideRight. Example 1: if the user wants to perform diag(diag(B))×A , then incx=ldb+1 where ldb is leading dimension of matrix B, either row-major or column-major. Example 2: if the user wants to perform α×A , then there are two choices, either cublasgeam() with *beta == 0 and transa == OpN or cublasdgmm() with incx == 0 and x[0] == alpha. The operation is out-of-place. The in-place only works if lda == ldc.

Handle.Cdgmm64 takes 64-bit sizes.

  • mode: Left multiply if mode == SideLeft or right multiply if mode == SideRight
  • m: Number of rows of matrix A and C
  • n: Number of columns of matrix A and C
  • a: < type > array of dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • x: One-dimensional < type > array of size abs(incx) x m if mode == SideLeft and abs(incx) x n if mode == SideRight
  • incx: Stride of one-dimensional array x
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

Wraps cublasCdgmm.

func (Handle) Cdgmm64

func (h Handle) Cdgmm64(mode SideMode, m int64, n int64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64, c driver.DevicePtr, ldc int64) error

Cdgmm64 performs the matrix-matrix multiplication.

C={A×diag(X)if mode == CUBLAS_SIDE_RIGHTdiag(X)×Aif mode == SideLeft where A and C are matrices stored in column-major format with dimensions m×n . X is a vector of size n if mode == SideRight and of size m if mode == SideLeft. X is gathered from one-dimensional array x with stride incx. The absolute value of incx is the stride and the sign of incx is direction of the stride. If incx is positive, then we forward x from the first element. Otherwise, we backward x from the last element. The formula of X is X[j]={x[j×incx]if incx≥0x[(χ−1)×|incx|−j×|incx|]if incx<0 where χ=m if mode == SideLeft and χ=n if mode == SideRight. Example 1: if the user wants to perform diag(diag(B))×A , then incx=ldb+1 where ldb is leading dimension of matrix B, either row-major or column-major. Example 2: if the user wants to perform α×A , then there are two choices, either cublasgeam() with *beta == 0 and transa == OpN or cublasdgmm() with incx == 0 and x[0] == alpha. The operation is out-of-place. The in-place only works if lda == ldc.

It is Handle.Cdgmm with int64 sizes and strides.

  • mode: Left multiply if mode == SideLeft or right multiply if mode == SideRight
  • m: Number of rows of matrix A and C
  • n: Number of columns of matrix A and C
  • a: < type > array of dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • x: One-dimensional < type > array of size abs(incx) x m if mode == SideLeft and abs(incx) x n if mode == SideRight
  • incx: Stride of one-dimensional array x
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

Wraps cublasCdgmm_64.

func (Handle) Cdotc

func (h Handle) Cdotc(n int32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32) (Complex64, error)

Cdotc computes the dot product of vectors x and y.

Hence, the result is ∑_(i=1)^(n)(x[k]×y[j]) where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that in the first equation the conjugate of the element of vector x should be used if the function name ends in character ‘c’ and that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sdot(), ddot(), cdotu(), cdotc(), zdotu(), zdotc()

Handle.Cdotc64 takes 64-bit sizes.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • result: The resulting dot product, which is set to 0 if n <= 0

Errors:

Wraps cublasCdotc_v2.

func (Handle) Cdotc64

func (h Handle) Cdotc64(n int64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64) (Complex64, error)

Cdotc64 computes the dot product of vectors x and y.

Hence, the result is ∑_(i=1)^(n)(x[k]×y[j]) where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that in the first equation the conjugate of the element of vector x should be used if the function name ends in character ‘c’ and that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sdot(), ddot(), cdotu(), cdotc(), zdotu(), zdotc()

It is Handle.Cdotc with int64 sizes and strides.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • result: The resulting dot product, which is set to 0 if n <= 0

Errors:

Wraps cublasCdotc_v2_64.

func (Handle) Cdotu

func (h Handle) Cdotu(n int32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32) (Complex64, error)

Cdotu computes the dot product of vectors x and y.

Hence, the result is ∑_(i=1)^(n)(x[k]×y[j]) where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that in the first equation the conjugate of the element of vector x should be used if the function name ends in character ‘c’ and that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sdot(), ddot(), cdotu(), cdotc(), zdotu(), zdotc()

Handle.Cdotu64 takes 64-bit sizes.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • result: The resulting dot product, which is set to 0 if n <= 0

Errors:

Wraps cublasCdotu_v2.

func (Handle) Cdotu64

func (h Handle) Cdotu64(n int64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64) (Complex64, error)

Cdotu64 computes the dot product of vectors x and y.

Hence, the result is ∑_(i=1)^(n)(x[k]×y[j]) where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that in the first equation the conjugate of the element of vector x should be used if the function name ends in character ‘c’ and that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sdot(), ddot(), cdotu(), cdotc(), zdotu(), zdotc()

It is Handle.Cdotu with int64 sizes and strides.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • result: The resulting dot product, which is set to 0 if n <= 0

Errors:

Wraps cublasCdotu_v2_64.

func (Handle) Cgbmv

func (h Handle) Cgbmv(trans Operation, m int32, n int32, kl int32, ku int32, alpha *Complex64, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32, beta *Complex64, y driver.DevicePtr, incy int32) error

Cgbmv performs the banded matrix-vector multiplication.

y=α op(A)x+βy, where A is a banded matrix with kl subdiagonals and ku superdiagonals, x and y are vectors, and α and β are scalars. Also, for matrix A op(A)={A if trans == CUBLAS_OP_NAᵀ if trans == CUBLAS_OP_TAᴴ if trans == OpC The banded matrix A is stored column by column, with the main diagonal stored in row ku+1 (starting in first position), the first superdiagonal stored in row ku (starting in second position), the first subdiagonal stored in row ku+2 (starting in first position), etc. So that in general, the element A(i,j) is stored in the memory location A(ku+1+i-j,j) for j=1,…,n and i∈[max(1,j−ku),min(m,j+kl)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left ku×ku and bottom right kl×kl triangles) are not referenced. For references please refer to NETLIB documentation: sgbmv(), dgbmv(), cgbmv(), zgbmv()

Handle.Cgbmv64 takes 64-bit sizes.

  • trans: Operation op( A) that is non- or (conj.) transpose
  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • kl: Number of subdiagonals of matrix A
  • ku: Number of superdiagonals of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= kl + ku + 1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements if trans == OpN and m elements otherwise
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with m elements if trans == OpN and n elements otherwise
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasCgbmv_v2.

func (Handle) Cgbmv64

func (h Handle) Cgbmv64(trans Operation, m int64, n int64, kl int64, ku int64, alpha *Complex64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64, beta *Complex64, y driver.DevicePtr, incy int64) error

Cgbmv64 performs the banded matrix-vector multiplication.

y=α op(A)x+βy, where A is a banded matrix with kl subdiagonals and ku superdiagonals, x and y are vectors, and α and β are scalars. Also, for matrix A op(A)={A if trans == CUBLAS_OP_NAᵀ if trans == CUBLAS_OP_TAᴴ if trans == OpC The banded matrix A is stored column by column, with the main diagonal stored in row ku+1 (starting in first position), the first superdiagonal stored in row ku (starting in second position), the first subdiagonal stored in row ku+2 (starting in first position), etc. So that in general, the element A(i,j) is stored in the memory location A(ku+1+i-j,j) for j=1,…,n and i∈[max(1,j−ku),min(m,j+kl)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left ku×ku and bottom right kl×kl triangles) are not referenced. For references please refer to NETLIB documentation: sgbmv(), dgbmv(), cgbmv(), zgbmv()

It is Handle.Cgbmv with int64 sizes and strides.

  • trans: Operation op( A) that is non- or (conj.) transpose
  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • kl: Number of subdiagonals of matrix A
  • ku: Number of superdiagonals of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= kl + ku + 1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements if trans == OpN and m elements otherwise
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with m elements if trans == OpN and n elements otherwise
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasCgbmv_v2_64.

func (Handle) Cgeam

func (h Handle) Cgeam(transa Operation, transb Operation, m int32, n int32, alpha *Complex64, a driver.DevicePtr, lda int32, beta *Complex64, b driver.DevicePtr, ldb int32, c driver.DevicePtr, ldc int32) error

Cgeam performs the matrix-matrix addition/transposition.

C=αop(A)+βop(B), where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×n , op(B)m×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . The operation is out-of-place if C does not overlap A or B. The in-place mode supports the following two operations, C=α*C+βop(B) C=αop(A)+β*C For in-place mode, if C == A, ldc == lda and transa == OpN. If C === B, ldc == ldb and transb == OpN. If the user does not meet above requirements, ErrInvalidValue is returned. The operation includes the following special cases: the user can reset matrix C to zero by setting *alpha = beta = 0. the user can transpose matrix A by setting *alpha = 1 and *beta = 0.

Handle.Cgeam64 takes 64-bit sizes.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • alpha: < type > scalar used for multiplication. If *alpha == 0, A does not have to be a valid input
  • a: < type > array of dimensions lda x n with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • beta: < type > scalar used for multiplication. If *beta == 0, B does not have to be a valid input
  • b: < type > array of dimension ldb x n with ldb >= max(1, m) if transb == OpN and ldb x m with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0, or if transa is not one of OpN, OpT and OpC, or if transb is not one of OpN, OpT and OpC, or if lda < max(1, m) when transa == OpN, and lda < max(1, n) otherwise, or if ldb < max(1, m) if transb == OpN, and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if A == C and `(transa != OpN)
  • ErrNotInitialized: The library was not initialized

Wraps cublasCgeam.

func (Handle) Cgeam64

func (h Handle) Cgeam64(transa Operation, transb Operation, m int64, n int64, alpha *Complex64, a driver.DevicePtr, lda int64, beta *Complex64, b driver.DevicePtr, ldb int64, c driver.DevicePtr, ldc int64) error

Cgeam64 performs the matrix-matrix addition/transposition.

C=αop(A)+βop(B), where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×n , op(B)m×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . The operation is out-of-place if C does not overlap A or B. The in-place mode supports the following two operations, C=α*C+βop(B) C=αop(A)+β*C For in-place mode, if C == A, ldc == lda and transa == OpN. If C === B, ldc == ldb and transb == OpN. If the user does not meet above requirements, ErrInvalidValue is returned. The operation includes the following special cases: the user can reset matrix C to zero by setting *alpha = beta = 0. the user can transpose matrix A by setting *alpha = 1 and *beta = 0.

It is Handle.Cgeam with int64 sizes and strides.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • alpha: < type > scalar used for multiplication. If *alpha == 0, A does not have to be a valid input
  • a: < type > array of dimensions lda x n with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • beta: < type > scalar used for multiplication. If *beta == 0, B does not have to be a valid input
  • b: < type > array of dimension ldb x n with ldb >= max(1, m) if transb == OpN and ldb x m with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0, or if transa is not one of OpN, OpT and OpC, or if transb is not one of OpN, OpT and OpC, or if lda < max(1, m) when transa == OpN, and lda < max(1, n) otherwise, or if ldb < max(1, m) if transb == OpN, and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if A == C and `(transa != OpN)
  • ErrNotInitialized: The library was not initialized

Wraps cublasCgeam_64.

func (Handle) CgelsBatched

func (h Handle) CgelsBatched(trans Operation, m int32, n int32, nrhs int32, aarray driver.DevicePtr, lda int32, carray driver.DevicePtr, ldc int32, info *int32, devInfoArray driver.DevicePtr, batchSize int32) error

CgelsBatched solves a batch of overdetermined linear systems in the least-squares sense.

Aarray is an array of pointers to matrices stored in column-major format.

Carray is an array of pointers to matrices stored in column-major format. This function find the least squares solution of a batch of overdetermined systems: it solves the least squares problem described as follows :

minimize  || Carray[i] - Aarray[i]*Xarray[i] || , with i = 0, ...,batchSize-1

On exit, each Aarray[i] is overwritten with their QR factorization and each Carray[i] is overwritten with the least square solution cublasgelsBatched supports only the non-transpose operation and only solves over-determined systems (m >= n). cublasgelsBatched only supports compute capability 2.0 or above. This function is intended to be used for matrices of small sizes where the launch overhead is a significant factor. For references please refer to NETLIB documentation: sgels(), dgels(), cgels(), zgels()

  • trans: Operation op( Aarray[i]) that is non- or (conj.) transpose. Only non-transpose operation is currently supported
  • m: Number of rows of each Aarray[i] and Carray[i] if trans == OpN, numbers of columns of each Aarray[i] otherwise (not supported currently)
  • n: Number of columns of each Aarray[i] if trans == OpN, and number of rows of each Aarray[i] and Carray[i] otherwise (not supported currently)
  • nrhs: Number of columns of each Carray[i]
  • aarray: Array of pointers to < type > array, with each array of dim. m x n with lda >= max(1, m) if trans == OpN, and n x m with lda >= max(1, n) otherwise (not supported currently). Matrices Aarray[i] should not overlap; otherwise, behavior is undefined
  • lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
  • carray: Array of pointers to < type > array, with each array of dim. m x nrhs with ldc >= max(1, m) if trans == OpN, and n x nrhs with lda >= max(1, n) otherwise (not supported currently). Matrices Carray[i] should not overlap; otherwise, behavior is undefined
  • ldc: Leading dimension of two-dimensional array used to store each matrix Carray[i]
  • info: If info == 0 the parameters passed to the function are valid. If info < 0 the parameter in position -info is invalid
  • devInfoArray: Optional array of integers of dimension batchsize. If non-null, every element of devInfoArray[i] == V has the following meaning: V == 0 : the i-th problem was successfully solved. V > 0 : the V-th diagonal element of the Aarray[i] is zero. Aarray[i] does not have full rank
  • batchSize: Number of pointers contained in Aarray and Carray

Errors:

Wraps cublasCgelsBatched.

func (Handle) Cgemm

func (h Handle) Cgemm(transa Operation, transb Operation, m int32, n int32, k int32, alpha *Complex64, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *Complex64, c driver.DevicePtr, ldc int32) error

Cgemm performs the matrix-matrix multiplication.

C=αop(A)op(B)+βC, where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×k , op(B)k×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . For references please refer to NETLIB documentation: sgemm(), dgemm(), cgemm(), zgemm()

Handle.Cgemm64 takes 64-bit sizes.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • k: Number of columns of op( A) and rows of op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrArchMismatch: In the case of Handle.Hgemm the device does not support math in half precision.
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasCgemm_v2.

func (Handle) Cgemm3m

func (h Handle) Cgemm3m(transa Operation, transb Operation, m int32, n int32, k int32, alpha *Complex64, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *Complex64, c driver.DevicePtr, ldc int32) error

Cgemm3m performs the complex matrix-matrix multiplication, using Gauss complexity reduction algorithm.

This can lead to an increase in performance up to 25%. C=αop(A)op(B)+βC, where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×k , op(B)k×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B .

Note: These 2 routines are only supported on GPUs with architecture capabilities equal to or greater than 5.0 For references please refer to NETLIB documentation: cgemm(), zgemm()

Handle.Cgemm3m64 takes 64-bit sizes.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • k: Number of columns of op( A) and rows of op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrArchMismatch: The device has a compute capabilites lower than 5.0.
  • ErrExecutionFailed: The function failed to launch on the GPU.
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized.

Wraps cublasCgemm3m.

func (Handle) Cgemm3m64

func (h Handle) Cgemm3m64(transa Operation, transb Operation, m int64, n int64, k int64, alpha *Complex64, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *Complex64, c driver.DevicePtr, ldc int64) error

Cgemm3m64 performs the complex matrix-matrix multiplication, using Gauss complexity reduction algorithm.

This can lead to an increase in performance up to 25%. C=αop(A)op(B)+βC, where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×k , op(B)k×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B .

Note: These 2 routines are only supported on GPUs with architecture capabilities equal to or greater than 5.0 For references please refer to NETLIB documentation: cgemm(), zgemm()

It is Handle.Cgemm3m with int64 sizes and strides.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • k: Number of columns of op( A) and rows of op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrArchMismatch: The device has a compute capabilites lower than 5.0.
  • ErrExecutionFailed: The function failed to launch on the GPU.
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized.

Wraps cublasCgemm3m_64.

func (Handle) Cgemm3mBatched

func (h Handle) Cgemm3mBatched(transa Operation, transb Operation, m int32, n int32, k int32, alpha *Complex64, aarray driver.DevicePtr, lda int32, barray driver.DevicePtr, ldb int32, beta *Complex64, carray driver.DevicePtr, ldc int32, batchCount int32) error

Cgemm3mBatched wraps cublasCgemm3mBatched.

Handle.Cgemm3mBatched64 takes 64-bit sizes.

func (Handle) Cgemm3mBatched64

func (h Handle) Cgemm3mBatched64(transa Operation, transb Operation, m int64, n int64, k int64, alpha *Complex64, aarray driver.DevicePtr, lda int64, barray driver.DevicePtr, ldb int64, beta *Complex64, carray driver.DevicePtr, ldc int64, batchCount int64) error

Cgemm3mBatched64 wraps cublasCgemm3mBatched_64.

It is Handle.Cgemm3mBatched with int64 sizes and strides.

func (Handle) Cgemm3mEx

func (h Handle) Cgemm3mEx(transa Operation, transb Operation, m int32, n int32, k int32, alpha *Complex64, a driver.DevicePtr, atype DataType, lda int32, b driver.DevicePtr, btype DataType, ldb int32, beta *Complex64, c driver.DevicePtr, ctype DataType, ldc int32) error

Cgemm3mEx wraps cublasCgemm3mEx.

Handle.Cgemm3mEx64 takes 64-bit sizes.

func (Handle) Cgemm3mEx64

func (h Handle) Cgemm3mEx64(transa Operation, transb Operation, m int64, n int64, k int64, alpha *Complex64, a driver.DevicePtr, atype DataType, lda int64, b driver.DevicePtr, btype DataType, ldb int64, beta *Complex64, c driver.DevicePtr, ctype DataType, ldc int64) error

Cgemm3mEx64 wraps cublasCgemm3mEx_64.

It is Handle.Cgemm3mEx with int64 sizes and strides.

func (Handle) Cgemm3mStridedBatched

func (h Handle) Cgemm3mStridedBatched(transa Operation, transb Operation, m int32, n int32, k int32, alpha *Complex64, a driver.DevicePtr, lda int32, strideA int64, b driver.DevicePtr, ldb int32, strideB int64, beta *Complex64, c driver.DevicePtr, ldc int32, strideC int64, batchCount int32) error

Cgemm3mStridedBatched performs the matrix-matrix multiplication of a batch of matrices.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. Input matrices A, B and output matrix C for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A, B and C matrices for the first instance are passed to the function by the user along with offsets in number of elements - strideA, strideB and strideC that determine the locations of input and output matrices in future instances. C+i*strideC=αop(A+i*strideA)op(B+i*strideB)+β(C+i*strideC), for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, i.e. the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], B[i], C[i] as notation for A, B and C matrices in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, strideB, strideC away from A[i-1], B[i-1], C[i-1]. The unit for the offset is number of elements and must not be zero .

Handle.Cgemm3mStridedBatched64 takes 64-bit sizes.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • b: < type >* pointer to the B matrix corresponding to the first instance of the batch, with dimensions ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store each matrix B[i]
  • strideB: Value of type long long int that gives the offset in number of elements between B[i] and B[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type >* pointer to the C matrix corresponding to the first instance of the batch, with dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected
  • ldc: Leading dimension of two-dimensional array used to store each matrix C[i]
  • strideC: Value of type long long int that gives the offset in number of elements between C[i] and C[i+1]
  • batchCount: Number of GEMMs to perform in the batch

Errors:

Wraps cublasCgemm3mStridedBatched.

func (Handle) Cgemm3mStridedBatched64

func (h Handle) Cgemm3mStridedBatched64(transa Operation, transb Operation, m int64, n int64, k int64, alpha *Complex64, a driver.DevicePtr, lda int64, strideA int64, b driver.DevicePtr, ldb int64, strideB int64, beta *Complex64, c driver.DevicePtr, ldc int64, strideC int64, batchCount int64) error

Cgemm3mStridedBatched64 performs the matrix-matrix multiplication of a batch of matrices.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. Input matrices A, B and output matrix C for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A, B and C matrices for the first instance are passed to the function by the user along with offsets in number of elements - strideA, strideB and strideC that determine the locations of input and output matrices in future instances. C+i*strideC=αop(A+i*strideA)op(B+i*strideB)+β(C+i*strideC), for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, i.e. the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], B[i], C[i] as notation for A, B and C matrices in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, strideB, strideC away from A[i-1], B[i-1], C[i-1]. The unit for the offset is number of elements and must not be zero .

It is Handle.Cgemm3mStridedBatched with int64 sizes and strides.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • b: < type >* pointer to the B matrix corresponding to the first instance of the batch, with dimensions ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store each matrix B[i]
  • strideB: Value of type long long int that gives the offset in number of elements between B[i] and B[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type >* pointer to the C matrix corresponding to the first instance of the batch, with dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected
  • ldc: Leading dimension of two-dimensional array used to store each matrix C[i]
  • strideC: Value of type long long int that gives the offset in number of elements between C[i] and C[i+1]
  • batchCount: Number of GEMMs to perform in the batch

Errors:

Wraps cublasCgemm3mStridedBatched_64.

func (Handle) Cgemm64

func (h Handle) Cgemm64(transa Operation, transb Operation, m int64, n int64, k int64, alpha *Complex64, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *Complex64, c driver.DevicePtr, ldc int64) error

Cgemm64 performs the matrix-matrix multiplication.

C=αop(A)op(B)+βC, where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×k , op(B)k×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . For references please refer to NETLIB documentation: sgemm(), dgemm(), cgemm(), zgemm()

It is Handle.Cgemm with int64 sizes and strides.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • k: Number of columns of op( A) and rows of op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrArchMismatch: In the case of Handle.Hgemm the device does not support math in half precision.
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasCgemm_v2_64.

func (Handle) CgemmBatched

func (h Handle) CgemmBatched(transa Operation, transb Operation, m int32, n int32, k int32, alpha *Complex64, aarray driver.DevicePtr, lda int32, barray driver.DevicePtr, ldb int32, beta *Complex64, carray driver.DevicePtr, ldc int32, batchCount int32) error

CgemmBatched performs the matrix-matrix multiplication of a batch of matrices.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. The address of the input matrices and the output matrix of each instance of the batch are read from arrays of pointers passed to the function by the caller. C[i]=αop(A[i])op(B[i])+βC[i], for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, that is, the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemmBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

Handle.CgemmBatched64 takes 64-bit sizes.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • barray: Array of pointers to < type > array, with each array of dim. ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • ldb: Leading dimension of two-dimensional array used to store each matrix B[i]
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • carray: Array of pointers to < type > array. It has dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • ldc: Leading dimension of two-dimensional array used to store each matrix C[i]
  • batchCount: Number of pointers contained in Aarray, Barray and Carray

Errors:

  • ErrArchMismatch: Handle.HgemmBatched is only supported for GPU with architecture capabilities equal or greater than 5.3
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m)
  • ErrNotInitialized: The library was not initialized

Wraps cublasCgemmBatched.

func (Handle) CgemmBatched64

func (h Handle) CgemmBatched64(transa Operation, transb Operation, m int64, n int64, k int64, alpha *Complex64, aarray driver.DevicePtr, lda int64, barray driver.DevicePtr, ldb int64, beta *Complex64, carray driver.DevicePtr, ldc int64, batchCount int64) error

CgemmBatched64 performs the matrix-matrix multiplication of a batch of matrices.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. The address of the input matrices and the output matrix of each instance of the batch are read from arrays of pointers passed to the function by the caller. C[i]=αop(A[i])op(B[i])+βC[i], for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, that is, the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemmBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

It is Handle.CgemmBatched with int64 sizes and strides.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • barray: Array of pointers to < type > array, with each array of dim. ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • ldb: Leading dimension of two-dimensional array used to store each matrix B[i]
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • carray: Array of pointers to < type > array. It has dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • ldc: Leading dimension of two-dimensional array used to store each matrix C[i]
  • batchCount: Number of pointers contained in Aarray, Barray and Carray

Errors:

  • ErrArchMismatch: Handle.HgemmBatched is only supported for GPU with architecture capabilities equal or greater than 5.3
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m)
  • ErrNotInitialized: The library was not initialized

Wraps cublasCgemmBatched_64.

func (Handle) CgemmEx

func (h Handle) CgemmEx(transa Operation, transb Operation, m int32, n int32, k int32, alpha *Complex64, a driver.DevicePtr, atype DataType, lda int32, b driver.DevicePtr, btype DataType, ldb int32, beta *Complex64, c driver.DevicePtr, ctype DataType, ldc int32) error

CgemmEx is an extension of cublasgemm().

In this function the input matrices and output matrices can have a lower precision but the computation is still done in the type <t>. For example, in the type float for Handle.SgemmEx and in the type cuComplex for Handle.CgemmEx. C=αop(A)op(B)+βC where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×k , op(B)k×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . The matrix types combinations supported for Handle.SgemmEx are listed below:

  • C: CUDA_R_16BF; A/B: CUDA_R_16BF
  • C: CUDA_R_16F; A/B: CUDA_R_16F
  • C: CUDA_R_32F; A/B: CUDA_R_8I
  • A/B: CUDA_R_16BF
  • A/B: CUDA_R_16F
  • A/B: CUDA_R_32F

The matrix types combinations supported for Handle.CgemmEx are listed below :

  • C: CUDA_C_32F; A/B: CUDA_C_8I
  • A/B: CUDA_C_32F

For references please refer to NETLIB documentation: sgemm() For more information about the numerical behavior of some GEMM algorithms, refer to the GEMM Algorithms Numerical Behavior section.

Handle.CgemmEx64 takes 64-bit sizes.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • k: Number of columns of op( A) and rows of op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • atype: Enumerant specifying the datatype of matrix A
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • btype: Enumerant specifying the datatype of matrix B
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ctype: Enumerant specifying the datatype of matrix C
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrArchMismatch: Handle.CgemmEx is only supported for GPU with architecture capabilities equal or greater than 5.0
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized
  • ErrNotSupported: The combination of the parameters Atype, Btype and Ctype is not supported

Wraps cublasCgemmEx.

func (Handle) CgemmEx64

func (h Handle) CgemmEx64(transa Operation, transb Operation, m int64, n int64, k int64, alpha *Complex64, a driver.DevicePtr, atype DataType, lda int64, b driver.DevicePtr, btype DataType, ldb int64, beta *Complex64, c driver.DevicePtr, ctype DataType, ldc int64) error

CgemmEx64 is an extension of cublasgemm().

In this function the input matrices and output matrices can have a lower precision but the computation is still done in the type <t>. For example, in the type float for Handle.SgemmEx and in the type cuComplex for Handle.CgemmEx. C=αop(A)op(B)+βC where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×k , op(B)k×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . The matrix types combinations supported for Handle.SgemmEx are listed below:

  • C: CUDA_R_16BF; A/B: CUDA_R_16BF
  • C: CUDA_R_16F; A/B: CUDA_R_16F
  • C: CUDA_R_32F; A/B: CUDA_R_8I
  • A/B: CUDA_R_16BF
  • A/B: CUDA_R_16F
  • A/B: CUDA_R_32F

The matrix types combinations supported for Handle.CgemmEx are listed below :

  • C: CUDA_C_32F; A/B: CUDA_C_8I
  • A/B: CUDA_C_32F

For references please refer to NETLIB documentation: sgemm() For more information about the numerical behavior of some GEMM algorithms, refer to the GEMM Algorithms Numerical Behavior section.

It is Handle.CgemmEx with int64 sizes and strides.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • k: Number of columns of op( A) and rows of op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • atype: Enumerant specifying the datatype of matrix A
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • btype: Enumerant specifying the datatype of matrix B
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ctype: Enumerant specifying the datatype of matrix C
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrArchMismatch: Handle.CgemmEx is only supported for GPU with architecture capabilities equal or greater than 5.0
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized
  • ErrNotSupported: The combination of the parameters Atype, Btype and Ctype is not supported

Wraps cublasCgemmEx_64.

func (Handle) CgemmStridedBatched

func (h Handle) CgemmStridedBatched(transa Operation, transb Operation, m int32, n int32, k int32, alpha *Complex64, a driver.DevicePtr, lda int32, strideA int64, b driver.DevicePtr, ldb int32, strideB int64, beta *Complex64, c driver.DevicePtr, ldc int32, strideC int64, batchCount int32) error

CgemmStridedBatched performs the matrix-matrix multiplication of a batch of matrices.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. Input matrices A, B and output matrix C for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A, B and C matrices for the first instance are passed to the function by the user along with offsets in number of elements - strideA, strideB and strideC that determine the locations of input and output matrices in future instances. C+i*strideC=αop(A+i*strideA)op(B+i*strideB)+β(C+i*strideC), for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, i.e. the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], B[i], C[i] as notation for A, B and C matrices in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, strideB, strideC away from A[i-1], B[i-1], C[i-1]. The unit for the offset is number of elements and must not be zero .

Handle.CgemmStridedBatched64 takes 64-bit sizes.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • b: < type >* pointer to the B matrix corresponding to the first instance of the batch, with dimensions ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store each matrix B[i]
  • strideB: Value of type long long int that gives the offset in number of elements between B[i] and B[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type >* pointer to the C matrix corresponding to the first instance of the batch, with dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected
  • ldc: Leading dimension of two-dimensional array used to store each matrix C[i]
  • strideC: Value of type long long int that gives the offset in number of elements between C[i] and C[i+1]
  • batchCount: Number of GEMMs to perform in the batch

Errors:

Wraps cublasCgemmStridedBatched.

func (Handle) CgemmStridedBatched64

func (h Handle) CgemmStridedBatched64(transa Operation, transb Operation, m int64, n int64, k int64, alpha *Complex64, a driver.DevicePtr, lda int64, strideA int64, b driver.DevicePtr, ldb int64, strideB int64, beta *Complex64, c driver.DevicePtr, ldc int64, strideC int64, batchCount int64) error

CgemmStridedBatched64 performs the matrix-matrix multiplication of a batch of matrices.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. Input matrices A, B and output matrix C for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A, B and C matrices for the first instance are passed to the function by the user along with offsets in number of elements - strideA, strideB and strideC that determine the locations of input and output matrices in future instances. C+i*strideC=αop(A+i*strideA)op(B+i*strideB)+β(C+i*strideC), for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, i.e. the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], B[i], C[i] as notation for A, B and C matrices in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, strideB, strideC away from A[i-1], B[i-1], C[i-1]. The unit for the offset is number of elements and must not be zero .

It is Handle.CgemmStridedBatched with int64 sizes and strides.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • b: < type >* pointer to the B matrix corresponding to the first instance of the batch, with dimensions ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store each matrix B[i]
  • strideB: Value of type long long int that gives the offset in number of elements between B[i] and B[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type >* pointer to the C matrix corresponding to the first instance of the batch, with dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected
  • ldc: Leading dimension of two-dimensional array used to store each matrix C[i]
  • strideC: Value of type long long int that gives the offset in number of elements between C[i] and C[i+1]
  • batchCount: Number of GEMMs to perform in the batch

Errors:

Wraps cublasCgemmStridedBatched_64.

func (Handle) Cgemv

func (h Handle) Cgemv(trans Operation, m int32, n int32, alpha *Complex64, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32, beta *Complex64, y driver.DevicePtr, incy int32) error

Cgemv performs the matrix-vector multiplication.

y=α op(A)x+βy, where A is a m×n matrix stored in column-major format, x and y are vectors, and α and β are scalars. Also, for matrix A op(A)={A if trans == CUBLAS_OP_NAᵀ if trans == CUBLAS_OP_TAᴴ if trans == OpC For references please refer to NETLIB documentation: sgemv(), dgemv(), cgemv(), zgemv()

Handle.Cgemv64 takes 64-bit sizes.

  • trans: Operation op( A) that is non- or (conj.) transpose
  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= max(1, m). Before entry, the leading m by n part of the array A must contain the matrix of coefficients. Unchanged on exit
  • lda: Leading dimension of two-dimensional array used to store matrix A. lda must be at least max(1, m)
  • x: < type > vector at least (1 + (n - 1) * abs(incx)) elements if trans == OpN and at least (1 + (m - 1) * abs(incx)) elements otherwise
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector at least (1 + (m - 1) * abs(incy)) elements if trans == OpN and at least (1 + (n - 1) * abs(incy)) elements otherwise
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasCgemv_v2.

func (Handle) Cgemv64

func (h Handle) Cgemv64(trans Operation, m int64, n int64, alpha *Complex64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64, beta *Complex64, y driver.DevicePtr, incy int64) error

Cgemv64 performs the matrix-vector multiplication.

y=α op(A)x+βy, where A is a m×n matrix stored in column-major format, x and y are vectors, and α and β are scalars. Also, for matrix A op(A)={A if trans == CUBLAS_OP_NAᵀ if trans == CUBLAS_OP_TAᴴ if trans == OpC For references please refer to NETLIB documentation: sgemv(), dgemv(), cgemv(), zgemv()

It is Handle.Cgemv with int64 sizes and strides.

  • trans: Operation op( A) that is non- or (conj.) transpose
  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= max(1, m). Before entry, the leading m by n part of the array A must contain the matrix of coefficients. Unchanged on exit
  • lda: Leading dimension of two-dimensional array used to store matrix A. lda must be at least max(1, m)
  • x: < type > vector at least (1 + (n - 1) * abs(incx)) elements if trans == OpN and at least (1 + (m - 1) * abs(incx)) elements otherwise
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector at least (1 + (m - 1) * abs(incy)) elements if trans == OpN and at least (1 + (n - 1) * abs(incy)) elements otherwise
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasCgemv_v2_64.

func (Handle) CgemvBatched

func (h Handle) CgemvBatched(trans Operation, m int32, n int32, alpha *Complex64, aarray driver.DevicePtr, lda int32, xarray driver.DevicePtr, incx int32, beta *Complex64, yarray driver.DevicePtr, incy int32, batchCount int32) error

CgemvBatched performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. The address of the input matrix and vector, and the output vector of each instance of the batch are read from arrays of pointers passed to the function by the caller. y[i]=αop(A[i])x[i]+βy[i], for i∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrice A[i] stored in column-major format with dimension m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] , op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] vectors must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemvBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

Handle.CgemvBatched64 takes 64-bit sizes.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x n with lda >= max(1, m). All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • xarray: Array of pointers to < type > array, with each dimension n if trans == OpN and m otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • incx: Stride of each one-dimensional array x[i]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • yarray: Array of pointers to < type > array. It has dimensions m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • incy: Stride of each one-dimensional array y[i]
  • batchCount: Number of pointers contained in Aarray, xarray and yarray

Errors:

Wraps cublasCgemvBatched.

func (Handle) CgemvBatched64

func (h Handle) CgemvBatched64(trans Operation, m int64, n int64, alpha *Complex64, aarray driver.DevicePtr, lda int64, xarray driver.DevicePtr, incx int64, beta *Complex64, yarray driver.DevicePtr, incy int64, batchCount int64) error

CgemvBatched64 performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. The address of the input matrix and vector, and the output vector of each instance of the batch are read from arrays of pointers passed to the function by the caller. y[i]=αop(A[i])x[i]+βy[i], for i∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrice A[i] stored in column-major format with dimension m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] , op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] vectors must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemvBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

It is Handle.CgemvBatched with int64 sizes and strides.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x n with lda >= max(1, m). All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • xarray: Array of pointers to < type > array, with each dimension n if trans == OpN and m otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • incx: Stride of each one-dimensional array x[i]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • yarray: Array of pointers to < type > array. It has dimensions m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • incy: Stride of each one-dimensional array y[i]
  • batchCount: Number of pointers contained in Aarray, xarray and yarray

Errors:

Wraps cublasCgemvBatched_64.

func (Handle) CgemvStridedBatched

func (h Handle) CgemvStridedBatched(trans Operation, m int32, n int32, alpha *Complex64, a driver.DevicePtr, lda int32, strideA int64, x driver.DevicePtr, incx int32, stridex int64, beta *Complex64, y driver.DevicePtr, incy int32, stridey int64, batchCount int32) error

CgemvStridedBatched performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. Input matrix A and vector x, and output vector y for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A matrix, x and y vectors for the first instance are passed to the function by the user along with offsets in number of elements - strideA, stridex and stridey that determine the locations of input matrices and vectors, and output vectors in future instances. y+i*stridey=αop(A+i*strideA)(x+i*stridex)+β(y+i*stridey), for i ∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrix stored in column-major format with dimension A[i]m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] matrices must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], x[i], y[i] as notation for A matrix, and x and y vectors in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, stridex, stridey away from A[i-1], x[i-1], y[i-1]. The unit for the offset is number of elements and must not be zero .

Handle.CgemvStridedBatched64 takes 64-bit sizes.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • x: < type >* pointer to the x vector corresponding to the first instance of the batch, with each dimension n if trans == OpN and m otherwise
  • incx: Stride of each one-dimensional array x[i]
  • stridex: Value of type long long int that gives the offset in number of elements between x[i] and x[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • y: < type >* pointer to the y vector corresponding to the first instance of the batch, with each dimension m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected
  • incy: Stride of each one-dimensional array y[i]
  • stridey: Value of type long long int that gives the offset in number of elements between y[i] and y[i+1]
  • batchCount: Number of GEMVs to perform in the batch

Errors:

Wraps cublasCgemvStridedBatched.

func (Handle) CgemvStridedBatched64

func (h Handle) CgemvStridedBatched64(trans Operation, m int64, n int64, alpha *Complex64, a driver.DevicePtr, lda int64, strideA int64, x driver.DevicePtr, incx int64, stridex int64, beta *Complex64, y driver.DevicePtr, incy int64, stridey int64, batchCount int64) error

CgemvStridedBatched64 performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. Input matrix A and vector x, and output vector y for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A matrix, x and y vectors for the first instance are passed to the function by the user along with offsets in number of elements - strideA, stridex and stridey that determine the locations of input matrices and vectors, and output vectors in future instances. y+i*stridey=αop(A+i*strideA)(x+i*stridex)+β(y+i*stridey), for i ∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrix stored in column-major format with dimension A[i]m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] matrices must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], x[i], y[i] as notation for A matrix, and x and y vectors in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, stridex, stridey away from A[i-1], x[i-1], y[i-1]. The unit for the offset is number of elements and must not be zero .

It is Handle.CgemvStridedBatched with int64 sizes and strides.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • x: < type >* pointer to the x vector corresponding to the first instance of the batch, with each dimension n if trans == OpN and m otherwise
  • incx: Stride of each one-dimensional array x[i]
  • stridex: Value of type long long int that gives the offset in number of elements between x[i] and x[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • y: < type >* pointer to the y vector corresponding to the first instance of the batch, with each dimension m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected
  • incy: Stride of each one-dimensional array y[i]
  • stridey: Value of type long long int that gives the offset in number of elements between y[i] and y[i+1]
  • batchCount: Number of GEMVs to perform in the batch

Errors:

Wraps cublasCgemvStridedBatched_64.

func (Handle) CgeqrfBatched

func (h Handle) CgeqrfBatched(m int32, n int32, aarray driver.DevicePtr, lda int32, tauArray driver.DevicePtr, info *int32, batchSize int32) error

CgeqrfBatched computes the QR factorization of each matrix in a batch.

Aarray is an array of pointers to matrices stored in column-major format with dimensions m x n and leading dimension lda.

TauArray is an array of pointers to vectors of dimension of at least max (1, min(m, n). This function performs the QR factorization of each Aarray[i] for i = 0, ...,batchSize-1 using Householder reflections. Each matrix Q[i] is represented as a product of elementary reflectors and is stored in the lower part of each Aarray[i] as follows :

Q[j] = H[j][1] H[j][2] . . . H[j](k), where k = min(m,n).

Each H[j][i] has the form

H[j][i] = I - tau[j] * v * v'

where tau[j] is a real scalar, and v is a real vector with v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in Aarray[j][i+1:m,i], and tau in TauArray[j][i]. This function is intended to be used for matrices of small sizes where the launch overhead is a significant factor. cublasgeqrfBatched supports arbitrary dimension. cublasgeqrfBatched only supports compute capability 2.0 or above. For references please refer to NETLIB documentation: sgeqrf(), dgeqrf(), cgeqrf(), zgeqrf()

  • m: Number of rows Aarray[i]
  • n: Number of columns of Aarray[i]
  • aarray: Array of pointers to < type > array, with each array of dim. m x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
  • tauArray: Array of pointers to < type > vector, with each vector of dim. max(1 ,min(m, n))
  • info: If info == 0, the parameters passed to the function are valid. If info < 0, the parameter in position -info is invalid
  • batchSize: Number of pointers contained in Aarray

Errors:

Wraps cublasCgeqrfBatched.

func (Handle) Cgerc

func (h Handle) Cgerc(m int32, n int32, alpha *Complex64, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, a driver.DevicePtr, lda int32) error

Cgerc performs the rank-1 update.

A={αxyᵀ+Aif ger(),geru() is calledαxyᴴ+Aif gerc() is called where A is a m×n matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: sger(), dger(), cgeru(), cgerc(), zgeru(), zgerc()

Handle.Cgerc64 takes 64-bit sizes.

  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with m elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimension lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasCgerc_v2.

func (Handle) Cgerc64

func (h Handle) Cgerc64(m int64, n int64, alpha *Complex64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, a driver.DevicePtr, lda int64) error

Cgerc64 performs the rank-1 update.

A={αxyᵀ+Aif ger(),geru() is calledαxyᴴ+Aif gerc() is called where A is a m×n matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: sger(), dger(), cgeru(), cgerc(), zgeru(), zgerc()

It is Handle.Cgerc with int64 sizes and strides.

  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with m elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimension lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasCgerc_v2_64.

func (Handle) Cgeru

func (h Handle) Cgeru(m int32, n int32, alpha *Complex64, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, a driver.DevicePtr, lda int32) error

Cgeru performs the rank-1 update.

A={αxyᵀ+Aif ger(),geru() is calledαxyᴴ+Aif gerc() is called where A is a m×n matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: sger(), dger(), cgeru(), cgerc(), zgeru(), zgerc()

Handle.Cgeru64 takes 64-bit sizes.

  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with m elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimension lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasCgeru_v2.

func (Handle) Cgeru64

func (h Handle) Cgeru64(m int64, n int64, alpha *Complex64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, a driver.DevicePtr, lda int64) error

Cgeru64 performs the rank-1 update.

A={αxyᵀ+Aif ger(),geru() is calledαxyᴴ+Aif gerc() is called where A is a m×n matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: sger(), dger(), cgeru(), cgerc(), zgeru(), zgerc()

It is Handle.Cgeru with int64 sizes and strides.

  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with m elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimension lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasCgeru_v2_64.

func (Handle) CgetrfBatched

func (h Handle) CgetrfBatched(n int32, a driver.DevicePtr, lda int32, p driver.DevicePtr, info driver.DevicePtr, batchSize int32) error

CgetrfBatched computes the LU factorization of each matrix in a batch.

Aarray is an array of pointers to matrices stored in column-major format with dimensions nxn and leading dimension lda.

This function performs the LU factorization of each Aarray[i] for i = 0, …, batchSize-1 by the following equation P*Aarray[i]=L*U where P is a permutation matrix which represents partial pivoting with row interchanges. L is a lower triangular matrix with unit diagonal and U is an upper triangular matrix. Formally P is written by a product of permutation matrices Pj, for j = 1,2,...,n, say P = P1 * P2 * P3 * .... * Pn. Pj is a permutation matrix which interchanges two rows of vector x when performing Pj*x. Pj can be constructed by j element of PivotArray[i] by the following Matlab code

// In Matlab PivotArray[i] is an array of base-1.
// In C, PivotArray[i] is base-0.
Pj = eye(n);
swap Pj(j,:) and Pj(PivotArray[i][j]  ,:)

L and U are written back to original matrix A, and diagonal elements of L are discarded. The L and U can be constructed by the following Matlab code

// A is a matrix of nxn after getrf.
L = eye(n);
for j = 1:n
    L(j+1:n,j) = A(j+1:n,j)
end
U = zeros(n);
for i = 1:n
    U(i,i:n) = A(i,i:n)
end

If matrix A(=Aarray[i]) is singular, getrf still works and the value of info(=infoArray[i]) reports first row index that LU factorization cannot proceed. If info is k, U(k,k) is zero. The equation P*A == L*U still holds, however L and U reconstruction needs a different Matlab code as follows:

// A is a matrix of nxn after getrf.
// info is k, which means U(k,k) is zero.
L = eye(n);
for j = 1:k-1
    L(j+1:n,j) = A(j+1:n,j)
end
U = zeros(n);
for i = 1:k-1
    U(i,i:n) = A(i,i:n)
end
for i = k:n
    U(i,k:n) = A(i,k:n)
end

This function is intended to be used for matrices of small sizes where the launch overhead is a significant factor. cublasgetrfBatched supports non-pivot LU factorization if PivotArray is NULL. cublasgetrfBatched supports arbitrary dimension. cublasgetrfBatched only supports compute capability 2.0 or above. For references please refer to NETLIB documentation: sgeqrf(), dgeqrf(), cgeqrf(), zgeqrf()

  • n: Number of rows and columns of Aarray[i]
  • lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
  • batchSize: Number of pointers contained in A

Errors:

Wraps cublasCgetrfBatched.

func (Handle) CgetriBatched

func (h Handle) CgetriBatched(n int32, a driver.DevicePtr, lda int32, p driver.DevicePtr, c driver.DevicePtr, ldc int32, info driver.DevicePtr, batchSize int32) error

CgetriBatched computes the inverse of each matrix in a batch from its LU factorization.

Aarray and Carray are arrays of pointers to matrices stored in column-major format with dimensions n*n and leading dimension lda and ldc respectively.

This function performs the inversion of matrices A[i] for i = 0, …, batchSize-1. Prior to calling cublasgetriBatched, the matrix A[i] must be factorized first using the routine cublasgetrfBatched. After the call of cublasgetrfBatched, the matrix pointing by Aarray[i] will contain the LU factors of the matrix A[i] and the vector pointing by (PivotArray+i) will contain the pivoting sequence. Following the LU factorization, cublasgetriBatched uses forward and backward triangular solvers to complete inversion of matrices A[i] for i = 0, …, batchSize-1. The inversion is out-of-place, so memory space of Carray[i] cannot overlap memory space of Array[i]. Typically all parameters in cublasgetrfBatched would be passed into cublasgetriBatched.

The user can check singularity from either cublasgetrfBatched or cublasgetriBatched. This function is intended to be used for matrices of small sizes where the launch overhead is a significant factor. If cublasgetrfBatched is performed by non-pivoting, PivotArray of cublasgetriBatched should be NULL. cublasgetriBatched supports arbitrary dimension. cublasgetriBatched only supports compute capability 2.0 or above.

  • n: Number of rows and columns of Aarray[i]
  • lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
  • ldc: Leading dimension of two-dimensional array used to store each matrix Carray[i]
  • batchSize: Number of pointers contained in A

Errors:

Wraps cublasCgetriBatched.

func (Handle) CgetrsBatched

func (h Handle) CgetrsBatched(trans Operation, n int32, nrhs int32, aarray driver.DevicePtr, lda int32, devIpiv driver.DevicePtr, barray driver.DevicePtr, ldb int32, info *int32, batchSize int32) error

CgetrsBatched solves an array of systems of linear equations of the form:

op(A[i])X[i]=B[i] where A[i] is a matrix which has been LU factorized with pivoting, X[i] and B[i] are n×nrhs matrices. Also, for matrix A op(A[i])={A[i]if trans == CUBLAS_OP_NAᵀ[i]if trans == CUBLAS_OP_TAᴴ[i]if trans == OpC This function is intended to be used for matrices of small sizes where the launch overhead is a significant factor. cublasgetrsBatched() supports non-pivot LU factorization if devIpiv is NULL. cublasgetrsBatched() supports arbitrary dimension. cublasgetrsBatched() only supports compute capability 2.0 or above. For references please refer to NETLIB documentation: sgeqrs(), dgeqrs(), cgeqrs(), zgeqrs()

  • trans: Operation op( A) that is non- or (conj.) transpose
  • n: Number of rows and columns of Aarray[i]
  • nrhs: Number of columns of Barray[i]
  • aarray: Array of pointers to < type > array, with each array of dim. n x n with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
  • devIpiv: Array of size n x batchSize that contains the pivoting sequence of each factorization of Aarray[i] stored in a linear fashion. If devIpiv is NULL, pivoting for all Aarray[i] is ignored
  • barray: Array of pointers to < type > array, with each array of dim. n x nrhs with ldb >= max(1, n). Matrices Barray[i] should not overlap; otherwise, undefined behavior is expected
  • ldb: Leading dimension of two-dimensional array used to store each solution matrix Barray[i]
  • info: If info == 0, the execution is successful. If info = -j, the j-th parameter had an illegal value
  • batchSize: Number of pointers contained in A

Errors:

Wraps cublasCgetrsBatched.

func (Handle) Chbmv

func (h Handle) Chbmv(uplo FillMode, n int32, k int32, alpha *Complex64, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32, beta *Complex64, y driver.DevicePtr, incy int32) error

Chbmv performs the Hermitian banded matrix-vector multiplication.

y=αAx+βy, where A is a n×n Hermitian banded matrix with k subdiagonals and superdiagonals, x and y are vectors, and α and β are scalars. If uplo == FillModeLower then the Hermitian banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the Hermitian banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k),j] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: chbmv(), zhbmv()

Handle.Chbmv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimensions lda x n, with lda >= k + 1. The imaginary parts of the diagonal elements are assumed to be zero
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasChbmv_v2.

func (Handle) Chbmv64

func (h Handle) Chbmv64(uplo FillMode, n int64, k int64, alpha *Complex64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64, beta *Complex64, y driver.DevicePtr, incy int64) error

Chbmv64 performs the Hermitian banded matrix-vector multiplication.

y=αAx+βy, where A is a n×n Hermitian banded matrix with k subdiagonals and superdiagonals, x and y are vectors, and α and β are scalars. If uplo == FillModeLower then the Hermitian banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the Hermitian banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k),j] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: chbmv(), zhbmv()

It is Handle.Chbmv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimensions lda x n, with lda >= k + 1. The imaginary parts of the diagonal elements are assumed to be zero
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasChbmv_v2_64.

func (Handle) Chemm

func (h Handle) Chemm(side SideMode, uplo FillMode, m int32, n int32, alpha *Complex64, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *Complex64, c driver.DevicePtr, ldc int32) error

Chemm performs the Hermitian matrix-matrix multiplication.

C={αAB+βCif side == [SideLeft]αBA+βCif side == SideRight where A is a Hermitian matrix stored in lower or upper mode, B and C are m×n matrices, and α and β are scalars. For references please refer to NETLIB documentation: chemm(), zhemm()

Handle.Chemm64 takes 64-bit sizes.

  • side: Indicates if matrix A is on the left or right of B
  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • m: Number of rows of matrix C and B, with matrix A sized accordingly
  • n: Number of columns of matrix C and B, with matrix A sized accordingly
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise. The imaginary parts of the diagonal elements are assumed to be zero
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasChemm_v2.

func (Handle) Chemm64

func (h Handle) Chemm64(side SideMode, uplo FillMode, m int64, n int64, alpha *Complex64, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *Complex64, c driver.DevicePtr, ldc int64) error

Chemm64 performs the Hermitian matrix-matrix multiplication.

C={αAB+βCif side == [SideLeft]αBA+βCif side == SideRight where A is a Hermitian matrix stored in lower or upper mode, B and C are m×n matrices, and α and β are scalars. For references please refer to NETLIB documentation: chemm(), zhemm()

It is Handle.Chemm with int64 sizes and strides.

  • side: Indicates if matrix A is on the left or right of B
  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • m: Number of rows of matrix C and B, with matrix A sized accordingly
  • n: Number of columns of matrix C and B, with matrix A sized accordingly
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise. The imaginary parts of the diagonal elements are assumed to be zero
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasChemm_v2_64.

func (Handle) Chemv

func (h Handle) Chemv(uplo FillMode, n int32, alpha *Complex64, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32, beta *Complex64, y driver.DevicePtr, incy int32) error

Chemv performs the Hermitian matrix-vector multiplication.

y=αAx+βy, where A is a n×n Hermitian matrix stored in lower or upper mode, x and y are vectors, and α and β are scalars. This function has an alternate faster implementation using atomics that can be enabled with Please see the section on the for more details about the usage of atomics For references please refer to NETLIB documentation: chemv(), zhemv()

Handle.Chemv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n, with lda >= max(1, n). The imaginary parts of the diagonal elements are assumed to be zero
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasChemv_v2.

func (Handle) Chemv64

func (h Handle) Chemv64(uplo FillMode, n int64, alpha *Complex64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64, beta *Complex64, y driver.DevicePtr, incy int64) error

Chemv64 performs the Hermitian matrix-vector multiplication.

y=αAx+βy, where A is a n×n Hermitian matrix stored in lower or upper mode, x and y are vectors, and α and β are scalars. This function has an alternate faster implementation using atomics that can be enabled with Please see the section on the for more details about the usage of atomics For references please refer to NETLIB documentation: chemv(), zhemv()

It is Handle.Chemv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n, with lda >= max(1, n). The imaginary parts of the diagonal elements are assumed to be zero
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasChemv_v2_64.

func (Handle) Cher

func (h Handle) Cher(uplo FillMode, n int32, alpha *float32, x driver.DevicePtr, incx int32, a driver.DevicePtr, lda int32) error

Cher performs the Hermitian rank-1 update.

A=αxxᴴ+A, where A is a n×n Hermitian matrix stored in column-major format, x is a vector, and α is a scalar. For references please refer to NETLIB documentation: cher(), zher()

Handle.Cher64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • a: < type > array of dimensions lda x n, with lda >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasCher_v2.

func (Handle) Cher2

func (h Handle) Cher2(uplo FillMode, n int32, alpha *Complex64, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, a driver.DevicePtr, lda int32) error

Cher2 performs the Hermitian rank-2 update.

A=αxyᴴ+αˉyxᴴ+A, where A is a n×n Hermitian matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: cher2(), zher2()

Handle.Cher264 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimension lda x n with lda >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasCher2_v2.

func (Handle) Cher2k

func (h Handle) Cher2k(uplo FillMode, trans Operation, n int32, k int32, alpha *Complex64, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *float32, c driver.DevicePtr, ldc int32) error

Cher2k performs the Hermitian rank- 2k update.

C=αop(A)op(B)ᴴ+αˉop(B)op(A)ᴴ+βC, where α and β are scalars, C is a Hermitian matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrix A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᴴ and Bᴴif trans == OpC For references please refer to NETLIB documentation: cher2k(), zher2k()

Handle.Cher2k64 takes 64-bit sizes.

  • uplo: Indicates if matrix C lower or upper part is stored, the other Hermitian part is not referenced
  • trans: Operation op( A) that is non- or (conj.) transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasCher2k_v2.

func (Handle) Cher2k64

func (h Handle) Cher2k64(uplo FillMode, trans Operation, n int64, k int64, alpha *Complex64, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *float32, c driver.DevicePtr, ldc int64) error

Cher2k64 performs the Hermitian rank- 2k update.

C=αop(A)op(B)ᴴ+αˉop(B)op(A)ᴴ+βC, where α and β are scalars, C is a Hermitian matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrix A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᴴ and Bᴴif trans == OpC For references please refer to NETLIB documentation: cher2k(), zher2k()

It is Handle.Cher2k with int64 sizes and strides.

  • uplo: Indicates if matrix C lower or upper part is stored, the other Hermitian part is not referenced
  • trans: Operation op( A) that is non- or (conj.) transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasCher2k_v2_64.

func (Handle) Cher64

func (h Handle) Cher64(uplo FillMode, n int64, alpha *float32, x driver.DevicePtr, incx int64, a driver.DevicePtr, lda int64) error

Cher64 performs the Hermitian rank-1 update.

A=αxxᴴ+A, where A is a n×n Hermitian matrix stored in column-major format, x is a vector, and α is a scalar. For references please refer to NETLIB documentation: cher(), zher()

It is Handle.Cher with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • a: < type > array of dimensions lda x n, with lda >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasCher_v2_64.

func (Handle) Cher264

func (h Handle) Cher264(uplo FillMode, n int64, alpha *Complex64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, a driver.DevicePtr, lda int64) error

Cher264 performs the Hermitian rank-2 update.

A=αxyᴴ+αˉyxᴴ+A, where A is a n×n Hermitian matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: cher2(), zher2()

It is Handle.Cher2 with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimension lda x n with lda >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasCher2_v2_64.

func (Handle) Cherk

func (h Handle) Cherk(uplo FillMode, trans Operation, n int32, k int32, alpha *float32, a driver.DevicePtr, lda int32, beta *float32, c driver.DevicePtr, ldc int32) error

Cherk performs the Hermitian rank- k update.

C=αop(A)op(A)ᴴ+βC, where α and β are scalars, C is a Hermitian matrix stored in lower or upper mode, and A is a matrix with dimensions op(A)n×k . Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᴴif transa == OpC For references please refer to NETLIB documentation: cherk(), zherk()

Handle.Cherk64 takes 64-bit sizes.

  • uplo: Indicates if matrix C lower or upper part is stored, the other Hermitian part is not referenced
  • trans: Operation op( A) that is non- or (conj.) transpose
  • n: Number of rows of matrix op( A) and C
  • k: Number of columns of matrix op( A)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasCherk_v2.

func (Handle) Cherk3mEx

func (h Handle) Cherk3mEx(uplo FillMode, trans Operation, n int32, k int32, alpha *float32, a driver.DevicePtr, atype DataType, lda int32, beta *float32, c driver.DevicePtr, ctype DataType, ldc int32) error

Cherk3mEx is an extension of Handle.Cherk where the input matrix and output matrix can have a lower precision but the computation is still done in the type cuComplex.

This routine is implemented using the Gauss complexity reduction algorithm which can lead to an increase in performance up to 25%. This function performs the Hermitian rank- k update C=αop(A)op(A)ᴴ+βC where α and β are scalars, C is a Hermitian matrix stored in lower or upper mode, and A is a matrix with dimensions op(A)n×k . Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᴴif transa == OpC

Note: This routine is only supported on GPUs with architecture capabilities equal to or greater than 5.0 The matrix types combinations supported for Handle.Cherk3mEx are listed in the following table:

  • A: CUDA_C_8I; C: CUDA_C_32F
  • A: CUDA_C_32F; C: CUDA_C_32F

For references please refer to NETLIB documentation: cherk()

Handle.Cherk3mEx64 takes 64-bit sizes.

  • uplo: Indicates if matrix C lower or upper part is stored, the other Hermitian part is not referenced
  • trans: Operation op( A) that is non- or (conj.) transpose
  • n: Number of rows of matrix op( A) and C
  • k: Number of columns of matrix op( A)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if trans == OpN and lda x n with lda >= max(1, k) otherwise
  • atype: Enumerant specifying the datatype of matrix A
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • ctype: Enumerant specifying the datatype of matrix C
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasCherk3mEx.

func (Handle) Cherk3mEx64

func (h Handle) Cherk3mEx64(uplo FillMode, trans Operation, n int64, k int64, alpha *float32, a driver.DevicePtr, atype DataType, lda int64, beta *float32, c driver.DevicePtr, ctype DataType, ldc int64) error

Cherk3mEx64 is an extension of Handle.Cherk where the input matrix and output matrix can have a lower precision but the computation is still done in the type cuComplex.

This routine is implemented using the Gauss complexity reduction algorithm which can lead to an increase in performance up to 25%. This function performs the Hermitian rank- k update C=αop(A)op(A)ᴴ+βC where α and β are scalars, C is a Hermitian matrix stored in lower or upper mode, and A is a matrix with dimensions op(A)n×k . Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᴴif transa == OpC

Note: This routine is only supported on GPUs with architecture capabilities equal to or greater than 5.0 The matrix types combinations supported for Handle.Cherk3mEx are listed in the following table:

  • A: CUDA_C_8I; C: CUDA_C_32F
  • A: CUDA_C_32F; C: CUDA_C_32F

For references please refer to NETLIB documentation: cherk()

It is Handle.Cherk3mEx with int64 sizes and strides.

  • uplo: Indicates if matrix C lower or upper part is stored, the other Hermitian part is not referenced
  • trans: Operation op( A) that is non- or (conj.) transpose
  • n: Number of rows of matrix op( A) and C
  • k: Number of columns of matrix op( A)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if trans == OpN and lda x n with lda >= max(1, k) otherwise
  • atype: Enumerant specifying the datatype of matrix A
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • ctype: Enumerant specifying the datatype of matrix C
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasCherk3mEx_64.

func (Handle) Cherk64

func (h Handle) Cherk64(uplo FillMode, trans Operation, n int64, k int64, alpha *float32, a driver.DevicePtr, lda int64, beta *float32, c driver.DevicePtr, ldc int64) error

Cherk64 performs the Hermitian rank- k update.

C=αop(A)op(A)ᴴ+βC, where α and β are scalars, C is a Hermitian matrix stored in lower or upper mode, and A is a matrix with dimensions op(A)n×k . Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᴴif transa == OpC For references please refer to NETLIB documentation: cherk(), zherk()

It is Handle.Cherk with int64 sizes and strides.

  • uplo: Indicates if matrix C lower or upper part is stored, the other Hermitian part is not referenced
  • trans: Operation op( A) that is non- or (conj.) transpose
  • n: Number of rows of matrix op( A) and C
  • k: Number of columns of matrix op( A)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasCherk_v2_64.

func (Handle) CherkEx

func (h Handle) CherkEx(uplo FillMode, trans Operation, n int32, k int32, alpha *float32, a driver.DevicePtr, atype DataType, lda int32, beta *float32, c driver.DevicePtr, ctype DataType, ldc int32) error

CherkEx is an extension of Handle.Cherk where the input matrix and output matrix can have a lower precision but the computation is still done in the type cuComplex.

This function performs the Hermitian rank- k update C=αop(A)op(A)ᴴ+βC where α and β are scalars, C is a Hermitian matrix stored in lower or upper mode, and A is a matrix with dimensions op(A)n×k . Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᴴif transa == OpC

Note: This routine is only supported on GPUs with architecture capabilities equal to or greater than 5.0 The matrix types combinations supported for Handle.CherkEx are listed in the following table:

  • A: CUDA_C_8I; C: CUDA_C_32F
  • A: CUDA_C_32F; C: CUDA_C_32F

For references please refer to NETLIB documentation: cherk()

Handle.CherkEx64 takes 64-bit sizes.

  • uplo: Indicates if matrix C lower or upper part is stored, the other Hermitian part is not referenced
  • trans: Operation op( A) that is non- or (conj.) transpose
  • n: Number of rows of matrix op( A) and C
  • k: Number of columns of matrix op( A)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • atype: Enumerant specifying the datatype of matrix A
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • ctype: Enumerant specifying the datatype of matrix C
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasCherkEx.

func (Handle) CherkEx64

func (h Handle) CherkEx64(uplo FillMode, trans Operation, n int64, k int64, alpha *float32, a driver.DevicePtr, atype DataType, lda int64, beta *float32, c driver.DevicePtr, ctype DataType, ldc int64) error

CherkEx64 is an extension of Handle.Cherk where the input matrix and output matrix can have a lower precision but the computation is still done in the type cuComplex.

This function performs the Hermitian rank- k update C=αop(A)op(A)ᴴ+βC where α and β are scalars, C is a Hermitian matrix stored in lower or upper mode, and A is a matrix with dimensions op(A)n×k . Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᴴif transa == OpC

Note: This routine is only supported on GPUs with architecture capabilities equal to or greater than 5.0 The matrix types combinations supported for Handle.CherkEx are listed in the following table:

  • A: CUDA_C_8I; C: CUDA_C_32F
  • A: CUDA_C_32F; C: CUDA_C_32F

For references please refer to NETLIB documentation: cherk()

It is Handle.CherkEx with int64 sizes and strides.

  • uplo: Indicates if matrix C lower or upper part is stored, the other Hermitian part is not referenced
  • trans: Operation op( A) that is non- or (conj.) transpose
  • n: Number of rows of matrix op( A) and C
  • k: Number of columns of matrix op( A)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • atype: Enumerant specifying the datatype of matrix A
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • ctype: Enumerant specifying the datatype of matrix C
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasCherkEx_64.

func (Handle) Cherkx

func (h Handle) Cherkx(uplo FillMode, trans Operation, n int32, k int32, alpha *Complex64, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *float32, c driver.DevicePtr, ldc int32) error

Cherkx performs a variation of the Hermitian rank- k update.

C=αop(A)op(B)ᴴ+βC, where α and β are scalars, C is a Hermitian matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrix A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᴴ and Bᴴif trans == OpC This routine can be used when the matrix B is in such way that the result is guaranteed to be hermitian. An usual example is when the matrix B is a scaled form of the matrix A: this is equivalent to B being the product of the matrix A and a diagonal matrix. For an efficient computation of the product of a regular matrix with a diagonal matrix, refer to the routine cublasdgmm(). For references please refer to NETLIB documentation: cherk(), zherk() and cher2k(), zher2k()

Handle.Cherkx64 takes 64-bit sizes.

  • uplo: Indicates if matrix C lower or upper part is stored, the other Hermitian part is not referenced
  • trans: Operation op( A) that is non- or (conj.) transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: Real scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasCherkx.

func (Handle) Cherkx64

func (h Handle) Cherkx64(uplo FillMode, trans Operation, n int64, k int64, alpha *Complex64, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *float32, c driver.DevicePtr, ldc int64) error

Cherkx64 performs a variation of the Hermitian rank- k update.

C=αop(A)op(B)ᴴ+βC, where α and β are scalars, C is a Hermitian matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrix A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᴴ and Bᴴif trans == OpC This routine can be used when the matrix B is in such way that the result is guaranteed to be hermitian. An usual example is when the matrix B is a scaled form of the matrix A: this is equivalent to B being the product of the matrix A and a diagonal matrix. For an efficient computation of the product of a regular matrix with a diagonal matrix, refer to the routine cublasdgmm(). For references please refer to NETLIB documentation: cherk(), zherk() and cher2k(), zher2k()

It is Handle.Cherkx with int64 sizes and strides.

  • uplo: Indicates if matrix C lower or upper part is stored, the other Hermitian part is not referenced
  • trans: Operation op( A) that is non- or (conj.) transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: Real scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasCherkx_64.

func (Handle) Chpmv

func (h Handle) Chpmv(uplo FillMode, n int32, alpha *Complex64, ap driver.DevicePtr, x driver.DevicePtr, incx int32, beta *Complex64, y driver.DevicePtr, incy int32) error

Chpmv performs the Hermitian packed matrix-vector multiplication.

y=αAx+βy, where A is a n×n Hermitian matrix stored in packed format, x and y are vectors, and α and β are scalars. If uplo == FillModeLower then the elements in the lower triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: chpmv(), zhpmv()

Handle.Chpmv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • ap: < type > array with A stored in packed format. The imaginary parts of the diagonal elements are assumed to be zero
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasChpmv_v2.

func (Handle) Chpmv64

func (h Handle) Chpmv64(uplo FillMode, n int64, alpha *Complex64, ap driver.DevicePtr, x driver.DevicePtr, incx int64, beta *Complex64, y driver.DevicePtr, incy int64) error

Chpmv64 performs the Hermitian packed matrix-vector multiplication.

y=αAx+βy, where A is a n×n Hermitian matrix stored in packed format, x and y are vectors, and α and β are scalars. If uplo == FillModeLower then the elements in the lower triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: chpmv(), zhpmv()

It is Handle.Chpmv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • ap: < type > array with A stored in packed format. The imaginary parts of the diagonal elements are assumed to be zero
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasChpmv_v2_64.

func (Handle) Chpr

func (h Handle) Chpr(uplo FillMode, n int32, alpha *float32, x driver.DevicePtr, incx int32, ap driver.DevicePtr) error

Chpr performs the packed Hermitian rank-1 update.

A=αxxᴴ+A, where A is a n×n Hermitian matrix stored in packed format, x is a vector, and α is a scalar. If uplo == FillModeLower then the elements in the lower triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: chpr(), zhpr()

Handle.Chpr64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • ap: < type > array with A stored in packed format. The imaginary parts of the diagonal elements are assumed and set to zero

Errors:

Wraps cublasChpr_v2.

func (Handle) Chpr2

func (h Handle) Chpr2(uplo FillMode, n int32, alpha *Complex64, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, ap driver.DevicePtr) error

Chpr2 performs the packed Hermitian rank-2 update.

A=αxyᴴ+αˉyxᴴ+A, where A is a n×n Hermitian matrix stored in packed format, x and y are vectors, and α is a scalar. If uplo == FillModeLower then the elements in the lower triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: chpr2, zhpr2

Handle.Chpr264 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • ap: < type > array with A stored in packed format. The imaginary parts of the diagonal elements are assumed and set to zero

Errors:

Wraps cublasChpr2_v2.

func (Handle) Chpr64

func (h Handle) Chpr64(uplo FillMode, n int64, alpha *float32, x driver.DevicePtr, incx int64, ap driver.DevicePtr) error

Chpr64 performs the packed Hermitian rank-1 update.

A=αxxᴴ+A, where A is a n×n Hermitian matrix stored in packed format, x is a vector, and α is a scalar. If uplo == FillModeLower then the elements in the lower triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: chpr(), zhpr()

It is Handle.Chpr with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • ap: < type > array with A stored in packed format. The imaginary parts of the diagonal elements are assumed and set to zero

Errors:

Wraps cublasChpr_v2_64.

func (Handle) Chpr264

func (h Handle) Chpr264(uplo FillMode, n int64, alpha *Complex64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, ap driver.DevicePtr) error

Chpr264 performs the packed Hermitian rank-2 update.

A=αxyᴴ+αˉyxᴴ+A, where A is a n×n Hermitian matrix stored in packed format, x and y are vectors, and α is a scalar. If uplo == FillModeLower then the elements in the lower triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: chpr2, zhpr2

It is Handle.Chpr2 with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • ap: < type > array with A stored in packed format. The imaginary parts of the diagonal elements are assumed and set to zero

Errors:

Wraps cublasChpr2_v2_64.

func (*Handle) Close

func (h *Handle) Close() error

Close releases hardware resources used by the cuBLAS library.

This function is usually the last call with a particular handle to the cuBLAS library. Because Create allocates some internal resources and the release of those resources by calling Handle.Close will implicitly call cudaDeviceSynchronize(), it is recommended to minimize the number of times these functions are called.

A nil error means the shut down succeeded.

Errors:

If h is zero, Close returns nil. Otherwise Close sets h to zero when the call succeeds and leaves it unchanged when it fails. Only h is zeroed: a copy of it still refers to the released object.

Wraps cublasDestroy_v2.

func (Handle) CmatinvBatched

func (h Handle) CmatinvBatched(n int32, a driver.DevicePtr, lda int32, ainv driver.DevicePtr, ldaInv int32, info driver.DevicePtr, batchSize int32) error

CmatinvBatched A and Ainv are arrays of pointers to matrices stored in column-major format with dimensions n*n and leading dimension lda and ldaInv respectively.

This function performs the inversion of matrices A[i] for i = 0, …, batchSize-1. This function is a short cut of cublasgetrfBatched() plus cublasgetriBatched(). However it doesn’t work if n is greater than 32. If not, the user has to go through cublasgetrfBatched() and cublasgetriBatched(). If the matrix A[i] is singular, then info[i] reports singularity, the same as cublasgetrfBatched().

  • n: Number of rows and columns of A[i]
  • a: Array of pointers to < type > array, with each array of dimension n*n with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • ainv: Array of pointers to < type > array, with each array of dimension n*n with ldaInv >= max(1, n). Matrices Ainv[i] should not overlap; otherwise, undefined behavior is expected
  • ldaInv: Leading dimension of two-dimensional array used to store each matrix Ainv[i]
  • info: Array of size batchSize that info[i] contains the information of inversion of A[i]. If info[i] == 0, the execution is successful. If info[i] == k, then U(k, k) == 0. The U is exactly singular and the inversion failed
  • batchSize: Number of pointers contained in A

Errors:

Wraps cublasCmatinvBatched.

func (Handle) CopyEx

func (h Handle) CopyEx(n int32, x driver.DevicePtr, xType DataType, incx int32, y driver.DevicePtr, yType DataType, incy int32) error

CopyEx wraps cublasCopyEx.

Handle.CopyEx64 takes 64-bit sizes.

func (Handle) CopyEx64

func (h Handle) CopyEx64(n int64, x driver.DevicePtr, xType DataType, incx int64, y driver.DevicePtr, yType DataType, incy int64) error

CopyEx64 wraps cublasCopyEx_64.

It is Handle.CopyEx with int64 sizes and strides.

func (Handle) Crot

func (h Handle) Crot(n int32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, c *float32, s *Complex64) error

Crot applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):

G=(cs−sc) to vectors x and y. Hence, the result is x[k]=c×x[k]+s×y[j] and y[j]=−s×x[k]+c×y[j] where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: srot(), drot(), crot(), csrot(), zrot(), zdrot()

Handle.Crot64 takes 64-bit sizes.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • c: Cosine element of the rotation matrix
  • s: Sine element of the rotation matrix

Errors:

Wraps cublasCrot_v2.

func (Handle) Crot64

func (h Handle) Crot64(n int64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, c *float32, s *Complex64) error

Crot64 applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):

G=(cs−sc) to vectors x and y. Hence, the result is x[k]=c×x[k]+s×y[j] and y[j]=−s×x[k]+c×y[j] where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: srot(), drot(), crot(), csrot(), zrot(), zdrot()

It is Handle.Crot with int64 sizes and strides.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • c: Cosine element of the rotation matrix
  • s: Sine element of the rotation matrix

Errors:

Wraps cublasCrot_v2_64.

func (Handle) Crotg

func (h Handle) Crotg(a *Complex64, b *Complex64, c *float32, s *Complex64) error

Crotg constructs the Givens rotation matrix.

G=(cs−sc), that zeros out the second entry of a 2×1 vector (a,b)ᵀ . Then, for real numbers we can write (cs−sc)(ab)=(r0) where c²+s²=1 and r=±a²+b² . The parameters a and b are overwritten with r and z , respectively. The value of z is such that c and s may be recovered using the following rules: (c,s)={(1−z²,z) if |z|<1(0.0,1.0) if |z|=1(1/z,1−z²) if |z|>1 For complex numbers we can write (cs−s¯c)(ab)=(r0) where c²+(s¯×s)=1 and r=a|a|×∥(a,b)ᵀ∥₂ with ∥(a,b)ᵀ∥₂=|a|²+|B|² for a≠0 and r=b for a=0 . Finally, the parameter a is overwritten with r on exit. For references please refer to NETLIB documentation: srotg(), drotg(), crotg(), zrotg()

  • a: < type > scalar that is overwritten with r
  • b: < type > scalar that is overwritten with z
  • c: Cosine element of the rotation matrix
  • s: Sine element of the rotation matrix

Errors:

Wraps cublasCrotg_v2.

func (Handle) Cscal

func (h Handle) Cscal(n int32, alpha *Complex64, x driver.DevicePtr, incx int32) error

Cscal scales the vector x by the scalar α and overwrites it with the result.

Hence, the performed operation is x[j]=α×x[j] for i=1,…,n and j=1+(i−1)*incx . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sscal(), dscal(), csscal(), cscal(), zdscal(), zscal()

Handle.Cscal64 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasCscal_v2.

func (Handle) Cscal64

func (h Handle) Cscal64(n int64, alpha *Complex64, x driver.DevicePtr, incx int64) error

Cscal64 scales the vector x by the scalar α and overwrites it with the result.

Hence, the performed operation is x[j]=α×x[j] for i=1,…,n and j=1+(i−1)*incx . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sscal(), dscal(), csscal(), cscal(), zdscal(), zscal()

It is Handle.Cscal with int64 sizes and strides.

  • n: Number of elements in the vector x
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasCscal_v2_64.

func (Handle) Csrot

func (h Handle) Csrot(n int32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, c *float32, s *float32) error

Csrot applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):

G=(cs−sc) to vectors x and y. Hence, the result is x[k]=c×x[k]+s×y[j] and y[j]=−s×x[k]+c×y[j] where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: srot(), drot(), crot(), csrot(), zrot(), zdrot()

Handle.Csrot64 takes 64-bit sizes.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • c: Cosine element of the rotation matrix
  • s: Sine element of the rotation matrix

Errors:

Wraps cublasCsrot_v2.

func (Handle) Csrot64

func (h Handle) Csrot64(n int64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, c *float32, s *float32) error

Csrot64 applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):

G=(cs−sc) to vectors x and y. Hence, the result is x[k]=c×x[k]+s×y[j] and y[j]=−s×x[k]+c×y[j] where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: srot(), drot(), crot(), csrot(), zrot(), zdrot()

It is Handle.Csrot with int64 sizes and strides.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • c: Cosine element of the rotation matrix
  • s: Sine element of the rotation matrix

Errors:

Wraps cublasCsrot_v2_64.

func (Handle) Csscal

func (h Handle) Csscal(n int32, alpha *float32, x driver.DevicePtr, incx int32) error

Csscal scales the vector x by the scalar α and overwrites it with the result.

Hence, the performed operation is x[j]=α×x[j] for i=1,…,n and j=1+(i−1)*incx . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sscal(), dscal(), csscal(), cscal(), zdscal(), zscal()

Handle.Csscal64 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasCsscal_v2.

func (Handle) Csscal64

func (h Handle) Csscal64(n int64, alpha *float32, x driver.DevicePtr, incx int64) error

Csscal64 scales the vector x by the scalar α and overwrites it with the result.

Hence, the performed operation is x[j]=α×x[j] for i=1,…,n and j=1+(i−1)*incx . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sscal(), dscal(), csscal(), cscal(), zdscal(), zscal()

It is Handle.Csscal with int64 sizes and strides.

  • n: Number of elements in the vector x
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasCsscal_v2_64.

func (Handle) Cswap

func (h Handle) Cswap(n int32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32) error

Cswap interchanges the elements of vector x and y.

Hence, the performed operation is y[j]⇔x[k] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sswap(), dswap(), cswap(), zswap()

Handle.Cswap64 takes 64-bit sizes.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasCswap_v2.

func (Handle) Cswap64

func (h Handle) Cswap64(n int64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64) error

Cswap64 interchanges the elements of vector x and y.

Hence, the performed operation is y[j]⇔x[k] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sswap(), dswap(), cswap(), zswap()

It is Handle.Cswap with int64 sizes and strides.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasCswap_v2_64.

func (Handle) Csymm

func (h Handle) Csymm(side SideMode, uplo FillMode, m int32, n int32, alpha *Complex64, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *Complex64, c driver.DevicePtr, ldc int32) error

Csymm performs the symmetric matrix-matrix multiplication.

C={αAB+βCif side == [SideLeft]αBA+βCif side == SideRight where A is a symmetric matrix stored in lower or upper mode, B and C are m×n matrices, and α and β are scalars. For references please refer to NETLIB documentation: ssymm(), dsymm(), csymm(), zsymm()

Handle.Csymm64 takes 64-bit sizes.

  • side: Indicates if matrix A is on the left or right of B
  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • m: Number of rows of matrix C and B, with matrix A sized accordingly
  • n: Number of columns of matrix C and B, with matrix A sized accordingly
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasCsymm_v2.

func (Handle) Csymm64

func (h Handle) Csymm64(side SideMode, uplo FillMode, m int64, n int64, alpha *Complex64, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *Complex64, c driver.DevicePtr, ldc int64) error

Csymm64 performs the symmetric matrix-matrix multiplication.

C={αAB+βCif side == [SideLeft]αBA+βCif side == SideRight where A is a symmetric matrix stored in lower or upper mode, B and C are m×n matrices, and α and β are scalars. For references please refer to NETLIB documentation: ssymm(), dsymm(), csymm(), zsymm()

It is Handle.Csymm with int64 sizes and strides.

  • side: Indicates if matrix A is on the left or right of B
  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • m: Number of rows of matrix C and B, with matrix A sized accordingly
  • n: Number of columns of matrix C and B, with matrix A sized accordingly
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasCsymm_v2_64.

func (Handle) Csymv

func (h Handle) Csymv(uplo FillMode, n int32, alpha *Complex64, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32, beta *Complex64, y driver.DevicePtr, incy int32) error

Csymv performs the symmetric matrix-vector multiplication.

y=αAx+βy where A is a n×n symmetric matrix stored in lower or upper mode, x and y are vectors, and α and β are scalars. This function has an alternate faster implementation using atomics that can be enabled with Handle.SetAtomicsMode. Please see the section on the function Handle.SetAtomicsMode for more details about the usage of atomics. For references please refer to NETLIB documentation: ssymv(), dsymv()

Handle.Csymv64 takes 64-bit sizes.

  • uplo: Indicates if matrix lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasCsymv_v2.

func (Handle) Csymv64

func (h Handle) Csymv64(uplo FillMode, n int64, alpha *Complex64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64, beta *Complex64, y driver.DevicePtr, incy int64) error

Csymv64 performs the symmetric matrix-vector multiplication.

y=αAx+βy where A is a n×n symmetric matrix stored in lower or upper mode, x and y are vectors, and α and β are scalars. This function has an alternate faster implementation using atomics that can be enabled with Handle.SetAtomicsMode. Please see the section on the function Handle.SetAtomicsMode for more details about the usage of atomics. For references please refer to NETLIB documentation: ssymv(), dsymv()

It is Handle.Csymv with int64 sizes and strides.

  • uplo: Indicates if matrix lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasCsymv_v2_64.

func (Handle) Csyr

func (h Handle) Csyr(uplo FillMode, n int32, alpha *Complex64, x driver.DevicePtr, incx int32, a driver.DevicePtr, lda int32) error

Csyr performs the symmetric rank-1 update.

A=αxxᵀ+A, where A is a n×n symmetric matrix stored in column-major format, x is a vector, and α is a scalar. For references please refer to NETLIB documentation: ssyr(), dsyr()

Handle.Csyr64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • a: < type > array of dimensions lda x n, with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasCsyr_v2.

func (Handle) Csyr2

func (h Handle) Csyr2(uplo FillMode, n int32, alpha *Complex64, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, a driver.DevicePtr, lda int32) error

Csyr2 performs the symmetric rank-2 update.

A=α(xyᵀ+yxᵀ)+A, where A is a n×n symmetric matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: ssyr2(), dsyr2()

Handle.Csyr264 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimensions lda x n, with lda >= max(1,n)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasCsyr2_v2.

func (Handle) Csyr2k

func (h Handle) Csyr2k(uplo FillMode, trans Operation, n int32, k int32, alpha *Complex64, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *Complex64, c driver.DevicePtr, ldc int32) error

Csyr2k performs the symmetric rank- 2k update.

C=α(op(A)op(B)ᵀ+op(B)op(A)ᵀ)+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrix A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᵀ and Bᵀif trans == OpT For references please refer to NETLIB documentation: ssyr2k(), dsyr2k(), csyr2k(), zsyr2k()

Handle.Csyr2k64 takes 64-bit sizes.

  • uplo: Indicates if matrix C lower or upper part, is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimensions ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, then C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If n < 0 or k < 0, or if trans is not one of OpN, OpT and OpC, or if uplo is not one of FillModeLower and FillModeUpper, or if lda < max(1, n) when trans == OpN, and lda < max(1, k) otherwise, or if ldb < max(1, n) when trans == OpN, and ldb < max(1, k) otherwise, or if ldc < max(1, n), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasCsyr2k_v2.

func (Handle) Csyr2k64

func (h Handle) Csyr2k64(uplo FillMode, trans Operation, n int64, k int64, alpha *Complex64, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *Complex64, c driver.DevicePtr, ldc int64) error

Csyr2k64 performs the symmetric rank- 2k update.

C=α(op(A)op(B)ᵀ+op(B)op(A)ᵀ)+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrix A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᵀ and Bᵀif trans == OpT For references please refer to NETLIB documentation: ssyr2k(), dsyr2k(), csyr2k(), zsyr2k()

It is Handle.Csyr2k with int64 sizes and strides.

  • uplo: Indicates if matrix C lower or upper part, is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimensions ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, then C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If n < 0 or k < 0, or if trans is not one of OpN, OpT and OpC, or if uplo is not one of FillModeLower and FillModeUpper, or if lda < max(1, n) when trans == OpN, and lda < max(1, k) otherwise, or if ldb < max(1, n) when trans == OpN, and ldb < max(1, k) otherwise, or if ldc < max(1, n), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasCsyr2k_v2_64.

func (Handle) Csyr64

func (h Handle) Csyr64(uplo FillMode, n int64, alpha *Complex64, x driver.DevicePtr, incx int64, a driver.DevicePtr, lda int64) error

Csyr64 performs the symmetric rank-1 update.

A=αxxᵀ+A, where A is a n×n symmetric matrix stored in column-major format, x is a vector, and α is a scalar. For references please refer to NETLIB documentation: ssyr(), dsyr()

It is Handle.Csyr with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • a: < type > array of dimensions lda x n, with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasCsyr_v2_64.

func (Handle) Csyr264

func (h Handle) Csyr264(uplo FillMode, n int64, alpha *Complex64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, a driver.DevicePtr, lda int64) error

Csyr264 performs the symmetric rank-2 update.

A=α(xyᵀ+yxᵀ)+A, where A is a n×n symmetric matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: ssyr2(), dsyr2()

It is Handle.Csyr2 with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimensions lda x n, with lda >= max(1,n)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasCsyr2_v2_64.

func (Handle) Csyrk

func (h Handle) Csyrk(uplo FillMode, trans Operation, n int32, k int32, alpha *Complex64, a driver.DevicePtr, lda int32, beta *Complex64, c driver.DevicePtr, ldc int32) error

Csyrk performs the symmetric rank- k update.

C=αop(A)op(A)ᵀ+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A is a matrix with dimensions op(A)n×k . Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == OpT For references please refer to NETLIB documentation: ssyrk(), dsyrk(), csyrk(), zsyrk()

Handle.Csyrk64 takes 64-bit sizes.

  • uplo: Indicates if matrix C lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A) and C
  • k: Number of columns of matrix op( A)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if trans == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasCsyrk_v2.

func (Handle) Csyrk3mEx

func (h Handle) Csyrk3mEx(uplo FillMode, trans Operation, n int32, k int32, alpha *Complex64, a driver.DevicePtr, atype DataType, lda int32, beta *Complex64, c driver.DevicePtr, ctype DataType, ldc int32) error

Csyrk3mEx is an extension of Handle.Csyrk where the input matrix and output matrix can have a lower precision but the computation is still done in the type cuComplex.

This routine is implemented using the Gauss complexity reduction algorithm which can lead to an increase in performance up to 25%. This function performs the symmetric rank- k update C=αop(A)op(A)ᵀ+βC where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A is a matrix with dimensions op(A)n×k . Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == OpT

Note: This routine is only supported on GPUs with architecture capabilities equal to or greater than 5.0 The matrix types combinations supported for Handle.Csyrk3mEx are listed below :

  • A: CUDA_C_8I; C: CUDA_C_32F
  • A: CUDA_C_32F; C: CUDA_C_32F

For references please refer to NETLIB documentation: ssyrk(), dsyrk(), csyrk(), zsyrk()

Handle.Csyrk3mEx64 takes 64-bit sizes.

  • uplo: Indicates if matrix C lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A) and C
  • k: Number of columns of matrix op( A)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if trans == OpN and lda x n with lda >= max(1, k) otherwise
  • atype: Enumerant specifying the datatype of matrix A
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n)
  • ctype: Enumerant specifying the datatype of matrix C
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasCsyrk3mEx.

func (Handle) Csyrk3mEx64

func (h Handle) Csyrk3mEx64(uplo FillMode, trans Operation, n int64, k int64, alpha *Complex64, a driver.DevicePtr, atype DataType, lda int64, beta *Complex64, c driver.DevicePtr, ctype DataType, ldc int64) error

Csyrk3mEx64 is an extension of Handle.Csyrk where the input matrix and output matrix can have a lower precision but the computation is still done in the type cuComplex.

This routine is implemented using the Gauss complexity reduction algorithm which can lead to an increase in performance up to 25%. This function performs the symmetric rank- k update C=αop(A)op(A)ᵀ+βC where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A is a matrix with dimensions op(A)n×k . Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == OpT

Note: This routine is only supported on GPUs with architecture capabilities equal to or greater than 5.0 The matrix types combinations supported for Handle.Csyrk3mEx are listed below :

  • A: CUDA_C_8I; C: CUDA_C_32F
  • A: CUDA_C_32F; C: CUDA_C_32F

For references please refer to NETLIB documentation: ssyrk(), dsyrk(), csyrk(), zsyrk()

It is Handle.Csyrk3mEx with int64 sizes and strides.

  • uplo: Indicates if matrix C lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A) and C
  • k: Number of columns of matrix op( A)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if trans == OpN and lda x n with lda >= max(1, k) otherwise
  • atype: Enumerant specifying the datatype of matrix A
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n)
  • ctype: Enumerant specifying the datatype of matrix C
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasCsyrk3mEx_64.

func (Handle) Csyrk64

func (h Handle) Csyrk64(uplo FillMode, trans Operation, n int64, k int64, alpha *Complex64, a driver.DevicePtr, lda int64, beta *Complex64, c driver.DevicePtr, ldc int64) error

Csyrk64 performs the symmetric rank- k update.

C=αop(A)op(A)ᵀ+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A is a matrix with dimensions op(A)n×k . Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == OpT For references please refer to NETLIB documentation: ssyrk(), dsyrk(), csyrk(), zsyrk()

It is Handle.Csyrk with int64 sizes and strides.

  • uplo: Indicates if matrix C lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A) and C
  • k: Number of columns of matrix op( A)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if trans == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasCsyrk_v2_64.

func (Handle) CsyrkEx

func (h Handle) CsyrkEx(uplo FillMode, trans Operation, n int32, k int32, alpha *Complex64, a driver.DevicePtr, atype DataType, lda int32, beta *Complex64, c driver.DevicePtr, ctype DataType, ldc int32) error

CsyrkEx is an extension of Handle.Csyrk where the input matrix and output matrix can have a lower precision but the computation is still done in the type cuComplex.

This function performs the symmetric rank- k update C=αop(A)op(A)ᵀ+βC where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A is a matrix with dimensions op(A)n×k . Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == OpT

Note: This routine is only supported on GPUs with architecture capabilities equal to or greater than 5.0 The matrix types combinations supported for Handle.CsyrkEx are listed below:

  • A: CUDA_C_8I; C: CUDA_C_32F
  • A: CUDA_C_32F; C: CUDA_C_32F

For references please refer to NETLIB documentation: ssyrk(), dsyrk(), csyrk(), zsyrk()

Handle.CsyrkEx64 takes 64-bit sizes.

  • uplo: Indicates if matrix C lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A) and C
  • k: Number of columns of matrix op( A)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if trans == OpN and lda x n with lda >= max(1, k) otherwise
  • atype: Enumerant specifying the datatype of matrix A
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n)
  • ctype: Enumerant specifying the datatype of matrix C
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasCsyrkEx.

func (Handle) CsyrkEx64

func (h Handle) CsyrkEx64(uplo FillMode, trans Operation, n int64, k int64, alpha *Complex64, a driver.DevicePtr, atype DataType, lda int64, beta *Complex64, c driver.DevicePtr, ctype DataType, ldc int64) error

CsyrkEx64 is an extension of Handle.Csyrk where the input matrix and output matrix can have a lower precision but the computation is still done in the type cuComplex.

This function performs the symmetric rank- k update C=αop(A)op(A)ᵀ+βC where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A is a matrix with dimensions op(A)n×k . Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == OpT

Note: This routine is only supported on GPUs with architecture capabilities equal to or greater than 5.0 The matrix types combinations supported for Handle.CsyrkEx are listed below:

  • A: CUDA_C_8I; C: CUDA_C_32F
  • A: CUDA_C_32F; C: CUDA_C_32F

For references please refer to NETLIB documentation: ssyrk(), dsyrk(), csyrk(), zsyrk()

It is Handle.CsyrkEx with int64 sizes and strides.

  • uplo: Indicates if matrix C lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A) and C
  • k: Number of columns of matrix op( A)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if trans == OpN and lda x n with lda >= max(1, k) otherwise
  • atype: Enumerant specifying the datatype of matrix A
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n)
  • ctype: Enumerant specifying the datatype of matrix C
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasCsyrkEx_64.

func (Handle) Csyrkx

func (h Handle) Csyrkx(uplo FillMode, trans Operation, n int32, k int32, alpha *Complex64, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *Complex64, c driver.DevicePtr, ldc int32) error

Csyrkx performs a variation of the symmetric rank- k update.

C=αop(A)op(B)ᵀ+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrices A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᵀ and Bᵀif trans == OpT This routine can be used when B is in such way that the result is guaranteed to be symmetric. A usual example is when the matrix B is a scaled form of the matrix A: this is equivalent to B being the product of the matrix A and a diagonal matrix. For an efficient computation of the product of a regular matrix with a diagonal matrix, refer to the routine cublasdgmm(). For references please refer to NETLIB documentation: ssyrk(), dsyrk(), csyrk(), zsyrk() and ssyr2k(), dsyr2k(), csyr2k(), zsyr2k()

Handle.Csyrkx64 takes 64-bit sizes.

  • uplo: Indicates if matrix C lower or upper part, is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimensions ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, then C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If n < 0 or k < 0, or if trans is not one of OpN, OpT and OpC, or if uplo is not one of FillModeLower and FillModeUpper, or if lda < max(1, n) when trans == OpN, and lda < max(1, k) otherwise, or if ldb < max(1, n) when trans == OpN, and ldb < max(1, k) otherwise, or if ldc < max(1, n), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasCsyrkx.

func (Handle) Csyrkx64

func (h Handle) Csyrkx64(uplo FillMode, trans Operation, n int64, k int64, alpha *Complex64, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *Complex64, c driver.DevicePtr, ldc int64) error

Csyrkx64 performs a variation of the symmetric rank- k update.

C=αop(A)op(B)ᵀ+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrices A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᵀ and Bᵀif trans == OpT This routine can be used when B is in such way that the result is guaranteed to be symmetric. A usual example is when the matrix B is a scaled form of the matrix A: this is equivalent to B being the product of the matrix A and a diagonal matrix. For an efficient computation of the product of a regular matrix with a diagonal matrix, refer to the routine cublasdgmm(). For references please refer to NETLIB documentation: ssyrk(), dsyrk(), csyrk(), zsyrk() and ssyr2k(), dsyr2k(), csyr2k(), zsyr2k()

It is Handle.Csyrkx with int64 sizes and strides.

  • uplo: Indicates if matrix C lower or upper part, is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimensions ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, then C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If n < 0 or k < 0, or if trans is not one of OpN, OpT and OpC, or if uplo is not one of FillModeLower and FillModeUpper, or if lda < max(1, n) when trans == OpN, and lda < max(1, k) otherwise, or if ldb < max(1, n) when trans == OpN, and ldb < max(1, k) otherwise, or if ldc < max(1, n), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasCsyrkx_64.

func (Handle) Ctbmv

func (h Handle) Ctbmv(uplo FillMode, trans Operation, diag DiagType, n int32, k int32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32) error

Ctbmv performs the triangular banded matrix-vector multiplication.

x=op(A)x, where A is a triangular banded matrix, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC If uplo == FillModeLower then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k,j)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: stbmv(), dtbmv(), ctbmv(), ztbmv()

Handle.Ctbmv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix
  • a: < type > array of dimension lda x n, with lda >= k + 1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasCtbmv_v2.

func (Handle) Ctbmv64

func (h Handle) Ctbmv64(uplo FillMode, trans Operation, diag DiagType, n int64, k int64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64) error

Ctbmv64 performs the triangular banded matrix-vector multiplication.

x=op(A)x, where A is a triangular banded matrix, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC If uplo == FillModeLower then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k,j)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: stbmv(), dtbmv(), ctbmv(), ztbmv()

It is Handle.Ctbmv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix
  • a: < type > array of dimension lda x n, with lda >= k + 1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasCtbmv_v2_64.

func (Handle) Ctbsv

func (h Handle) Ctbsv(uplo FillMode, trans Operation, diag DiagType, n int32, k int32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32) error

Ctbsv solves the triangular banded linear system with a single right-hand-side.

op(A)x=b, where A is a triangular banded matrix, and x and b are vectors. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. If uplo == FillModeLower then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k,j)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: stbsv(), dtbsv(), ctbsv(), ztbsv()

Handle.Ctbsv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix A
  • a: < type > array of dimension lda x n, with lda >= k+1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasCtbsv_v2.

func (Handle) Ctbsv64

func (h Handle) Ctbsv64(uplo FillMode, trans Operation, diag DiagType, n int64, k int64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64) error

Ctbsv64 solves the triangular banded linear system with a single right-hand-side.

op(A)x=b, where A is a triangular banded matrix, and x and b are vectors. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. If uplo == FillModeLower then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k,j)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: stbsv(), dtbsv(), ctbsv(), ztbsv()

It is Handle.Ctbsv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix A
  • a: < type > array of dimension lda x n, with lda >= k+1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasCtbsv_v2_64.

func (Handle) Ctpmv

func (h Handle) Ctpmv(uplo FillMode, trans Operation, diag DiagType, n int32, ap driver.DevicePtr, x driver.DevicePtr, incx int32) error

Ctpmv performs the triangular packed matrix-vector multiplication.

x=op(A)x, where A is a triangular matrix stored in packed format, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC If uplo == FillModeLower then the elements in the lower triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for A(i,j) and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: stpmv(), dtpmv(), ctpmv(), ztpmv()

Handle.Ctpmv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • ap: < type > array with A stored in packed format
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasCtpmv_v2.

func (Handle) Ctpmv64

func (h Handle) Ctpmv64(uplo FillMode, trans Operation, diag DiagType, n int64, ap driver.DevicePtr, x driver.DevicePtr, incx int64) error

Ctpmv64 performs the triangular packed matrix-vector multiplication.

x=op(A)x, where A is a triangular matrix stored in packed format, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC If uplo == FillModeLower then the elements in the lower triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for A(i,j) and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: stpmv(), dtpmv(), ctpmv(), ztpmv()

It is Handle.Ctpmv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • ap: < type > array with A stored in packed format
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasCtpmv_v2_64.

func (Handle) Ctpsv

func (h Handle) Ctpsv(uplo FillMode, trans Operation, diag DiagType, n int32, ap driver.DevicePtr, x driver.DevicePtr, incx int32) error

Ctpsv solves the packed triangular linear system with a single right-hand-side.

op(A)x=b, where A is a triangular matrix stored in packed format, and x and b are vectors. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. If uplo == FillModeLower then the elements in the lower triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: stpsv(), dtpsv(), ctpsv(), ztpsv()

Handle.Ctpsv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • ap: < type > array with A stored in packed format
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasCtpsv_v2.

func (Handle) Ctpsv64

func (h Handle) Ctpsv64(uplo FillMode, trans Operation, diag DiagType, n int64, ap driver.DevicePtr, x driver.DevicePtr, incx int64) error

Ctpsv64 solves the packed triangular linear system with a single right-hand-side.

op(A)x=b, where A is a triangular matrix stored in packed format, and x and b are vectors. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. If uplo == FillModeLower then the elements in the lower triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: stpsv(), dtpsv(), ctpsv(), ztpsv()

It is Handle.Ctpsv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • ap: < type > array with A stored in packed format
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasCtpsv_v2_64.

func (Handle) Ctpttr

func (h Handle) Ctpttr(uplo FillMode, n int32, ap driver.DevicePtr, a driver.DevicePtr, lda int32) error

Ctpttr performs the conversion from the triangular packed format to the triangular format.

If uplo == FillModeLower then the elements of AP are copied into the lower triangular part of the triangular matrix A and the upper part of A is left untouched. If uplo == FillModeUpper then the elements of AP are copied into the upper triangular part of the triangular matrix A and the lower part of A is left untouched. For references please refer to NETLIB documentation: stpttr(), dtpttr(), ctpttr(), ztpttr()

  • uplo: Indicates if matrix AP contains lower or upper part of matrix A
  • n: Number of rows and columns of matrix A
  • ap: < type > array with A stored in packed format
  • a: < type > array of dimensions lda x n , with lda >= max(1, n). The opposite side of A is left untouched
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasCtpttr.

func (Handle) Ctrmm

func (h Handle) Ctrmm(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int32, n int32, alpha *Complex64, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, c driver.DevicePtr, ldc int32) error

Ctrmm performs the triangular matrix-matrix multiplication.

C={αop(A)Bif side == [SideLeft]αBop(A)if side == SideRight where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, B and C are m×n matrix, and α is a scalar. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC Notice that in order to achieve better parallelism cuBLAS differs from the BLAS API only for this routine. The BLAS API assumes an in-place implementation (with results written back to B), while the cuBLAS API assumes an out-of-place implementation (with results written into C). The application can obtain the in-place functionality of BLAS in the cuBLAS API by passing the address of the matrix B in place of the matrix C. No other overlapping in the input parameters is supported. For references please refer to NETLIB documentation: strmm(), dtrmm(), ctrmm(), ztrmm()

Handle.Ctrmm64 takes 64-bit sizes.

  • side: Indicates if matrix A is on the left or right of B
  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • m: Number of rows of matrix B, with matrix A sized accordingly
  • n: Number of columns of matrix B, with matrix A sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A is not referenced and B does not have to be a valid input
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • c: < type > array of dimension ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasCtrmm_v2.

func (Handle) Ctrmm64

func (h Handle) Ctrmm64(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int64, n int64, alpha *Complex64, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, c driver.DevicePtr, ldc int64) error

Ctrmm64 performs the triangular matrix-matrix multiplication.

C={αop(A)Bif side == [SideLeft]αBop(A)if side == SideRight where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, B and C are m×n matrix, and α is a scalar. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC Notice that in order to achieve better parallelism cuBLAS differs from the BLAS API only for this routine. The BLAS API assumes an in-place implementation (with results written back to B), while the cuBLAS API assumes an out-of-place implementation (with results written into C). The application can obtain the in-place functionality of BLAS in the cuBLAS API by passing the address of the matrix B in place of the matrix C. No other overlapping in the input parameters is supported. For references please refer to NETLIB documentation: strmm(), dtrmm(), ctrmm(), ztrmm()

It is Handle.Ctrmm with int64 sizes and strides.

  • side: Indicates if matrix A is on the left or right of B
  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • m: Number of rows of matrix B, with matrix A sized accordingly
  • n: Number of columns of matrix B, with matrix A sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A is not referenced and B does not have to be a valid input
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • c: < type > array of dimension ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasCtrmm_v2_64.

func (Handle) Ctrmv

func (h Handle) Ctrmv(uplo FillMode, trans Operation, diag DiagType, n int32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32) error

Ctrmv performs the triangular matrix-vector multiplication.

x=op(A)x, where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC For references please refer to NETLIB documentation: strmv(), dtrmv(), ctrmv(), ztrmv()

Handle.Ctrmv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • a: < type > array of dimensions lda x n , with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasCtrmv_v2.

func (Handle) Ctrmv64

func (h Handle) Ctrmv64(uplo FillMode, trans Operation, diag DiagType, n int64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64) error

Ctrmv64 performs the triangular matrix-vector multiplication.

x=op(A)x, where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC For references please refer to NETLIB documentation: strmv(), dtrmv(), ctrmv(), ztrmv()

It is Handle.Ctrmv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • a: < type > array of dimensions lda x n , with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasCtrmv_v2_64.

func (Handle) Ctrsm

func (h Handle) Ctrsm(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int32, n int32, alpha *Complex64, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32) error

Ctrsm solves the triangular linear system with multiple right-hand-sides.

{op(A)X=αBif side == CUBLAS_SIDE_LEFTXop(A)=αBif side == SideRight where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, X and B are m×n matrices, and α is a scalar. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC The solution X overwrites the right-hand-sides B on exit. No test for singularity or near-singularity is included in this function. For references please refer to NETLIB documentation: strsm(), dtrsm(), ctrsm(), ztrsm()

Handle.Ctrsm64 takes 64-bit sizes.

  • side: Indicates if matrix A is on the left or right of X
  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • m: Number of rows of matrix B, with matrix A sized accordingly
  • n: Number of columns of matrix B, with matrix A is sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A is not referenced and B does not have to be a valid input
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array. It has dimensions ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B

Errors:

Wraps cublasCtrsm_v2.

func (Handle) Ctrsm64

func (h Handle) Ctrsm64(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int64, n int64, alpha *Complex64, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64) error

Ctrsm64 solves the triangular linear system with multiple right-hand-sides.

{op(A)X=αBif side == CUBLAS_SIDE_LEFTXop(A)=αBif side == SideRight where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, X and B are m×n matrices, and α is a scalar. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC The solution X overwrites the right-hand-sides B on exit. No test for singularity or near-singularity is included in this function. For references please refer to NETLIB documentation: strsm(), dtrsm(), ctrsm(), ztrsm()

It is Handle.Ctrsm with int64 sizes and strides.

  • side: Indicates if matrix A is on the left or right of X
  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • m: Number of rows of matrix B, with matrix A sized accordingly
  • n: Number of columns of matrix B, with matrix A is sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A is not referenced and B does not have to be a valid input
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array. It has dimensions ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B

Errors:

Wraps cublasCtrsm_v2_64.

func (Handle) CtrsmBatched

func (h Handle) CtrsmBatched(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int32, n int32, alpha *Complex64, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, batchCount int32) error

CtrsmBatched solves an array of triangular linear systems with multiple right-hand-sides.

{op(A[i])X[i]=αB[i]if side == CUBLAS_SIDE_LEFTX[i]op(A[i])=αB[i]if side == SideRight where A[i] is a triangular matrix stored in lower or upper mode with or without the main diagonal, X[i] and B[i] are m×n matrices, and α is a scalar. Also, for matrix A op(A[i])={A[i]if transa == CUBLAS_OP_NAᵀ[i]if transa == CUBLAS_OP_TAᴴ[i]if transa == OpC The solution X[i] overwrites the right-hand-sides B[i] on exit. No test for singularity or near-singularity is included in this function. This function works for any sizes but is intended to be used for matrices of small sizes where the launch overhead is a significant factor. For bigger sizes, it might be advantageous to call batchCount times the regular cublastrsm() within a set of CUDA streams. The current implementation is limited to devices with compute capability above or equal 2.0. For references please refer to NETLIB documentation: strsm(), dtrsm(), ctrsm(), ztrsm()

Handle.CtrsmBatched64 takes 64-bit sizes.

  • side: Indicates if matrix A[i] is on the left or right of X[i]
  • uplo: Indicates if matrix A[i] lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A[i] are unity and should not be accessed
  • m: Number of rows of matrix B[i], with matrix A[i] sized accordingly
  • n: Number of columns of matrix B[i], with matrix A[i] is sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A[i] is not referenced and B[i] does not have to be a valid input
  • a: Array of pointers to < type > array, with each array of dim. lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A[i]
  • b: Array of pointers to < type > array, with each array of dim. ldb x n with ldb >= max(1, m). Matrices B[i] should not overlap; otherwise, undefined behavior is expected
  • ldb: Leading dimension of two-dimensional array used to store matrix B[i]
  • batchCount: Number of pointers contained in A and B

Errors:

Wraps cublasCtrsmBatched.

func (Handle) CtrsmBatched64

func (h Handle) CtrsmBatched64(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int64, n int64, alpha *Complex64, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, batchCount int64) error

CtrsmBatched64 solves an array of triangular linear systems with multiple right-hand-sides.

{op(A[i])X[i]=αB[i]if side == CUBLAS_SIDE_LEFTX[i]op(A[i])=αB[i]if side == SideRight where A[i] is a triangular matrix stored in lower or upper mode with or without the main diagonal, X[i] and B[i] are m×n matrices, and α is a scalar. Also, for matrix A op(A[i])={A[i]if transa == CUBLAS_OP_NAᵀ[i]if transa == CUBLAS_OP_TAᴴ[i]if transa == OpC The solution X[i] overwrites the right-hand-sides B[i] on exit. No test for singularity or near-singularity is included in this function. This function works for any sizes but is intended to be used for matrices of small sizes where the launch overhead is a significant factor. For bigger sizes, it might be advantageous to call batchCount times the regular cublastrsm() within a set of CUDA streams. The current implementation is limited to devices with compute capability above or equal 2.0. For references please refer to NETLIB documentation: strsm(), dtrsm(), ctrsm(), ztrsm()

It is Handle.CtrsmBatched with int64 sizes and strides.

  • side: Indicates if matrix A[i] is on the left or right of X[i]
  • uplo: Indicates if matrix A[i] lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A[i] are unity and should not be accessed
  • m: Number of rows of matrix B[i], with matrix A[i] sized accordingly
  • n: Number of columns of matrix B[i], with matrix A[i] is sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A[i] is not referenced and B[i] does not have to be a valid input
  • a: Array of pointers to < type > array, with each array of dim. lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A[i]
  • b: Array of pointers to < type > array, with each array of dim. ldb x n with ldb >= max(1, m). Matrices B[i] should not overlap; otherwise, undefined behavior is expected
  • ldb: Leading dimension of two-dimensional array used to store matrix B[i]
  • batchCount: Number of pointers contained in A and B

Errors:

Wraps cublasCtrsmBatched_64.

func (Handle) Ctrsv

func (h Handle) Ctrsv(uplo FillMode, trans Operation, diag DiagType, n int32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32) error

Ctrsv solves the triangular linear system with a single right-hand-side.

op(A)x=b, where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, and x and b are vectors. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. For references please refer to NETLIB documentation: strsv(), dtrsv(), ctrsv(), ztrsv()

Handle.Ctrsv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • a: < type > array of dimension lda x n, with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasCtrsv_v2.

func (Handle) Ctrsv64

func (h Handle) Ctrsv64(uplo FillMode, trans Operation, diag DiagType, n int64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64) error

Ctrsv64 solves the triangular linear system with a single right-hand-side.

op(A)x=b, where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, and x and b are vectors. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. For references please refer to NETLIB documentation: strsv(), dtrsv(), ctrsv(), ztrsv()

It is Handle.Ctrsv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • a: < type > array of dimension lda x n, with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasCtrsv_v2_64.

func (Handle) Ctrttp

func (h Handle) Ctrttp(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ap driver.DevicePtr) error

Ctrttp performs the conversion from the triangular format to the triangular packed format.

If uplo == FillModeLower then the lower triangular part of the triangular matrix A is copied into the array AP. If uplo == FillModeUpper then then the upper triangular part of the triangular matrix A is copied into the array AP. For references please refer to NETLIB documentation: strttp(), dtrttp(), ctrttp(), ztrttp()

  • uplo: Indicates which matrix A lower or upper part is referenced
  • n: Number of rows and columns of matrix A
  • a: < type > array of dimensions lda x n , with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • ap: < type > array with A stored in packed format

Errors:

Wraps cublasCtrttp.

func (Handle) Dasum

func (h Handle) Dasum(n int32, x driver.DevicePtr, incx int32) (float64, error)

Dasum computes the sum of the absolute values of the elements of vector x.

Hence, the result is ∑_(i=1)^(n)|Im(x[j])|+|Re(x[j])| where j=1+(i−1)*incx . Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sasum(), dasum(), scasum(), dzasum()

Handle.Dasum64 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting sum, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasDasum_v2.

func (Handle) Dasum64

func (h Handle) Dasum64(n int64, x driver.DevicePtr, incx int64) (float64, error)

Dasum64 computes the sum of the absolute values of the elements of vector x.

Hence, the result is ∑_(i=1)^(n)|Im(x[j])|+|Re(x[j])| where j=1+(i−1)*incx . Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sasum(), dasum(), scasum(), dzasum()

It is Handle.Dasum with int64 sizes and strides.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting sum, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasDasum_v2_64.

func (Handle) Daxpy

func (h Handle) Daxpy(n int32, alpha *float64, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32) error

Daxpy multiplies the vector x by the scalar α and adds it to the vector y overwriting the latest vector with the result.

Hence, the performed operation is y[j]=α×x[k]+y[j] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: saxpy(), daxpy(), caxpy(), zaxpy()

Handle.Daxpy64 takes 64-bit sizes.

  • n: Number of elements in the vector x and y
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasDaxpy_v2.

func (Handle) Daxpy64

func (h Handle) Daxpy64(n int64, alpha *float64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64) error

Daxpy64 multiplies the vector x by the scalar α and adds it to the vector y overwriting the latest vector with the result.

Hence, the performed operation is y[j]=α×x[k]+y[j] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: saxpy(), daxpy(), caxpy(), zaxpy()

It is Handle.Daxpy with int64 sizes and strides.

  • n: Number of elements in the vector x and y
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasDaxpy_v2_64.

func (Handle) Dcopy

func (h Handle) Dcopy(n int32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32) error

Dcopy copies the vector x into the vector y.

Hence, the performed operation is y[j]=x[k] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: scopy(), dcopy(), ccopy(), zcopy()

Handle.Dcopy64 takes 64-bit sizes.

  • n: Number of elements in the vector x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasDcopy_v2.

func (Handle) Dcopy64

func (h Handle) Dcopy64(n int64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64) error

Dcopy64 copies the vector x into the vector y.

Hence, the performed operation is y[j]=x[k] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: scopy(), dcopy(), ccopy(), zcopy()

It is Handle.Dcopy with int64 sizes and strides.

  • n: Number of elements in the vector x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasDcopy_v2_64.

func (Handle) Ddgmm

func (h Handle) Ddgmm(mode SideMode, m int32, n int32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32, c driver.DevicePtr, ldc int32) error

Ddgmm performs the matrix-matrix multiplication.

C={A×diag(X)if mode == CUBLAS_SIDE_RIGHTdiag(X)×Aif mode == SideLeft where A and C are matrices stored in column-major format with dimensions m×n . X is a vector of size n if mode == SideRight and of size m if mode == SideLeft. X is gathered from one-dimensional array x with stride incx. The absolute value of incx is the stride and the sign of incx is direction of the stride. If incx is positive, then we forward x from the first element. Otherwise, we backward x from the last element. The formula of X is X[j]={x[j×incx]if incx≥0x[(χ−1)×|incx|−j×|incx|]if incx<0 where χ=m if mode == SideLeft and χ=n if mode == SideRight. Example 1: if the user wants to perform diag(diag(B))×A , then incx=ldb+1 where ldb is leading dimension of matrix B, either row-major or column-major. Example 2: if the user wants to perform α×A , then there are two choices, either cublasgeam() with *beta == 0 and transa == OpN or cublasdgmm() with incx == 0 and x[0] == alpha. The operation is out-of-place. The in-place only works if lda == ldc.

Handle.Ddgmm64 takes 64-bit sizes.

  • mode: Left multiply if mode == SideLeft or right multiply if mode == SideRight
  • m: Number of rows of matrix A and C
  • n: Number of columns of matrix A and C
  • a: < type > array of dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • x: One-dimensional < type > array of size abs(incx) x m if mode == SideLeft and abs(incx) x n if mode == SideRight
  • incx: Stride of one-dimensional array x
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

Wraps cublasDdgmm.

func (Handle) Ddgmm64

func (h Handle) Ddgmm64(mode SideMode, m int64, n int64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64, c driver.DevicePtr, ldc int64) error

Ddgmm64 performs the matrix-matrix multiplication.

C={A×diag(X)if mode == CUBLAS_SIDE_RIGHTdiag(X)×Aif mode == SideLeft where A and C are matrices stored in column-major format with dimensions m×n . X is a vector of size n if mode == SideRight and of size m if mode == SideLeft. X is gathered from one-dimensional array x with stride incx. The absolute value of incx is the stride and the sign of incx is direction of the stride. If incx is positive, then we forward x from the first element. Otherwise, we backward x from the last element. The formula of X is X[j]={x[j×incx]if incx≥0x[(χ−1)×|incx|−j×|incx|]if incx<0 where χ=m if mode == SideLeft and χ=n if mode == SideRight. Example 1: if the user wants to perform diag(diag(B))×A , then incx=ldb+1 where ldb is leading dimension of matrix B, either row-major or column-major. Example 2: if the user wants to perform α×A , then there are two choices, either cublasgeam() with *beta == 0 and transa == OpN or cublasdgmm() with incx == 0 and x[0] == alpha. The operation is out-of-place. The in-place only works if lda == ldc.

It is Handle.Ddgmm with int64 sizes and strides.

  • mode: Left multiply if mode == SideLeft or right multiply if mode == SideRight
  • m: Number of rows of matrix A and C
  • n: Number of columns of matrix A and C
  • a: < type > array of dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • x: One-dimensional < type > array of size abs(incx) x m if mode == SideLeft and abs(incx) x n if mode == SideRight
  • incx: Stride of one-dimensional array x
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

Wraps cublasDdgmm_64.

func (Handle) Ddot

func (h Handle) Ddot(n int32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32) (float64, error)

Ddot computes the dot product of vectors x and y.

Hence, the result is ∑_(i=1)^(n)(x[k]×y[j]) where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that in the first equation the conjugate of the element of vector x should be used if the function name ends in character ‘c’ and that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sdot(), ddot(), cdotu(), cdotc(), zdotu(), zdotc()

Handle.Ddot64 takes 64-bit sizes.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • result: The resulting dot product, which is set to 0 if n <= 0

Errors:

Wraps cublasDdot_v2.

func (Handle) Ddot64

func (h Handle) Ddot64(n int64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64) (float64, error)

Ddot64 computes the dot product of vectors x and y.

Hence, the result is ∑_(i=1)^(n)(x[k]×y[j]) where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that in the first equation the conjugate of the element of vector x should be used if the function name ends in character ‘c’ and that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sdot(), ddot(), cdotu(), cdotc(), zdotu(), zdotc()

It is Handle.Ddot with int64 sizes and strides.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • result: The resulting dot product, which is set to 0 if n <= 0

Errors:

Wraps cublasDdot_v2_64.

func (Handle) Dgbmv

func (h Handle) Dgbmv(trans Operation, m int32, n int32, kl int32, ku int32, alpha *float64, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32, beta *float64, y driver.DevicePtr, incy int32) error

Dgbmv performs the banded matrix-vector multiplication.

y=α op(A)x+βy, where A is a banded matrix with kl subdiagonals and ku superdiagonals, x and y are vectors, and α and β are scalars. Also, for matrix A op(A)={A if trans == CUBLAS_OP_NAᵀ if trans == CUBLAS_OP_TAᴴ if trans == OpC The banded matrix A is stored column by column, with the main diagonal stored in row ku+1 (starting in first position), the first superdiagonal stored in row ku (starting in second position), the first subdiagonal stored in row ku+2 (starting in first position), etc. So that in general, the element A(i,j) is stored in the memory location A(ku+1+i-j,j) for j=1,…,n and i∈[max(1,j−ku),min(m,j+kl)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left ku×ku and bottom right kl×kl triangles) are not referenced. For references please refer to NETLIB documentation: sgbmv(), dgbmv(), cgbmv(), zgbmv()

Handle.Dgbmv64 takes 64-bit sizes.

  • trans: Operation op( A) that is non- or (conj.) transpose
  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • kl: Number of subdiagonals of matrix A
  • ku: Number of superdiagonals of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= kl + ku + 1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements if trans == OpN and m elements otherwise
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with m elements if trans == OpN and n elements otherwise
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasDgbmv_v2.

func (Handle) Dgbmv64

func (h Handle) Dgbmv64(trans Operation, m int64, n int64, kl int64, ku int64, alpha *float64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64, beta *float64, y driver.DevicePtr, incy int64) error

Dgbmv64 performs the banded matrix-vector multiplication.

y=α op(A)x+βy, where A is a banded matrix with kl subdiagonals and ku superdiagonals, x and y are vectors, and α and β are scalars. Also, for matrix A op(A)={A if trans == CUBLAS_OP_NAᵀ if trans == CUBLAS_OP_TAᴴ if trans == OpC The banded matrix A is stored column by column, with the main diagonal stored in row ku+1 (starting in first position), the first superdiagonal stored in row ku (starting in second position), the first subdiagonal stored in row ku+2 (starting in first position), etc. So that in general, the element A(i,j) is stored in the memory location A(ku+1+i-j,j) for j=1,…,n and i∈[max(1,j−ku),min(m,j+kl)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left ku×ku and bottom right kl×kl triangles) are not referenced. For references please refer to NETLIB documentation: sgbmv(), dgbmv(), cgbmv(), zgbmv()

It is Handle.Dgbmv with int64 sizes and strides.

  • trans: Operation op( A) that is non- or (conj.) transpose
  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • kl: Number of subdiagonals of matrix A
  • ku: Number of superdiagonals of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= kl + ku + 1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements if trans == OpN and m elements otherwise
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with m elements if trans == OpN and n elements otherwise
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasDgbmv_v2_64.

func (Handle) Dgeam

func (h Handle) Dgeam(transa Operation, transb Operation, m int32, n int32, alpha *float64, a driver.DevicePtr, lda int32, beta *float64, b driver.DevicePtr, ldb int32, c driver.DevicePtr, ldc int32) error

Dgeam performs the matrix-matrix addition/transposition.

C=αop(A)+βop(B), where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×n , op(B)m×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . The operation is out-of-place if C does not overlap A or B. The in-place mode supports the following two operations, C=α*C+βop(B) C=αop(A)+β*C For in-place mode, if C == A, ldc == lda and transa == OpN. If C === B, ldc == ldb and transb == OpN. If the user does not meet above requirements, ErrInvalidValue is returned. The operation includes the following special cases: the user can reset matrix C to zero by setting *alpha = beta = 0. the user can transpose matrix A by setting *alpha = 1 and *beta = 0.

Handle.Dgeam64 takes 64-bit sizes.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • alpha: < type > scalar used for multiplication. If *alpha == 0, A does not have to be a valid input
  • a: < type > array of dimensions lda x n with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • beta: < type > scalar used for multiplication. If *beta == 0, B does not have to be a valid input
  • b: < type > array of dimension ldb x n with ldb >= max(1, m) if transb == OpN and ldb x m with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0, or if transa is not one of OpN, OpT and OpC, or if transb is not one of OpN, OpT and OpC, or if lda < max(1, m) when transa == OpN, and lda < max(1, n) otherwise, or if ldb < max(1, m) if transb == OpN, and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if A == C and `(transa != OpN)
  • ErrNotInitialized: The library was not initialized

Wraps cublasDgeam.

func (Handle) Dgeam64

func (h Handle) Dgeam64(transa Operation, transb Operation, m int64, n int64, alpha *float64, a driver.DevicePtr, lda int64, beta *float64, b driver.DevicePtr, ldb int64, c driver.DevicePtr, ldc int64) error

Dgeam64 performs the matrix-matrix addition/transposition.

C=αop(A)+βop(B), where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×n , op(B)m×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . The operation is out-of-place if C does not overlap A or B. The in-place mode supports the following two operations, C=α*C+βop(B) C=αop(A)+β*C For in-place mode, if C == A, ldc == lda and transa == OpN. If C === B, ldc == ldb and transb == OpN. If the user does not meet above requirements, ErrInvalidValue is returned. The operation includes the following special cases: the user can reset matrix C to zero by setting *alpha = beta = 0. the user can transpose matrix A by setting *alpha = 1 and *beta = 0.

It is Handle.Dgeam with int64 sizes and strides.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • alpha: < type > scalar used for multiplication. If *alpha == 0, A does not have to be a valid input
  • a: < type > array of dimensions lda x n with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • beta: < type > scalar used for multiplication. If *beta == 0, B does not have to be a valid input
  • b: < type > array of dimension ldb x n with ldb >= max(1, m) if transb == OpN and ldb x m with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0, or if transa is not one of OpN, OpT and OpC, or if transb is not one of OpN, OpT and OpC, or if lda < max(1, m) when transa == OpN, and lda < max(1, n) otherwise, or if ldb < max(1, m) if transb == OpN, and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if A == C and `(transa != OpN)
  • ErrNotInitialized: The library was not initialized

Wraps cublasDgeam_64.

func (Handle) DgelsBatched

func (h Handle) DgelsBatched(trans Operation, m int32, n int32, nrhs int32, aarray driver.DevicePtr, lda int32, carray driver.DevicePtr, ldc int32, info *int32, devInfoArray driver.DevicePtr, batchSize int32) error

DgelsBatched solves a batch of overdetermined linear systems in the least-squares sense.

Aarray is an array of pointers to matrices stored in column-major format.

Carray is an array of pointers to matrices stored in column-major format. This function find the least squares solution of a batch of overdetermined systems: it solves the least squares problem described as follows :

minimize  || Carray[i] - Aarray[i]*Xarray[i] || , with i = 0, ...,batchSize-1

On exit, each Aarray[i] is overwritten with their QR factorization and each Carray[i] is overwritten with the least square solution cublasgelsBatched supports only the non-transpose operation and only solves over-determined systems (m >= n). cublasgelsBatched only supports compute capability 2.0 or above. This function is intended to be used for matrices of small sizes where the launch overhead is a significant factor. For references please refer to NETLIB documentation: sgels(), dgels(), cgels(), zgels()

  • trans: Operation op( Aarray[i]) that is non- or (conj.) transpose. Only non-transpose operation is currently supported
  • m: Number of rows of each Aarray[i] and Carray[i] if trans == OpN, numbers of columns of each Aarray[i] otherwise (not supported currently)
  • n: Number of columns of each Aarray[i] if trans == OpN, and number of rows of each Aarray[i] and Carray[i] otherwise (not supported currently)
  • nrhs: Number of columns of each Carray[i]
  • aarray: Array of pointers to < type > array, with each array of dim. m x n with lda >= max(1, m) if trans == OpN, and n x m with lda >= max(1, n) otherwise (not supported currently). Matrices Aarray[i] should not overlap; otherwise, behavior is undefined
  • lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
  • carray: Array of pointers to < type > array, with each array of dim. m x nrhs with ldc >= max(1, m) if trans == OpN, and n x nrhs with lda >= max(1, n) otherwise (not supported currently). Matrices Carray[i] should not overlap; otherwise, behavior is undefined
  • ldc: Leading dimension of two-dimensional array used to store each matrix Carray[i]
  • info: If info == 0 the parameters passed to the function are valid. If info < 0 the parameter in position -info is invalid
  • devInfoArray: Optional array of integers of dimension batchsize. If non-null, every element of devInfoArray[i] == V has the following meaning: V == 0 : the i-th problem was successfully solved. V > 0 : the V-th diagonal element of the Aarray[i] is zero. Aarray[i] does not have full rank
  • batchSize: Number of pointers contained in Aarray and Carray

Errors:

Wraps cublasDgelsBatched.

func (Handle) Dgemm

func (h Handle) Dgemm(transa Operation, transb Operation, m int32, n int32, k int32, alpha *float64, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *float64, c driver.DevicePtr, ldc int32) error

Dgemm performs the matrix-matrix multiplication.

C=αop(A)op(B)+βC, where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×k , op(B)k×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . For references please refer to NETLIB documentation: sgemm(), dgemm(), cgemm(), zgemm()

Handle.Dgemm64 takes 64-bit sizes.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • k: Number of columns of op( A) and rows of op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrArchMismatch: In the case of Handle.Hgemm the device does not support math in half precision.
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasDgemm_v2.

func (Handle) Dgemm64

func (h Handle) Dgemm64(transa Operation, transb Operation, m int64, n int64, k int64, alpha *float64, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *float64, c driver.DevicePtr, ldc int64) error

Dgemm64 performs the matrix-matrix multiplication.

C=αop(A)op(B)+βC, where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×k , op(B)k×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . For references please refer to NETLIB documentation: sgemm(), dgemm(), cgemm(), zgemm()

It is Handle.Dgemm with int64 sizes and strides.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • k: Number of columns of op( A) and rows of op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrArchMismatch: In the case of Handle.Hgemm the device does not support math in half precision.
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasDgemm_v2_64.

func (Handle) DgemmBatched

func (h Handle) DgemmBatched(transa Operation, transb Operation, m int32, n int32, k int32, alpha *float64, aarray driver.DevicePtr, lda int32, barray driver.DevicePtr, ldb int32, beta *float64, carray driver.DevicePtr, ldc int32, batchCount int32) error

DgemmBatched performs the matrix-matrix multiplication of a batch of matrices.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. The address of the input matrices and the output matrix of each instance of the batch are read from arrays of pointers passed to the function by the caller. C[i]=αop(A[i])op(B[i])+βC[i], for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, that is, the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemmBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

Handle.DgemmBatched64 takes 64-bit sizes.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • barray: Array of pointers to < type > array, with each array of dim. ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • ldb: Leading dimension of two-dimensional array used to store each matrix B[i]
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • carray: Array of pointers to < type > array. It has dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • ldc: Leading dimension of two-dimensional array used to store each matrix C[i]
  • batchCount: Number of pointers contained in Aarray, Barray and Carray

Errors:

  • ErrArchMismatch: Handle.HgemmBatched is only supported for GPU with architecture capabilities equal or greater than 5.3
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m)
  • ErrNotInitialized: The library was not initialized

Wraps cublasDgemmBatched.

func (Handle) DgemmBatched64

func (h Handle) DgemmBatched64(transa Operation, transb Operation, m int64, n int64, k int64, alpha *float64, aarray driver.DevicePtr, lda int64, barray driver.DevicePtr, ldb int64, beta *float64, carray driver.DevicePtr, ldc int64, batchCount int64) error

DgemmBatched64 performs the matrix-matrix multiplication of a batch of matrices.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. The address of the input matrices and the output matrix of each instance of the batch are read from arrays of pointers passed to the function by the caller. C[i]=αop(A[i])op(B[i])+βC[i], for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, that is, the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemmBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

It is Handle.DgemmBatched with int64 sizes and strides.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • barray: Array of pointers to < type > array, with each array of dim. ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • ldb: Leading dimension of two-dimensional array used to store each matrix B[i]
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • carray: Array of pointers to < type > array. It has dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • ldc: Leading dimension of two-dimensional array used to store each matrix C[i]
  • batchCount: Number of pointers contained in Aarray, Barray and Carray

Errors:

  • ErrArchMismatch: Handle.HgemmBatched is only supported for GPU with architecture capabilities equal or greater than 5.3
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m)
  • ErrNotInitialized: The library was not initialized

Wraps cublasDgemmBatched_64.

func (Handle) DgemmGroupedBatched

func (h Handle) DgemmGroupedBatched(transaArray *Operation, transbArray *Operation, mArray *int32, nArray *int32, kArray *int32, alphaArray *float64, aarray driver.DevicePtr, ldaArray *int32, barray driver.DevicePtr, ldbArray *int32, betaArray *float64, carray driver.DevicePtr, ldcArray *int32, groupCount int32, groupSize *int32) error

DgemmGroupedBatched performs the matrix-matrix multiplication on groups of matrices.

A given group is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. However, the dimensions, leading dimensions, transpositions, and scaling factors (alpha, beta) may vary between groups. The address of the input matrices and the output matrix of each instance of the batch are read from arrays of pointers passed to the function by the caller. This is functionally equivalent to the following:

idx = 0;
for i = 0:group_count - 1
    for j = 0:group_size[i] - 1
        gemm(transa_array[i], transb_array[i], m_array[i], n_array[i], k_array[i],
             alpha_array[i], Aarray[idx], lda_array[i], Barray[idx], ldb_array[i],
             beta_array[i], Carray[idx], ldc_array[i]);
        idx += 1;
    end
end

where alphaArray and betaArray are arrays of scaling factors, and Aarray, Barray and Carray are arrays of pointers to matrices stored in column-major format. For a given index, idx, that is part of group i, the dimensions are:

Note: This API takes arrays of two different lengths. The arrays of dimensions, leading dimensions, transpositions, and scaling factors are of length groupCount and the arrays of matrices are of length problem_count where problem_count=∑_(i=0)^(groupCount−1)groupSize[i] For matrix A[idx] in group i op(A[idx])={A[idx]if transaArray[i] == CUBLAS_OP_NA[idx]ᵀif transaArray[i] == CUBLAS_OP_TA[idx]ᴴif transaArray[i] == OpC and op(B[idx]) is defined similarly for matrix B[idx] in group i.

Note: C[idx] matrices must not overlap, that is, the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemmBatched() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemmGroupedBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is required that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

Handle.DgemmGroupedBatched64 takes 64-bit sizes.

  • transaArray: Operation op( A[idx]) that is non- or (conj.) transpose for each group
  • transbArray: Operation op( B[idx]) that is non- or (conj.) transpose for each group
  • mArray: Array containing the number of rows of matrix op( A[idx]) and C[idx] for each group
  • nArray: Array containing the number of columns of op( B[idx]) and C[idx] for each group
  • kArray: Array containing the number of columns of op( A[idx]) and rows of op( B[idx]) for each group
  • alphaArray: Array containing the < type > scalar used for multiplication for each group
  • aarray: Array of pointers to < type > array, with each array of dim. lda[i] x k[i] with lda[i] >= max(1,m[i]) if transa[i] == OpN and lda[i] x m[i] with lda[i] >= max(1,k[i]) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • ldaArray: Array containing the leading dimensions of two-dimensional arrays used to store each matrix A[idx] for each group
  • barray: Array of pointers to < type > array, with each array of dim. ldb[i] x n[i] with ldb[i] >= max(1,k[i]) if transb[i] == OpN and ldb[i] x k[i] with ldb[i] >= max(1,n[i]) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • ldbArray: Array containing the leading dimensions of two-dimensional arrays used to store each matrix B[idx] for each group
  • betaArray: Array containing the < type > scalar used for multiplication for each group
  • carray: Array of pointers to < type > array. It has dimensions ldc[i] x n[i] with ldc[i] >= max(1,m[i]). Matrices C[idx] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • ldcArray: Array containing the leading dimensions of two-dimensional arrays used to store each matrix C[idx] for each group
  • groupCount: Number of groups
  • groupSize: Array containing the number of pointers contained in Aarray, Barray and Carray for each group

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If transa_array, transb_array, m_array, n_array, k_array, alpha_array, lda_array, ldb_array, beta_array, ldc_array, or group_size are NULL, or if group_count < 0, or if m_array[i] < 0, n_array[i] < 0, k_array[i] < 0, group_size[i] < 0, or if transa_array[i] and transb_array[i] are not one of OpN, OpC, OpT, or if lda_array[i] < max(1, m_array[i]) if transa_array[i] == OpN and lda_array[i] < max(1, k_array[i]) otherwise, or if ldb_array[i] < max(1, k_array[i]) if transb_array[i] == OpN and ldb_array[i] < max(1, n_array[i]) otherwise, or if ldc_array[i] < max(1, m_array[i])
  • ErrNotInitialized: The library was not initialized
  • ErrNotSupported: The pointer mode is set to PointerModeDevice

Wraps cublasDgemmGroupedBatched.

func (Handle) DgemmGroupedBatched64

func (h Handle) DgemmGroupedBatched64(transaArray *Operation, transbArray *Operation, mArray *int64, nArray *int64, kArray *int64, alphaArray *float64, aarray driver.DevicePtr, ldaArray *int64, barray driver.DevicePtr, ldbArray *int64, betaArray *float64, carray driver.DevicePtr, ldcArray *int64, groupCount int64, groupSize *int64) error

DgemmGroupedBatched64 performs the matrix-matrix multiplication on groups of matrices.

A given group is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. However, the dimensions, leading dimensions, transpositions, and scaling factors (alpha, beta) may vary between groups. The address of the input matrices and the output matrix of each instance of the batch are read from arrays of pointers passed to the function by the caller. This is functionally equivalent to the following:

idx = 0;
for i = 0:group_count - 1
    for j = 0:group_size[i] - 1
        gemm(transa_array[i], transb_array[i], m_array[i], n_array[i], k_array[i],
             alpha_array[i], Aarray[idx], lda_array[i], Barray[idx], ldb_array[i],
             beta_array[i], Carray[idx], ldc_array[i]);
        idx += 1;
    end
end

where alphaArray and betaArray are arrays of scaling factors, and Aarray, Barray and Carray are arrays of pointers to matrices stored in column-major format. For a given index, idx, that is part of group i, the dimensions are:

Note: This API takes arrays of two different lengths. The arrays of dimensions, leading dimensions, transpositions, and scaling factors are of length groupCount and the arrays of matrices are of length problem_count where problem_count=∑_(i=0)^(groupCount−1)groupSize[i] For matrix A[idx] in group i op(A[idx])={A[idx]if transaArray[i] == CUBLAS_OP_NA[idx]ᵀif transaArray[i] == CUBLAS_OP_TA[idx]ᴴif transaArray[i] == OpC and op(B[idx]) is defined similarly for matrix B[idx] in group i.

Note: C[idx] matrices must not overlap, that is, the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemmBatched() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemmGroupedBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is required that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

It is Handle.DgemmGroupedBatched with int64 sizes and strides.

  • transaArray: Operation op( A[idx]) that is non- or (conj.) transpose for each group
  • transbArray: Operation op( B[idx]) that is non- or (conj.) transpose for each group
  • mArray: Array containing the number of rows of matrix op( A[idx]) and C[idx] for each group
  • nArray: Array containing the number of columns of op( B[idx]) and C[idx] for each group
  • kArray: Array containing the number of columns of op( A[idx]) and rows of op( B[idx]) for each group
  • alphaArray: Array containing the < type > scalar used for multiplication for each group
  • aarray: Array of pointers to < type > array, with each array of dim. lda[i] x k[i] with lda[i] >= max(1,m[i]) if transa[i] == OpN and lda[i] x m[i] with lda[i] >= max(1,k[i]) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • ldaArray: Array containing the leading dimensions of two-dimensional arrays used to store each matrix A[idx] for each group
  • barray: Array of pointers to < type > array, with each array of dim. ldb[i] x n[i] with ldb[i] >= max(1,k[i]) if transb[i] == OpN and ldb[i] x k[i] with ldb[i] >= max(1,n[i]) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • ldbArray: Array containing the leading dimensions of two-dimensional arrays used to store each matrix B[idx] for each group
  • betaArray: Array containing the < type > scalar used for multiplication for each group
  • carray: Array of pointers to < type > array. It has dimensions ldc[i] x n[i] with ldc[i] >= max(1,m[i]). Matrices C[idx] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • ldcArray: Array containing the leading dimensions of two-dimensional arrays used to store each matrix C[idx] for each group
  • groupCount: Number of groups
  • groupSize: Array containing the number of pointers contained in Aarray, Barray and Carray for each group

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If transa_array, transb_array, m_array, n_array, k_array, alpha_array, lda_array, ldb_array, beta_array, ldc_array, or group_size are NULL, or if group_count < 0, or if m_array[i] < 0, n_array[i] < 0, k_array[i] < 0, group_size[i] < 0, or if transa_array[i] and transb_array[i] are not one of OpN, OpC, OpT, or if lda_array[i] < max(1, m_array[i]) if transa_array[i] == OpN and lda_array[i] < max(1, k_array[i]) otherwise, or if ldb_array[i] < max(1, k_array[i]) if transb_array[i] == OpN and ldb_array[i] < max(1, n_array[i]) otherwise, or if ldc_array[i] < max(1, m_array[i])
  • ErrNotInitialized: The library was not initialized
  • ErrNotSupported: The pointer mode is set to PointerModeDevice

Wraps cublasDgemmGroupedBatched_64.

func (Handle) DgemmStridedBatched

func (h Handle) DgemmStridedBatched(transa Operation, transb Operation, m int32, n int32, k int32, alpha *float64, a driver.DevicePtr, lda int32, strideA int64, b driver.DevicePtr, ldb int32, strideB int64, beta *float64, c driver.DevicePtr, ldc int32, strideC int64, batchCount int32) error

DgemmStridedBatched performs the matrix-matrix multiplication of a batch of matrices.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. Input matrices A, B and output matrix C for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A, B and C matrices for the first instance are passed to the function by the user along with offsets in number of elements - strideA, strideB and strideC that determine the locations of input and output matrices in future instances. C+i*strideC=αop(A+i*strideA)op(B+i*strideB)+β(C+i*strideC), for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, i.e. the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], B[i], C[i] as notation for A, B and C matrices in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, strideB, strideC away from A[i-1], B[i-1], C[i-1]. The unit for the offset is number of elements and must not be zero .

Handle.DgemmStridedBatched64 takes 64-bit sizes.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • b: < type >* pointer to the B matrix corresponding to the first instance of the batch, with dimensions ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store each matrix B[i]
  • strideB: Value of type long long int that gives the offset in number of elements between B[i] and B[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type >* pointer to the C matrix corresponding to the first instance of the batch, with dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected
  • ldc: Leading dimension of two-dimensional array used to store each matrix C[i]
  • strideC: Value of type long long int that gives the offset in number of elements between C[i] and C[i+1]
  • batchCount: Number of GEMMs to perform in the batch

Errors:

Wraps cublasDgemmStridedBatched.

func (Handle) DgemmStridedBatched64

func (h Handle) DgemmStridedBatched64(transa Operation, transb Operation, m int64, n int64, k int64, alpha *float64, a driver.DevicePtr, lda int64, strideA int64, b driver.DevicePtr, ldb int64, strideB int64, beta *float64, c driver.DevicePtr, ldc int64, strideC int64, batchCount int64) error

DgemmStridedBatched64 performs the matrix-matrix multiplication of a batch of matrices.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. Input matrices A, B and output matrix C for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A, B and C matrices for the first instance are passed to the function by the user along with offsets in number of elements - strideA, strideB and strideC that determine the locations of input and output matrices in future instances. C+i*strideC=αop(A+i*strideA)op(B+i*strideB)+β(C+i*strideC), for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, i.e. the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], B[i], C[i] as notation for A, B and C matrices in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, strideB, strideC away from A[i-1], B[i-1], C[i-1]. The unit for the offset is number of elements and must not be zero .

It is Handle.DgemmStridedBatched with int64 sizes and strides.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • b: < type >* pointer to the B matrix corresponding to the first instance of the batch, with dimensions ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store each matrix B[i]
  • strideB: Value of type long long int that gives the offset in number of elements between B[i] and B[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type >* pointer to the C matrix corresponding to the first instance of the batch, with dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected
  • ldc: Leading dimension of two-dimensional array used to store each matrix C[i]
  • strideC: Value of type long long int that gives the offset in number of elements between C[i] and C[i+1]
  • batchCount: Number of GEMMs to perform in the batch

Errors:

Wraps cublasDgemmStridedBatched_64.

func (Handle) Dgemv

func (h Handle) Dgemv(trans Operation, m int32, n int32, alpha *float64, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32, beta *float64, y driver.DevicePtr, incy int32) error

Dgemv performs the matrix-vector multiplication.

y=α op(A)x+βy, where A is a m×n matrix stored in column-major format, x and y are vectors, and α and β are scalars. Also, for matrix A op(A)={A if trans == CUBLAS_OP_NAᵀ if trans == CUBLAS_OP_TAᴴ if trans == OpC For references please refer to NETLIB documentation: sgemv(), dgemv(), cgemv(), zgemv()

Handle.Dgemv64 takes 64-bit sizes.

  • trans: Operation op( A) that is non- or (conj.) transpose
  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= max(1, m). Before entry, the leading m by n part of the array A must contain the matrix of coefficients. Unchanged on exit
  • lda: Leading dimension of two-dimensional array used to store matrix A. lda must be at least max(1, m)
  • x: < type > vector at least (1 + (n - 1) * abs(incx)) elements if trans == OpN and at least (1 + (m - 1) * abs(incx)) elements otherwise
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector at least (1 + (m - 1) * abs(incy)) elements if trans == OpN and at least (1 + (n - 1) * abs(incy)) elements otherwise
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasDgemv_v2.

func (Handle) Dgemv64

func (h Handle) Dgemv64(trans Operation, m int64, n int64, alpha *float64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64, beta *float64, y driver.DevicePtr, incy int64) error

Dgemv64 performs the matrix-vector multiplication.

y=α op(A)x+βy, where A is a m×n matrix stored in column-major format, x and y are vectors, and α and β are scalars. Also, for matrix A op(A)={A if trans == CUBLAS_OP_NAᵀ if trans == CUBLAS_OP_TAᴴ if trans == OpC For references please refer to NETLIB documentation: sgemv(), dgemv(), cgemv(), zgemv()

It is Handle.Dgemv with int64 sizes and strides.

  • trans: Operation op( A) that is non- or (conj.) transpose
  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= max(1, m). Before entry, the leading m by n part of the array A must contain the matrix of coefficients. Unchanged on exit
  • lda: Leading dimension of two-dimensional array used to store matrix A. lda must be at least max(1, m)
  • x: < type > vector at least (1 + (n - 1) * abs(incx)) elements if trans == OpN and at least (1 + (m - 1) * abs(incx)) elements otherwise
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector at least (1 + (m - 1) * abs(incy)) elements if trans == OpN and at least (1 + (n - 1) * abs(incy)) elements otherwise
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasDgemv_v2_64.

func (Handle) DgemvBatched

func (h Handle) DgemvBatched(trans Operation, m int32, n int32, alpha *float64, aarray driver.DevicePtr, lda int32, xarray driver.DevicePtr, incx int32, beta *float64, yarray driver.DevicePtr, incy int32, batchCount int32) error

DgemvBatched performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. The address of the input matrix and vector, and the output vector of each instance of the batch are read from arrays of pointers passed to the function by the caller. y[i]=αop(A[i])x[i]+βy[i], for i∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrice A[i] stored in column-major format with dimension m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] , op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] vectors must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemvBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

Handle.DgemvBatched64 takes 64-bit sizes.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x n with lda >= max(1, m). All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • xarray: Array of pointers to < type > array, with each dimension n if trans == OpN and m otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • incx: Stride of each one-dimensional array x[i]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • yarray: Array of pointers to < type > array. It has dimensions m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • incy: Stride of each one-dimensional array y[i]
  • batchCount: Number of pointers contained in Aarray, xarray and yarray

Errors:

Wraps cublasDgemvBatched.

func (Handle) DgemvBatched64

func (h Handle) DgemvBatched64(trans Operation, m int64, n int64, alpha *float64, aarray driver.DevicePtr, lda int64, xarray driver.DevicePtr, incx int64, beta *float64, yarray driver.DevicePtr, incy int64, batchCount int64) error

DgemvBatched64 performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. The address of the input matrix and vector, and the output vector of each instance of the batch are read from arrays of pointers passed to the function by the caller. y[i]=αop(A[i])x[i]+βy[i], for i∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrice A[i] stored in column-major format with dimension m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] , op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] vectors must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemvBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

It is Handle.DgemvBatched with int64 sizes and strides.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x n with lda >= max(1, m). All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • xarray: Array of pointers to < type > array, with each dimension n if trans == OpN and m otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • incx: Stride of each one-dimensional array x[i]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • yarray: Array of pointers to < type > array. It has dimensions m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • incy: Stride of each one-dimensional array y[i]
  • batchCount: Number of pointers contained in Aarray, xarray and yarray

Errors:

Wraps cublasDgemvBatched_64.

func (Handle) DgemvStridedBatched

func (h Handle) DgemvStridedBatched(trans Operation, m int32, n int32, alpha *float64, a driver.DevicePtr, lda int32, strideA int64, x driver.DevicePtr, incx int32, stridex int64, beta *float64, y driver.DevicePtr, incy int32, stridey int64, batchCount int32) error

DgemvStridedBatched performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. Input matrix A and vector x, and output vector y for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A matrix, x and y vectors for the first instance are passed to the function by the user along with offsets in number of elements - strideA, stridex and stridey that determine the locations of input matrices and vectors, and output vectors in future instances. y+i*stridey=αop(A+i*strideA)(x+i*stridex)+β(y+i*stridey), for i ∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrix stored in column-major format with dimension A[i]m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] matrices must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], x[i], y[i] as notation for A matrix, and x and y vectors in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, stridex, stridey away from A[i-1], x[i-1], y[i-1]. The unit for the offset is number of elements and must not be zero .

Handle.DgemvStridedBatched64 takes 64-bit sizes.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • x: < type >* pointer to the x vector corresponding to the first instance of the batch, with each dimension n if trans == OpN and m otherwise
  • incx: Stride of each one-dimensional array x[i]
  • stridex: Value of type long long int that gives the offset in number of elements between x[i] and x[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • y: < type >* pointer to the y vector corresponding to the first instance of the batch, with each dimension m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected
  • incy: Stride of each one-dimensional array y[i]
  • stridey: Value of type long long int that gives the offset in number of elements between y[i] and y[i+1]
  • batchCount: Number of GEMVs to perform in the batch

Errors:

Wraps cublasDgemvStridedBatched.

func (Handle) DgemvStridedBatched64

func (h Handle) DgemvStridedBatched64(trans Operation, m int64, n int64, alpha *float64, a driver.DevicePtr, lda int64, strideA int64, x driver.DevicePtr, incx int64, stridex int64, beta *float64, y driver.DevicePtr, incy int64, stridey int64, batchCount int64) error

DgemvStridedBatched64 performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. Input matrix A and vector x, and output vector y for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A matrix, x and y vectors for the first instance are passed to the function by the user along with offsets in number of elements - strideA, stridex and stridey that determine the locations of input matrices and vectors, and output vectors in future instances. y+i*stridey=αop(A+i*strideA)(x+i*stridex)+β(y+i*stridey), for i ∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrix stored in column-major format with dimension A[i]m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] matrices must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], x[i], y[i] as notation for A matrix, and x and y vectors in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, stridex, stridey away from A[i-1], x[i-1], y[i-1]. The unit for the offset is number of elements and must not be zero .

It is Handle.DgemvStridedBatched with int64 sizes and strides.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • x: < type >* pointer to the x vector corresponding to the first instance of the batch, with each dimension n if trans == OpN and m otherwise
  • incx: Stride of each one-dimensional array x[i]
  • stridex: Value of type long long int that gives the offset in number of elements between x[i] and x[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • y: < type >* pointer to the y vector corresponding to the first instance of the batch, with each dimension m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected
  • incy: Stride of each one-dimensional array y[i]
  • stridey: Value of type long long int that gives the offset in number of elements between y[i] and y[i+1]
  • batchCount: Number of GEMVs to perform in the batch

Errors:

Wraps cublasDgemvStridedBatched_64.

func (Handle) DgeqrfBatched

func (h Handle) DgeqrfBatched(m int32, n int32, aarray driver.DevicePtr, lda int32, tauArray driver.DevicePtr, info *int32, batchSize int32) error

DgeqrfBatched computes the QR factorization of each matrix in a batch.

Aarray is an array of pointers to matrices stored in column-major format with dimensions m x n and leading dimension lda.

TauArray is an array of pointers to vectors of dimension of at least max (1, min(m, n). This function performs the QR factorization of each Aarray[i] for i = 0, ...,batchSize-1 using Householder reflections. Each matrix Q[i] is represented as a product of elementary reflectors and is stored in the lower part of each Aarray[i] as follows :

Q[j] = H[j][1] H[j][2] . . . H[j](k), where k = min(m,n).

Each H[j][i] has the form

H[j][i] = I - tau[j] * v * v'

where tau[j] is a real scalar, and v is a real vector with v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in Aarray[j][i+1:m,i], and tau in TauArray[j][i]. This function is intended to be used for matrices of small sizes where the launch overhead is a significant factor. cublasgeqrfBatched supports arbitrary dimension. cublasgeqrfBatched only supports compute capability 2.0 or above. For references please refer to NETLIB documentation: sgeqrf(), dgeqrf(), cgeqrf(), zgeqrf()

  • m: Number of rows Aarray[i]
  • n: Number of columns of Aarray[i]
  • aarray: Array of pointers to < type > array, with each array of dim. m x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
  • tauArray: Array of pointers to < type > vector, with each vector of dim. max(1 ,min(m, n))
  • info: If info == 0, the parameters passed to the function are valid. If info < 0, the parameter in position -info is invalid
  • batchSize: Number of pointers contained in Aarray

Errors:

Wraps cublasDgeqrfBatched.

func (Handle) Dger

func (h Handle) Dger(m int32, n int32, alpha *float64, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, a driver.DevicePtr, lda int32) error

Dger performs the rank-1 update.

A={αxyᵀ+Aif ger(),geru() is calledαxyᴴ+Aif gerc() is called where A is a m×n matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: sger(), dger(), cgeru(), cgerc(), zgeru(), zgerc()

Handle.Dger64 takes 64-bit sizes.

  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with m elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimension lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasDger_v2.

func (Handle) Dger64

func (h Handle) Dger64(m int64, n int64, alpha *float64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, a driver.DevicePtr, lda int64) error

Dger64 performs the rank-1 update.

A={αxyᵀ+Aif ger(),geru() is calledαxyᴴ+Aif gerc() is called where A is a m×n matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: sger(), dger(), cgeru(), cgerc(), zgeru(), zgerc()

It is Handle.Dger with int64 sizes and strides.

  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with m elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimension lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasDger_v2_64.

func (Handle) DgetrfBatched

func (h Handle) DgetrfBatched(n int32, a driver.DevicePtr, lda int32, p driver.DevicePtr, info driver.DevicePtr, batchSize int32) error

DgetrfBatched computes the LU factorization of each matrix in a batch.

Aarray is an array of pointers to matrices stored in column-major format with dimensions nxn and leading dimension lda.

This function performs the LU factorization of each Aarray[i] for i = 0, …, batchSize-1 by the following equation P*Aarray[i]=L*U where P is a permutation matrix which represents partial pivoting with row interchanges. L is a lower triangular matrix with unit diagonal and U is an upper triangular matrix. Formally P is written by a product of permutation matrices Pj, for j = 1,2,...,n, say P = P1 * P2 * P3 * .... * Pn. Pj is a permutation matrix which interchanges two rows of vector x when performing Pj*x. Pj can be constructed by j element of PivotArray[i] by the following Matlab code

// In Matlab PivotArray[i] is an array of base-1.
// In C, PivotArray[i] is base-0.
Pj = eye(n);
swap Pj(j,:) and Pj(PivotArray[i][j]  ,:)

L and U are written back to original matrix A, and diagonal elements of L are discarded. The L and U can be constructed by the following Matlab code

// A is a matrix of nxn after getrf.
L = eye(n);
for j = 1:n
    L(j+1:n,j) = A(j+1:n,j)
end
U = zeros(n);
for i = 1:n
    U(i,i:n) = A(i,i:n)
end

If matrix A(=Aarray[i]) is singular, getrf still works and the value of info(=infoArray[i]) reports first row index that LU factorization cannot proceed. If info is k, U(k,k) is zero. The equation P*A == L*U still holds, however L and U reconstruction needs a different Matlab code as follows:

// A is a matrix of nxn after getrf.
// info is k, which means U(k,k) is zero.
L = eye(n);
for j = 1:k-1
    L(j+1:n,j) = A(j+1:n,j)
end
U = zeros(n);
for i = 1:k-1
    U(i,i:n) = A(i,i:n)
end
for i = k:n
    U(i,k:n) = A(i,k:n)
end

This function is intended to be used for matrices of small sizes where the launch overhead is a significant factor. cublasgetrfBatched supports non-pivot LU factorization if PivotArray is NULL. cublasgetrfBatched supports arbitrary dimension. cublasgetrfBatched only supports compute capability 2.0 or above. For references please refer to NETLIB documentation: sgeqrf(), dgeqrf(), cgeqrf(), zgeqrf()

  • n: Number of rows and columns of Aarray[i]
  • lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
  • batchSize: Number of pointers contained in A

Errors:

Wraps cublasDgetrfBatched.

func (Handle) DgetriBatched

func (h Handle) DgetriBatched(n int32, a driver.DevicePtr, lda int32, p driver.DevicePtr, c driver.DevicePtr, ldc int32, info driver.DevicePtr, batchSize int32) error

DgetriBatched computes the inverse of each matrix in a batch from its LU factorization.

Aarray and Carray are arrays of pointers to matrices stored in column-major format with dimensions n*n and leading dimension lda and ldc respectively.

This function performs the inversion of matrices A[i] for i = 0, …, batchSize-1. Prior to calling cublasgetriBatched, the matrix A[i] must be factorized first using the routine cublasgetrfBatched. After the call of cublasgetrfBatched, the matrix pointing by Aarray[i] will contain the LU factors of the matrix A[i] and the vector pointing by (PivotArray+i) will contain the pivoting sequence. Following the LU factorization, cublasgetriBatched uses forward and backward triangular solvers to complete inversion of matrices A[i] for i = 0, …, batchSize-1. The inversion is out-of-place, so memory space of Carray[i] cannot overlap memory space of Array[i]. Typically all parameters in cublasgetrfBatched would be passed into cublasgetriBatched.

The user can check singularity from either cublasgetrfBatched or cublasgetriBatched. This function is intended to be used for matrices of small sizes where the launch overhead is a significant factor. If cublasgetrfBatched is performed by non-pivoting, PivotArray of cublasgetriBatched should be NULL. cublasgetriBatched supports arbitrary dimension. cublasgetriBatched only supports compute capability 2.0 or above.

  • n: Number of rows and columns of Aarray[i]
  • lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
  • ldc: Leading dimension of two-dimensional array used to store each matrix Carray[i]
  • batchSize: Number of pointers contained in A

Errors:

Wraps cublasDgetriBatched.

Example

ExampleHandle_DgetriBatched inverts a batch of n×n matrices. DgetrfBatched factors each matrix in place; DgetriBatched takes the same arguments and writes each inverse to a separate matrix. A nonzero info entry marks a singular matrix. It needs a current CUDA context.

package main

import (
	"fmt"

	"github.com/tmc/lib/nvidia/cublas"
	"github.com/tmc/lib/nvidia/driver"
)

func main() {
	h, err := cublas.Create()
	if err != nil {
		fmt.Println("cuBLAS unavailable:", err)
		return
	}
	defer h.Close()

	const n, batch = 4, 16
	// a and c are device arrays of batch pointers to column-major n×n
	// matrices; pivots holds n*batch int32s and info holds batch int32s.
	var a, c, pivots, info driver.DevicePtr

	if err := h.DgetrfBatched(n, a, n, pivots, info, batch); err != nil {
		fmt.Println("getrf:", err)
		return
	}
	if err := h.DgetriBatched(n, a, n, pivots, c, n, info, batch); err != nil {
		fmt.Println("getri:", err)
		return
	}
	status := make([]int32, batch)
	if err := info.CopyToHost(status); err != nil {
		fmt.Println("copy info:", err)
		return
	}
	for i, s := range status {
		if s != 0 {
			fmt.Printf("matrix %d is singular: U(%d,%d) = 0\n", i, s, s)
		}
	}
}

func (Handle) DgetrsBatched

func (h Handle) DgetrsBatched(trans Operation, n int32, nrhs int32, aarray driver.DevicePtr, lda int32, devIpiv driver.DevicePtr, barray driver.DevicePtr, ldb int32, info *int32, batchSize int32) error

DgetrsBatched solves an array of systems of linear equations of the form:

op(A[i])X[i]=B[i] where A[i] is a matrix which has been LU factorized with pivoting, X[i] and B[i] are n×nrhs matrices. Also, for matrix A op(A[i])={A[i]if trans == CUBLAS_OP_NAᵀ[i]if trans == CUBLAS_OP_TAᴴ[i]if trans == OpC This function is intended to be used for matrices of small sizes where the launch overhead is a significant factor. cublasgetrsBatched() supports non-pivot LU factorization if devIpiv is NULL. cublasgetrsBatched() supports arbitrary dimension. cublasgetrsBatched() only supports compute capability 2.0 or above. For references please refer to NETLIB documentation: sgeqrs(), dgeqrs(), cgeqrs(), zgeqrs()

  • trans: Operation op( A) that is non- or (conj.) transpose
  • n: Number of rows and columns of Aarray[i]
  • nrhs: Number of columns of Barray[i]
  • aarray: Array of pointers to < type > array, with each array of dim. n x n with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
  • devIpiv: Array of size n x batchSize that contains the pivoting sequence of each factorization of Aarray[i] stored in a linear fashion. If devIpiv is NULL, pivoting for all Aarray[i] is ignored
  • barray: Array of pointers to < type > array, with each array of dim. n x nrhs with ldb >= max(1, n). Matrices Barray[i] should not overlap; otherwise, undefined behavior is expected
  • ldb: Leading dimension of two-dimensional array used to store each solution matrix Barray[i]
  • info: If info == 0, the execution is successful. If info = -j, the j-th parameter had an illegal value
  • batchSize: Number of pointers contained in A

Errors:

Wraps cublasDgetrsBatched.

func (Handle) DmatinvBatched

func (h Handle) DmatinvBatched(n int32, a driver.DevicePtr, lda int32, ainv driver.DevicePtr, ldaInv int32, info driver.DevicePtr, batchSize int32) error

DmatinvBatched A and Ainv are arrays of pointers to matrices stored in column-major format with dimensions n*n and leading dimension lda and ldaInv respectively.

This function performs the inversion of matrices A[i] for i = 0, …, batchSize-1. This function is a short cut of cublasgetrfBatched() plus cublasgetriBatched(). However it doesn’t work if n is greater than 32. If not, the user has to go through cublasgetrfBatched() and cublasgetriBatched(). If the matrix A[i] is singular, then info[i] reports singularity, the same as cublasgetrfBatched().

  • n: Number of rows and columns of A[i]
  • a: Array of pointers to < type > array, with each array of dimension n*n with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • ainv: Array of pointers to < type > array, with each array of dimension n*n with ldaInv >= max(1, n). Matrices Ainv[i] should not overlap; otherwise, undefined behavior is expected
  • ldaInv: Leading dimension of two-dimensional array used to store each matrix Ainv[i]
  • info: Array of size batchSize that info[i] contains the information of inversion of A[i]. If info[i] == 0, the execution is successful. If info[i] == k, then U(k, k) == 0. The U is exactly singular and the inversion failed
  • batchSize: Number of pointers contained in A

Errors:

Wraps cublasDmatinvBatched.

func (Handle) Dnrm2

func (h Handle) Dnrm2(n int32, x driver.DevicePtr, incx int32) (float64, error)

Dnrm2 computes the Euclidean norm of the vector x.

The code uses a multiphase model of accumulation to avoid intermediate underflow and overflow, with the result being equivalent to ∑_(i=1)^(n)(x[j]×x[j]) where j=1+(i−1)*incx in exact arithmetic. Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: snrm2(), dnrm2(), scnrm2(), dznrm2()

Handle.Dnrm264 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • result: The resulting norm, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasDnrm2_v2.

func (Handle) Dnrm264

func (h Handle) Dnrm264(n int64, x driver.DevicePtr, incx int64) (float64, error)

Dnrm264 computes the Euclidean norm of the vector x.

The code uses a multiphase model of accumulation to avoid intermediate underflow and overflow, with the result being equivalent to ∑_(i=1)^(n)(x[j]×x[j]) where j=1+(i−1)*incx in exact arithmetic. Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: snrm2(), dnrm2(), scnrm2(), dznrm2()

It is Handle.Dnrm2 with int64 sizes and strides.

  • n: Number of elements in the vector x
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • result: The resulting norm, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasDnrm2_v2_64.

func (Handle) DotEx

func (h Handle) DotEx(n int32, x driver.DevicePtr, xType DataType, incx int32, y driver.DevicePtr, yType DataType, incy int32, result unsafe.Pointer, resultType DataType, executionType DataType) error

DotEx is an API generalization of the routines cublasdot() and cublasdotc() where input data, output data and compute type can be specified independently.

Note: cublasdotc() is dot product conjugated, cublasdotu() is dot product unconjugated. These functions support the 64-bit Integer Interface. This function computes the dot product of vectors x and y. Hence, the result is ∑_(i=1)^(n)(x[k]×y[j]) where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that in the first equation the conjugate of the element of vector x should be used if the function name ends in character ‘c’ and that the last two equations reflect 1-based indexing used for compatibility with Fortran. The datatypes combinations currently supported for Handle.DotEx and Handle.DotcEx are listed below:

x            y            result       execution
CUDA_R_16F   CUDA_R_16F   CUDA_R_16F   CUDA_R_32F
CUDA_R_16BF  CUDA_R_16BF  CUDA_R_16BF  CUDA_R_32F
CUDA_R_32F   CUDA_R_32F   CUDA_R_32F   CUDA_R_32F
CUDA_R_64F   CUDA_R_64F   CUDA_R_64F   CUDA_R_64F
CUDA_C_32F   CUDA_C_32F   CUDA_C_32F   CUDA_C_32F
CUDA_C_64F   CUDA_C_64F   CUDA_C_64F   CUDA_C_64F

For references please refer to NETLIB documentation: sdot(), ddot(), cdotu(), cdotc(), zdotu(), zdotc()

Handle.DotEx64 takes 64-bit sizes.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • xType: Enumerant specifying the datatype of vector x
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • yType: Enumerant specifying the datatype of vector y
  • incy: Stride between consecutive elements of y
  • result: The resulting dot product, which is set to 0 if n <= 0. The library writes the value before the call returns or, under Handle.SetPointerMode with PointerModeDevice, to the device address d passed as unsafe.Pointer(uintptr(d)) by the time the stream work completes, so device memory must stay valid until then.
  • resultType: Enumerant specifying the datatype of the result
  • executionType: Enumerant specifying the datatype in which the computation is executed

Errors:

Wraps cublasDotEx.

func (Handle) DotEx64

func (h Handle) DotEx64(n int64, x driver.DevicePtr, xType DataType, incx int64, y driver.DevicePtr, yType DataType, incy int64, result unsafe.Pointer, resultType DataType, executionType DataType) error

DotEx64 is an API generalization of the routines cublasdot() and cublasdotc() where input data, output data and compute type can be specified independently.

Note: cublasdotc() is dot product conjugated, cublasdotu() is dot product unconjugated. These functions support the 64-bit Integer Interface. This function computes the dot product of vectors x and y. Hence, the result is ∑_(i=1)^(n)(x[k]×y[j]) where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that in the first equation the conjugate of the element of vector x should be used if the function name ends in character ‘c’ and that the last two equations reflect 1-based indexing used for compatibility with Fortran. The datatypes combinations currently supported for Handle.DotEx and Handle.DotcEx are listed below:

x            y            result       execution
CUDA_R_16F   CUDA_R_16F   CUDA_R_16F   CUDA_R_32F
CUDA_R_16BF  CUDA_R_16BF  CUDA_R_16BF  CUDA_R_32F
CUDA_R_32F   CUDA_R_32F   CUDA_R_32F   CUDA_R_32F
CUDA_R_64F   CUDA_R_64F   CUDA_R_64F   CUDA_R_64F
CUDA_C_32F   CUDA_C_32F   CUDA_C_32F   CUDA_C_32F
CUDA_C_64F   CUDA_C_64F   CUDA_C_64F   CUDA_C_64F

For references please refer to NETLIB documentation: sdot(), ddot(), cdotu(), cdotc(), zdotu(), zdotc()

It is Handle.DotEx with int64 sizes and strides.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • xType: Enumerant specifying the datatype of vector x
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • yType: Enumerant specifying the datatype of vector y
  • incy: Stride between consecutive elements of y
  • result: The resulting dot product, which is set to 0 if n <= 0. The library writes the value before the call returns or, under Handle.SetPointerMode with PointerModeDevice, to the device address d passed as unsafe.Pointer(uintptr(d)) by the time the stream work completes, so device memory must stay valid until then.
  • resultType: Enumerant specifying the datatype of the result
  • executionType: Enumerant specifying the datatype in which the computation is executed

Errors:

Wraps cublasDotEx_64.

func (Handle) DotcEx

func (h Handle) DotcEx(n int32, x driver.DevicePtr, xType DataType, incx int32, y driver.DevicePtr, yType DataType, incy int32, result unsafe.Pointer, resultType DataType, executionType DataType) error

DotcEx is an API generalization of the routines cublasdot() and cublasdotc() where input data, output data and compute type can be specified independently.

Note: cublasdotc() is dot product conjugated, cublasdotu() is dot product unconjugated. These functions support the 64-bit Integer Interface. This function computes the dot product of vectors x and y. Hence, the result is ∑_(i=1)^(n)(x[k]×y[j]) where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that in the first equation the conjugate of the element of vector x should be used if the function name ends in character ‘c’ and that the last two equations reflect 1-based indexing used for compatibility with Fortran. The datatypes combinations currently supported for Handle.DotEx and Handle.DotcEx are listed below:

x            y            result       execution
CUDA_R_16F   CUDA_R_16F   CUDA_R_16F   CUDA_R_32F
CUDA_R_16BF  CUDA_R_16BF  CUDA_R_16BF  CUDA_R_32F
CUDA_R_32F   CUDA_R_32F   CUDA_R_32F   CUDA_R_32F
CUDA_R_64F   CUDA_R_64F   CUDA_R_64F   CUDA_R_64F
CUDA_C_32F   CUDA_C_32F   CUDA_C_32F   CUDA_C_32F
CUDA_C_64F   CUDA_C_64F   CUDA_C_64F   CUDA_C_64F

For references please refer to NETLIB documentation: sdot(), ddot(), cdotu(), cdotc(), zdotu(), zdotc()

Handle.DotcEx64 takes 64-bit sizes.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • xType: Enumerant specifying the datatype of vector x
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • yType: Enumerant specifying the datatype of vector y
  • incy: Stride between consecutive elements of y
  • result: The resulting dot product, which is set to 0 if n <= 0. The library writes the value before the call returns or, under Handle.SetPointerMode with PointerModeDevice, to the device address d passed as unsafe.Pointer(uintptr(d)) by the time the stream work completes, so device memory must stay valid until then.
  • resultType: Enumerant specifying the datatype of the result
  • executionType: Enumerant specifying the datatype in which the computation is executed

Errors:

Wraps cublasDotcEx.

func (Handle) DotcEx64

func (h Handle) DotcEx64(n int64, x driver.DevicePtr, xType DataType, incx int64, y driver.DevicePtr, yType DataType, incy int64, result unsafe.Pointer, resultType DataType, executionType DataType) error

DotcEx64 is an API generalization of the routines cublasdot() and cublasdotc() where input data, output data and compute type can be specified independently.

Note: cublasdotc() is dot product conjugated, cublasdotu() is dot product unconjugated. These functions support the 64-bit Integer Interface. This function computes the dot product of vectors x and y. Hence, the result is ∑_(i=1)^(n)(x[k]×y[j]) where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that in the first equation the conjugate of the element of vector x should be used if the function name ends in character ‘c’ and that the last two equations reflect 1-based indexing used for compatibility with Fortran. The datatypes combinations currently supported for Handle.DotEx and Handle.DotcEx are listed below:

x            y            result       execution
CUDA_R_16F   CUDA_R_16F   CUDA_R_16F   CUDA_R_32F
CUDA_R_16BF  CUDA_R_16BF  CUDA_R_16BF  CUDA_R_32F
CUDA_R_32F   CUDA_R_32F   CUDA_R_32F   CUDA_R_32F
CUDA_R_64F   CUDA_R_64F   CUDA_R_64F   CUDA_R_64F
CUDA_C_32F   CUDA_C_32F   CUDA_C_32F   CUDA_C_32F
CUDA_C_64F   CUDA_C_64F   CUDA_C_64F   CUDA_C_64F

For references please refer to NETLIB documentation: sdot(), ddot(), cdotu(), cdotc(), zdotu(), zdotc()

It is Handle.DotcEx with int64 sizes and strides.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • xType: Enumerant specifying the datatype of vector x
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • yType: Enumerant specifying the datatype of vector y
  • incy: Stride between consecutive elements of y
  • result: The resulting dot product, which is set to 0 if n <= 0. The library writes the value before the call returns or, under Handle.SetPointerMode with PointerModeDevice, to the device address d passed as unsafe.Pointer(uintptr(d)) by the time the stream work completes, so device memory must stay valid until then.
  • resultType: Enumerant specifying the datatype of the result
  • executionType: Enumerant specifying the datatype in which the computation is executed

Errors:

Wraps cublasDotcEx_64.

func (Handle) Drot

func (h Handle) Drot(n int32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, c *float64, s *float64) error

Drot applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):

G=(cs−sc) to vectors x and y. Hence, the result is x[k]=c×x[k]+s×y[j] and y[j]=−s×x[k]+c×y[j] where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: srot(), drot(), crot(), csrot(), zrot(), zdrot()

Handle.Drot64 takes 64-bit sizes.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • c: Cosine element of the rotation matrix
  • s: Sine element of the rotation matrix

Errors:

Wraps cublasDrot_v2.

func (Handle) Drot64

func (h Handle) Drot64(n int64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, c *float64, s *float64) error

Drot64 applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):

G=(cs−sc) to vectors x and y. Hence, the result is x[k]=c×x[k]+s×y[j] and y[j]=−s×x[k]+c×y[j] where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: srot(), drot(), crot(), csrot(), zrot(), zdrot()

It is Handle.Drot with int64 sizes and strides.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • c: Cosine element of the rotation matrix
  • s: Sine element of the rotation matrix

Errors:

Wraps cublasDrot_v2_64.

func (Handle) Drotg

func (h Handle) Drotg(a *float64, b *float64, c *float64, s *float64) error

Drotg constructs the Givens rotation matrix.

G=(cs−sc), that zeros out the second entry of a 2×1 vector (a,b)ᵀ . Then, for real numbers we can write (cs−sc)(ab)=(r0) where c²+s²=1 and r=±a²+b² . The parameters a and b are overwritten with r and z , respectively. The value of z is such that c and s may be recovered using the following rules: (c,s)={(1−z²,z) if |z|<1(0.0,1.0) if |z|=1(1/z,1−z²) if |z|>1 For complex numbers we can write (cs−s¯c)(ab)=(r0) where c²+(s¯×s)=1 and r=a|a|×∥(a,b)ᵀ∥₂ with ∥(a,b)ᵀ∥₂=|a|²+|B|² for a≠0 and r=b for a=0 . Finally, the parameter a is overwritten with r on exit. For references please refer to NETLIB documentation: srotg(), drotg(), crotg(), zrotg()

  • a: < type > scalar that is overwritten with r
  • b: < type > scalar that is overwritten with z
  • c: Cosine element of the rotation matrix
  • s: Sine element of the rotation matrix

Errors:

Wraps cublasDrotg_v2.

func (Handle) Drotm

func (h Handle) Drotm(n int32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, param *float64) error

Drotm applies the modified Givens transformation.

H=(h₁₁h₁₂h₂₁h₂₂), to vectors x and y. Hence, the result is x[k]=h₁₁×x[k]+h₁₂×y[j] and y[j]=h₂₁×x[k]+h₂₂×y[j] where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. The elements , , and of matrix H are stored in param[1], param[2], param[3] and param[4], respectively. The flag = param[0] defines the following predefined values for the matrix H entries

flag == -1.0          flag == 0.0           flag == 1.0            flag == -2.0
(h₁₁, h₁₂; h₂₁, h₂₂)  (1.0, h₁₂; h₂₁, 1.0)  (h₁₁, 1.0; −1.0, h₂₂)  (1.0, 0.0; 0.0, 1.0)

Notice that the values -1.0, 0.0 and 1.0 implied by the flag are not stored in param. For references please refer to NETLIB documentation: srotm(), drotm()

Handle.Drotm64 takes 64-bit sizes.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • param: < type > vector of 5 elements, where param[0] and param[1..4] contain the flag and matrix H

Errors:

Wraps cublasDrotm_v2.

func (Handle) Drotm64

func (h Handle) Drotm64(n int64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, param *float64) error

Drotm64 applies the modified Givens transformation.

H=(h₁₁h₁₂h₂₁h₂₂), to vectors x and y. Hence, the result is x[k]=h₁₁×x[k]+h₁₂×y[j] and y[j]=h₂₁×x[k]+h₂₂×y[j] where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. The elements , , and of matrix H are stored in param[1], param[2], param[3] and param[4], respectively. The flag = param[0] defines the following predefined values for the matrix H entries

flag == -1.0          flag == 0.0           flag == 1.0            flag == -2.0
(h₁₁, h₁₂; h₂₁, h₂₂)  (1.0, h₁₂; h₂₁, 1.0)  (h₁₁, 1.0; −1.0, h₂₂)  (1.0, 0.0; 0.0, 1.0)

Notice that the values -1.0, 0.0 and 1.0 implied by the flag are not stored in param. For references please refer to NETLIB documentation: srotm(), drotm()

It is Handle.Drotm with int64 sizes and strides.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • param: < type > vector of 5 elements, where param[0] and param[1..4] contain the flag and matrix H

Errors:

Wraps cublasDrotm_v2_64.

func (Handle) Drotmg

func (h Handle) Drotmg(d1 *float64, d2 *float64, x1 *float64, y1 *float64, param *float64) error

Drotmg constructs the modified Givens transformation.

H=(h₁₁h₁₂h₂₁h₂₂), that zeros out the second entry of a 2×1 vector (d1*x1,d2*y1)ᵀ . The flag = param[0] defines the following predefined values for the matrix H entries

flag == -1.0          flag == 0.0           flag == 1.0            flag == -2.0
(h₁₁, h₁₂; h₂₁, h₂₂)  (1.0, h₁₂; h₂₁, 1.0)  (h₁₁, 1.0; −1.0, h₂₂)  (1.0, 0.0; 0.0, 1.0)

Notice that the values -1.0, 0.0 and 1.0 implied by the flag are not stored in param. For references please refer to NETLIB documentation: srotmg(), drotmg()

  • d1: < type > scalar that is overwritten on exit
  • d2: < type > scalar that is overwritten on exit
  • x1: < type > scalar that is overwritten on exit
  • y1: < type > scalar
  • param: < type > vector of 5 elements, where param[0] and param[1-4] contain the flag and matrix H

Errors:

Wraps cublasDrotmg_v2.

func (Handle) Dsbmv

func (h Handle) Dsbmv(uplo FillMode, n int32, k int32, alpha *float64, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32, beta *float64, y driver.DevicePtr, incy int32) error

Dsbmv performs the symmetric banded matrix-vector multiplication.

y=αAx+βy, where A is a n×n symmetric banded matrix with k subdiagonals and superdiagonals, x and y are vectors, and α and β are scalars. If uplo == FillModeLower then the symmetric banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the symmetric banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k),j] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: ssbmv(), dsbmv()

Handle.Dsbmv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= k + 1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasDsbmv_v2.

func (Handle) Dsbmv64

func (h Handle) Dsbmv64(uplo FillMode, n int64, k int64, alpha *float64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64, beta *float64, y driver.DevicePtr, incy int64) error

Dsbmv64 performs the symmetric banded matrix-vector multiplication.

y=αAx+βy, where A is a n×n symmetric banded matrix with k subdiagonals and superdiagonals, x and y are vectors, and α and β are scalars. If uplo == FillModeLower then the symmetric banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the symmetric banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k),j] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: ssbmv(), dsbmv()

It is Handle.Dsbmv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= k + 1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasDsbmv_v2_64.

func (Handle) Dscal

func (h Handle) Dscal(n int32, alpha *float64, x driver.DevicePtr, incx int32) error

Dscal scales the vector x by the scalar α and overwrites it with the result.

Hence, the performed operation is x[j]=α×x[j] for i=1,…,n and j=1+(i−1)*incx . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sscal(), dscal(), csscal(), cscal(), zdscal(), zscal()

Handle.Dscal64 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasDscal_v2.

func (Handle) Dscal64

func (h Handle) Dscal64(n int64, alpha *float64, x driver.DevicePtr, incx int64) error

Dscal64 scales the vector x by the scalar α and overwrites it with the result.

Hence, the performed operation is x[j]=α×x[j] for i=1,…,n and j=1+(i−1)*incx . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sscal(), dscal(), csscal(), cscal(), zdscal(), zscal()

It is Handle.Dscal with int64 sizes and strides.

  • n: Number of elements in the vector x
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasDscal_v2_64.

func (Handle) Dspmv

func (h Handle) Dspmv(uplo FillMode, n int32, alpha *float64, ap driver.DevicePtr, x driver.DevicePtr, incx int32, beta *float64, y driver.DevicePtr, incy int32) error

Dspmv performs the symmetric packed matrix-vector multiplication.

y=αAx+βy, where A is a n×n symmetric matrix stored in packed format, x and y are vectors, and α and β are scalars. If uplo == FillModeLower then the elements in the lower triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: sspmv(), dspmv()

Handle.Dspmv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • ap: < type > array with A stored in packed format
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasDspmv_v2.

func (Handle) Dspmv64

func (h Handle) Dspmv64(uplo FillMode, n int64, alpha *float64, ap driver.DevicePtr, x driver.DevicePtr, incx int64, beta *float64, y driver.DevicePtr, incy int64) error

Dspmv64 performs the symmetric packed matrix-vector multiplication.

y=αAx+βy, where A is a n×n symmetric matrix stored in packed format, x and y are vectors, and α and β are scalars. If uplo == FillModeLower then the elements in the lower triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: sspmv(), dspmv()

It is Handle.Dspmv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • ap: < type > array with A stored in packed format
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasDspmv_v2_64.

func (Handle) Dspr

func (h Handle) Dspr(uplo FillMode, n int32, alpha *float64, x driver.DevicePtr, incx int32, ap driver.DevicePtr) error

Dspr performs the packed symmetric rank-1 update.

A=αxxᵀ+A, where A is a n×n symmetric matrix stored in packed format, x is a vector, and α is a scalar. If uplo == FillModeLower then the elements in the lower triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: sspr(), dspr()

Handle.Dspr64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • ap: < type > array with A stored in packed format

Errors:

Wraps cublasDspr_v2.

func (Handle) Dspr2

func (h Handle) Dspr2(uplo FillMode, n int32, alpha *float64, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, ap driver.DevicePtr) error

Dspr2 performs the packed symmetric rank-2 update.

A=α(xyᵀ+yxᵀ)+A, where A is a n×n symmetric matrix stored in packed format, x is a vector, and α is a scalar. If uplo == FillModeLower then the elements in the lower triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: sspr2(), dspr2()

Handle.Dspr264 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • ap: < type > array with A stored in packed format

Errors:

Wraps cublasDspr2_v2.

func (Handle) Dspr64

func (h Handle) Dspr64(uplo FillMode, n int64, alpha *float64, x driver.DevicePtr, incx int64, ap driver.DevicePtr) error

Dspr64 performs the packed symmetric rank-1 update.

A=αxxᵀ+A, where A is a n×n symmetric matrix stored in packed format, x is a vector, and α is a scalar. If uplo == FillModeLower then the elements in the lower triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: sspr(), dspr()

It is Handle.Dspr with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • ap: < type > array with A stored in packed format

Errors:

Wraps cublasDspr_v2_64.

func (Handle) Dspr264

func (h Handle) Dspr264(uplo FillMode, n int64, alpha *float64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, ap driver.DevicePtr) error

Dspr264 performs the packed symmetric rank-2 update.

A=α(xyᵀ+yxᵀ)+A, where A is a n×n symmetric matrix stored in packed format, x is a vector, and α is a scalar. If uplo == FillModeLower then the elements in the lower triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: sspr2(), dspr2()

It is Handle.Dspr2 with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • ap: < type > array with A stored in packed format

Errors:

Wraps cublasDspr2_v2_64.

func (Handle) Dswap

func (h Handle) Dswap(n int32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32) error

Dswap interchanges the elements of vector x and y.

Hence, the performed operation is y[j]⇔x[k] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sswap(), dswap(), cswap(), zswap()

Handle.Dswap64 takes 64-bit sizes.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasDswap_v2.

func (Handle) Dswap64

func (h Handle) Dswap64(n int64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64) error

Dswap64 interchanges the elements of vector x and y.

Hence, the performed operation is y[j]⇔x[k] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sswap(), dswap(), cswap(), zswap()

It is Handle.Dswap with int64 sizes and strides.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasDswap_v2_64.

func (Handle) Dsymm

func (h Handle) Dsymm(side SideMode, uplo FillMode, m int32, n int32, alpha *float64, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *float64, c driver.DevicePtr, ldc int32) error

Dsymm performs the symmetric matrix-matrix multiplication.

C={αAB+βCif side == [SideLeft]αBA+βCif side == SideRight where A is a symmetric matrix stored in lower or upper mode, B and C are m×n matrices, and α and β are scalars. For references please refer to NETLIB documentation: ssymm(), dsymm(), csymm(), zsymm()

Handle.Dsymm64 takes 64-bit sizes.

  • side: Indicates if matrix A is on the left or right of B
  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • m: Number of rows of matrix C and B, with matrix A sized accordingly
  • n: Number of columns of matrix C and B, with matrix A sized accordingly
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasDsymm_v2.

func (Handle) Dsymm64

func (h Handle) Dsymm64(side SideMode, uplo FillMode, m int64, n int64, alpha *float64, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *float64, c driver.DevicePtr, ldc int64) error

Dsymm64 performs the symmetric matrix-matrix multiplication.

C={αAB+βCif side == [SideLeft]αBA+βCif side == SideRight where A is a symmetric matrix stored in lower or upper mode, B and C are m×n matrices, and α and β are scalars. For references please refer to NETLIB documentation: ssymm(), dsymm(), csymm(), zsymm()

It is Handle.Dsymm with int64 sizes and strides.

  • side: Indicates if matrix A is on the left or right of B
  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • m: Number of rows of matrix C and B, with matrix A sized accordingly
  • n: Number of columns of matrix C and B, with matrix A sized accordingly
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasDsymm_v2_64.

func (Handle) Dsymv

func (h Handle) Dsymv(uplo FillMode, n int32, alpha *float64, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32, beta *float64, y driver.DevicePtr, incy int32) error

Dsymv performs the symmetric matrix-vector multiplication.

y=αAx+βy where A is a n×n symmetric matrix stored in lower or upper mode, x and y are vectors, and α and β are scalars. This function has an alternate faster implementation using atomics that can be enabled with Handle.SetAtomicsMode. Please see the section on the function Handle.SetAtomicsMode for more details about the usage of atomics. For references please refer to NETLIB documentation: ssymv(), dsymv()

Handle.Dsymv64 takes 64-bit sizes.

  • uplo: Indicates if matrix lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasDsymv_v2.

func (Handle) Dsymv64

func (h Handle) Dsymv64(uplo FillMode, n int64, alpha *float64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64, beta *float64, y driver.DevicePtr, incy int64) error

Dsymv64 performs the symmetric matrix-vector multiplication.

y=αAx+βy where A is a n×n symmetric matrix stored in lower or upper mode, x and y are vectors, and α and β are scalars. This function has an alternate faster implementation using atomics that can be enabled with Handle.SetAtomicsMode. Please see the section on the function Handle.SetAtomicsMode for more details about the usage of atomics. For references please refer to NETLIB documentation: ssymv(), dsymv()

It is Handle.Dsymv with int64 sizes and strides.

  • uplo: Indicates if matrix lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasDsymv_v2_64.

func (Handle) Dsyr

func (h Handle) Dsyr(uplo FillMode, n int32, alpha *float64, x driver.DevicePtr, incx int32, a driver.DevicePtr, lda int32) error

Dsyr performs the symmetric rank-1 update.

A=αxxᵀ+A, where A is a n×n symmetric matrix stored in column-major format, x is a vector, and α is a scalar. For references please refer to NETLIB documentation: ssyr(), dsyr()

Handle.Dsyr64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • a: < type > array of dimensions lda x n, with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasDsyr_v2.

func (Handle) Dsyr2

func (h Handle) Dsyr2(uplo FillMode, n int32, alpha *float64, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, a driver.DevicePtr, lda int32) error

Dsyr2 performs the symmetric rank-2 update.

A=α(xyᵀ+yxᵀ)+A, where A is a n×n symmetric matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: ssyr2(), dsyr2()

Handle.Dsyr264 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimensions lda x n, with lda >= max(1,n)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasDsyr2_v2.

func (Handle) Dsyr2k

func (h Handle) Dsyr2k(uplo FillMode, trans Operation, n int32, k int32, alpha *float64, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *float64, c driver.DevicePtr, ldc int32) error

Dsyr2k performs the symmetric rank- 2k update.

C=α(op(A)op(B)ᵀ+op(B)op(A)ᵀ)+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrix A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᵀ and Bᵀif trans == OpT For references please refer to NETLIB documentation: ssyr2k(), dsyr2k(), csyr2k(), zsyr2k()

Handle.Dsyr2k64 takes 64-bit sizes.

  • uplo: Indicates if matrix C lower or upper part, is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimensions ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, then C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If n < 0 or k < 0, or if trans is not one of OpN, OpT and OpC, or if uplo is not one of FillModeLower and FillModeUpper, or if lda < max(1, n) when trans == OpN, and lda < max(1, k) otherwise, or if ldb < max(1, n) when trans == OpN, and ldb < max(1, k) otherwise, or if ldc < max(1, n), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasDsyr2k_v2.

func (Handle) Dsyr2k64

func (h Handle) Dsyr2k64(uplo FillMode, trans Operation, n int64, k int64, alpha *float64, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *float64, c driver.DevicePtr, ldc int64) error

Dsyr2k64 performs the symmetric rank- 2k update.

C=α(op(A)op(B)ᵀ+op(B)op(A)ᵀ)+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrix A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᵀ and Bᵀif trans == OpT For references please refer to NETLIB documentation: ssyr2k(), dsyr2k(), csyr2k(), zsyr2k()

It is Handle.Dsyr2k with int64 sizes and strides.

  • uplo: Indicates if matrix C lower or upper part, is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimensions ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, then C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If n < 0 or k < 0, or if trans is not one of OpN, OpT and OpC, or if uplo is not one of FillModeLower and FillModeUpper, or if lda < max(1, n) when trans == OpN, and lda < max(1, k) otherwise, or if ldb < max(1, n) when trans == OpN, and ldb < max(1, k) otherwise, or if ldc < max(1, n), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasDsyr2k_v2_64.

func (Handle) Dsyr64

func (h Handle) Dsyr64(uplo FillMode, n int64, alpha *float64, x driver.DevicePtr, incx int64, a driver.DevicePtr, lda int64) error

Dsyr64 performs the symmetric rank-1 update.

A=αxxᵀ+A, where A is a n×n symmetric matrix stored in column-major format, x is a vector, and α is a scalar. For references please refer to NETLIB documentation: ssyr(), dsyr()

It is Handle.Dsyr with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • a: < type > array of dimensions lda x n, with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasDsyr_v2_64.

func (Handle) Dsyr264

func (h Handle) Dsyr264(uplo FillMode, n int64, alpha *float64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, a driver.DevicePtr, lda int64) error

Dsyr264 performs the symmetric rank-2 update.

A=α(xyᵀ+yxᵀ)+A, where A is a n×n symmetric matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: ssyr2(), dsyr2()

It is Handle.Dsyr2 with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimensions lda x n, with lda >= max(1,n)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasDsyr2_v2_64.

func (Handle) Dsyrk

func (h Handle) Dsyrk(uplo FillMode, trans Operation, n int32, k int32, alpha *float64, a driver.DevicePtr, lda int32, beta *float64, c driver.DevicePtr, ldc int32) error

Dsyrk performs the symmetric rank- k update.

C=αop(A)op(A)ᵀ+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A is a matrix with dimensions op(A)n×k . Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == OpT For references please refer to NETLIB documentation: ssyrk(), dsyrk(), csyrk(), zsyrk()

Handle.Dsyrk64 takes 64-bit sizes.

  • uplo: Indicates if matrix C lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A) and C
  • k: Number of columns of matrix op( A)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if trans == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasDsyrk_v2.

func (Handle) Dsyrk64

func (h Handle) Dsyrk64(uplo FillMode, trans Operation, n int64, k int64, alpha *float64, a driver.DevicePtr, lda int64, beta *float64, c driver.DevicePtr, ldc int64) error

Dsyrk64 performs the symmetric rank- k update.

C=αop(A)op(A)ᵀ+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A is a matrix with dimensions op(A)n×k . Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == OpT For references please refer to NETLIB documentation: ssyrk(), dsyrk(), csyrk(), zsyrk()

It is Handle.Dsyrk with int64 sizes and strides.

  • uplo: Indicates if matrix C lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A) and C
  • k: Number of columns of matrix op( A)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if trans == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasDsyrk_v2_64.

func (Handle) Dsyrkx

func (h Handle) Dsyrkx(uplo FillMode, trans Operation, n int32, k int32, alpha *float64, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *float64, c driver.DevicePtr, ldc int32) error

Dsyrkx performs a variation of the symmetric rank- k update.

C=αop(A)op(B)ᵀ+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrices A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᵀ and Bᵀif trans == OpT This routine can be used when B is in such way that the result is guaranteed to be symmetric. A usual example is when the matrix B is a scaled form of the matrix A: this is equivalent to B being the product of the matrix A and a diagonal matrix. For an efficient computation of the product of a regular matrix with a diagonal matrix, refer to the routine cublasdgmm(). For references please refer to NETLIB documentation: ssyrk(), dsyrk(), csyrk(), zsyrk() and ssyr2k(), dsyr2k(), csyr2k(), zsyr2k()

Handle.Dsyrkx64 takes 64-bit sizes.

  • uplo: Indicates if matrix C lower or upper part, is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimensions ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, then C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If n < 0 or k < 0, or if trans is not one of OpN, OpT and OpC, or if uplo is not one of FillModeLower and FillModeUpper, or if lda < max(1, n) when trans == OpN, and lda < max(1, k) otherwise, or if ldb < max(1, n) when trans == OpN, and ldb < max(1, k) otherwise, or if ldc < max(1, n), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasDsyrkx.

func (Handle) Dsyrkx64

func (h Handle) Dsyrkx64(uplo FillMode, trans Operation, n int64, k int64, alpha *float64, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *float64, c driver.DevicePtr, ldc int64) error

Dsyrkx64 performs a variation of the symmetric rank- k update.

C=αop(A)op(B)ᵀ+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrices A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᵀ and Bᵀif trans == OpT This routine can be used when B is in such way that the result is guaranteed to be symmetric. A usual example is when the matrix B is a scaled form of the matrix A: this is equivalent to B being the product of the matrix A and a diagonal matrix. For an efficient computation of the product of a regular matrix with a diagonal matrix, refer to the routine cublasdgmm(). For references please refer to NETLIB documentation: ssyrk(), dsyrk(), csyrk(), zsyrk() and ssyr2k(), dsyr2k(), csyr2k(), zsyr2k()

It is Handle.Dsyrkx with int64 sizes and strides.

  • uplo: Indicates if matrix C lower or upper part, is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimensions ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, then C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If n < 0 or k < 0, or if trans is not one of OpN, OpT and OpC, or if uplo is not one of FillModeLower and FillModeUpper, or if lda < max(1, n) when trans == OpN, and lda < max(1, k) otherwise, or if ldb < max(1, n) when trans == OpN, and ldb < max(1, k) otherwise, or if ldc < max(1, n), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasDsyrkx_64.

func (Handle) Dtbmv

func (h Handle) Dtbmv(uplo FillMode, trans Operation, diag DiagType, n int32, k int32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32) error

Dtbmv performs the triangular banded matrix-vector multiplication.

x=op(A)x, where A is a triangular banded matrix, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC If uplo == FillModeLower then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k,j)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: stbmv(), dtbmv(), ctbmv(), ztbmv()

Handle.Dtbmv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix
  • a: < type > array of dimension lda x n, with lda >= k + 1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasDtbmv_v2.

func (Handle) Dtbmv64

func (h Handle) Dtbmv64(uplo FillMode, trans Operation, diag DiagType, n int64, k int64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64) error

Dtbmv64 performs the triangular banded matrix-vector multiplication.

x=op(A)x, where A is a triangular banded matrix, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC If uplo == FillModeLower then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k,j)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: stbmv(), dtbmv(), ctbmv(), ztbmv()

It is Handle.Dtbmv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix
  • a: < type > array of dimension lda x n, with lda >= k + 1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasDtbmv_v2_64.

func (Handle) Dtbsv

func (h Handle) Dtbsv(uplo FillMode, trans Operation, diag DiagType, n int32, k int32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32) error

Dtbsv solves the triangular banded linear system with a single right-hand-side.

op(A)x=b, where A is a triangular banded matrix, and x and b are vectors. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. If uplo == FillModeLower then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k,j)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: stbsv(), dtbsv(), ctbsv(), ztbsv()

Handle.Dtbsv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix A
  • a: < type > array of dimension lda x n, with lda >= k+1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasDtbsv_v2.

func (Handle) Dtbsv64

func (h Handle) Dtbsv64(uplo FillMode, trans Operation, diag DiagType, n int64, k int64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64) error

Dtbsv64 solves the triangular banded linear system with a single right-hand-side.

op(A)x=b, where A is a triangular banded matrix, and x and b are vectors. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. If uplo == FillModeLower then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k,j)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: stbsv(), dtbsv(), ctbsv(), ztbsv()

It is Handle.Dtbsv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix A
  • a: < type > array of dimension lda x n, with lda >= k+1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasDtbsv_v2_64.

func (Handle) Dtpmv

func (h Handle) Dtpmv(uplo FillMode, trans Operation, diag DiagType, n int32, ap driver.DevicePtr, x driver.DevicePtr, incx int32) error

Dtpmv performs the triangular packed matrix-vector multiplication.

x=op(A)x, where A is a triangular matrix stored in packed format, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC If uplo == FillModeLower then the elements in the lower triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for A(i,j) and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: stpmv(), dtpmv(), ctpmv(), ztpmv()

Handle.Dtpmv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • ap: < type > array with A stored in packed format
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasDtpmv_v2.

func (Handle) Dtpmv64

func (h Handle) Dtpmv64(uplo FillMode, trans Operation, diag DiagType, n int64, ap driver.DevicePtr, x driver.DevicePtr, incx int64) error

Dtpmv64 performs the triangular packed matrix-vector multiplication.

x=op(A)x, where A is a triangular matrix stored in packed format, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC If uplo == FillModeLower then the elements in the lower triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for A(i,j) and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: stpmv(), dtpmv(), ctpmv(), ztpmv()

It is Handle.Dtpmv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • ap: < type > array with A stored in packed format
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasDtpmv_v2_64.

func (Handle) Dtpsv

func (h Handle) Dtpsv(uplo FillMode, trans Operation, diag DiagType, n int32, ap driver.DevicePtr, x driver.DevicePtr, incx int32) error

Dtpsv solves the packed triangular linear system with a single right-hand-side.

op(A)x=b, where A is a triangular matrix stored in packed format, and x and b are vectors. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. If uplo == FillModeLower then the elements in the lower triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: stpsv(), dtpsv(), ctpsv(), ztpsv()

Handle.Dtpsv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • ap: < type > array with A stored in packed format
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasDtpsv_v2.

func (Handle) Dtpsv64

func (h Handle) Dtpsv64(uplo FillMode, trans Operation, diag DiagType, n int64, ap driver.DevicePtr, x driver.DevicePtr, incx int64) error

Dtpsv64 solves the packed triangular linear system with a single right-hand-side.

op(A)x=b, where A is a triangular matrix stored in packed format, and x and b are vectors. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. If uplo == FillModeLower then the elements in the lower triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: stpsv(), dtpsv(), ctpsv(), ztpsv()

It is Handle.Dtpsv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • ap: < type > array with A stored in packed format
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasDtpsv_v2_64.

func (Handle) Dtpttr

func (h Handle) Dtpttr(uplo FillMode, n int32, ap driver.DevicePtr, a driver.DevicePtr, lda int32) error

Dtpttr performs the conversion from the triangular packed format to the triangular format.

If uplo == FillModeLower then the elements of AP are copied into the lower triangular part of the triangular matrix A and the upper part of A is left untouched. If uplo == FillModeUpper then the elements of AP are copied into the upper triangular part of the triangular matrix A and the lower part of A is left untouched. For references please refer to NETLIB documentation: stpttr(), dtpttr(), ctpttr(), ztpttr()

  • uplo: Indicates if matrix AP contains lower or upper part of matrix A
  • n: Number of rows and columns of matrix A
  • ap: < type > array with A stored in packed format
  • a: < type > array of dimensions lda x n , with lda >= max(1, n). The opposite side of A is left untouched
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasDtpttr.

func (Handle) Dtrmm

func (h Handle) Dtrmm(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int32, n int32, alpha *float64, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, c driver.DevicePtr, ldc int32) error

Dtrmm performs the triangular matrix-matrix multiplication.

C={αop(A)Bif side == [SideLeft]αBop(A)if side == SideRight where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, B and C are m×n matrix, and α is a scalar. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC Notice that in order to achieve better parallelism cuBLAS differs from the BLAS API only for this routine. The BLAS API assumes an in-place implementation (with results written back to B), while the cuBLAS API assumes an out-of-place implementation (with results written into C). The application can obtain the in-place functionality of BLAS in the cuBLAS API by passing the address of the matrix B in place of the matrix C. No other overlapping in the input parameters is supported. For references please refer to NETLIB documentation: strmm(), dtrmm(), ctrmm(), ztrmm()

Handle.Dtrmm64 takes 64-bit sizes.

  • side: Indicates if matrix A is on the left or right of B
  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • m: Number of rows of matrix B, with matrix A sized accordingly
  • n: Number of columns of matrix B, with matrix A sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A is not referenced and B does not have to be a valid input
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • c: < type > array of dimension ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasDtrmm_v2.

func (Handle) Dtrmm64

func (h Handle) Dtrmm64(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int64, n int64, alpha *float64, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, c driver.DevicePtr, ldc int64) error

Dtrmm64 performs the triangular matrix-matrix multiplication.

C={αop(A)Bif side == [SideLeft]αBop(A)if side == SideRight where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, B and C are m×n matrix, and α is a scalar. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC Notice that in order to achieve better parallelism cuBLAS differs from the BLAS API only for this routine. The BLAS API assumes an in-place implementation (with results written back to B), while the cuBLAS API assumes an out-of-place implementation (with results written into C). The application can obtain the in-place functionality of BLAS in the cuBLAS API by passing the address of the matrix B in place of the matrix C. No other overlapping in the input parameters is supported. For references please refer to NETLIB documentation: strmm(), dtrmm(), ctrmm(), ztrmm()

It is Handle.Dtrmm with int64 sizes and strides.

  • side: Indicates if matrix A is on the left or right of B
  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • m: Number of rows of matrix B, with matrix A sized accordingly
  • n: Number of columns of matrix B, with matrix A sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A is not referenced and B does not have to be a valid input
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • c: < type > array of dimension ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasDtrmm_v2_64.

func (Handle) Dtrmv

func (h Handle) Dtrmv(uplo FillMode, trans Operation, diag DiagType, n int32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32) error

Dtrmv performs the triangular matrix-vector multiplication.

x=op(A)x, where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC For references please refer to NETLIB documentation: strmv(), dtrmv(), ctrmv(), ztrmv()

Handle.Dtrmv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • a: < type > array of dimensions lda x n , with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasDtrmv_v2.

func (Handle) Dtrmv64

func (h Handle) Dtrmv64(uplo FillMode, trans Operation, diag DiagType, n int64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64) error

Dtrmv64 performs the triangular matrix-vector multiplication.

x=op(A)x, where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC For references please refer to NETLIB documentation: strmv(), dtrmv(), ctrmv(), ztrmv()

It is Handle.Dtrmv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • a: < type > array of dimensions lda x n , with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasDtrmv_v2_64.

func (Handle) Dtrsm

func (h Handle) Dtrsm(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int32, n int32, alpha *float64, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32) error

Dtrsm solves the triangular linear system with multiple right-hand-sides.

{op(A)X=αBif side == CUBLAS_SIDE_LEFTXop(A)=αBif side == SideRight where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, X and B are m×n matrices, and α is a scalar. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC The solution X overwrites the right-hand-sides B on exit. No test for singularity or near-singularity is included in this function. For references please refer to NETLIB documentation: strsm(), dtrsm(), ctrsm(), ztrsm()

Handle.Dtrsm64 takes 64-bit sizes.

  • side: Indicates if matrix A is on the left or right of X
  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • m: Number of rows of matrix B, with matrix A sized accordingly
  • n: Number of columns of matrix B, with matrix A is sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A is not referenced and B does not have to be a valid input
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array. It has dimensions ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B

Errors:

Wraps cublasDtrsm_v2.

func (Handle) Dtrsm64

func (h Handle) Dtrsm64(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int64, n int64, alpha *float64, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64) error

Dtrsm64 solves the triangular linear system with multiple right-hand-sides.

{op(A)X=αBif side == CUBLAS_SIDE_LEFTXop(A)=αBif side == SideRight where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, X and B are m×n matrices, and α is a scalar. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC The solution X overwrites the right-hand-sides B on exit. No test for singularity or near-singularity is included in this function. For references please refer to NETLIB documentation: strsm(), dtrsm(), ctrsm(), ztrsm()

It is Handle.Dtrsm with int64 sizes and strides.

  • side: Indicates if matrix A is on the left or right of X
  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • m: Number of rows of matrix B, with matrix A sized accordingly
  • n: Number of columns of matrix B, with matrix A is sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A is not referenced and B does not have to be a valid input
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array. It has dimensions ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B

Errors:

Wraps cublasDtrsm_v2_64.

func (Handle) DtrsmBatched

func (h Handle) DtrsmBatched(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int32, n int32, alpha *float64, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, batchCount int32) error

DtrsmBatched solves an array of triangular linear systems with multiple right-hand-sides.

{op(A[i])X[i]=αB[i]if side == CUBLAS_SIDE_LEFTX[i]op(A[i])=αB[i]if side == SideRight where A[i] is a triangular matrix stored in lower or upper mode with or without the main diagonal, X[i] and B[i] are m×n matrices, and α is a scalar. Also, for matrix A op(A[i])={A[i]if transa == CUBLAS_OP_NAᵀ[i]if transa == CUBLAS_OP_TAᴴ[i]if transa == OpC The solution X[i] overwrites the right-hand-sides B[i] on exit. No test for singularity or near-singularity is included in this function. This function works for any sizes but is intended to be used for matrices of small sizes where the launch overhead is a significant factor. For bigger sizes, it might be advantageous to call batchCount times the regular cublastrsm() within a set of CUDA streams. The current implementation is limited to devices with compute capability above or equal 2.0. For references please refer to NETLIB documentation: strsm(), dtrsm(), ctrsm(), ztrsm()

Handle.DtrsmBatched64 takes 64-bit sizes.

  • side: Indicates if matrix A[i] is on the left or right of X[i]
  • uplo: Indicates if matrix A[i] lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A[i] are unity and should not be accessed
  • m: Number of rows of matrix B[i], with matrix A[i] sized accordingly
  • n: Number of columns of matrix B[i], with matrix A[i] is sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A[i] is not referenced and B[i] does not have to be a valid input
  • a: Array of pointers to < type > array, with each array of dim. lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A[i]
  • b: Array of pointers to < type > array, with each array of dim. ldb x n with ldb >= max(1, m). Matrices B[i] should not overlap; otherwise, undefined behavior is expected
  • ldb: Leading dimension of two-dimensional array used to store matrix B[i]
  • batchCount: Number of pointers contained in A and B

Errors:

Wraps cublasDtrsmBatched.

func (Handle) DtrsmBatched64

func (h Handle) DtrsmBatched64(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int64, n int64, alpha *float64, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, batchCount int64) error

DtrsmBatched64 solves an array of triangular linear systems with multiple right-hand-sides.

{op(A[i])X[i]=αB[i]if side == CUBLAS_SIDE_LEFTX[i]op(A[i])=αB[i]if side == SideRight where A[i] is a triangular matrix stored in lower or upper mode with or without the main diagonal, X[i] and B[i] are m×n matrices, and α is a scalar. Also, for matrix A op(A[i])={A[i]if transa == CUBLAS_OP_NAᵀ[i]if transa == CUBLAS_OP_TAᴴ[i]if transa == OpC The solution X[i] overwrites the right-hand-sides B[i] on exit. No test for singularity or near-singularity is included in this function. This function works for any sizes but is intended to be used for matrices of small sizes where the launch overhead is a significant factor. For bigger sizes, it might be advantageous to call batchCount times the regular cublastrsm() within a set of CUDA streams. The current implementation is limited to devices with compute capability above or equal 2.0. For references please refer to NETLIB documentation: strsm(), dtrsm(), ctrsm(), ztrsm()

It is Handle.DtrsmBatched with int64 sizes and strides.

  • side: Indicates if matrix A[i] is on the left or right of X[i]
  • uplo: Indicates if matrix A[i] lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A[i] are unity and should not be accessed
  • m: Number of rows of matrix B[i], with matrix A[i] sized accordingly
  • n: Number of columns of matrix B[i], with matrix A[i] is sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A[i] is not referenced and B[i] does not have to be a valid input
  • a: Array of pointers to < type > array, with each array of dim. lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A[i]
  • b: Array of pointers to < type > array, with each array of dim. ldb x n with ldb >= max(1, m). Matrices B[i] should not overlap; otherwise, undefined behavior is expected
  • ldb: Leading dimension of two-dimensional array used to store matrix B[i]
  • batchCount: Number of pointers contained in A and B

Errors:

Wraps cublasDtrsmBatched_64.

func (Handle) Dtrsv

func (h Handle) Dtrsv(uplo FillMode, trans Operation, diag DiagType, n int32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32) error

Dtrsv solves the triangular linear system with a single right-hand-side.

op(A)x=b, where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, and x and b are vectors. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. For references please refer to NETLIB documentation: strsv(), dtrsv(), ctrsv(), ztrsv()

Handle.Dtrsv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • a: < type > array of dimension lda x n, with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasDtrsv_v2.

func (Handle) Dtrsv64

func (h Handle) Dtrsv64(uplo FillMode, trans Operation, diag DiagType, n int64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64) error

Dtrsv64 solves the triangular linear system with a single right-hand-side.

op(A)x=b, where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, and x and b are vectors. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. For references please refer to NETLIB documentation: strsv(), dtrsv(), ctrsv(), ztrsv()

It is Handle.Dtrsv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • a: < type > array of dimension lda x n, with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasDtrsv_v2_64.

func (Handle) Dtrttp

func (h Handle) Dtrttp(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ap driver.DevicePtr) error

Dtrttp performs the conversion from the triangular format to the triangular packed format.

If uplo == FillModeLower then the lower triangular part of the triangular matrix A is copied into the array AP. If uplo == FillModeUpper then then the upper triangular part of the triangular matrix A is copied into the array AP. For references please refer to NETLIB documentation: strttp(), dtrttp(), ctrttp(), ztrttp()

  • uplo: Indicates which matrix A lower or upper part is referenced
  • n: Number of rows and columns of matrix A
  • a: < type > array of dimensions lda x n , with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • ap: < type > array with A stored in packed format

Errors:

Wraps cublasDtrttp.

func (Handle) Dzasum

func (h Handle) Dzasum(n int32, x driver.DevicePtr, incx int32) (float64, error)

Dzasum computes the sum of the absolute values of the elements of vector x.

Hence, the result is ∑_(i=1)^(n)|Im(x[j])|+|Re(x[j])| where j=1+(i−1)*incx . Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sasum(), dasum(), scasum(), dzasum()

Handle.Dzasum64 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting sum, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasDzasum_v2.

func (Handle) Dzasum64

func (h Handle) Dzasum64(n int64, x driver.DevicePtr, incx int64) (float64, error)

Dzasum64 computes the sum of the absolute values of the elements of vector x.

Hence, the result is ∑_(i=1)^(n)|Im(x[j])|+|Re(x[j])| where j=1+(i−1)*incx . Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sasum(), dasum(), scasum(), dzasum()

It is Handle.Dzasum with int64 sizes and strides.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting sum, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasDzasum_v2_64.

func (Handle) Dznrm2

func (h Handle) Dznrm2(n int32, x driver.DevicePtr, incx int32) (float64, error)

Dznrm2 computes the Euclidean norm of the vector x.

The code uses a multiphase model of accumulation to avoid intermediate underflow and overflow, with the result being equivalent to ∑_(i=1)^(n)(x[j]×x[j]) where j=1+(i−1)*incx in exact arithmetic. Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: snrm2(), dnrm2(), scnrm2(), dznrm2()

Handle.Dznrm264 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • result: The resulting norm, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasDznrm2_v2.

func (Handle) Dznrm264

func (h Handle) Dznrm264(n int64, x driver.DevicePtr, incx int64) (float64, error)

Dznrm264 computes the Euclidean norm of the vector x.

The code uses a multiphase model of accumulation to avoid intermediate underflow and overflow, with the result being equivalent to ∑_(i=1)^(n)(x[j]×x[j]) where j=1+(i−1)*incx in exact arithmetic. Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: snrm2(), dnrm2(), scnrm2(), dznrm2()

It is Handle.Dznrm2 with int64 sizes and strides.

  • n: Number of elements in the vector x
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • result: The resulting norm, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasDznrm2_v2_64.

func (Handle) EmulationSpecialValuesSupport

func (h Handle) EmulationSpecialValuesSupport(mask *CudaEmulationSpecialValuesSupport) error

EmulationSpecialValuesSupport obtains the value previously programmed to the library handle.

A nil error means emulation special values support was returned successfully.

Errors:

Wraps cublasGetEmulationSpecialValuesSupport.

func (Handle) EmulationStrategy

func (h Handle) EmulationStrategy(emulationStrategy *EmulationStrategy) error

EmulationStrategy obtains the value previously programmed to the library handle.

A nil error means emulation strategy was returned successfully.

Errors:

Wraps cublasGetEmulationStrategy.

func (Handle) FixedPointEmulationMantissaBitCountPointer

func (h Handle) FixedPointEmulationMantissaBitCountPointer(mantissaBitCount **int32) error

FixedPointEmulationMantissaBitCountPointer obtains the value previously programmed to the library handle.

A nil error means mantissaBitCount was returned successfully.

Errors:

Wraps cublasGetFixedPointEmulationMantissaBitCountPointer.

func (Handle) FixedPointEmulationMantissaBitOffset

func (h Handle) FixedPointEmulationMantissaBitOffset() (int32, error)

FixedPointEmulationMantissaBitOffset obtains the value previously programmed to the library handle.

A nil error means mantissaBitOffset was returned successfully.

Errors:

Wraps cublasGetFixedPointEmulationMantissaBitOffset.

func (Handle) FixedPointEmulationMantissaControl

func (h Handle) FixedPointEmulationMantissaControl(mantissaControl *CudaEmulationMantissaControl) error

FixedPointEmulationMantissaControl obtains the value previously programmed to the library handle.

A nil error means fixed-point emulation mantissa control was returned successfully.

Errors:

Wraps cublasGetFixedPointEmulationMantissaControl.

func (Handle) FixedPointEmulationMaxMantissaBitCount

func (h Handle) FixedPointEmulationMaxMantissaBitCount() (int32, error)

FixedPointEmulationMaxMantissaBitCount obtains the value previously programmed to the library handle.

A nil error means maxMantissaBitCount was returned successfully.

Errors:

Wraps cublasGetFixedPointEmulationMaxMantissaBitCount.

func (Handle) GemmBatchedEx

func (h Handle) GemmBatchedEx(transa Operation, transb Operation, m int32, n int32, k int32, alpha Scalar, aarray driver.DevicePtr, atype DataType, lda int32, barray driver.DevicePtr, btype DataType, ldb int32, beta Scalar, carray driver.DevicePtr, ctype DataType, ldc int32, batchCount int32, computeType ComputeType, algo GemmAlgo) error

GemmBatchedEx is an extension of cublasgemmBatched() that performs the matrix-matrix multiplication of a batch of matrices and allows the user to individually specify the data types for each of the A, B and C matrix arrays, the precision of computation and the GEMM algorithm to be run.

Like cublasgemmBatched(), the batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. The address of the input matrices and the output matrix of each instance of the batch are read from arrays of pointers passed to the function by the caller. Supported combinations of arguments are listed further down in this section.

Note: The second variant of Handle.GemmBatchedEx function is provided for backward compatibility with C++ applications code, where the computeType parameter is of cudaDataType instead of ComputeType. C applications would still compile with the updated function signature. C[i]=αop(A[i])op(B[i])+βC[i], for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, i.e. the individual gemm operations must be computable independently; otherwise, behavior is undefined. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API. Handle.GemmBatchedEx supports the following Compute Type, Scale Type, Atype/Btype, and Ctype:

If Atype is CUDA_R_16F or CUDA_R_16BF, or computeType is any of the FAST options, or when math mode or algo enable fast math modes, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 8 == 0 then ensure intptr_t(ptr) % 16 == 0,
  • if k % 2 == 0 then ensure intptr_t(ptr) % 4 == 0.

Note: Compute types Compute32I and Compute32IPedantic are only supported with all pointers A[i], B[i] being 4-byte aligned and lda, ldb being multiples of 4. For a better performance, it is also recommended that IMMA kernels requirements for the regular data ordering listed here are met. Also refer to: sgemm.()

Handle.GemmBatchedEx64 takes 64-bit sizes.

  • transa: Operation op( Aarray[i]) that is non- or (conj.) transpose
  • transb: Operation op( Barray[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( Aarray[i]) and Carray[i]
  • n: Number of columns of matrix op( Barray[i]) and Carray[i]
  • k: Number of columns of op( Aarray[i]) and rows of op( Barray[i])
  • alpha: Scaling factor for matrix products of the type that corresponds to the computeType and Ctype, see the table below for details. Its kind must match computeType and ctype; a host Scalar of another kind is a *ScalarError. It holds a host value or, under Handle.SetPointerMode with PointerModeDevice, a device address made with DeviceScalar.
  • aarray: Array of pointers to < Atype > array, with each array of dim. lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • atype: Enumerant specifying the datatype of Aarray
  • lda: Leading dimension of two-dimensional array used to store the matrix Aarray[i]
  • barray: Array of pointers to < Btype > array, with each array of dim. ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • btype: Enumerant specifying the datatype of Barray
  • ldb: Leading dimension of two-dimensional array used to store matrix Barray[i]
  • beta: Scaling factor for Carray of the type that corresponds to the computeType and Ctype, see the table below for details. If beta == 0, Carray[i] does not have to be a valid input. Its kind must match computeType and ctype; a host Scalar of another kind is a *ScalarError. It holds a host value or, under Handle.SetPointerMode with PointerModeDevice, a device address made with DeviceScalar.
  • carray: Array of pointers to < Ctype > array. It has dimensions ldc x n with ldc >= max(1, m). Matrices Carray[i] should not overlap; otherwise, the behavior is undefined. All pointers must meet certain alignment criteria. Please see below for details
  • ctype: Enumerant specifying the datatype of Carray
  • ldc: Leading dimension of a two-dimensional array used to store each matrix Carray[i]
  • batchCount: Number of pointers contained in Aarray, Barray and Carray
  • computeType: Enumerant specifying the computation type
  • algo: Enumerant specifying the algorithm. See GemmAlgo

Errors:

  • ErrArchMismatch: Handle.GemmBatchedEx is only supported for GPU with architecture capabilities equal to or greater than 5.0.
  • ErrExecutionFailed: The function failed to launch on the GPU.
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if Atype or Btype or Ctype or algo or computeType is not supported
  • ErrNotInitialized: The library was not initialized.
  • ErrNotSupported: The combination of the parameters Atype, Btype and Ctype or the algorithm, algo is not supported.

Wraps cublasGemmBatchedEx.

func (Handle) GemmBatchedEx64

func (h Handle) GemmBatchedEx64(transa Operation, transb Operation, m int64, n int64, k int64, alpha Scalar, aarray driver.DevicePtr, atype DataType, lda int64, barray driver.DevicePtr, btype DataType, ldb int64, beta Scalar, carray driver.DevicePtr, ctype DataType, ldc int64, batchCount int64, computeType ComputeType, algo GemmAlgo) error

GemmBatchedEx64 is an extension of cublasgemmBatched() that performs the matrix-matrix multiplication of a batch of matrices and allows the user to individually specify the data types for each of the A, B and C matrix arrays, the precision of computation and the GEMM algorithm to be run.

Like cublasgemmBatched(), the batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. The address of the input matrices and the output matrix of each instance of the batch are read from arrays of pointers passed to the function by the caller. Supported combinations of arguments are listed further down in this section.

Note: The second variant of Handle.GemmBatchedEx function is provided for backward compatibility with C++ applications code, where the computeType parameter is of cudaDataType instead of ComputeType. C applications would still compile with the updated function signature. C[i]=αop(A[i])op(B[i])+βC[i], for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, i.e. the individual gemm operations must be computable independently; otherwise, behavior is undefined. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API. Handle.GemmBatchedEx supports the following Compute Type, Scale Type, Atype/Btype, and Ctype:

If Atype is CUDA_R_16F or CUDA_R_16BF, or computeType is any of the FAST options, or when math mode or algo enable fast math modes, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 8 == 0 then ensure intptr_t(ptr) % 16 == 0,
  • if k % 2 == 0 then ensure intptr_t(ptr) % 4 == 0.

Note: Compute types Compute32I and Compute32IPedantic are only supported with all pointers A[i], B[i] being 4-byte aligned and lda, ldb being multiples of 4. For a better performance, it is also recommended that IMMA kernels requirements for the regular data ordering listed here are met. Also refer to: sgemm.()

It is Handle.GemmBatchedEx with int64 sizes and strides.

  • transa: Operation op( Aarray[i]) that is non- or (conj.) transpose
  • transb: Operation op( Barray[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( Aarray[i]) and Carray[i]
  • n: Number of columns of matrix op( Barray[i]) and Carray[i]
  • k: Number of columns of op( Aarray[i]) and rows of op( Barray[i])
  • alpha: Scaling factor for matrix products of the type that corresponds to the computeType and Ctype, see the table below for details. Its kind must match computeType and ctype; a host Scalar of another kind is a *ScalarError. It holds a host value or, under Handle.SetPointerMode with PointerModeDevice, a device address made with DeviceScalar.
  • aarray: Array of pointers to < Atype > array, with each array of dim. lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • atype: Enumerant specifying the datatype of Aarray
  • lda: Leading dimension of two-dimensional array used to store the matrix Aarray[i]
  • barray: Array of pointers to < Btype > array, with each array of dim. ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • btype: Enumerant specifying the datatype of Barray
  • ldb: Leading dimension of two-dimensional array used to store matrix Barray[i]
  • beta: Scaling factor for Carray of the type that corresponds to the computeType and Ctype, see the table below for details. If beta == 0, Carray[i] does not have to be a valid input. Its kind must match computeType and ctype; a host Scalar of another kind is a *ScalarError. It holds a host value or, under Handle.SetPointerMode with PointerModeDevice, a device address made with DeviceScalar.
  • carray: Array of pointers to < Ctype > array. It has dimensions ldc x n with ldc >= max(1, m). Matrices Carray[i] should not overlap; otherwise, the behavior is undefined. All pointers must meet certain alignment criteria. Please see below for details
  • ctype: Enumerant specifying the datatype of Carray
  • ldc: Leading dimension of a two-dimensional array used to store each matrix Carray[i]
  • batchCount: Number of pointers contained in Aarray, Barray and Carray
  • computeType: Enumerant specifying the computation type
  • algo: Enumerant specifying the algorithm. See GemmAlgo

Errors:

  • ErrArchMismatch: Handle.GemmBatchedEx is only supported for GPU with architecture capabilities equal to or greater than 5.0.
  • ErrExecutionFailed: The function failed to launch on the GPU.
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if Atype or Btype or Ctype or algo or computeType is not supported
  • ErrNotInitialized: The library was not initialized.
  • ErrNotSupported: The combination of the parameters Atype, Btype and Ctype or the algorithm, algo is not supported.

Wraps cublasGemmBatchedEx_64.

func (Handle) GemmEx

func (h Handle) GemmEx(transa Operation, transb Operation, m int32, n int32, k int32, alpha Scalar, a driver.DevicePtr, atype DataType, lda int32, b driver.DevicePtr, btype DataType, ldb int32, beta Scalar, c driver.DevicePtr, ctype DataType, ldc int32, computeType ComputeType, algo GemmAlgo) error

GemmEx is an extension of cublasgemm() that allows the user to individually specify the data types for each of the A, B and C matrices, the precision of computation and the GEMM algorithm to be run.

Supported combinations of arguments are listed further down in this section.

Note: The second variant of Handle.GemmEx function is provided for backward compatibility with C++ applications code, where the computeType parameter is of cudaDataType instead of ComputeType. C applications would still compile with the updated function signature. This function is only supported on devices with compute capability 5.0 or later. C=αop(A)op(B)+βC where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×k , op(B)k×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . Handle.GemmEx supports the following Compute Type, Scale Type, Atype/Btype, and Ctype:

Note: Compute32I and Compute32IPedantic compute types are only supported with A, B being 4-byte aligned and lda, ldb being multiples of 4. For better performance, it is also recommended that IMMA kernels requirements for a regular data ordering listed here are met. The possible error values returned by this function and their meanings are listed in the following table. Starting with release 11.2, using the typed functions instead of the extension functions (cublas**Ex()) helps in reducing the binary size when linking to static cuBLAS Library. Also refer to: sgemm.() For more information about the numerical behavior of some GEMM algorithms, refer to the GEMM Algorithms Numerical Behavior section.

Handle.GemmEx64 takes 64-bit sizes.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • k: Number of columns of op( A) and rows of op( B)
  • alpha: Scaling factor for A*B of the type that corresponds to the computeType and Ctype, see the table below for details. Its kind must match computeType and ctype; a host Scalar of another kind is a *ScalarError. It holds a host value or, under Handle.SetPointerMode with PointerModeDevice, a device address made with DeviceScalar.
  • a: < type > array of dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • atype: Enumerant specifying the datatype of matrix A
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • btype: Enumerant specifying the datatype of matrix B
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: Scaling factor for C of the type that corresponds to the computeType and Ctype, see the table below for details. If beta == 0, C does not have to be a valid input. Its kind must match computeType and ctype; a host Scalar of another kind is a *ScalarError. It holds a host value or, under Handle.SetPointerMode with PointerModeDevice, a device address made with DeviceScalar.
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ctype: Enumerant specifying the datatype of matrix C
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C
  • computeType: Enumerant specifying the computation type
  • algo: Enumerant specifying the algorithm. See GemmAlgo

Errors:

  • ErrArchMismatch: Handle.GemmEx is only supported for GPU with architecture capabilities equal or greater than 5.0.
  • ErrExecutionFailed: The function failed to launch on the GPU.
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if C is NULL when beta is not zero; if Atype or Btype or Ctype or algo are not supported
  • ErrNotInitialized: The library was not initialized.
  • ErrNotSupported: The combination of the parameters Atype, Btype and Ctype or the algorithm, algo is not supported.

Wraps cublasGemmEx.

func (Handle) GemmEx64

func (h Handle) GemmEx64(transa Operation, transb Operation, m int64, n int64, k int64, alpha Scalar, a driver.DevicePtr, atype DataType, lda int64, b driver.DevicePtr, btype DataType, ldb int64, beta Scalar, c driver.DevicePtr, ctype DataType, ldc int64, computeType ComputeType, algo GemmAlgo) error

GemmEx64 is an extension of cublasgemm() that allows the user to individually specify the data types for each of the A, B and C matrices, the precision of computation and the GEMM algorithm to be run.

Supported combinations of arguments are listed further down in this section.

Note: The second variant of Handle.GemmEx function is provided for backward compatibility with C++ applications code, where the computeType parameter is of cudaDataType instead of ComputeType. C applications would still compile with the updated function signature. This function is only supported on devices with compute capability 5.0 or later. C=αop(A)op(B)+βC where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×k , op(B)k×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . Handle.GemmEx supports the following Compute Type, Scale Type, Atype/Btype, and Ctype:

Note: Compute32I and Compute32IPedantic compute types are only supported with A, B being 4-byte aligned and lda, ldb being multiples of 4. For better performance, it is also recommended that IMMA kernels requirements for a regular data ordering listed here are met. The possible error values returned by this function and their meanings are listed in the following table. Starting with release 11.2, using the typed functions instead of the extension functions (cublas**Ex()) helps in reducing the binary size when linking to static cuBLAS Library. Also refer to: sgemm.() For more information about the numerical behavior of some GEMM algorithms, refer to the GEMM Algorithms Numerical Behavior section.

It is Handle.GemmEx with int64 sizes and strides.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • k: Number of columns of op( A) and rows of op( B)
  • alpha: Scaling factor for A*B of the type that corresponds to the computeType and Ctype, see the table below for details. Its kind must match computeType and ctype; a host Scalar of another kind is a *ScalarError. It holds a host value or, under Handle.SetPointerMode with PointerModeDevice, a device address made with DeviceScalar.
  • a: < type > array of dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • atype: Enumerant specifying the datatype of matrix A
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • btype: Enumerant specifying the datatype of matrix B
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: Scaling factor for C of the type that corresponds to the computeType and Ctype, see the table below for details. If beta == 0, C does not have to be a valid input. Its kind must match computeType and ctype; a host Scalar of another kind is a *ScalarError. It holds a host value or, under Handle.SetPointerMode with PointerModeDevice, a device address made with DeviceScalar.
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ctype: Enumerant specifying the datatype of matrix C
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C
  • computeType: Enumerant specifying the computation type
  • algo: Enumerant specifying the algorithm. See GemmAlgo

Errors:

  • ErrArchMismatch: Handle.GemmEx is only supported for GPU with architecture capabilities equal or greater than 5.0.
  • ErrExecutionFailed: The function failed to launch on the GPU.
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if C is NULL when beta is not zero; if Atype or Btype or Ctype or algo are not supported
  • ErrNotInitialized: The library was not initialized.
  • ErrNotSupported: The combination of the parameters Atype, Btype and Ctype or the algorithm, algo is not supported.

Wraps cublasGemmEx_64.

func (Handle) GemmGroupedBatchedEx

func (h Handle) GemmGroupedBatchedEx(transaArray *Operation, transbArray *Operation, mArray *int32, nArray *int32, kArray *int32, alphaArray unsafe.Pointer, aarray driver.DevicePtr, atype DataType, ldaArray *int32, barray driver.DevicePtr, btype DataType, ldbArray *int32, betaArray unsafe.Pointer, carray driver.DevicePtr, ctype DataType, ldcArray *int32, groupCount int32, groupSize *int32, computeType ComputeType) error

GemmGroupedBatchedEx performs the matrix-matrix multiplication on groups of matrices.

A given group is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. However, the dimensions, leading dimensions, transpositions, and scaling factors (alpha, beta) may vary between groups. The address of the input matrices and the output matrix of each instance of the batch are read from arrays of pointers passed to the function by the caller. This is functionally equivalent to the following:

idx = 0;
for i = 0:group_count - 1
    for j = 0:group_size[i] - 1
        gemmEx(transa_array[i], transb_array[i], m_array[i], n_array[i], k_array[i],
               alpha_array[i], Aarray[idx], Atype, lda_array[i], Barray[idx], Btype,
               ldb_array[i], beta_array[i], Carray[idx], Ctype, ldc_array[i],
               computeType, CUBLAS_GEMM_DEFAULT);
        idx += 1;
    end
end

where alphaArray and betaArray are arrays of scaling factors, and Aarray, Barray and Carray are arrays of pointers to matrices stored in column-major format. For a given index, idx, that is part of group i, the dimensions are:

Note: This API takes arrays of two different lengths. The arrays of dimensions, leading dimensions, transpositions, and scaling factors are of length groupCount and the arrays of matrices are of length problem_count where problem_count=∑_(i=0)^(groupCount−1)groupSize[i] For matrix A[idx] in group i op(A[idx])={A[idx]if transaArray[i] == CUBLAS_OP_NA[idx]ᵀif transaArray[i] == CUBLAS_OP_TA[idx]ᴴif transaArray[i] == OpC and op(B[idx]) is defined similarly for matrix B[idx] in group i.

Note: C[idx] matrices must not overlap, that is, the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to Handle.GemmBatchedEx in different CUDA streams, rather than use this API. Handle.GemmGroupedBatchedEx supports the following Compute Type, Scale Type, Atype/Btype, and Ctype:

  • Compute Type: Compute32F; Scale Type (alpha and beta): CUDA_R_32F; Atype/Btype: CUDA_R_16BF; Ctype: CUDA_R_16BF
  • Compute Type: Compute32F; Scale Type (alpha and beta): CUDA_R_32F; Atype/Btype: CUDA_R_16F; Ctype: CUDA_R_16F
  • Compute Type: Compute32F; Scale Type (alpha and beta): CUDA_R_32F; Atype/Btype: CUDA_R_32F; Ctype: CUDA_R_32F
  • Compute Type: Compute32FPedantic; Scale Type (alpha and beta): CUDA_R_32F; Atype/Btype: CUDA_R_32F; Ctype: CUDA_R_32F
  • Compute Type: Compute32FFastTF32; Scale Type (alpha and beta): CUDA_R_32F; Atype/Btype: CUDA_R_32F; Ctype: CUDA_R_32F
  • Compute Type: Compute64F or Compute64FPedantic; Scale Type (alpha and beta): CUDA_R_64F; Atype/Btype: CUDA_R_64F; Ctype: CUDA_R_64F

If Atype is CUDA_R_16F or CUDA_R_16BF or if the computeType is any of the FAST options, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is required that they meet the following rule:

  • if (k * AtypeSize) % 16 == 0 then ensure intptr_t(ptr) % 16 == 0,
  • if (k * AtypeSize) % 4 == 0 then ensure intptr_t(ptr) % 4 == 0.

Handle.GemmGroupedBatchedEx64 takes 64-bit sizes.

  • transaArray: Array containing the operations, op( A[idx]), that is non- or (conj.) transpose for each group
  • transbArray: Array containing the operations, op( B[idx]), that is non- or (conj.) transpose for each group
  • mArray: Array containing the number of rows of matrix op( A[idx]) and C[idx] for each group
  • nArray: Array containing the number of columns of op( B[idx]) and C[idx] for each group
  • kArray: Array containing the number of columns of op( A[idx]) and rows of op( B[idx]) for each group
  • alphaArray: Array containing the < Scale Type > scalar used for multiplication for each group
  • aarray: Array of pointers to < Atype > array, with each array of dim. lda[i] x k[i] with lda[i] >= max(1,m[i]) if transa[i] == OpN and lda[i] x m[i] with lda[i] >= max(1,k[i]) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • atype: Enumerant specifying the datatype of A
  • ldaArray: Array containing the leading dimensions of two-dimensional arrays used to store each matrix A[idx] for each group
  • barray: Array of pointers to < Btype > array, with each array of dim. ldb[i] x n[i] with ldb[i] >= max(1,k[i]) if transb[i] == OpN and ldb[i] x k[i] with ldb[i] >= max(1,n[i]) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • btype: Enumerant specifying the datatype of B
  • ldbArray: Array containing the leading dimensions of two-dimensional arrays used to store each matrix B[idx] for each group
  • betaArray: Array containing the < Scale Type > scalar used for multiplication for each group
  • carray: Array of pointers to < Ctype > array. It has dimensions ldc[i] x n[i] with ldc[i] >= max(1,m[i]). Matrices C[idx] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • ctype: Enumerant specifying the datatype of C
  • ldcArray: Array containing the leading dimensions of two-dimensional arrays used to store each matrix C[idx] for each group
  • groupCount: Number of groups
  • groupSize: Array containing the number of pointers contained in Aarray, Barray and Carray for each group
  • computeType: Enumerant specifying the computation type

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If transa_array, transb_array, m_array, n_array, k_array, alpha_array, lda_array, ldb_array, beta_array, ldc_array, or group_size are NULL, or if group_count < 0, or if m_array[i] < 0, n_array[i] < 0, k_array[i] < 0, group_size[i] < 0, or if transa_array[i] and transb_array[i] are not one of OpN, OpC, OpT, or if lda_array[i] < max(1, m_array[i]) if transa_array[i] == OpN and lda_array[i] < max(1, k_array[i]) otherwise, or if ldb_array[i] < max(1, k_array[i]) if transb_array[i] == OpN and ldb_array[i] < max(1, n_array[i]) otherwise, or if ldc_array[i] < max(1, m_array[i])
  • ErrNotInitialized: The library was not initialized
  • ErrNotSupported: the pointer mode is set to PointerModeDevice; Atype or Btype or Ctype or computeType are not supported

Wraps cublasGemmGroupedBatchedEx.

func (Handle) GemmGroupedBatchedEx64

func (h Handle) GemmGroupedBatchedEx64(transaArray *Operation, transbArray *Operation, mArray *int64, nArray *int64, kArray *int64, alphaArray unsafe.Pointer, aarray driver.DevicePtr, atype DataType, ldaArray *int64, barray driver.DevicePtr, btype DataType, ldbArray *int64, betaArray unsafe.Pointer, carray driver.DevicePtr, ctype DataType, ldcArray *int64, groupCount int64, groupSize *int64, computeType ComputeType) error

GemmGroupedBatchedEx64 performs the matrix-matrix multiplication on groups of matrices.

A given group is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. However, the dimensions, leading dimensions, transpositions, and scaling factors (alpha, beta) may vary between groups. The address of the input matrices and the output matrix of each instance of the batch are read from arrays of pointers passed to the function by the caller. This is functionally equivalent to the following:

idx = 0;
for i = 0:group_count - 1
    for j = 0:group_size[i] - 1
        gemmEx(transa_array[i], transb_array[i], m_array[i], n_array[i], k_array[i],
               alpha_array[i], Aarray[idx], Atype, lda_array[i], Barray[idx], Btype,
               ldb_array[i], beta_array[i], Carray[idx], Ctype, ldc_array[i],
               computeType, CUBLAS_GEMM_DEFAULT);
        idx += 1;
    end
end

where alphaArray and betaArray are arrays of scaling factors, and Aarray, Barray and Carray are arrays of pointers to matrices stored in column-major format. For a given index, idx, that is part of group i, the dimensions are:

Note: This API takes arrays of two different lengths. The arrays of dimensions, leading dimensions, transpositions, and scaling factors are of length groupCount and the arrays of matrices are of length problem_count where problem_count=∑_(i=0)^(groupCount−1)groupSize[i] For matrix A[idx] in group i op(A[idx])={A[idx]if transaArray[i] == CUBLAS_OP_NA[idx]ᵀif transaArray[i] == CUBLAS_OP_TA[idx]ᴴif transaArray[i] == OpC and op(B[idx]) is defined similarly for matrix B[idx] in group i.

Note: C[idx] matrices must not overlap, that is, the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to Handle.GemmBatchedEx in different CUDA streams, rather than use this API. Handle.GemmGroupedBatchedEx supports the following Compute Type, Scale Type, Atype/Btype, and Ctype:

  • Compute Type: Compute32F; Scale Type (alpha and beta): CUDA_R_32F; Atype/Btype: CUDA_R_16BF; Ctype: CUDA_R_16BF
  • Compute Type: Compute32F; Scale Type (alpha and beta): CUDA_R_32F; Atype/Btype: CUDA_R_16F; Ctype: CUDA_R_16F
  • Compute Type: Compute32F; Scale Type (alpha and beta): CUDA_R_32F; Atype/Btype: CUDA_R_32F; Ctype: CUDA_R_32F
  • Compute Type: Compute32FPedantic; Scale Type (alpha and beta): CUDA_R_32F; Atype/Btype: CUDA_R_32F; Ctype: CUDA_R_32F
  • Compute Type: Compute32FFastTF32; Scale Type (alpha and beta): CUDA_R_32F; Atype/Btype: CUDA_R_32F; Ctype: CUDA_R_32F
  • Compute Type: Compute64F or Compute64FPedantic; Scale Type (alpha and beta): CUDA_R_64F; Atype/Btype: CUDA_R_64F; Ctype: CUDA_R_64F

If Atype is CUDA_R_16F or CUDA_R_16BF or if the computeType is any of the FAST options, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is required that they meet the following rule:

  • if (k * AtypeSize) % 16 == 0 then ensure intptr_t(ptr) % 16 == 0,
  • if (k * AtypeSize) % 4 == 0 then ensure intptr_t(ptr) % 4 == 0.

It is Handle.GemmGroupedBatchedEx with int64 sizes and strides.

  • transaArray: Array containing the operations, op( A[idx]), that is non- or (conj.) transpose for each group
  • transbArray: Array containing the operations, op( B[idx]), that is non- or (conj.) transpose for each group
  • mArray: Array containing the number of rows of matrix op( A[idx]) and C[idx] for each group
  • nArray: Array containing the number of columns of op( B[idx]) and C[idx] for each group
  • kArray: Array containing the number of columns of op( A[idx]) and rows of op( B[idx]) for each group
  • alphaArray: Array containing the < Scale Type > scalar used for multiplication for each group
  • aarray: Array of pointers to < Atype > array, with each array of dim. lda[i] x k[i] with lda[i] >= max(1,m[i]) if transa[i] == OpN and lda[i] x m[i] with lda[i] >= max(1,k[i]) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • atype: Enumerant specifying the datatype of A
  • ldaArray: Array containing the leading dimensions of two-dimensional arrays used to store each matrix A[idx] for each group
  • barray: Array of pointers to < Btype > array, with each array of dim. ldb[i] x n[i] with ldb[i] >= max(1,k[i]) if transb[i] == OpN and ldb[i] x k[i] with ldb[i] >= max(1,n[i]) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • btype: Enumerant specifying the datatype of B
  • ldbArray: Array containing the leading dimensions of two-dimensional arrays used to store each matrix B[idx] for each group
  • betaArray: Array containing the < Scale Type > scalar used for multiplication for each group
  • carray: Array of pointers to < Ctype > array. It has dimensions ldc[i] x n[i] with ldc[i] >= max(1,m[i]). Matrices C[idx] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • ctype: Enumerant specifying the datatype of C
  • ldcArray: Array containing the leading dimensions of two-dimensional arrays used to store each matrix C[idx] for each group
  • groupCount: Number of groups
  • groupSize: Array containing the number of pointers contained in Aarray, Barray and Carray for each group
  • computeType: Enumerant specifying the computation type

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If transa_array, transb_array, m_array, n_array, k_array, alpha_array, lda_array, ldb_array, beta_array, ldc_array, or group_size are NULL, or if group_count < 0, or if m_array[i] < 0, n_array[i] < 0, k_array[i] < 0, group_size[i] < 0, or if transa_array[i] and transb_array[i] are not one of OpN, OpC, OpT, or if lda_array[i] < max(1, m_array[i]) if transa_array[i] == OpN and lda_array[i] < max(1, k_array[i]) otherwise, or if ldb_array[i] < max(1, k_array[i]) if transb_array[i] == OpN and ldb_array[i] < max(1, n_array[i]) otherwise, or if ldc_array[i] < max(1, m_array[i])
  • ErrNotInitialized: The library was not initialized
  • ErrNotSupported: the pointer mode is set to PointerModeDevice; Atype or Btype or Ctype or computeType are not supported

Wraps cublasGemmGroupedBatchedEx_64.

func (Handle) GemmStridedBatchedEx

func (h Handle) GemmStridedBatchedEx(transa Operation, transb Operation, m int32, n int32, k int32, alpha Scalar, a driver.DevicePtr, atype DataType, lda int32, strideA int64, b driver.DevicePtr, btype DataType, ldb int32, strideB int64, beta Scalar, c driver.DevicePtr, ctype DataType, ldc int32, strideC int64, batchCount int32, computeType ComputeType, algo GemmAlgo) error

GemmStridedBatchedEx is an extension of cublasgemmStridedBatched() that performs the matrix-matrix multiplication of a batch of matrices and allows the user to individually specify the data types for each of the A, B and C matrices, the precision of computation and the GEMM algorithm to be run.

Like cublasgemmStridedBatched(), the batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. Input matrices A, B and output matrix C for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A, B and C matrices for the first instance are passed to the function by the user along with the offsets in number of elements - strideA, strideB and strideC that determine the locations of input and output matrices in future instances.

Note: The second variant of Handle.GemmStridedBatchedEx function is provided for backward compatibility with C++ applications code, where the computeType parameter is of cudaDataType_t instead of ComputeType. C applications would still compile with the updated function signature. C+i*strideC=αop(A+i*strideA)op(B+i*strideB)+β(C+i*strideC), for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, i.e. the individual gemm operations must be computable independently; otherwise, the behavior is undefined. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], B[i], C[i] as notation for A, B and C matrices in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, strideB, strideC away from A[i-1], B[i-1], C[i-1]. The unit for the offset is number of elements and must not be zero . Handle.GemmStridedBatchedEx supports the following Compute Type, Scale Type, Atype/Btype, and Ctype:

Note: Compute types Compute32I and Compute32IPedantic are only supported with all pointers A[i], B[i] being 4-byte aligned and lda, ldb being multiples of 4. For a better performance, it is also recommended that IMMA kernels requirements for the regular data ordering listed here are met. Also refer to: sgemm.()

Handle.GemmStridedBatchedEx64 takes 64-bit sizes.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of matrix op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: Scaling factor for A*B of the type that corresponds to the computeType and Ctype, see the table below for details. Its kind must match computeType and ctype; a host Scalar of another kind is a *ScalarError. It holds a host value or, under Handle.SetPointerMode with PointerModeDevice, a device address made with DeviceScalar.
  • a: Pointer to < Atype > matrix, A, corresponds to the first instance of the batch, with dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • atype: Enumerant specifying the datatype of A
  • lda: Leading dimension of two-dimensional array used to store the matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • b: Pointer to < Btype > matrix, B, corresponds to the first instance of the batch, with dimensions ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • btype: Enumerant specifying the datatype of B
  • ldb: Leading dimension of two-dimensional array used to store matrix B[i]
  • strideB: Value of type long long int that gives the offset in number of elements between B[i] and B[i+1]
  • beta: Scaling factor for C of the type that corresponds to the computeType and Ctype, see the table below for details. If beta == 0, C[i] does not have to be a valid input. Its kind must match computeType and ctype; a host Scalar of another kind is a *ScalarError. It holds a host value or, under Handle.SetPointerMode with PointerModeDevice, a device address made with DeviceScalar.
  • c: Pointer to < Ctype > matrix, C, corresponds to the first instance of the batch, with dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected
  • ctype: Enumerant specifying the datatype of C
  • ldc: Leading dimension of a two-dimensional array used to store each matrix C[i]
  • strideC: Value of type long long int that gives the offset in number of elements between C[i] and C[i+1]
  • batchCount: Number of GEMMs to perform in the batch
  • computeType: Enumerant specifying the computation type
  • algo: Enumerant specifying the algorithm. See GemmAlgo

Errors:

  • ErrArchMismatch: Handle.GemmBatchedEx is only supported for GPU with architecture capabilities equal or greater than 5.0.
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if Atype or Btype or Ctype or algo or computeType is not supported
  • ErrNotInitialized: The library was not initialized.
  • ErrNotSupported: The combination of the parameters Atype, Btype and Ctype or the algorithm, algo is not supported.

Wraps cublasGemmStridedBatchedEx.

func (Handle) GemmStridedBatchedEx64

func (h Handle) GemmStridedBatchedEx64(transa Operation, transb Operation, m int64, n int64, k int64, alpha Scalar, a driver.DevicePtr, atype DataType, lda int64, strideA int64, b driver.DevicePtr, btype DataType, ldb int64, strideB int64, beta Scalar, c driver.DevicePtr, ctype DataType, ldc int64, strideC int64, batchCount int64, computeType ComputeType, algo GemmAlgo) error

GemmStridedBatchedEx64 is an extension of cublasgemmStridedBatched() that performs the matrix-matrix multiplication of a batch of matrices and allows the user to individually specify the data types for each of the A, B and C matrices, the precision of computation and the GEMM algorithm to be run.

Like cublasgemmStridedBatched(), the batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. Input matrices A, B and output matrix C for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A, B and C matrices for the first instance are passed to the function by the user along with the offsets in number of elements - strideA, strideB and strideC that determine the locations of input and output matrices in future instances.

Note: The second variant of Handle.GemmStridedBatchedEx function is provided for backward compatibility with C++ applications code, where the computeType parameter is of cudaDataType_t instead of ComputeType. C applications would still compile with the updated function signature. C+i*strideC=αop(A+i*strideA)op(B+i*strideB)+β(C+i*strideC), for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, i.e. the individual gemm operations must be computable independently; otherwise, the behavior is undefined. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], B[i], C[i] as notation for A, B and C matrices in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, strideB, strideC away from A[i-1], B[i-1], C[i-1]. The unit for the offset is number of elements and must not be zero . Handle.GemmStridedBatchedEx supports the following Compute Type, Scale Type, Atype/Btype, and Ctype:

Note: Compute types Compute32I and Compute32IPedantic are only supported with all pointers A[i], B[i] being 4-byte aligned and lda, ldb being multiples of 4. For a better performance, it is also recommended that IMMA kernels requirements for the regular data ordering listed here are met. Also refer to: sgemm.()

It is Handle.GemmStridedBatchedEx with int64 sizes and strides.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of matrix op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: Scaling factor for A*B of the type that corresponds to the computeType and Ctype, see the table below for details. Its kind must match computeType and ctype; a host Scalar of another kind is a *ScalarError. It holds a host value or, under Handle.SetPointerMode with PointerModeDevice, a device address made with DeviceScalar.
  • a: Pointer to < Atype > matrix, A, corresponds to the first instance of the batch, with dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • atype: Enumerant specifying the datatype of A
  • lda: Leading dimension of two-dimensional array used to store the matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • b: Pointer to < Btype > matrix, B, corresponds to the first instance of the batch, with dimensions ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • btype: Enumerant specifying the datatype of B
  • ldb: Leading dimension of two-dimensional array used to store matrix B[i]
  • strideB: Value of type long long int that gives the offset in number of elements between B[i] and B[i+1]
  • beta: Scaling factor for C of the type that corresponds to the computeType and Ctype, see the table below for details. If beta == 0, C[i] does not have to be a valid input. Its kind must match computeType and ctype; a host Scalar of another kind is a *ScalarError. It holds a host value or, under Handle.SetPointerMode with PointerModeDevice, a device address made with DeviceScalar.
  • c: Pointer to < Ctype > matrix, C, corresponds to the first instance of the batch, with dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected
  • ctype: Enumerant specifying the datatype of C
  • ldc: Leading dimension of a two-dimensional array used to store each matrix C[i]
  • strideC: Value of type long long int that gives the offset in number of elements between C[i] and C[i+1]
  • batchCount: Number of GEMMs to perform in the batch
  • computeType: Enumerant specifying the computation type
  • algo: Enumerant specifying the algorithm. See GemmAlgo

Errors:

  • ErrArchMismatch: Handle.GemmBatchedEx is only supported for GPU with architecture capabilities equal or greater than 5.0.
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if Atype or Btype or Ctype or algo or computeType is not supported
  • ErrNotInitialized: The library was not initialized.
  • ErrNotSupported: The combination of the parameters Atype, Btype and Ctype or the algorithm, algo is not supported.

Wraps cublasGemmStridedBatchedEx_64.

func (Handle) HSHgemvBatched

func (h Handle) HSHgemvBatched(trans Operation, m int32, n int32, alpha *float32, aarray driver.DevicePtr, lda int32, xarray driver.DevicePtr, incx int32, beta *float32, yarray driver.DevicePtr, incy int32, batchCount int32) error

HSHgemvBatched performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. The address of the input matrix and vector, and the output vector of each instance of the batch are read from arrays of pointers passed to the function by the caller. y[i]=αop(A[i])x[i]+βy[i], for i∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrice A[i] stored in column-major format with dimension m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] , op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] vectors must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemvBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

Handle.HSHgemvBatched64 takes 64-bit sizes.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x n with lda >= max(1, m). All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • xarray: Array of pointers to < type > array, with each dimension n if trans == OpN and m otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • incx: Stride of each one-dimensional array x[i]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • yarray: Array of pointers to < type > array. It has dimensions m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • incy: Stride of each one-dimensional array y[i]
  • batchCount: Number of pointers contained in Aarray, xarray and yarray

Errors:

Wraps cublasHSHgemvBatched.

func (Handle) HSHgemvBatched64

func (h Handle) HSHgemvBatched64(trans Operation, m int64, n int64, alpha *float32, aarray driver.DevicePtr, lda int64, xarray driver.DevicePtr, incx int64, beta *float32, yarray driver.DevicePtr, incy int64, batchCount int64) error

HSHgemvBatched64 performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. The address of the input matrix and vector, and the output vector of each instance of the batch are read from arrays of pointers passed to the function by the caller. y[i]=αop(A[i])x[i]+βy[i], for i∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrice A[i] stored in column-major format with dimension m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] , op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] vectors must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemvBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

It is Handle.HSHgemvBatched with int64 sizes and strides.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x n with lda >= max(1, m). All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • xarray: Array of pointers to < type > array, with each dimension n if trans == OpN and m otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • incx: Stride of each one-dimensional array x[i]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • yarray: Array of pointers to < type > array. It has dimensions m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • incy: Stride of each one-dimensional array y[i]
  • batchCount: Number of pointers contained in Aarray, xarray and yarray

Errors:

Wraps cublasHSHgemvBatched_64.

func (Handle) HSHgemvStridedBatched

func (h Handle) HSHgemvStridedBatched(trans Operation, m int32, n int32, alpha *float32, a driver.DevicePtr, lda int32, strideA int64, x driver.DevicePtr, incx int32, stridex int64, beta *float32, y driver.DevicePtr, incy int32, stridey int64, batchCount int32) error

HSHgemvStridedBatched performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. Input matrix A and vector x, and output vector y for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A matrix, x and y vectors for the first instance are passed to the function by the user along with offsets in number of elements - strideA, stridex and stridey that determine the locations of input matrices and vectors, and output vectors in future instances. y+i*stridey=αop(A+i*strideA)(x+i*stridex)+β(y+i*stridey), for i ∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrix stored in column-major format with dimension A[i]m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] matrices must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], x[i], y[i] as notation for A matrix, and x and y vectors in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, stridex, stridey away from A[i-1], x[i-1], y[i-1]. The unit for the offset is number of elements and must not be zero .

Handle.HSHgemvStridedBatched64 takes 64-bit sizes.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • x: < type >* pointer to the x vector corresponding to the first instance of the batch, with each dimension n if trans == OpN and m otherwise
  • incx: Stride of each one-dimensional array x[i]
  • stridex: Value of type long long int that gives the offset in number of elements between x[i] and x[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • y: < type >* pointer to the y vector corresponding to the first instance of the batch, with each dimension m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected
  • incy: Stride of each one-dimensional array y[i]
  • stridey: Value of type long long int that gives the offset in number of elements between y[i] and y[i+1]
  • batchCount: Number of GEMVs to perform in the batch

Errors:

Wraps cublasHSHgemvStridedBatched.

func (Handle) HSHgemvStridedBatched64

func (h Handle) HSHgemvStridedBatched64(trans Operation, m int64, n int64, alpha *float32, a driver.DevicePtr, lda int64, strideA int64, x driver.DevicePtr, incx int64, stridex int64, beta *float32, y driver.DevicePtr, incy int64, stridey int64, batchCount int64) error

HSHgemvStridedBatched64 performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. Input matrix A and vector x, and output vector y for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A matrix, x and y vectors for the first instance are passed to the function by the user along with offsets in number of elements - strideA, stridex and stridey that determine the locations of input matrices and vectors, and output vectors in future instances. y+i*stridey=αop(A+i*strideA)(x+i*stridex)+β(y+i*stridey), for i ∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrix stored in column-major format with dimension A[i]m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] matrices must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], x[i], y[i] as notation for A matrix, and x and y vectors in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, stridex, stridey away from A[i-1], x[i-1], y[i-1]. The unit for the offset is number of elements and must not be zero .

It is Handle.HSHgemvStridedBatched with int64 sizes and strides.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • x: < type >* pointer to the x vector corresponding to the first instance of the batch, with each dimension n if trans == OpN and m otherwise
  • incx: Stride of each one-dimensional array x[i]
  • stridex: Value of type long long int that gives the offset in number of elements between x[i] and x[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • y: < type >* pointer to the y vector corresponding to the first instance of the batch, with each dimension m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected
  • incy: Stride of each one-dimensional array y[i]
  • stridey: Value of type long long int that gives the offset in number of elements between y[i] and y[i+1]
  • batchCount: Number of GEMVs to perform in the batch

Errors:

Wraps cublasHSHgemvStridedBatched_64.

func (Handle) HSSgemvBatched

func (h Handle) HSSgemvBatched(trans Operation, m int32, n int32, alpha *float32, aarray driver.DevicePtr, lda int32, xarray driver.DevicePtr, incx int32, beta *float32, yarray driver.DevicePtr, incy int32, batchCount int32) error

HSSgemvBatched performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. The address of the input matrix and vector, and the output vector of each instance of the batch are read from arrays of pointers passed to the function by the caller. y[i]=αop(A[i])x[i]+βy[i], for i∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrice A[i] stored in column-major format with dimension m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] , op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] vectors must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemvBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

Handle.HSSgemvBatched64 takes 64-bit sizes.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x n with lda >= max(1, m). All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • xarray: Array of pointers to < type > array, with each dimension n if trans == OpN and m otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • incx: Stride of each one-dimensional array x[i]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • yarray: Array of pointers to < type > array. It has dimensions m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • incy: Stride of each one-dimensional array y[i]
  • batchCount: Number of pointers contained in Aarray, xarray and yarray

Errors:

Wraps cublasHSSgemvBatched.

func (Handle) HSSgemvBatched64

func (h Handle) HSSgemvBatched64(trans Operation, m int64, n int64, alpha *float32, aarray driver.DevicePtr, lda int64, xarray driver.DevicePtr, incx int64, beta *float32, yarray driver.DevicePtr, incy int64, batchCount int64) error

HSSgemvBatched64 performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. The address of the input matrix and vector, and the output vector of each instance of the batch are read from arrays of pointers passed to the function by the caller. y[i]=αop(A[i])x[i]+βy[i], for i∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrice A[i] stored in column-major format with dimension m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] , op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] vectors must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemvBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

It is Handle.HSSgemvBatched with int64 sizes and strides.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x n with lda >= max(1, m). All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • xarray: Array of pointers to < type > array, with each dimension n if trans == OpN and m otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • incx: Stride of each one-dimensional array x[i]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • yarray: Array of pointers to < type > array. It has dimensions m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • incy: Stride of each one-dimensional array y[i]
  • batchCount: Number of pointers contained in Aarray, xarray and yarray

Errors:

Wraps cublasHSSgemvBatched_64.

func (Handle) HSSgemvStridedBatched

func (h Handle) HSSgemvStridedBatched(trans Operation, m int32, n int32, alpha *float32, a driver.DevicePtr, lda int32, strideA int64, x driver.DevicePtr, incx int32, stridex int64, beta *float32, y driver.DevicePtr, incy int32, stridey int64, batchCount int32) error

HSSgemvStridedBatched performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. Input matrix A and vector x, and output vector y for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A matrix, x and y vectors for the first instance are passed to the function by the user along with offsets in number of elements - strideA, stridex and stridey that determine the locations of input matrices and vectors, and output vectors in future instances. y+i*stridey=αop(A+i*strideA)(x+i*stridex)+β(y+i*stridey), for i ∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrix stored in column-major format with dimension A[i]m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] matrices must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], x[i], y[i] as notation for A matrix, and x and y vectors in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, stridex, stridey away from A[i-1], x[i-1], y[i-1]. The unit for the offset is number of elements and must not be zero .

Handle.HSSgemvStridedBatched64 takes 64-bit sizes.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • x: < type >* pointer to the x vector corresponding to the first instance of the batch, with each dimension n if trans == OpN and m otherwise
  • incx: Stride of each one-dimensional array x[i]
  • stridex: Value of type long long int that gives the offset in number of elements between x[i] and x[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • y: < type >* pointer to the y vector corresponding to the first instance of the batch, with each dimension m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected
  • incy: Stride of each one-dimensional array y[i]
  • stridey: Value of type long long int that gives the offset in number of elements between y[i] and y[i+1]
  • batchCount: Number of GEMVs to perform in the batch

Errors:

Wraps cublasHSSgemvStridedBatched.

func (Handle) HSSgemvStridedBatched64

func (h Handle) HSSgemvStridedBatched64(trans Operation, m int64, n int64, alpha *float32, a driver.DevicePtr, lda int64, strideA int64, x driver.DevicePtr, incx int64, stridex int64, beta *float32, y driver.DevicePtr, incy int64, stridey int64, batchCount int64) error

HSSgemvStridedBatched64 performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. Input matrix A and vector x, and output vector y for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A matrix, x and y vectors for the first instance are passed to the function by the user along with offsets in number of elements - strideA, stridex and stridey that determine the locations of input matrices and vectors, and output vectors in future instances. y+i*stridey=αop(A+i*strideA)(x+i*stridex)+β(y+i*stridey), for i ∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrix stored in column-major format with dimension A[i]m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] matrices must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], x[i], y[i] as notation for A matrix, and x and y vectors in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, stridex, stridey away from A[i-1], x[i-1], y[i-1]. The unit for the offset is number of elements and must not be zero .

It is Handle.HSSgemvStridedBatched with int64 sizes and strides.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • x: < type >* pointer to the x vector corresponding to the first instance of the batch, with each dimension n if trans == OpN and m otherwise
  • incx: Stride of each one-dimensional array x[i]
  • stridex: Value of type long long int that gives the offset in number of elements between x[i] and x[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • y: < type >* pointer to the y vector corresponding to the first instance of the batch, with each dimension m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected
  • incy: Stride of each one-dimensional array y[i]
  • stridey: Value of type long long int that gives the offset in number of elements between y[i] and y[i+1]
  • batchCount: Number of GEMVs to perform in the batch

Errors:

Wraps cublasHSSgemvStridedBatched_64.

func (Handle) Hgemm

func (h Handle) Hgemm(transa Operation, transb Operation, m int32, n int32, k int32, alpha *Half, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *Half, c driver.DevicePtr, ldc int32) error

Hgemm performs the matrix-matrix multiplication.

C=αop(A)op(B)+βC, where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×k , op(B)k×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . For references please refer to NETLIB documentation: sgemm(), dgemm(), cgemm(), zgemm()

Handle.Hgemm64 takes 64-bit sizes.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • k: Number of columns of op( A) and rows of op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrArchMismatch: In the case of Handle.Hgemm the device does not support math in half precision.
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasHgemm.

func (Handle) Hgemm64

func (h Handle) Hgemm64(transa Operation, transb Operation, m int64, n int64, k int64, alpha *Half, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *Half, c driver.DevicePtr, ldc int64) error

Hgemm64 performs the matrix-matrix multiplication.

C=αop(A)op(B)+βC, where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×k , op(B)k×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . For references please refer to NETLIB documentation: sgemm(), dgemm(), cgemm(), zgemm()

It is Handle.Hgemm with int64 sizes and strides.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • k: Number of columns of op( A) and rows of op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrArchMismatch: In the case of Handle.Hgemm the device does not support math in half precision.
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasHgemm_64.

func (Handle) HgemmBatched

func (h Handle) HgemmBatched(transa Operation, transb Operation, m int32, n int32, k int32, alpha *Half, aarray driver.DevicePtr, lda int32, barray driver.DevicePtr, ldb int32, beta *Half, carray driver.DevicePtr, ldc int32, batchCount int32) error

HgemmBatched performs the matrix-matrix multiplication of a batch of matrices.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. The address of the input matrices and the output matrix of each instance of the batch are read from arrays of pointers passed to the function by the caller. C[i]=αop(A[i])op(B[i])+βC[i], for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, that is, the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemmBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

Handle.HgemmBatched64 takes 64-bit sizes.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • barray: Array of pointers to < type > array, with each array of dim. ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • ldb: Leading dimension of two-dimensional array used to store each matrix B[i]
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • carray: Array of pointers to < type > array. It has dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • ldc: Leading dimension of two-dimensional array used to store each matrix C[i]
  • batchCount: Number of pointers contained in Aarray, Barray and Carray

Errors:

  • ErrArchMismatch: Handle.HgemmBatched is only supported for GPU with architecture capabilities equal or greater than 5.3
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m)
  • ErrNotInitialized: The library was not initialized

Wraps cublasHgemmBatched.

func (Handle) HgemmBatched64

func (h Handle) HgemmBatched64(transa Operation, transb Operation, m int64, n int64, k int64, alpha *Half, aarray driver.DevicePtr, lda int64, barray driver.DevicePtr, ldb int64, beta *Half, carray driver.DevicePtr, ldc int64, batchCount int64) error

HgemmBatched64 performs the matrix-matrix multiplication of a batch of matrices.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. The address of the input matrices and the output matrix of each instance of the batch are read from arrays of pointers passed to the function by the caller. C[i]=αop(A[i])op(B[i])+βC[i], for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, that is, the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemmBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

It is Handle.HgemmBatched with int64 sizes and strides.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • barray: Array of pointers to < type > array, with each array of dim. ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • ldb: Leading dimension of two-dimensional array used to store each matrix B[i]
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • carray: Array of pointers to < type > array. It has dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • ldc: Leading dimension of two-dimensional array used to store each matrix C[i]
  • batchCount: Number of pointers contained in Aarray, Barray and Carray

Errors:

  • ErrArchMismatch: Handle.HgemmBatched is only supported for GPU with architecture capabilities equal or greater than 5.3
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m)
  • ErrNotInitialized: The library was not initialized

Wraps cublasHgemmBatched_64.

func (Handle) HgemmStridedBatched

func (h Handle) HgemmStridedBatched(transa Operation, transb Operation, m int32, n int32, k int32, alpha *Half, a driver.DevicePtr, lda int32, strideA int64, b driver.DevicePtr, ldb int32, strideB int64, beta *Half, c driver.DevicePtr, ldc int32, strideC int64, batchCount int32) error

HgemmStridedBatched performs the matrix-matrix multiplication of a batch of matrices.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. Input matrices A, B and output matrix C for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A, B and C matrices for the first instance are passed to the function by the user along with offsets in number of elements - strideA, strideB and strideC that determine the locations of input and output matrices in future instances. C+i*strideC=αop(A+i*strideA)op(B+i*strideB)+β(C+i*strideC), for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, i.e. the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], B[i], C[i] as notation for A, B and C matrices in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, strideB, strideC away from A[i-1], B[i-1], C[i-1]. The unit for the offset is number of elements and must not be zero .

Handle.HgemmStridedBatched64 takes 64-bit sizes.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • b: < type >* pointer to the B matrix corresponding to the first instance of the batch, with dimensions ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store each matrix B[i]
  • strideB: Value of type long long int that gives the offset in number of elements between B[i] and B[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type >* pointer to the C matrix corresponding to the first instance of the batch, with dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected
  • ldc: Leading dimension of two-dimensional array used to store each matrix C[i]
  • strideC: Value of type long long int that gives the offset in number of elements between C[i] and C[i+1]
  • batchCount: Number of GEMMs to perform in the batch

Errors:

Wraps cublasHgemmStridedBatched.

func (Handle) HgemmStridedBatched64

func (h Handle) HgemmStridedBatched64(transa Operation, transb Operation, m int64, n int64, k int64, alpha *Half, a driver.DevicePtr, lda int64, strideA int64, b driver.DevicePtr, ldb int64, strideB int64, beta *Half, c driver.DevicePtr, ldc int64, strideC int64, batchCount int64) error

HgemmStridedBatched64 performs the matrix-matrix multiplication of a batch of matrices.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. Input matrices A, B and output matrix C for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A, B and C matrices for the first instance are passed to the function by the user along with offsets in number of elements - strideA, strideB and strideC that determine the locations of input and output matrices in future instances. C+i*strideC=αop(A+i*strideA)op(B+i*strideB)+β(C+i*strideC), for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, i.e. the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], B[i], C[i] as notation for A, B and C matrices in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, strideB, strideC away from A[i-1], B[i-1], C[i-1]. The unit for the offset is number of elements and must not be zero .

It is Handle.HgemmStridedBatched with int64 sizes and strides.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • b: < type >* pointer to the B matrix corresponding to the first instance of the batch, with dimensions ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store each matrix B[i]
  • strideB: Value of type long long int that gives the offset in number of elements between B[i] and B[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type >* pointer to the C matrix corresponding to the first instance of the batch, with dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected
  • ldc: Leading dimension of two-dimensional array used to store each matrix C[i]
  • strideC: Value of type long long int that gives the offset in number of elements between C[i] and C[i+1]
  • batchCount: Number of GEMMs to perform in the batch

Errors:

Wraps cublasHgemmStridedBatched_64.

func (Handle) IamaxEx

func (h Handle) IamaxEx(n int32, x driver.DevicePtr, xType DataType, incx int32) (int32, error)

IamaxEx wraps cublasIamaxEx.

Handle.IamaxEx64 takes 64-bit sizes.

func (Handle) IamaxEx64

func (h Handle) IamaxEx64(n int64, x driver.DevicePtr, xType DataType, incx int64) (int64, error)

IamaxEx64 wraps cublasIamaxEx_64.

It is Handle.IamaxEx with int64 sizes and strides.

func (Handle) IaminEx

func (h Handle) IaminEx(n int32, x driver.DevicePtr, xType DataType, incx int32) (int32, error)

IaminEx wraps cublasIaminEx.

Handle.IaminEx64 takes 64-bit sizes.

func (Handle) IaminEx64

func (h Handle) IaminEx64(n int64, x driver.DevicePtr, xType DataType, incx int64) (int64, error)

IaminEx64 wraps cublasIaminEx_64.

It is Handle.IaminEx with int64 sizes and strides.

func (Handle) Icamax

func (h Handle) Icamax(n int32, x driver.DevicePtr, incx int32) (int32, error)

Icamax finds the (smallest) index of the element of the maximum magnitude.

Hence, the result is the first i such that |Im(x[j])|+|Re(x[j])| is maximum for i=1,…,n and j=1+(i−1)* incx . Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: isamax(), idamax(), icamax(), izamax()

Handle.Icamax64 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting index, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasIcamax_v2.

func (Handle) Icamax64

func (h Handle) Icamax64(n int64, x driver.DevicePtr, incx int64) (int64, error)

Icamax64 finds the (smallest) index of the element of the maximum magnitude.

Hence, the result is the first i such that |Im(x[j])|+|Re(x[j])| is maximum for i=1,…,n and j=1+(i−1)* incx . Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: isamax(), idamax(), icamax(), izamax()

It is Handle.Icamax with int64 sizes and strides.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting index, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasIcamax_v2_64.

func (Handle) Icamin

func (h Handle) Icamin(n int32, x driver.DevicePtr, incx int32) (int32, error)

Icamin finds the (smallest) index of the element of the minimum magnitude.

Hence, the result is the first i such that |Im(x[j])|+|Re(x[j])| is minimum for i=1,…,n and j=1+(i−1)*incx Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: isamin()

Handle.Icamin64 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting index, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasIcamin_v2.

func (Handle) Icamin64

func (h Handle) Icamin64(n int64, x driver.DevicePtr, incx int64) (int64, error)

Icamin64 finds the (smallest) index of the element of the minimum magnitude.

Hence, the result is the first i such that |Im(x[j])|+|Re(x[j])| is minimum for i=1,…,n and j=1+(i−1)*incx Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: isamin()

It is Handle.Icamin with int64 sizes and strides.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting index, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasIcamin_v2_64.

func (Handle) Idamax

func (h Handle) Idamax(n int32, x driver.DevicePtr, incx int32) (int32, error)

Idamax finds the (smallest) index of the element of the maximum magnitude.

Hence, the result is the first i such that |Im(x[j])|+|Re(x[j])| is maximum for i=1,…,n and j=1+(i−1)* incx . Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: isamax(), idamax(), icamax(), izamax()

Handle.Idamax64 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting index, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasIdamax_v2.

func (Handle) Idamax64

func (h Handle) Idamax64(n int64, x driver.DevicePtr, incx int64) (int64, error)

Idamax64 finds the (smallest) index of the element of the maximum magnitude.

Hence, the result is the first i such that |Im(x[j])|+|Re(x[j])| is maximum for i=1,…,n and j=1+(i−1)* incx . Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: isamax(), idamax(), icamax(), izamax()

It is Handle.Idamax with int64 sizes and strides.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting index, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasIdamax_v2_64.

func (Handle) Idamin

func (h Handle) Idamin(n int32, x driver.DevicePtr, incx int32) (int32, error)

Idamin finds the (smallest) index of the element of the minimum magnitude.

Hence, the result is the first i such that |Im(x[j])|+|Re(x[j])| is minimum for i=1,…,n and j=1+(i−1)*incx Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: isamin()

Handle.Idamin64 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting index, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasIdamin_v2.

func (Handle) Idamin64

func (h Handle) Idamin64(n int64, x driver.DevicePtr, incx int64) (int64, error)

Idamin64 finds the (smallest) index of the element of the minimum magnitude.

Hence, the result is the first i such that |Im(x[j])|+|Re(x[j])| is minimum for i=1,…,n and j=1+(i−1)*incx Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: isamin()

It is Handle.Idamin with int64 sizes and strides.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting index, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasIdamin_v2_64.

func (Handle) Isamax

func (h Handle) Isamax(n int32, x driver.DevicePtr, incx int32) (int32, error)

Isamax finds the (smallest) index of the element of the maximum magnitude.

Hence, the result is the first i such that |Im(x[j])|+|Re(x[j])| is maximum for i=1,…,n and j=1+(i−1)* incx . Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: isamax(), idamax(), icamax(), izamax()

Handle.Isamax64 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting index, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasIsamax_v2.

func (Handle) Isamax64

func (h Handle) Isamax64(n int64, x driver.DevicePtr, incx int64) (int64, error)

Isamax64 finds the (smallest) index of the element of the maximum magnitude.

Hence, the result is the first i such that |Im(x[j])|+|Re(x[j])| is maximum for i=1,…,n and j=1+(i−1)* incx . Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: isamax(), idamax(), icamax(), izamax()

It is Handle.Isamax with int64 sizes and strides.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting index, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasIsamax_v2_64.

func (Handle) Isamin

func (h Handle) Isamin(n int32, x driver.DevicePtr, incx int32) (int32, error)

Isamin finds the (smallest) index of the element of the minimum magnitude.

Hence, the result is the first i such that |Im(x[j])|+|Re(x[j])| is minimum for i=1,…,n and j=1+(i−1)*incx Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: isamin()

Handle.Isamin64 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting index, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasIsamin_v2.

func (Handle) Isamin64

func (h Handle) Isamin64(n int64, x driver.DevicePtr, incx int64) (int64, error)

Isamin64 finds the (smallest) index of the element of the minimum magnitude.

Hence, the result is the first i such that |Im(x[j])|+|Re(x[j])| is minimum for i=1,…,n and j=1+(i−1)*incx Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: isamin()

It is Handle.Isamin with int64 sizes and strides.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting index, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasIsamin_v2_64.

func (Handle) Izamax

func (h Handle) Izamax(n int32, x driver.DevicePtr, incx int32) (int32, error)

Izamax finds the (smallest) index of the element of the maximum magnitude.

Hence, the result is the first i such that |Im(x[j])|+|Re(x[j])| is maximum for i=1,…,n and j=1+(i−1)* incx . Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: isamax(), idamax(), icamax(), izamax()

Handle.Izamax64 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting index, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasIzamax_v2.

func (Handle) Izamax64

func (h Handle) Izamax64(n int64, x driver.DevicePtr, incx int64) (int64, error)

Izamax64 finds the (smallest) index of the element of the maximum magnitude.

Hence, the result is the first i such that |Im(x[j])|+|Re(x[j])| is maximum for i=1,…,n and j=1+(i−1)* incx . Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: isamax(), idamax(), icamax(), izamax()

It is Handle.Izamax with int64 sizes and strides.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting index, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasIzamax_v2_64.

func (Handle) Izamin

func (h Handle) Izamin(n int32, x driver.DevicePtr, incx int32) (int32, error)

Izamin finds the (smallest) index of the element of the minimum magnitude.

Hence, the result is the first i such that |Im(x[j])|+|Re(x[j])| is minimum for i=1,…,n and j=1+(i−1)*incx Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: isamin()

Handle.Izamin64 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting index, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasIzamin_v2.

func (Handle) Izamin64

func (h Handle) Izamin64(n int64, x driver.DevicePtr, incx int64) (int64, error)

Izamin64 finds the (smallest) index of the element of the minimum magnitude.

Hence, the result is the first i such that |Im(x[j])|+|Re(x[j])| is minimum for i=1,…,n and j=1+(i−1)*incx Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: isamin()

It is Handle.Izamin with int64 sizes and strides.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting index, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasIzamin_v2_64.

func (Handle) MathMode

func (h Handle) MathMode() (Math, error)

MathMode returns the math mode used by the library routines.

A nil error means the math type was returned successfully.

Errors:

Wraps cublasGetMathMode.

func (Handle) Nrm2Ex

func (h Handle) Nrm2Ex(n int32, x driver.DevicePtr, xType DataType, incx int32, result unsafe.Pointer, resultType DataType, executionType DataType) error

Nrm2Ex is an API generalization of the routine cublasnrm2() where input data, output data and compute type can be specified independently.

This function computes the Euclidean norm of the vector x. The code uses a multiphase model of accumulation to avoid intermediate underflow and overflow, with the result being equivalent to ∑_(i=1)^(n)(x[j]×x[j]) where j=1+(i−1)*incx in exact arithmetic. Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. The datatypes combinations currently supported for Handle.Nrm2Ex are listed below :

x            result       execution
CUDA_R_16F   CUDA_R_16F   CUDA_R_32F
CUDA_R_16BF  CUDA_R_16BF  CUDA_R_32F
CUDA_R_32F   CUDA_R_32F   CUDA_R_32F
CUDA_C_32F   CUDA_R_32F   CUDA_R_32F
CUDA_R_64F   CUDA_R_64F   CUDA_R_64F
CUDA_C_64F   CUDA_R_64F   CUDA_R_64F

For references please refer to NETLIB documentation: snrm2(), dnrm2(), scnrm2(), dznrm2()

Handle.Nrm2Ex64 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • x: < type > vector with n elements
  • xType: Enumerant specifying the datatype of vector x
  • incx: Stride between consecutive elements of x
  • result: The resulting norm, which is set to 0 if n <= 0 or incx <= 0. The library writes the value before the call returns or, under Handle.SetPointerMode with PointerModeDevice, to the device address d passed as unsafe.Pointer(uintptr(d)) by the time the stream work completes, so device memory must stay valid until then.
  • resultType: Enumerant specifying the datatype of the result
  • executionType: Enumerant specifying the datatype in which the computation is executed

Errors:

Wraps cublasNrm2Ex.

func (Handle) Nrm2Ex64

func (h Handle) Nrm2Ex64(n int64, x driver.DevicePtr, xType DataType, incx int64, result unsafe.Pointer, resultType DataType, executionType DataType) error

Nrm2Ex64 is an API generalization of the routine cublasnrm2() where input data, output data and compute type can be specified independently.

This function computes the Euclidean norm of the vector x. The code uses a multiphase model of accumulation to avoid intermediate underflow and overflow, with the result being equivalent to ∑_(i=1)^(n)(x[j]×x[j]) where j=1+(i−1)*incx in exact arithmetic. Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. The datatypes combinations currently supported for Handle.Nrm2Ex are listed below :

x            result       execution
CUDA_R_16F   CUDA_R_16F   CUDA_R_32F
CUDA_R_16BF  CUDA_R_16BF  CUDA_R_32F
CUDA_R_32F   CUDA_R_32F   CUDA_R_32F
CUDA_C_32F   CUDA_R_32F   CUDA_R_32F
CUDA_R_64F   CUDA_R_64F   CUDA_R_64F
CUDA_C_64F   CUDA_R_64F   CUDA_R_64F

For references please refer to NETLIB documentation: snrm2(), dnrm2(), scnrm2(), dznrm2()

It is Handle.Nrm2Ex with int64 sizes and strides.

  • n: Number of elements in the vector x
  • x: < type > vector with n elements
  • xType: Enumerant specifying the datatype of vector x
  • incx: Stride between consecutive elements of x
  • result: The resulting norm, which is set to 0 if n <= 0 or incx <= 0. The library writes the value before the call returns or, under Handle.SetPointerMode with PointerModeDevice, to the device address d passed as unsafe.Pointer(uintptr(d)) by the time the stream work completes, so device memory must stay valid until then.
  • resultType: Enumerant specifying the datatype of the result
  • executionType: Enumerant specifying the datatype in which the computation is executed

Errors:

Wraps cublasNrm2Ex_64.

func (Handle) PointerMode

func (h Handle) PointerMode() (PointerMode, error)

PointerMode obtains the pointer mode used by the cuBLAS library.

Please see the section on the PointerMode type for more details.

A nil error means the pointer mode was obtained successfully.

Errors:

Wraps cublasGetPointerMode_v2.

func (Handle) RotEx

func (h Handle) RotEx(n int32, x driver.DevicePtr, xType DataType, incx int32, y driver.DevicePtr, yType DataType, incy int32, c Scalar, s Scalar, csType DataType, executiontype DataType) error

RotEx is an extension to the routine cublasrot() where input data, output data, cosine/sine type, and compute type can be specified independently.

This function applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s): G=(cs−sc) to vectors x and y. Hence, the result is x[k]=c×x[k]+s×y[j] and y[j]=−s×x[k]+c×y[j] where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. The datatypes combinations currently supported for Handle.RotEx are listed below :

executionType  xType / yType                        csType
CUDA_R_32F     CUDA_R_16BF, CUDA_R_16F, CUDA_R_32F  CUDA_R_16BF, CUDA_R_16F, CUDA_R_32F
CUDA_R_64F     CUDA_R_64F                           CUDA_R_64F
CUDA_C_32F     CUDA_C_32F, CUDA_C_32F               CUDA_R_32F, CUDA_C_32F
CUDA_C_64F     CUDA_C_64F, CUDA_C_64F               CUDA_R_64F, CUDA_C_64F

For references please refer to NETLIB documentation: srot(), drot(), crot(), csrot(), zrot(), zdrot()

Handle.RotEx64 takes 64-bit sizes.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • xType: Enumerant specifying the datatype of vector x
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • yType: Enumerant specifying the datatype of vector y
  • incy: Stride between consecutive elements of y
  • c: Cosine element of the rotation matrix. Its kind must match csType; a host Scalar of another kind is a *ScalarError. It holds a host value or, under Handle.SetPointerMode with PointerModeDevice, a device address made with DeviceScalar.
  • s: Sine element of the rotation matrix. Its kind must match csType; a host Scalar of another kind is a *ScalarError. It holds a host value or, under Handle.SetPointerMode with PointerModeDevice, a device address made with DeviceScalar.
  • csType: Enumerant specifying the datatype of c and s
  • executiontype: Enumerant specifying the datatype in which the computation is executed

Errors:

Wraps cublasRotEx.

func (Handle) RotEx64

func (h Handle) RotEx64(n int64, x driver.DevicePtr, xType DataType, incx int64, y driver.DevicePtr, yType DataType, incy int64, c Scalar, s Scalar, csType DataType, executiontype DataType) error

RotEx64 is an extension to the routine cublasrot() where input data, output data, cosine/sine type, and compute type can be specified independently.

This function applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s): G=(cs−sc) to vectors x and y. Hence, the result is x[k]=c×x[k]+s×y[j] and y[j]=−s×x[k]+c×y[j] where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. The datatypes combinations currently supported for Handle.RotEx are listed below :

executionType  xType / yType                        csType
CUDA_R_32F     CUDA_R_16BF, CUDA_R_16F, CUDA_R_32F  CUDA_R_16BF, CUDA_R_16F, CUDA_R_32F
CUDA_R_64F     CUDA_R_64F                           CUDA_R_64F
CUDA_C_32F     CUDA_C_32F, CUDA_C_32F               CUDA_R_32F, CUDA_C_32F
CUDA_C_64F     CUDA_C_64F, CUDA_C_64F               CUDA_R_64F, CUDA_C_64F

For references please refer to NETLIB documentation: srot(), drot(), crot(), csrot(), zrot(), zdrot()

It is Handle.RotEx with int64 sizes and strides.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • xType: Enumerant specifying the datatype of vector x
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • yType: Enumerant specifying the datatype of vector y
  • incy: Stride between consecutive elements of y
  • c: Cosine element of the rotation matrix. Its kind must match csType; a host Scalar of another kind is a *ScalarError. It holds a host value or, under Handle.SetPointerMode with PointerModeDevice, a device address made with DeviceScalar.
  • s: Sine element of the rotation matrix. Its kind must match csType; a host Scalar of another kind is a *ScalarError. It holds a host value or, under Handle.SetPointerMode with PointerModeDevice, a device address made with DeviceScalar.
  • csType: Enumerant specifying the datatype of c and s
  • executiontype: Enumerant specifying the datatype in which the computation is executed

Errors:

Wraps cublasRotEx_64.

func (Handle) RotgEx

func (h Handle) RotgEx(a unsafe.Pointer, b unsafe.Pointer, abType DataType, c unsafe.Pointer, s unsafe.Pointer, csType DataType, executiontype DataType) error

RotgEx wraps cublasRotgEx.

The library writes a, b, c, and s before the call returns or, under Handle.SetPointerMode with PointerModeDevice, to the device address d passed as unsafe.Pointer(uintptr(d)) by the time the stream work completes, so device memory must stay valid until then.

func (Handle) RotmEx

func (h Handle) RotmEx(n int32, x driver.DevicePtr, xType DataType, incx int32, y driver.DevicePtr, yType DataType, incy int32, param unsafe.Pointer, paramType DataType, executiontype DataType) error

RotmEx wraps cublasRotmEx.

Handle.RotmEx64 takes 64-bit sizes.

func (Handle) RotmEx64

func (h Handle) RotmEx64(n int64, x driver.DevicePtr, xType DataType, incx int64, y driver.DevicePtr, yType DataType, incy int64, param unsafe.Pointer, paramType DataType, executiontype DataType) error

RotmEx64 wraps cublasRotmEx_64.

It is Handle.RotmEx with int64 sizes and strides.

func (Handle) RotmgEx

func (h Handle) RotmgEx(d1 unsafe.Pointer, d1Type DataType, d2 unsafe.Pointer, d2Type DataType, x1 unsafe.Pointer, x1Type DataType, y1 Scalar, y1Type DataType, param unsafe.Pointer, paramType DataType, executiontype DataType) error

RotmgEx wraps cublasRotmgEx.

The kind of y1 must match y1Type; a host Scalar of another kind is a *ScalarError. The library writes d1, d2, and x1 before the call returns or, under Handle.SetPointerMode with PointerModeDevice, to the device address d passed as unsafe.Pointer(uintptr(d)) by the time the stream work completes, so device memory must stay valid until then.

func (Handle) Sasum

func (h Handle) Sasum(n int32, x driver.DevicePtr, incx int32) (float32, error)

Sasum computes the sum of the absolute values of the elements of vector x.

Hence, the result is ∑_(i=1)^(n)|Im(x[j])|+|Re(x[j])| where j=1+(i−1)*incx . Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sasum(), dasum(), scasum(), dzasum()

Handle.Sasum64 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting sum, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasSasum_v2.

func (Handle) Sasum64

func (h Handle) Sasum64(n int64, x driver.DevicePtr, incx int64) (float32, error)

Sasum64 computes the sum of the absolute values of the elements of vector x.

Hence, the result is ∑_(i=1)^(n)|Im(x[j])|+|Re(x[j])| where j=1+(i−1)*incx . Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sasum(), dasum(), scasum(), dzasum()

It is Handle.Sasum with int64 sizes and strides.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting sum, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasSasum_v2_64.

func (Handle) Saxpy

func (h Handle) Saxpy(n int32, alpha *float32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32) error

Saxpy multiplies the vector x by the scalar α and adds it to the vector y overwriting the latest vector with the result.

Hence, the performed operation is y[j]=α×x[k]+y[j] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: saxpy(), daxpy(), caxpy(), zaxpy()

Handle.Saxpy64 takes 64-bit sizes.

  • n: Number of elements in the vector x and y
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasSaxpy_v2.

func (Handle) Saxpy64

func (h Handle) Saxpy64(n int64, alpha *float32, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64) error

Saxpy64 multiplies the vector x by the scalar α and adds it to the vector y overwriting the latest vector with the result.

Hence, the performed operation is y[j]=α×x[k]+y[j] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: saxpy(), daxpy(), caxpy(), zaxpy()

It is Handle.Saxpy with int64 sizes and strides.

  • n: Number of elements in the vector x and y
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasSaxpy_v2_64.

func (Handle) ScalEx

func (h Handle) ScalEx(n int32, alpha Scalar, alphaType DataType, x driver.DevicePtr, xType DataType, incx int32, executionType DataType) error

ScalEx scales the vector x by the scalar α and overwrites it with the result.

Hence, the performed operation is x[j]=α×x[j] for i=1,…,n and j=1+(i−1)*incx . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. The datatypes combinations currently supported for Handle.ScalEx are listed below :

alpha       x            execution
CUDA_R_32F  CUDA_R_16F   CUDA_R_32F
CUDA_R_32F  CUDA_R_16BF  CUDA_R_32F
CUDA_R_32F  CUDA_R_32F   CUDA_R_32F
CUDA_R_64F  CUDA_R_64F   CUDA_R_64F
CUDA_C_32F  CUDA_C_32F   CUDA_C_32F
CUDA_C_64F  CUDA_C_64F   CUDA_C_64F

For references please refer to NETLIB documentation: sscal(), dscal(), csscal(), cscal(), zdscal(), zscal()

Handle.ScalEx64 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • alpha: Scalar used for multiplication. Its kind must match alphaType; a host Scalar of another kind is a *ScalarError. It holds a host value or, under Handle.SetPointerMode with PointerModeDevice, a device address made with DeviceScalar.
  • alphaType: Enumerant specifying the datatype of scalar alpha
  • x: < type > vector with n elements
  • xType: Enumerant specifying the datatype of vector x
  • incx: Stride between consecutive elements of x
  • executionType: Enumerant specifying the datatype in which the computation is executed

Errors:

Wraps cublasScalEx.

func (Handle) ScalEx64

func (h Handle) ScalEx64(n int64, alpha Scalar, alphaType DataType, x driver.DevicePtr, xType DataType, incx int64, executionType DataType) error

ScalEx64 scales the vector x by the scalar α and overwrites it with the result.

Hence, the performed operation is x[j]=α×x[j] for i=1,…,n and j=1+(i−1)*incx . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. The datatypes combinations currently supported for Handle.ScalEx are listed below :

alpha       x            execution
CUDA_R_32F  CUDA_R_16F   CUDA_R_32F
CUDA_R_32F  CUDA_R_16BF  CUDA_R_32F
CUDA_R_32F  CUDA_R_32F   CUDA_R_32F
CUDA_R_64F  CUDA_R_64F   CUDA_R_64F
CUDA_C_32F  CUDA_C_32F   CUDA_C_32F
CUDA_C_64F  CUDA_C_64F   CUDA_C_64F

For references please refer to NETLIB documentation: sscal(), dscal(), csscal(), cscal(), zdscal(), zscal()

It is Handle.ScalEx with int64 sizes and strides.

  • n: Number of elements in the vector x
  • alpha: Scalar used for multiplication. Its kind must match alphaType; a host Scalar of another kind is a *ScalarError. It holds a host value or, under Handle.SetPointerMode with PointerModeDevice, a device address made with DeviceScalar.
  • alphaType: Enumerant specifying the datatype of scalar alpha
  • x: < type > vector with n elements
  • xType: Enumerant specifying the datatype of vector x
  • incx: Stride between consecutive elements of x
  • executionType: Enumerant specifying the datatype in which the computation is executed

Errors:

Wraps cublasScalEx_64.

func (Handle) Scasum

func (h Handle) Scasum(n int32, x driver.DevicePtr, incx int32) (float32, error)

Scasum computes the sum of the absolute values of the elements of vector x.

Hence, the result is ∑_(i=1)^(n)|Im(x[j])|+|Re(x[j])| where j=1+(i−1)*incx . Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sasum(), dasum(), scasum(), dzasum()

Handle.Scasum64 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting sum, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasScasum_v2.

func (Handle) Scasum64

func (h Handle) Scasum64(n int64, x driver.DevicePtr, incx int64) (float32, error)

Scasum64 computes the sum of the absolute values of the elements of vector x.

Hence, the result is ∑_(i=1)^(n)|Im(x[j])|+|Re(x[j])| where j=1+(i−1)*incx . Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sasum(), dasum(), scasum(), dzasum()

It is Handle.Scasum with int64 sizes and strides.

  • n: Number of elements in the vector x
  • x: < type > vector with elements
  • incx: Stride between consecutive elements of x
  • result: The resulting sum, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasScasum_v2_64.

func (Handle) Scnrm2

func (h Handle) Scnrm2(n int32, x driver.DevicePtr, incx int32) (float32, error)

Scnrm2 computes the Euclidean norm of the vector x.

The code uses a multiphase model of accumulation to avoid intermediate underflow and overflow, with the result being equivalent to ∑_(i=1)^(n)(x[j]×x[j]) where j=1+(i−1)*incx in exact arithmetic. Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: snrm2(), dnrm2(), scnrm2(), dznrm2()

Handle.Scnrm264 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • result: The resulting norm, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasScnrm2_v2.

func (Handle) Scnrm264

func (h Handle) Scnrm264(n int64, x driver.DevicePtr, incx int64) (float32, error)

Scnrm264 computes the Euclidean norm of the vector x.

The code uses a multiphase model of accumulation to avoid intermediate underflow and overflow, with the result being equivalent to ∑_(i=1)^(n)(x[j]×x[j]) where j=1+(i−1)*incx in exact arithmetic. Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: snrm2(), dnrm2(), scnrm2(), dznrm2()

It is Handle.Scnrm2 with int64 sizes and strides.

  • n: Number of elements in the vector x
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • result: The resulting norm, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasScnrm2_v2_64.

func (Handle) Scopy

func (h Handle) Scopy(n int32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32) error

Scopy copies the vector x into the vector y.

Hence, the performed operation is y[j]=x[k] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: scopy(), dcopy(), ccopy(), zcopy()

Handle.Scopy64 takes 64-bit sizes.

  • n: Number of elements in the vector x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasScopy_v2.

func (Handle) Scopy64

func (h Handle) Scopy64(n int64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64) error

Scopy64 copies the vector x into the vector y.

Hence, the performed operation is y[j]=x[k] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: scopy(), dcopy(), ccopy(), zcopy()

It is Handle.Scopy with int64 sizes and strides.

  • n: Number of elements in the vector x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasScopy_v2_64.

func (Handle) Sdgmm

func (h Handle) Sdgmm(mode SideMode, m int32, n int32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32, c driver.DevicePtr, ldc int32) error

Sdgmm performs the matrix-matrix multiplication.

C={A×diag(X)if mode == CUBLAS_SIDE_RIGHTdiag(X)×Aif mode == SideLeft where A and C are matrices stored in column-major format with dimensions m×n . X is a vector of size n if mode == SideRight and of size m if mode == SideLeft. X is gathered from one-dimensional array x with stride incx. The absolute value of incx is the stride and the sign of incx is direction of the stride. If incx is positive, then we forward x from the first element. Otherwise, we backward x from the last element. The formula of X is X[j]={x[j×incx]if incx≥0x[(χ−1)×|incx|−j×|incx|]if incx<0 where χ=m if mode == SideLeft and χ=n if mode == SideRight. Example 1: if the user wants to perform diag(diag(B))×A , then incx=ldb+1 where ldb is leading dimension of matrix B, either row-major or column-major. Example 2: if the user wants to perform α×A , then there are two choices, either cublasgeam() with *beta == 0 and transa == OpN or cublasdgmm() with incx == 0 and x[0] == alpha. The operation is out-of-place. The in-place only works if lda == ldc.

Handle.Sdgmm64 takes 64-bit sizes.

  • mode: Left multiply if mode == SideLeft or right multiply if mode == SideRight
  • m: Number of rows of matrix A and C
  • n: Number of columns of matrix A and C
  • a: < type > array of dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • x: One-dimensional < type > array of size abs(incx) x m if mode == SideLeft and abs(incx) x n if mode == SideRight
  • incx: Stride of one-dimensional array x
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

Wraps cublasSdgmm.

func (Handle) Sdgmm64

func (h Handle) Sdgmm64(mode SideMode, m int64, n int64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64, c driver.DevicePtr, ldc int64) error

Sdgmm64 performs the matrix-matrix multiplication.

C={A×diag(X)if mode == CUBLAS_SIDE_RIGHTdiag(X)×Aif mode == SideLeft where A and C are matrices stored in column-major format with dimensions m×n . X is a vector of size n if mode == SideRight and of size m if mode == SideLeft. X is gathered from one-dimensional array x with stride incx. The absolute value of incx is the stride and the sign of incx is direction of the stride. If incx is positive, then we forward x from the first element. Otherwise, we backward x from the last element. The formula of X is X[j]={x[j×incx]if incx≥0x[(χ−1)×|incx|−j×|incx|]if incx<0 where χ=m if mode == SideLeft and χ=n if mode == SideRight. Example 1: if the user wants to perform diag(diag(B))×A , then incx=ldb+1 where ldb is leading dimension of matrix B, either row-major or column-major. Example 2: if the user wants to perform α×A , then there are two choices, either cublasgeam() with *beta == 0 and transa == OpN or cublasdgmm() with incx == 0 and x[0] == alpha. The operation is out-of-place. The in-place only works if lda == ldc.

It is Handle.Sdgmm with int64 sizes and strides.

  • mode: Left multiply if mode == SideLeft or right multiply if mode == SideRight
  • m: Number of rows of matrix A and C
  • n: Number of columns of matrix A and C
  • a: < type > array of dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • x: One-dimensional < type > array of size abs(incx) x m if mode == SideLeft and abs(incx) x n if mode == SideRight
  • incx: Stride of one-dimensional array x
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

Wraps cublasSdgmm_64.

func (Handle) Sdot

func (h Handle) Sdot(n int32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32) (float32, error)

Sdot computes the dot product of vectors x and y.

Hence, the result is ∑_(i=1)^(n)(x[k]×y[j]) where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that in the first equation the conjugate of the element of vector x should be used if the function name ends in character ‘c’ and that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sdot(), ddot(), cdotu(), cdotc(), zdotu(), zdotc()

Handle.Sdot64 takes 64-bit sizes.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • result: The resulting dot product, which is set to 0 if n <= 0

Errors:

Wraps cublasSdot_v2.

func (Handle) Sdot64

func (h Handle) Sdot64(n int64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64) (float32, error)

Sdot64 computes the dot product of vectors x and y.

Hence, the result is ∑_(i=1)^(n)(x[k]×y[j]) where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that in the first equation the conjugate of the element of vector x should be used if the function name ends in character ‘c’ and that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sdot(), ddot(), cdotu(), cdotc(), zdotu(), zdotc()

It is Handle.Sdot with int64 sizes and strides.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • result: The resulting dot product, which is set to 0 if n <= 0

Errors:

Wraps cublasSdot_v2_64.

func (Handle) SetAtomicsMode

func (h Handle) SetAtomicsMode(mode AtomicsMode) error

SetAtomicsMode allows or disallows atomics in the routines that have an implementation using them.

Some routines like cublassymv() and cublashemv() have an alternate implementation that use atomics to cumulate results.

This implementation is generally significantly faster but can generate results that are not strictly identical from one run to the others. Mathematically, those different results are not significant but when debugging those differences can be prejudicial. This function allows or disallows the usage of atomics in the cuBLAS library for all routines which have an alternate implementation. When not explicitly specified in the documentation of any cuBLAS routine, it means that this routine does not have an alternate implementation that use atomics. When atomics mode is disabled, each cuBLAS routine should produce the same results from one run to the other when called with identical parameters on the same Hardware. The default atomics mode of default initialized Handle object is AtomicsNotAllowed. Please see the section on the type for more details.

A nil error means the atomics mode was set successfully.

Errors:

Wraps cublasSetAtomicsMode.

func (Handle) SetEmulationSpecialValuesSupport

func (h Handle) SetEmulationSpecialValuesSupport(mask CudaEmulationSpecialValuesSupport) error

SetEmulationSpecialValuesSupport sets the value previously programmed to the library handle.

A nil error means emulation special values support was set successfully.

Errors:

Wraps cublasSetEmulationSpecialValuesSupport.

func (Handle) SetEmulationStrategy

func (h Handle) SetEmulationStrategy(emulationStrategy EmulationStrategy) error

SetEmulationStrategy enables you to select how the library should make use of floating point emulation.

For more details, please see EmulationStrategy.

A nil error means the emulation strategy was set successfully.

Errors:

Wraps cublasSetEmulationStrategy.

func (Handle) SetFixedPointEmulationMantissaBitCountPointer

func (h Handle) SetFixedPointEmulationMantissaBitCountPointer(mantissaBitCount *int32) error

SetFixedPointEmulationMantissaBitCountPointer sets the value previously programmed to the library handle.

A nil error means mantissaBitCount was set successfully.

Errors:

Wraps cublasSetFixedPointEmulationMantissaBitCountPointer.

func (Handle) SetFixedPointEmulationMantissaBitOffset

func (h Handle) SetFixedPointEmulationMantissaBitOffset(mantissaBitOffset int32) error

SetFixedPointEmulationMantissaBitOffset sets the value previously programmed to the library handle.

A nil error means mantissaBitOffset was set successfully.

Errors:

Wraps cublasSetFixedPointEmulationMantissaBitOffset.

func (Handle) SetFixedPointEmulationMantissaControl

func (h Handle) SetFixedPointEmulationMantissaControl(mantissaControl CudaEmulationMantissaControl) error

SetFixedPointEmulationMantissaControl sets the value previously programmed to the library handle.

A nil error means fixed-point emulation mantissa control was set successfully.

Errors:

Wraps cublasSetFixedPointEmulationMantissaControl.

func (Handle) SetFixedPointEmulationMaxMantissaBitCount

func (h Handle) SetFixedPointEmulationMaxMantissaBitCount(maxMantissaBitCount int32) error

SetFixedPointEmulationMaxMantissaBitCount sets the value previously programmed to the library handle.

A nil error means maxMantissaBitCount was set successfully.

Errors:

Wraps cublasSetFixedPointEmulationMaxMantissaBitCount.

func (Handle) SetMathMode

func (h Handle) SetMathMode(mode Math) error

SetMathMode enables you to choose the compute precision modes as defined by Math.

Users are allowed to set the compute precision mode as a logical combination of them (except the deprecated TensorOpMath). For example, Handle.SetMathMode(handle, DefaultMath | MathDisallowReducedPrecisionReduction). Please note that the default math mode is DefaultMath. For matrix and compute precisions allowed for Handle.GemmEx and cublasLtMatmul() APIs and their strided variants please refer to: Handle.GemmEx , Handle.GemmBatchedEx, Handle.GemmStridedBatchedEx, and cublasLtMatmul().

A nil error means the math mode was set successfully.

Errors:

Wraps cublasSetMathMode.

func (Handle) SetPointerMode

func (h Handle) SetPointerMode(mode PointerMode) error

SetPointerMode sets the pointer mode used by the cuBLAS library.

The default is for the values to be passed by reference on the host. Please see the section on the PointerMode type for more details.

A nil error means the pointer mode was set successfully.

Errors:

Wraps cublasSetPointerMode_v2.

func (Handle) SetSmCountTarget

func (h Handle) SetSmCountTarget(smCountTarget int32) error

SetSmCountTarget allows overriding the number of multiprocessors available to the library during kernels execution.

This option can be used to improve the library performance when cuBLAS routines are known to run concurrently with other work on different CUDA streams. For example, on an NVIDIA A100 GPU, which has 108 multiprocessors, when there is a concurrent kenrel running with grid size of 8, one can use Handle.SetSmCountTarget with smCountTarget set to 100 to override the library heuristics to optimize for running on the remaining 100 multiprocessors. When set to 0, the library returns to its default behavior. The input value should not exceed the device’s multiprocessor count, which can be obtained using cudaDeviceGetAttribute. Negative values are not accepted. The user must ensure thread safety when modifying the library handle with this routine similar to when using Handle.SetStream, etc.

A nil error means SM count target was set successfully.

Errors:

Wraps cublasSetSmCountTarget.

func (Handle) SetStream

func (h Handle) SetStream(streamId driver.Stream) error

SetStream sets the cuBLAS library stream, which will be used to execute all subsequent calls to the cuBLAS library functions.

If the cuBLAS library stream is not set, all kernels use the default NULL stream. In particular, this routine can be used to change the stream between kernel launches and then to reset the cuBLAS library stream back to NULL. Additionally this function unconditionally resets the cuBLAS library workspace back to the default workspace pool (see Handle.SetWorkspace).

Errors:

Wraps cublasSetStream_v2.

func (Handle) SetWorkspace

func (h Handle) SetWorkspace(workspace driver.DevicePtr, workspaceSizeInBytes uint) error

SetWorkspace sets the cuBLAS library workspace to a user-owned device buffer, which will be used to execute all subsequent calls to the cuBLAS library functions (on the currently set stream).

If the cuBLAS library workspace is not set, all kernels will use the default workspace pool allocated during the cuBLAS context creation. In particular, this routine can be used to change the workspace between kernel launches. The workspace pointer has to be aligned to at least 256 bytes, otherwise ErrInvalidValue error is returned. The Handle.SetStream function unconditionally resets the cuBLAS library workspace back to the default workspace pool. Calling this function, including with workspaceSizeInBytes equal to 0, will prevent the cuBLAS library from utilizing the default workspace. Too small value of workspaceSizeInBytes may cause some routines to fail with ErrAllocFailed error returned or cause large regressions in performance. Workspace size equal to or larger than 16KiB is enough to prevent ErrAllocFailed error, while a larger workspace can provide performance benefits for some routines.

Note: If the stream set by Handle.SetStream is cudaStreamPerThread and there are multiple threads using the same cuBLAS library handle, then users must manually manage synchronization to avoid possible race conditions in the user provided workspace. Alternatively, users may rely on the default workspace pool which safely guards against race conditions.

Warning: cuBLAS functions may invoke more than one CUDA kernel, and rely on workspace being intact between the invocations. Hence, if cuBLAS handle is configured with user-provided workspace and is being used from multiple threads, it is user’s responsibility to serialize cuBLAS calls between threads, as otherwise the kernels from different cuBLAS invocations might interleave and invalidate the assumptions each of them makes regarding workspace intactness. The default workspace pool managed by cuBLAS is thread safe. The table below shows the recommended size of user-provided workspace. This is based on the cuBLAS default workspace pool size which is GPU architecture dependent.

  • GPU Architecture: NVIDIA Hopper Architecture and newer (sm90+); Recommended workspace size: 32 MiB
  • GPU Architecture: Other; Recommended workspace size: 4 MiB

Note: If the cuBLAS library is configured to utilize fixed-point emulation, which can be done by setting the corresponding math mode in Handle.SetMathMode or calling APIs with Compute64FEmulatedFixedpoint, it can be beneficial to provide more workspace than recommended for the GPU architecture. See Fixed-Point Workspace Requirements for more details.

Errors:

Wraps cublasSetWorkspace_v2.

func (Handle) Sgbmv

func (h Handle) Sgbmv(trans Operation, m int32, n int32, kl int32, ku int32, alpha *float32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32, beta *float32, y driver.DevicePtr, incy int32) error

Sgbmv performs the banded matrix-vector multiplication.

y=α op(A)x+βy, where A is a banded matrix with kl subdiagonals and ku superdiagonals, x and y are vectors, and α and β are scalars. Also, for matrix A op(A)={A if trans == CUBLAS_OP_NAᵀ if trans == CUBLAS_OP_TAᴴ if trans == OpC The banded matrix A is stored column by column, with the main diagonal stored in row ku+1 (starting in first position), the first superdiagonal stored in row ku (starting in second position), the first subdiagonal stored in row ku+2 (starting in first position), etc. So that in general, the element A(i,j) is stored in the memory location A(ku+1+i-j,j) for j=1,…,n and i∈[max(1,j−ku),min(m,j+kl)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left ku×ku and bottom right kl×kl triangles) are not referenced. For references please refer to NETLIB documentation: sgbmv(), dgbmv(), cgbmv(), zgbmv()

Handle.Sgbmv64 takes 64-bit sizes.

  • trans: Operation op( A) that is non- or (conj.) transpose
  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • kl: Number of subdiagonals of matrix A
  • ku: Number of superdiagonals of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= kl + ku + 1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements if trans == OpN and m elements otherwise
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with m elements if trans == OpN and n elements otherwise
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasSgbmv_v2.

func (Handle) Sgbmv64

func (h Handle) Sgbmv64(trans Operation, m int64, n int64, kl int64, ku int64, alpha *float32, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64, beta *float32, y driver.DevicePtr, incy int64) error

Sgbmv64 performs the banded matrix-vector multiplication.

y=α op(A)x+βy, where A is a banded matrix with kl subdiagonals and ku superdiagonals, x and y are vectors, and α and β are scalars. Also, for matrix A op(A)={A if trans == CUBLAS_OP_NAᵀ if trans == CUBLAS_OP_TAᴴ if trans == OpC The banded matrix A is stored column by column, with the main diagonal stored in row ku+1 (starting in first position), the first superdiagonal stored in row ku (starting in second position), the first subdiagonal stored in row ku+2 (starting in first position), etc. So that in general, the element A(i,j) is stored in the memory location A(ku+1+i-j,j) for j=1,…,n and i∈[max(1,j−ku),min(m,j+kl)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left ku×ku and bottom right kl×kl triangles) are not referenced. For references please refer to NETLIB documentation: sgbmv(), dgbmv(), cgbmv(), zgbmv()

It is Handle.Sgbmv with int64 sizes and strides.

  • trans: Operation op( A) that is non- or (conj.) transpose
  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • kl: Number of subdiagonals of matrix A
  • ku: Number of superdiagonals of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= kl + ku + 1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements if trans == OpN and m elements otherwise
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with m elements if trans == OpN and n elements otherwise
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasSgbmv_v2_64.

func (Handle) Sgeam

func (h Handle) Sgeam(transa Operation, transb Operation, m int32, n int32, alpha *float32, a driver.DevicePtr, lda int32, beta *float32, b driver.DevicePtr, ldb int32, c driver.DevicePtr, ldc int32) error

Sgeam performs the matrix-matrix addition/transposition.

C=αop(A)+βop(B), where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×n , op(B)m×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . The operation is out-of-place if C does not overlap A or B. The in-place mode supports the following two operations, C=α*C+βop(B) C=αop(A)+β*C For in-place mode, if C == A, ldc == lda and transa == OpN. If C === B, ldc == ldb and transb == OpN. If the user does not meet above requirements, ErrInvalidValue is returned. The operation includes the following special cases: the user can reset matrix C to zero by setting *alpha = beta = 0. the user can transpose matrix A by setting *alpha = 1 and *beta = 0.

Handle.Sgeam64 takes 64-bit sizes.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • alpha: < type > scalar used for multiplication. If *alpha == 0, A does not have to be a valid input
  • a: < type > array of dimensions lda x n with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • beta: < type > scalar used for multiplication. If *beta == 0, B does not have to be a valid input
  • b: < type > array of dimension ldb x n with ldb >= max(1, m) if transb == OpN and ldb x m with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0, or if transa is not one of OpN, OpT and OpC, or if transb is not one of OpN, OpT and OpC, or if lda < max(1, m) when transa == OpN, and lda < max(1, n) otherwise, or if ldb < max(1, m) if transb == OpN, and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if A == C and `(transa != OpN)
  • ErrNotInitialized: The library was not initialized

Wraps cublasSgeam.

func (Handle) Sgeam64

func (h Handle) Sgeam64(transa Operation, transb Operation, m int64, n int64, alpha *float32, a driver.DevicePtr, lda int64, beta *float32, b driver.DevicePtr, ldb int64, c driver.DevicePtr, ldc int64) error

Sgeam64 performs the matrix-matrix addition/transposition.

C=αop(A)+βop(B), where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×n , op(B)m×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . The operation is out-of-place if C does not overlap A or B. The in-place mode supports the following two operations, C=α*C+βop(B) C=αop(A)+β*C For in-place mode, if C == A, ldc == lda and transa == OpN. If C === B, ldc == ldb and transb == OpN. If the user does not meet above requirements, ErrInvalidValue is returned. The operation includes the following special cases: the user can reset matrix C to zero by setting *alpha = beta = 0. the user can transpose matrix A by setting *alpha = 1 and *beta = 0.

It is Handle.Sgeam with int64 sizes and strides.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • alpha: < type > scalar used for multiplication. If *alpha == 0, A does not have to be a valid input
  • a: < type > array of dimensions lda x n with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • beta: < type > scalar used for multiplication. If *beta == 0, B does not have to be a valid input
  • b: < type > array of dimension ldb x n with ldb >= max(1, m) if transb == OpN and ldb x m with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0, or if transa is not one of OpN, OpT and OpC, or if transb is not one of OpN, OpT and OpC, or if lda < max(1, m) when transa == OpN, and lda < max(1, n) otherwise, or if ldb < max(1, m) if transb == OpN, and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if A == C and `(transa != OpN)
  • ErrNotInitialized: The library was not initialized

Wraps cublasSgeam_64.

func (Handle) SgelsBatched

func (h Handle) SgelsBatched(trans Operation, m int32, n int32, nrhs int32, aarray driver.DevicePtr, lda int32, carray driver.DevicePtr, ldc int32, info *int32, devInfoArray driver.DevicePtr, batchSize int32) error

SgelsBatched solves a batch of overdetermined linear systems in the least-squares sense.

Aarray is an array of pointers to matrices stored in column-major format.

Carray is an array of pointers to matrices stored in column-major format. This function find the least squares solution of a batch of overdetermined systems: it solves the least squares problem described as follows :

minimize  || Carray[i] - Aarray[i]*Xarray[i] || , with i = 0, ...,batchSize-1

On exit, each Aarray[i] is overwritten with their QR factorization and each Carray[i] is overwritten with the least square solution cublasgelsBatched supports only the non-transpose operation and only solves over-determined systems (m >= n). cublasgelsBatched only supports compute capability 2.0 or above. This function is intended to be used for matrices of small sizes where the launch overhead is a significant factor. For references please refer to NETLIB documentation: sgels(), dgels(), cgels(), zgels()

  • trans: Operation op( Aarray[i]) that is non- or (conj.) transpose. Only non-transpose operation is currently supported
  • m: Number of rows of each Aarray[i] and Carray[i] if trans == OpN, numbers of columns of each Aarray[i] otherwise (not supported currently)
  • n: Number of columns of each Aarray[i] if trans == OpN, and number of rows of each Aarray[i] and Carray[i] otherwise (not supported currently)
  • nrhs: Number of columns of each Carray[i]
  • aarray: Array of pointers to < type > array, with each array of dim. m x n with lda >= max(1, m) if trans == OpN, and n x m with lda >= max(1, n) otherwise (not supported currently). Matrices Aarray[i] should not overlap; otherwise, behavior is undefined
  • lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
  • carray: Array of pointers to < type > array, with each array of dim. m x nrhs with ldc >= max(1, m) if trans == OpN, and n x nrhs with lda >= max(1, n) otherwise (not supported currently). Matrices Carray[i] should not overlap; otherwise, behavior is undefined
  • ldc: Leading dimension of two-dimensional array used to store each matrix Carray[i]
  • info: If info == 0 the parameters passed to the function are valid. If info < 0 the parameter in position -info is invalid
  • devInfoArray: Optional array of integers of dimension batchsize. If non-null, every element of devInfoArray[i] == V has the following meaning: V == 0 : the i-th problem was successfully solved. V > 0 : the V-th diagonal element of the Aarray[i] is zero. Aarray[i] does not have full rank
  • batchSize: Number of pointers contained in Aarray and Carray

Errors:

Wraps cublasSgelsBatched.

func (Handle) Sgemm

func (h Handle) Sgemm(transa Operation, transb Operation, m int32, n int32, k int32, alpha *float32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *float32, c driver.DevicePtr, ldc int32) error

Sgemm performs the matrix-matrix multiplication.

C=αop(A)op(B)+βC, where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×k , op(B)k×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . For references please refer to NETLIB documentation: sgemm(), dgemm(), cgemm(), zgemm()

Handle.Sgemm64 takes 64-bit sizes.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • k: Number of columns of op( A) and rows of op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrArchMismatch: In the case of Handle.Hgemm the device does not support math in half precision.
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasSgemm_v2.

func (Handle) Sgemm64

func (h Handle) Sgemm64(transa Operation, transb Operation, m int64, n int64, k int64, alpha *float32, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *float32, c driver.DevicePtr, ldc int64) error

Sgemm64 performs the matrix-matrix multiplication.

C=αop(A)op(B)+βC, where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×k , op(B)k×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . For references please refer to NETLIB documentation: sgemm(), dgemm(), cgemm(), zgemm()

It is Handle.Sgemm with int64 sizes and strides.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • k: Number of columns of op( A) and rows of op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrArchMismatch: In the case of Handle.Hgemm the device does not support math in half precision.
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasSgemm_v2_64.

func (Handle) SgemmBatched

func (h Handle) SgemmBatched(transa Operation, transb Operation, m int32, n int32, k int32, alpha *float32, aarray driver.DevicePtr, lda int32, barray driver.DevicePtr, ldb int32, beta *float32, carray driver.DevicePtr, ldc int32, batchCount int32) error

SgemmBatched performs the matrix-matrix multiplication of a batch of matrices.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. The address of the input matrices and the output matrix of each instance of the batch are read from arrays of pointers passed to the function by the caller. C[i]=αop(A[i])op(B[i])+βC[i], for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, that is, the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemmBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

Handle.SgemmBatched64 takes 64-bit sizes.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • barray: Array of pointers to < type > array, with each array of dim. ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • ldb: Leading dimension of two-dimensional array used to store each matrix B[i]
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • carray: Array of pointers to < type > array. It has dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • ldc: Leading dimension of two-dimensional array used to store each matrix C[i]
  • batchCount: Number of pointers contained in Aarray, Barray and Carray

Errors:

  • ErrArchMismatch: Handle.HgemmBatched is only supported for GPU with architecture capabilities equal or greater than 5.3
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m)
  • ErrNotInitialized: The library was not initialized

Wraps cublasSgemmBatched.

func (Handle) SgemmBatched64

func (h Handle) SgemmBatched64(transa Operation, transb Operation, m int64, n int64, k int64, alpha *float32, aarray driver.DevicePtr, lda int64, barray driver.DevicePtr, ldb int64, beta *float32, carray driver.DevicePtr, ldc int64, batchCount int64) error

SgemmBatched64 performs the matrix-matrix multiplication of a batch of matrices.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. The address of the input matrices and the output matrix of each instance of the batch are read from arrays of pointers passed to the function by the caller. C[i]=αop(A[i])op(B[i])+βC[i], for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, that is, the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemmBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

It is Handle.SgemmBatched with int64 sizes and strides.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • barray: Array of pointers to < type > array, with each array of dim. ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • ldb: Leading dimension of two-dimensional array used to store each matrix B[i]
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • carray: Array of pointers to < type > array. It has dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • ldc: Leading dimension of two-dimensional array used to store each matrix C[i]
  • batchCount: Number of pointers contained in Aarray, Barray and Carray

Errors:

  • ErrArchMismatch: Handle.HgemmBatched is only supported for GPU with architecture capabilities equal or greater than 5.3
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m)
  • ErrNotInitialized: The library was not initialized

Wraps cublasSgemmBatched_64.

func (Handle) SgemmEx

func (h Handle) SgemmEx(transa Operation, transb Operation, m int32, n int32, k int32, alpha *float32, a driver.DevicePtr, atype DataType, lda int32, b driver.DevicePtr, btype DataType, ldb int32, beta *float32, c driver.DevicePtr, ctype DataType, ldc int32) error

SgemmEx is an extension of cublasgemm().

In this function the input matrices and output matrices can have a lower precision but the computation is still done in the type <t>. For example, in the type float for Handle.SgemmEx and in the type cuComplex for Handle.CgemmEx. C=αop(A)op(B)+βC where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×k , op(B)k×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . The matrix types combinations supported for Handle.SgemmEx are listed below:

  • C: CUDA_R_16BF; A/B: CUDA_R_16BF
  • C: CUDA_R_16F; A/B: CUDA_R_16F
  • C: CUDA_R_32F; A/B: CUDA_R_8I
  • A/B: CUDA_R_16BF
  • A/B: CUDA_R_16F
  • A/B: CUDA_R_32F

The matrix types combinations supported for Handle.CgemmEx are listed below :

  • C: CUDA_C_32F; A/B: CUDA_C_8I
  • A/B: CUDA_C_32F

For references please refer to NETLIB documentation: sgemm() For more information about the numerical behavior of some GEMM algorithms, refer to the GEMM Algorithms Numerical Behavior section.

Handle.SgemmEx64 takes 64-bit sizes.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • k: Number of columns of op( A) and rows of op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • atype: Enumerant specifying the datatype of matrix A
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • btype: Enumerant specifying the datatype of matrix B
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ctype: Enumerant specifying the datatype of matrix C
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrArchMismatch: Handle.CgemmEx is only supported for GPU with architecture capabilities equal or greater than 5.0
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized
  • ErrNotSupported: The combination of the parameters Atype, Btype and Ctype is not supported

Wraps cublasSgemmEx.

func (Handle) SgemmEx64

func (h Handle) SgemmEx64(transa Operation, transb Operation, m int64, n int64, k int64, alpha *float32, a driver.DevicePtr, atype DataType, lda int64, b driver.DevicePtr, btype DataType, ldb int64, beta *float32, c driver.DevicePtr, ctype DataType, ldc int64) error

SgemmEx64 is an extension of cublasgemm().

In this function the input matrices and output matrices can have a lower precision but the computation is still done in the type <t>. For example, in the type float for Handle.SgemmEx and in the type cuComplex for Handle.CgemmEx. C=αop(A)op(B)+βC where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×k , op(B)k×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . The matrix types combinations supported for Handle.SgemmEx are listed below:

  • C: CUDA_R_16BF; A/B: CUDA_R_16BF
  • C: CUDA_R_16F; A/B: CUDA_R_16F
  • C: CUDA_R_32F; A/B: CUDA_R_8I
  • A/B: CUDA_R_16BF
  • A/B: CUDA_R_16F
  • A/B: CUDA_R_32F

The matrix types combinations supported for Handle.CgemmEx are listed below :

  • C: CUDA_C_32F; A/B: CUDA_C_8I
  • A/B: CUDA_C_32F

For references please refer to NETLIB documentation: sgemm() For more information about the numerical behavior of some GEMM algorithms, refer to the GEMM Algorithms Numerical Behavior section.

It is Handle.SgemmEx with int64 sizes and strides.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • k: Number of columns of op( A) and rows of op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • atype: Enumerant specifying the datatype of matrix A
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • btype: Enumerant specifying the datatype of matrix B
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ctype: Enumerant specifying the datatype of matrix C
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrArchMismatch: Handle.CgemmEx is only supported for GPU with architecture capabilities equal or greater than 5.0
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized
  • ErrNotSupported: The combination of the parameters Atype, Btype and Ctype is not supported

Wraps cublasSgemmEx_64.

func (Handle) SgemmGroupedBatched

func (h Handle) SgemmGroupedBatched(transaArray *Operation, transbArray *Operation, mArray *int32, nArray *int32, kArray *int32, alphaArray *float32, aarray driver.DevicePtr, ldaArray *int32, barray driver.DevicePtr, ldbArray *int32, betaArray *float32, carray driver.DevicePtr, ldcArray *int32, groupCount int32, groupSize *int32) error

SgemmGroupedBatched performs the matrix-matrix multiplication on groups of matrices.

A given group is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. However, the dimensions, leading dimensions, transpositions, and scaling factors (alpha, beta) may vary between groups. The address of the input matrices and the output matrix of each instance of the batch are read from arrays of pointers passed to the function by the caller. This is functionally equivalent to the following:

idx = 0;
for i = 0:group_count - 1
    for j = 0:group_size[i] - 1
        gemm(transa_array[i], transb_array[i], m_array[i], n_array[i], k_array[i],
             alpha_array[i], Aarray[idx], lda_array[i], Barray[idx], ldb_array[i],
             beta_array[i], Carray[idx], ldc_array[i]);
        idx += 1;
    end
end

where alphaArray and betaArray are arrays of scaling factors, and Aarray, Barray and Carray are arrays of pointers to matrices stored in column-major format. For a given index, idx, that is part of group i, the dimensions are:

Note: This API takes arrays of two different lengths. The arrays of dimensions, leading dimensions, transpositions, and scaling factors are of length groupCount and the arrays of matrices are of length problem_count where problem_count=∑_(i=0)^(groupCount−1)groupSize[i] For matrix A[idx] in group i op(A[idx])={A[idx]if transaArray[i] == CUBLAS_OP_NA[idx]ᵀif transaArray[i] == CUBLAS_OP_TA[idx]ᴴif transaArray[i] == OpC and op(B[idx]) is defined similarly for matrix B[idx] in group i.

Note: C[idx] matrices must not overlap, that is, the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemmBatched() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemmGroupedBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is required that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

Handle.SgemmGroupedBatched64 takes 64-bit sizes.

  • transaArray: Operation op( A[idx]) that is non- or (conj.) transpose for each group
  • transbArray: Operation op( B[idx]) that is non- or (conj.) transpose for each group
  • mArray: Array containing the number of rows of matrix op( A[idx]) and C[idx] for each group
  • nArray: Array containing the number of columns of op( B[idx]) and C[idx] for each group
  • kArray: Array containing the number of columns of op( A[idx]) and rows of op( B[idx]) for each group
  • alphaArray: Array containing the < type > scalar used for multiplication for each group
  • aarray: Array of pointers to < type > array, with each array of dim. lda[i] x k[i] with lda[i] >= max(1,m[i]) if transa[i] == OpN and lda[i] x m[i] with lda[i] >= max(1,k[i]) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • ldaArray: Array containing the leading dimensions of two-dimensional arrays used to store each matrix A[idx] for each group
  • barray: Array of pointers to < type > array, with each array of dim. ldb[i] x n[i] with ldb[i] >= max(1,k[i]) if transb[i] == OpN and ldb[i] x k[i] with ldb[i] >= max(1,n[i]) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • ldbArray: Array containing the leading dimensions of two-dimensional arrays used to store each matrix B[idx] for each group
  • betaArray: Array containing the < type > scalar used for multiplication for each group
  • carray: Array of pointers to < type > array. It has dimensions ldc[i] x n[i] with ldc[i] >= max(1,m[i]). Matrices C[idx] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • ldcArray: Array containing the leading dimensions of two-dimensional arrays used to store each matrix C[idx] for each group
  • groupCount: Number of groups
  • groupSize: Array containing the number of pointers contained in Aarray, Barray and Carray for each group

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If transa_array, transb_array, m_array, n_array, k_array, alpha_array, lda_array, ldb_array, beta_array, ldc_array, or group_size are NULL, or if group_count < 0, or if m_array[i] < 0, n_array[i] < 0, k_array[i] < 0, group_size[i] < 0, or if transa_array[i] and transb_array[i] are not one of OpN, OpC, OpT, or if lda_array[i] < max(1, m_array[i]) if transa_array[i] == OpN and lda_array[i] < max(1, k_array[i]) otherwise, or if ldb_array[i] < max(1, k_array[i]) if transb_array[i] == OpN and ldb_array[i] < max(1, n_array[i]) otherwise, or if ldc_array[i] < max(1, m_array[i])
  • ErrNotInitialized: The library was not initialized
  • ErrNotSupported: The pointer mode is set to PointerModeDevice

Wraps cublasSgemmGroupedBatched.

func (Handle) SgemmGroupedBatched64

func (h Handle) SgemmGroupedBatched64(transaArray *Operation, transbArray *Operation, mArray *int64, nArray *int64, kArray *int64, alphaArray *float32, aarray driver.DevicePtr, ldaArray *int64, barray driver.DevicePtr, ldbArray *int64, betaArray *float32, carray driver.DevicePtr, ldcArray *int64, groupCount int64, groupSize *int64) error

SgemmGroupedBatched64 performs the matrix-matrix multiplication on groups of matrices.

A given group is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. However, the dimensions, leading dimensions, transpositions, and scaling factors (alpha, beta) may vary between groups. The address of the input matrices and the output matrix of each instance of the batch are read from arrays of pointers passed to the function by the caller. This is functionally equivalent to the following:

idx = 0;
for i = 0:group_count - 1
    for j = 0:group_size[i] - 1
        gemm(transa_array[i], transb_array[i], m_array[i], n_array[i], k_array[i],
             alpha_array[i], Aarray[idx], lda_array[i], Barray[idx], ldb_array[i],
             beta_array[i], Carray[idx], ldc_array[i]);
        idx += 1;
    end
end

where alphaArray and betaArray are arrays of scaling factors, and Aarray, Barray and Carray are arrays of pointers to matrices stored in column-major format. For a given index, idx, that is part of group i, the dimensions are:

Note: This API takes arrays of two different lengths. The arrays of dimensions, leading dimensions, transpositions, and scaling factors are of length groupCount and the arrays of matrices are of length problem_count where problem_count=∑_(i=0)^(groupCount−1)groupSize[i] For matrix A[idx] in group i op(A[idx])={A[idx]if transaArray[i] == CUBLAS_OP_NA[idx]ᵀif transaArray[i] == CUBLAS_OP_TA[idx]ᴴif transaArray[i] == OpC and op(B[idx]) is defined similarly for matrix B[idx] in group i.

Note: C[idx] matrices must not overlap, that is, the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemmBatched() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemmGroupedBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is required that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

It is Handle.SgemmGroupedBatched with int64 sizes and strides.

  • transaArray: Operation op( A[idx]) that is non- or (conj.) transpose for each group
  • transbArray: Operation op( B[idx]) that is non- or (conj.) transpose for each group
  • mArray: Array containing the number of rows of matrix op( A[idx]) and C[idx] for each group
  • nArray: Array containing the number of columns of op( B[idx]) and C[idx] for each group
  • kArray: Array containing the number of columns of op( A[idx]) and rows of op( B[idx]) for each group
  • alphaArray: Array containing the < type > scalar used for multiplication for each group
  • aarray: Array of pointers to < type > array, with each array of dim. lda[i] x k[i] with lda[i] >= max(1,m[i]) if transa[i] == OpN and lda[i] x m[i] with lda[i] >= max(1,k[i]) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • ldaArray: Array containing the leading dimensions of two-dimensional arrays used to store each matrix A[idx] for each group
  • barray: Array of pointers to < type > array, with each array of dim. ldb[i] x n[i] with ldb[i] >= max(1,k[i]) if transb[i] == OpN and ldb[i] x k[i] with ldb[i] >= max(1,n[i]) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • ldbArray: Array containing the leading dimensions of two-dimensional arrays used to store each matrix B[idx] for each group
  • betaArray: Array containing the < type > scalar used for multiplication for each group
  • carray: Array of pointers to < type > array. It has dimensions ldc[i] x n[i] with ldc[i] >= max(1,m[i]). Matrices C[idx] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • ldcArray: Array containing the leading dimensions of two-dimensional arrays used to store each matrix C[idx] for each group
  • groupCount: Number of groups
  • groupSize: Array containing the number of pointers contained in Aarray, Barray and Carray for each group

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If transa_array, transb_array, m_array, n_array, k_array, alpha_array, lda_array, ldb_array, beta_array, ldc_array, or group_size are NULL, or if group_count < 0, or if m_array[i] < 0, n_array[i] < 0, k_array[i] < 0, group_size[i] < 0, or if transa_array[i] and transb_array[i] are not one of OpN, OpC, OpT, or if lda_array[i] < max(1, m_array[i]) if transa_array[i] == OpN and lda_array[i] < max(1, k_array[i]) otherwise, or if ldb_array[i] < max(1, k_array[i]) if transb_array[i] == OpN and ldb_array[i] < max(1, n_array[i]) otherwise, or if ldc_array[i] < max(1, m_array[i])
  • ErrNotInitialized: The library was not initialized
  • ErrNotSupported: The pointer mode is set to PointerModeDevice

Wraps cublasSgemmGroupedBatched_64.

func (Handle) SgemmStridedBatched

func (h Handle) SgemmStridedBatched(transa Operation, transb Operation, m int32, n int32, k int32, alpha *float32, a driver.DevicePtr, lda int32, strideA int64, b driver.DevicePtr, ldb int32, strideB int64, beta *float32, c driver.DevicePtr, ldc int32, strideC int64, batchCount int32) error

SgemmStridedBatched performs the matrix-matrix multiplication of a batch of matrices.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. Input matrices A, B and output matrix C for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A, B and C matrices for the first instance are passed to the function by the user along with offsets in number of elements - strideA, strideB and strideC that determine the locations of input and output matrices in future instances. C+i*strideC=αop(A+i*strideA)op(B+i*strideB)+β(C+i*strideC), for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, i.e. the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], B[i], C[i] as notation for A, B and C matrices in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, strideB, strideC away from A[i-1], B[i-1], C[i-1]. The unit for the offset is number of elements and must not be zero .

Handle.SgemmStridedBatched64 takes 64-bit sizes.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • b: < type >* pointer to the B matrix corresponding to the first instance of the batch, with dimensions ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store each matrix B[i]
  • strideB: Value of type long long int that gives the offset in number of elements between B[i] and B[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type >* pointer to the C matrix corresponding to the first instance of the batch, with dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected
  • ldc: Leading dimension of two-dimensional array used to store each matrix C[i]
  • strideC: Value of type long long int that gives the offset in number of elements between C[i] and C[i+1]
  • batchCount: Number of GEMMs to perform in the batch

Errors:

Wraps cublasSgemmStridedBatched.

func (Handle) SgemmStridedBatched64

func (h Handle) SgemmStridedBatched64(transa Operation, transb Operation, m int64, n int64, k int64, alpha *float32, a driver.DevicePtr, lda int64, strideA int64, b driver.DevicePtr, ldb int64, strideB int64, beta *float32, c driver.DevicePtr, ldc int64, strideC int64, batchCount int64) error

SgemmStridedBatched64 performs the matrix-matrix multiplication of a batch of matrices.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. Input matrices A, B and output matrix C for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A, B and C matrices for the first instance are passed to the function by the user along with offsets in number of elements - strideA, strideB and strideC that determine the locations of input and output matrices in future instances. C+i*strideC=αop(A+i*strideA)op(B+i*strideB)+β(C+i*strideC), for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, i.e. the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], B[i], C[i] as notation for A, B and C matrices in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, strideB, strideC away from A[i-1], B[i-1], C[i-1]. The unit for the offset is number of elements and must not be zero .

It is Handle.SgemmStridedBatched with int64 sizes and strides.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • b: < type >* pointer to the B matrix corresponding to the first instance of the batch, with dimensions ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store each matrix B[i]
  • strideB: Value of type long long int that gives the offset in number of elements between B[i] and B[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type >* pointer to the C matrix corresponding to the first instance of the batch, with dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected
  • ldc: Leading dimension of two-dimensional array used to store each matrix C[i]
  • strideC: Value of type long long int that gives the offset in number of elements between C[i] and C[i+1]
  • batchCount: Number of GEMMs to perform in the batch

Errors:

Wraps cublasSgemmStridedBatched_64.

func (Handle) Sgemv

func (h Handle) Sgemv(trans Operation, m int32, n int32, alpha *float32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32, beta *float32, y driver.DevicePtr, incy int32) error

Sgemv performs the matrix-vector multiplication.

y=α op(A)x+βy, where A is a m×n matrix stored in column-major format, x and y are vectors, and α and β are scalars. Also, for matrix A op(A)={A if trans == CUBLAS_OP_NAᵀ if trans == CUBLAS_OP_TAᴴ if trans == OpC For references please refer to NETLIB documentation: sgemv(), dgemv(), cgemv(), zgemv()

Handle.Sgemv64 takes 64-bit sizes.

  • trans: Operation op( A) that is non- or (conj.) transpose
  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= max(1, m). Before entry, the leading m by n part of the array A must contain the matrix of coefficients. Unchanged on exit
  • lda: Leading dimension of two-dimensional array used to store matrix A. lda must be at least max(1, m)
  • x: < type > vector at least (1 + (n - 1) * abs(incx)) elements if trans == OpN and at least (1 + (m - 1) * abs(incx)) elements otherwise
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector at least (1 + (m - 1) * abs(incy)) elements if trans == OpN and at least (1 + (n - 1) * abs(incy)) elements otherwise
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasSgemv_v2.

func (Handle) Sgemv64

func (h Handle) Sgemv64(trans Operation, m int64, n int64, alpha *float32, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64, beta *float32, y driver.DevicePtr, incy int64) error

Sgemv64 performs the matrix-vector multiplication.

y=α op(A)x+βy, where A is a m×n matrix stored in column-major format, x and y are vectors, and α and β are scalars. Also, for matrix A op(A)={A if trans == CUBLAS_OP_NAᵀ if trans == CUBLAS_OP_TAᴴ if trans == OpC For references please refer to NETLIB documentation: sgemv(), dgemv(), cgemv(), zgemv()

It is Handle.Sgemv with int64 sizes and strides.

  • trans: Operation op( A) that is non- or (conj.) transpose
  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= max(1, m). Before entry, the leading m by n part of the array A must contain the matrix of coefficients. Unchanged on exit
  • lda: Leading dimension of two-dimensional array used to store matrix A. lda must be at least max(1, m)
  • x: < type > vector at least (1 + (n - 1) * abs(incx)) elements if trans == OpN and at least (1 + (m - 1) * abs(incx)) elements otherwise
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector at least (1 + (m - 1) * abs(incy)) elements if trans == OpN and at least (1 + (n - 1) * abs(incy)) elements otherwise
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasSgemv_v2_64.

func (Handle) SgemvBatched

func (h Handle) SgemvBatched(trans Operation, m int32, n int32, alpha *float32, aarray driver.DevicePtr, lda int32, xarray driver.DevicePtr, incx int32, beta *float32, yarray driver.DevicePtr, incy int32, batchCount int32) error

SgemvBatched performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. The address of the input matrix and vector, and the output vector of each instance of the batch are read from arrays of pointers passed to the function by the caller. y[i]=αop(A[i])x[i]+βy[i], for i∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrice A[i] stored in column-major format with dimension m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] , op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] vectors must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemvBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

Handle.SgemvBatched64 takes 64-bit sizes.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x n with lda >= max(1, m). All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • xarray: Array of pointers to < type > array, with each dimension n if trans == OpN and m otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • incx: Stride of each one-dimensional array x[i]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • yarray: Array of pointers to < type > array. It has dimensions m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • incy: Stride of each one-dimensional array y[i]
  • batchCount: Number of pointers contained in Aarray, xarray and yarray

Errors:

Wraps cublasSgemvBatched.

func (Handle) SgemvBatched64

func (h Handle) SgemvBatched64(trans Operation, m int64, n int64, alpha *float32, aarray driver.DevicePtr, lda int64, xarray driver.DevicePtr, incx int64, beta *float32, yarray driver.DevicePtr, incy int64, batchCount int64) error

SgemvBatched64 performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. The address of the input matrix and vector, and the output vector of each instance of the batch are read from arrays of pointers passed to the function by the caller. y[i]=αop(A[i])x[i]+βy[i], for i∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrice A[i] stored in column-major format with dimension m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] , op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] vectors must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemvBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

It is Handle.SgemvBatched with int64 sizes and strides.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x n with lda >= max(1, m). All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • xarray: Array of pointers to < type > array, with each dimension n if trans == OpN and m otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • incx: Stride of each one-dimensional array x[i]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • yarray: Array of pointers to < type > array. It has dimensions m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • incy: Stride of each one-dimensional array y[i]
  • batchCount: Number of pointers contained in Aarray, xarray and yarray

Errors:

Wraps cublasSgemvBatched_64.

func (Handle) SgemvStridedBatched

func (h Handle) SgemvStridedBatched(trans Operation, m int32, n int32, alpha *float32, a driver.DevicePtr, lda int32, strideA int64, x driver.DevicePtr, incx int32, stridex int64, beta *float32, y driver.DevicePtr, incy int32, stridey int64, batchCount int32) error

SgemvStridedBatched performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. Input matrix A and vector x, and output vector y for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A matrix, x and y vectors for the first instance are passed to the function by the user along with offsets in number of elements - strideA, stridex and stridey that determine the locations of input matrices and vectors, and output vectors in future instances. y+i*stridey=αop(A+i*strideA)(x+i*stridex)+β(y+i*stridey), for i ∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrix stored in column-major format with dimension A[i]m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] matrices must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], x[i], y[i] as notation for A matrix, and x and y vectors in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, stridex, stridey away from A[i-1], x[i-1], y[i-1]. The unit for the offset is number of elements and must not be zero .

Handle.SgemvStridedBatched64 takes 64-bit sizes.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • x: < type >* pointer to the x vector corresponding to the first instance of the batch, with each dimension n if trans == OpN and m otherwise
  • incx: Stride of each one-dimensional array x[i]
  • stridex: Value of type long long int that gives the offset in number of elements between x[i] and x[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • y: < type >* pointer to the y vector corresponding to the first instance of the batch, with each dimension m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected
  • incy: Stride of each one-dimensional array y[i]
  • stridey: Value of type long long int that gives the offset in number of elements between y[i] and y[i+1]
  • batchCount: Number of GEMVs to perform in the batch

Errors:

Wraps cublasSgemvStridedBatched.

func (Handle) SgemvStridedBatched64

func (h Handle) SgemvStridedBatched64(trans Operation, m int64, n int64, alpha *float32, a driver.DevicePtr, lda int64, strideA int64, x driver.DevicePtr, incx int64, stridex int64, beta *float32, y driver.DevicePtr, incy int64, stridey int64, batchCount int64) error

SgemvStridedBatched64 performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. Input matrix A and vector x, and output vector y for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A matrix, x and y vectors for the first instance are passed to the function by the user along with offsets in number of elements - strideA, stridex and stridey that determine the locations of input matrices and vectors, and output vectors in future instances. y+i*stridey=αop(A+i*strideA)(x+i*stridex)+β(y+i*stridey), for i ∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrix stored in column-major format with dimension A[i]m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] matrices must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], x[i], y[i] as notation for A matrix, and x and y vectors in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, stridex, stridey away from A[i-1], x[i-1], y[i-1]. The unit for the offset is number of elements and must not be zero .

It is Handle.SgemvStridedBatched with int64 sizes and strides.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • x: < type >* pointer to the x vector corresponding to the first instance of the batch, with each dimension n if trans == OpN and m otherwise
  • incx: Stride of each one-dimensional array x[i]
  • stridex: Value of type long long int that gives the offset in number of elements between x[i] and x[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • y: < type >* pointer to the y vector corresponding to the first instance of the batch, with each dimension m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected
  • incy: Stride of each one-dimensional array y[i]
  • stridey: Value of type long long int that gives the offset in number of elements between y[i] and y[i+1]
  • batchCount: Number of GEMVs to perform in the batch

Errors:

Wraps cublasSgemvStridedBatched_64.

func (Handle) SgeqrfBatched

func (h Handle) SgeqrfBatched(m int32, n int32, aarray driver.DevicePtr, lda int32, tauArray driver.DevicePtr, info *int32, batchSize int32) error

SgeqrfBatched computes the QR factorization of each matrix in a batch.

Aarray is an array of pointers to matrices stored in column-major format with dimensions m x n and leading dimension lda.

TauArray is an array of pointers to vectors of dimension of at least max (1, min(m, n). This function performs the QR factorization of each Aarray[i] for i = 0, ...,batchSize-1 using Householder reflections. Each matrix Q[i] is represented as a product of elementary reflectors and is stored in the lower part of each Aarray[i] as follows :

Q[j] = H[j][1] H[j][2] . . . H[j](k), where k = min(m,n).

Each H[j][i] has the form

H[j][i] = I - tau[j] * v * v'

where tau[j] is a real scalar, and v is a real vector with v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in Aarray[j][i+1:m,i], and tau in TauArray[j][i]. This function is intended to be used for matrices of small sizes where the launch overhead is a significant factor. cublasgeqrfBatched supports arbitrary dimension. cublasgeqrfBatched only supports compute capability 2.0 or above. For references please refer to NETLIB documentation: sgeqrf(), dgeqrf(), cgeqrf(), zgeqrf()

  • m: Number of rows Aarray[i]
  • n: Number of columns of Aarray[i]
  • aarray: Array of pointers to < type > array, with each array of dim. m x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
  • tauArray: Array of pointers to < type > vector, with each vector of dim. max(1 ,min(m, n))
  • info: If info == 0, the parameters passed to the function are valid. If info < 0, the parameter in position -info is invalid
  • batchSize: Number of pointers contained in Aarray

Errors:

Wraps cublasSgeqrfBatched.

func (Handle) Sger

func (h Handle) Sger(m int32, n int32, alpha *float32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, a driver.DevicePtr, lda int32) error

Sger performs the rank-1 update.

A={αxyᵀ+Aif ger(),geru() is calledαxyᴴ+Aif gerc() is called where A is a m×n matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: sger(), dger(), cgeru(), cgerc(), zgeru(), zgerc()

Handle.Sger64 takes 64-bit sizes.

  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with m elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimension lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasSger_v2.

func (Handle) Sger64

func (h Handle) Sger64(m int64, n int64, alpha *float32, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, a driver.DevicePtr, lda int64) error

Sger64 performs the rank-1 update.

A={αxyᵀ+Aif ger(),geru() is calledαxyᴴ+Aif gerc() is called where A is a m×n matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: sger(), dger(), cgeru(), cgerc(), zgeru(), zgerc()

It is Handle.Sger with int64 sizes and strides.

  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with m elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimension lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasSger_v2_64.

func (Handle) SgetrfBatched

func (h Handle) SgetrfBatched(n int32, a driver.DevicePtr, lda int32, p driver.DevicePtr, info driver.DevicePtr, batchSize int32) error

SgetrfBatched computes the LU factorization of each matrix in a batch.

Aarray is an array of pointers to matrices stored in column-major format with dimensions nxn and leading dimension lda.

This function performs the LU factorization of each Aarray[i] for i = 0, …, batchSize-1 by the following equation P*Aarray[i]=L*U where P is a permutation matrix which represents partial pivoting with row interchanges. L is a lower triangular matrix with unit diagonal and U is an upper triangular matrix. Formally P is written by a product of permutation matrices Pj, for j = 1,2,...,n, say P = P1 * P2 * P3 * .... * Pn. Pj is a permutation matrix which interchanges two rows of vector x when performing Pj*x. Pj can be constructed by j element of PivotArray[i] by the following Matlab code

// In Matlab PivotArray[i] is an array of base-1.
// In C, PivotArray[i] is base-0.
Pj = eye(n);
swap Pj(j,:) and Pj(PivotArray[i][j]  ,:)

L and U are written back to original matrix A, and diagonal elements of L are discarded. The L and U can be constructed by the following Matlab code

// A is a matrix of nxn after getrf.
L = eye(n);
for j = 1:n
    L(j+1:n,j) = A(j+1:n,j)
end
U = zeros(n);
for i = 1:n
    U(i,i:n) = A(i,i:n)
end

If matrix A(=Aarray[i]) is singular, getrf still works and the value of info(=infoArray[i]) reports first row index that LU factorization cannot proceed. If info is k, U(k,k) is zero. The equation P*A == L*U still holds, however L and U reconstruction needs a different Matlab code as follows:

// A is a matrix of nxn after getrf.
// info is k, which means U(k,k) is zero.
L = eye(n);
for j = 1:k-1
    L(j+1:n,j) = A(j+1:n,j)
end
U = zeros(n);
for i = 1:k-1
    U(i,i:n) = A(i,i:n)
end
for i = k:n
    U(i,k:n) = A(i,k:n)
end

This function is intended to be used for matrices of small sizes where the launch overhead is a significant factor. cublasgetrfBatched supports non-pivot LU factorization if PivotArray is NULL. cublasgetrfBatched supports arbitrary dimension. cublasgetrfBatched only supports compute capability 2.0 or above. For references please refer to NETLIB documentation: sgeqrf(), dgeqrf(), cgeqrf(), zgeqrf()

  • n: Number of rows and columns of Aarray[i]
  • lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
  • batchSize: Number of pointers contained in A

Errors:

Wraps cublasSgetrfBatched.

func (Handle) SgetriBatched

func (h Handle) SgetriBatched(n int32, a driver.DevicePtr, lda int32, p driver.DevicePtr, c driver.DevicePtr, ldc int32, info driver.DevicePtr, batchSize int32) error

SgetriBatched computes the inverse of each matrix in a batch from its LU factorization.

Aarray and Carray are arrays of pointers to matrices stored in column-major format with dimensions n*n and leading dimension lda and ldc respectively.

This function performs the inversion of matrices A[i] for i = 0, …, batchSize-1. Prior to calling cublasgetriBatched, the matrix A[i] must be factorized first using the routine cublasgetrfBatched. After the call of cublasgetrfBatched, the matrix pointing by Aarray[i] will contain the LU factors of the matrix A[i] and the vector pointing by (PivotArray+i) will contain the pivoting sequence. Following the LU factorization, cublasgetriBatched uses forward and backward triangular solvers to complete inversion of matrices A[i] for i = 0, …, batchSize-1. The inversion is out-of-place, so memory space of Carray[i] cannot overlap memory space of Array[i]. Typically all parameters in cublasgetrfBatched would be passed into cublasgetriBatched.

The user can check singularity from either cublasgetrfBatched or cublasgetriBatched. This function is intended to be used for matrices of small sizes where the launch overhead is a significant factor. If cublasgetrfBatched is performed by non-pivoting, PivotArray of cublasgetriBatched should be NULL. cublasgetriBatched supports arbitrary dimension. cublasgetriBatched only supports compute capability 2.0 or above.

  • n: Number of rows and columns of Aarray[i]
  • lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
  • ldc: Leading dimension of two-dimensional array used to store each matrix Carray[i]
  • batchSize: Number of pointers contained in A

Errors:

Wraps cublasSgetriBatched.

func (Handle) SgetrsBatched

func (h Handle) SgetrsBatched(trans Operation, n int32, nrhs int32, aarray driver.DevicePtr, lda int32, devIpiv driver.DevicePtr, barray driver.DevicePtr, ldb int32, info *int32, batchSize int32) error

SgetrsBatched solves an array of systems of linear equations of the form:

op(A[i])X[i]=B[i] where A[i] is a matrix which has been LU factorized with pivoting, X[i] and B[i] are n×nrhs matrices. Also, for matrix A op(A[i])={A[i]if trans == CUBLAS_OP_NAᵀ[i]if trans == CUBLAS_OP_TAᴴ[i]if trans == OpC This function is intended to be used for matrices of small sizes where the launch overhead is a significant factor. cublasgetrsBatched() supports non-pivot LU factorization if devIpiv is NULL. cublasgetrsBatched() supports arbitrary dimension. cublasgetrsBatched() only supports compute capability 2.0 or above. For references please refer to NETLIB documentation: sgeqrs(), dgeqrs(), cgeqrs(), zgeqrs()

  • trans: Operation op( A) that is non- or (conj.) transpose
  • n: Number of rows and columns of Aarray[i]
  • nrhs: Number of columns of Barray[i]
  • aarray: Array of pointers to < type > array, with each array of dim. n x n with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
  • devIpiv: Array of size n x batchSize that contains the pivoting sequence of each factorization of Aarray[i] stored in a linear fashion. If devIpiv is NULL, pivoting for all Aarray[i] is ignored
  • barray: Array of pointers to < type > array, with each array of dim. n x nrhs with ldb >= max(1, n). Matrices Barray[i] should not overlap; otherwise, undefined behavior is expected
  • ldb: Leading dimension of two-dimensional array used to store each solution matrix Barray[i]
  • info: If info == 0, the execution is successful. If info = -j, the j-th parameter had an illegal value
  • batchSize: Number of pointers contained in A

Errors:

Wraps cublasSgetrsBatched.

func (Handle) SmCountTarget

func (h Handle) SmCountTarget() (int32, error)

SmCountTarget obtains the value previously programmed to the library handle.

A nil error means SM count target was returned successfully.

Errors:

Wraps cublasGetSmCountTarget.

func (Handle) SmatinvBatched

func (h Handle) SmatinvBatched(n int32, a driver.DevicePtr, lda int32, ainv driver.DevicePtr, ldaInv int32, info driver.DevicePtr, batchSize int32) error

SmatinvBatched A and Ainv are arrays of pointers to matrices stored in column-major format with dimensions n*n and leading dimension lda and ldaInv respectively.

This function performs the inversion of matrices A[i] for i = 0, …, batchSize-1. This function is a short cut of cublasgetrfBatched() plus cublasgetriBatched(). However it doesn’t work if n is greater than 32. If not, the user has to go through cublasgetrfBatched() and cublasgetriBatched(). If the matrix A[i] is singular, then info[i] reports singularity, the same as cublasgetrfBatched().

  • n: Number of rows and columns of A[i]
  • a: Array of pointers to < type > array, with each array of dimension n*n with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • ainv: Array of pointers to < type > array, with each array of dimension n*n with ldaInv >= max(1, n). Matrices Ainv[i] should not overlap; otherwise, undefined behavior is expected
  • ldaInv: Leading dimension of two-dimensional array used to store each matrix Ainv[i]
  • info: Array of size batchSize that info[i] contains the information of inversion of A[i]. If info[i] == 0, the execution is successful. If info[i] == k, then U(k, k) == 0. The U is exactly singular and the inversion failed
  • batchSize: Number of pointers contained in A

Errors:

Wraps cublasSmatinvBatched.

func (Handle) Snrm2

func (h Handle) Snrm2(n int32, x driver.DevicePtr, incx int32) (float32, error)

Snrm2 computes the Euclidean norm of the vector x.

The code uses a multiphase model of accumulation to avoid intermediate underflow and overflow, with the result being equivalent to ∑_(i=1)^(n)(x[j]×x[j]) where j=1+(i−1)*incx in exact arithmetic. Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: snrm2(), dnrm2(), scnrm2(), dznrm2()

Handle.Snrm264 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • result: The resulting norm, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasSnrm2_v2.

func (Handle) Snrm264

func (h Handle) Snrm264(n int64, x driver.DevicePtr, incx int64) (float32, error)

Snrm264 computes the Euclidean norm of the vector x.

The code uses a multiphase model of accumulation to avoid intermediate underflow and overflow, with the result being equivalent to ∑_(i=1)^(n)(x[j]×x[j]) where j=1+(i−1)*incx in exact arithmetic. Notice that the last equation reflects 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: snrm2(), dnrm2(), scnrm2(), dznrm2()

It is Handle.Snrm2 with int64 sizes and strides.

  • n: Number of elements in the vector x
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • result: The resulting norm, which is set to 0 if n <= 0 or incx <= 0

Errors:

Wraps cublasSnrm2_v2_64.

func (Handle) Srot

func (h Handle) Srot(n int32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, c *float32, s *float32) error

Srot applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):

G=(cs−sc) to vectors x and y. Hence, the result is x[k]=c×x[k]+s×y[j] and y[j]=−s×x[k]+c×y[j] where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: srot(), drot(), crot(), csrot(), zrot(), zdrot()

Handle.Srot64 takes 64-bit sizes.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • c: Cosine element of the rotation matrix
  • s: Sine element of the rotation matrix

Errors:

Wraps cublasSrot_v2.

func (Handle) Srot64

func (h Handle) Srot64(n int64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, c *float32, s *float32) error

Srot64 applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):

G=(cs−sc) to vectors x and y. Hence, the result is x[k]=c×x[k]+s×y[j] and y[j]=−s×x[k]+c×y[j] where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: srot(), drot(), crot(), csrot(), zrot(), zdrot()

It is Handle.Srot with int64 sizes and strides.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • c: Cosine element of the rotation matrix
  • s: Sine element of the rotation matrix

Errors:

Wraps cublasSrot_v2_64.

func (Handle) Srotg

func (h Handle) Srotg(a *float32, b *float32, c *float32, s *float32) error

Srotg constructs the Givens rotation matrix.

G=(cs−sc), that zeros out the second entry of a 2×1 vector (a,b)ᵀ . Then, for real numbers we can write (cs−sc)(ab)=(r0) where c²+s²=1 and r=±a²+b² . The parameters a and b are overwritten with r and z , respectively. The value of z is such that c and s may be recovered using the following rules: (c,s)={(1−z²,z) if |z|<1(0.0,1.0) if |z|=1(1/z,1−z²) if |z|>1 For complex numbers we can write (cs−s¯c)(ab)=(r0) where c²+(s¯×s)=1 and r=a|a|×∥(a,b)ᵀ∥₂ with ∥(a,b)ᵀ∥₂=|a|²+|B|² for a≠0 and r=b for a=0 . Finally, the parameter a is overwritten with r on exit. For references please refer to NETLIB documentation: srotg(), drotg(), crotg(), zrotg()

  • a: < type > scalar that is overwritten with r
  • b: < type > scalar that is overwritten with z
  • c: Cosine element of the rotation matrix
  • s: Sine element of the rotation matrix

Errors:

Wraps cublasSrotg_v2.

func (Handle) Srotm

func (h Handle) Srotm(n int32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, param *float32) error

Srotm applies the modified Givens transformation.

H=(h₁₁h₁₂h₂₁h₂₂), to vectors x and y. Hence, the result is x[k]=h₁₁×x[k]+h₁₂×y[j] and y[j]=h₂₁×x[k]+h₂₂×y[j] where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. The elements , , and of matrix H are stored in param[1], param[2], param[3] and param[4], respectively. The flag = param[0] defines the following predefined values for the matrix H entries

flag == -1.0          flag == 0.0           flag == 1.0            flag == -2.0
(h₁₁, h₁₂; h₂₁, h₂₂)  (1.0, h₁₂; h₂₁, 1.0)  (h₁₁, 1.0; −1.0, h₂₂)  (1.0, 0.0; 0.0, 1.0)

Notice that the values -1.0, 0.0 and 1.0 implied by the flag are not stored in param. For references please refer to NETLIB documentation: srotm(), drotm()

Handle.Srotm64 takes 64-bit sizes.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • param: < type > vector of 5 elements, where param[0] and param[1..4] contain the flag and matrix H

Errors:

Wraps cublasSrotm_v2.

func (Handle) Srotm64

func (h Handle) Srotm64(n int64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, param *float32) error

Srotm64 applies the modified Givens transformation.

H=(h₁₁h₁₂h₂₁h₂₂), to vectors x and y. Hence, the result is x[k]=h₁₁×x[k]+h₁₂×y[j] and y[j]=h₂₁×x[k]+h₂₂×y[j] where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. The elements , , and of matrix H are stored in param[1], param[2], param[3] and param[4], respectively. The flag = param[0] defines the following predefined values for the matrix H entries

flag == -1.0          flag == 0.0           flag == 1.0            flag == -2.0
(h₁₁, h₁₂; h₂₁, h₂₂)  (1.0, h₁₂; h₂₁, 1.0)  (h₁₁, 1.0; −1.0, h₂₂)  (1.0, 0.0; 0.0, 1.0)

Notice that the values -1.0, 0.0 and 1.0 implied by the flag are not stored in param. For references please refer to NETLIB documentation: srotm(), drotm()

It is Handle.Srotm with int64 sizes and strides.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • param: < type > vector of 5 elements, where param[0] and param[1..4] contain the flag and matrix H

Errors:

Wraps cublasSrotm_v2_64.

func (Handle) Srotmg

func (h Handle) Srotmg(d1 *float32, d2 *float32, x1 *float32, y1 *float32, param *float32) error

Srotmg constructs the modified Givens transformation.

H=(h₁₁h₁₂h₂₁h₂₂), that zeros out the second entry of a 2×1 vector (d1*x1,d2*y1)ᵀ . The flag = param[0] defines the following predefined values for the matrix H entries

flag == -1.0          flag == 0.0           flag == 1.0            flag == -2.0
(h₁₁, h₁₂; h₂₁, h₂₂)  (1.0, h₁₂; h₂₁, 1.0)  (h₁₁, 1.0; −1.0, h₂₂)  (1.0, 0.0; 0.0, 1.0)

Notice that the values -1.0, 0.0 and 1.0 implied by the flag are not stored in param. For references please refer to NETLIB documentation: srotmg(), drotmg()

  • d1: < type > scalar that is overwritten on exit
  • d2: < type > scalar that is overwritten on exit
  • x1: < type > scalar that is overwritten on exit
  • y1: < type > scalar
  • param: < type > vector of 5 elements, where param[0] and param[1-4] contain the flag and matrix H

Errors:

Wraps cublasSrotmg_v2.

func (Handle) Ssbmv

func (h Handle) Ssbmv(uplo FillMode, n int32, k int32, alpha *float32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32, beta *float32, y driver.DevicePtr, incy int32) error

Ssbmv performs the symmetric banded matrix-vector multiplication.

y=αAx+βy, where A is a n×n symmetric banded matrix with k subdiagonals and superdiagonals, x and y are vectors, and α and β are scalars. If uplo == FillModeLower then the symmetric banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the symmetric banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k),j] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: ssbmv(), dsbmv()

Handle.Ssbmv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= k + 1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasSsbmv_v2.

func (Handle) Ssbmv64

func (h Handle) Ssbmv64(uplo FillMode, n int64, k int64, alpha *float32, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64, beta *float32, y driver.DevicePtr, incy int64) error

Ssbmv64 performs the symmetric banded matrix-vector multiplication.

y=αAx+βy, where A is a n×n symmetric banded matrix with k subdiagonals and superdiagonals, x and y are vectors, and α and β are scalars. If uplo == FillModeLower then the symmetric banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the symmetric banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k),j] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: ssbmv(), dsbmv()

It is Handle.Ssbmv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= k + 1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasSsbmv_v2_64.

func (Handle) Sscal

func (h Handle) Sscal(n int32, alpha *float32, x driver.DevicePtr, incx int32) error

Sscal scales the vector x by the scalar α and overwrites it with the result.

Hence, the performed operation is x[j]=α×x[j] for i=1,…,n and j=1+(i−1)*incx . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sscal(), dscal(), csscal(), cscal(), zdscal(), zscal()

Handle.Sscal64 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasSscal_v2.

func (Handle) Sscal64

func (h Handle) Sscal64(n int64, alpha *float32, x driver.DevicePtr, incx int64) error

Sscal64 scales the vector x by the scalar α and overwrites it with the result.

Hence, the performed operation is x[j]=α×x[j] for i=1,…,n and j=1+(i−1)*incx . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sscal(), dscal(), csscal(), cscal(), zdscal(), zscal()

It is Handle.Sscal with int64 sizes and strides.

  • n: Number of elements in the vector x
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasSscal_v2_64.

func (Handle) Sspmv

func (h Handle) Sspmv(uplo FillMode, n int32, alpha *float32, ap driver.DevicePtr, x driver.DevicePtr, incx int32, beta *float32, y driver.DevicePtr, incy int32) error

Sspmv performs the symmetric packed matrix-vector multiplication.

y=αAx+βy, where A is a n×n symmetric matrix stored in packed format, x and y are vectors, and α and β are scalars. If uplo == FillModeLower then the elements in the lower triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: sspmv(), dspmv()

Handle.Sspmv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • ap: < type > array with A stored in packed format
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasSspmv_v2.

func (Handle) Sspmv64

func (h Handle) Sspmv64(uplo FillMode, n int64, alpha *float32, ap driver.DevicePtr, x driver.DevicePtr, incx int64, beta *float32, y driver.DevicePtr, incy int64) error

Sspmv64 performs the symmetric packed matrix-vector multiplication.

y=αAx+βy, where A is a n×n symmetric matrix stored in packed format, x and y are vectors, and α and β are scalars. If uplo == FillModeLower then the elements in the lower triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: sspmv(), dspmv()

It is Handle.Sspmv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • ap: < type > array with A stored in packed format
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasSspmv_v2_64.

func (Handle) Sspr

func (h Handle) Sspr(uplo FillMode, n int32, alpha *float32, x driver.DevicePtr, incx int32, ap driver.DevicePtr) error

Sspr performs the packed symmetric rank-1 update.

A=αxxᵀ+A, where A is a n×n symmetric matrix stored in packed format, x is a vector, and α is a scalar. If uplo == FillModeLower then the elements in the lower triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: sspr(), dspr()

Handle.Sspr64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • ap: < type > array with A stored in packed format

Errors:

Wraps cublasSspr_v2.

func (Handle) Sspr2

func (h Handle) Sspr2(uplo FillMode, n int32, alpha *float32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, ap driver.DevicePtr) error

Sspr2 performs the packed symmetric rank-2 update.

A=α(xyᵀ+yxᵀ)+A, where A is a n×n symmetric matrix stored in packed format, x is a vector, and α is a scalar. If uplo == FillModeLower then the elements in the lower triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: sspr2(), dspr2()

Handle.Sspr264 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • ap: < type > array with A stored in packed format

Errors:

Wraps cublasSspr2_v2.

func (Handle) Sspr64

func (h Handle) Sspr64(uplo FillMode, n int64, alpha *float32, x driver.DevicePtr, incx int64, ap driver.DevicePtr) error

Sspr64 performs the packed symmetric rank-1 update.

A=αxxᵀ+A, where A is a n×n symmetric matrix stored in packed format, x is a vector, and α is a scalar. If uplo == FillModeLower then the elements in the lower triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: sspr(), dspr()

It is Handle.Sspr with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • ap: < type > array with A stored in packed format

Errors:

Wraps cublasSspr_v2_64.

func (Handle) Sspr264

func (h Handle) Sspr264(uplo FillMode, n int64, alpha *float32, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, ap driver.DevicePtr) error

Sspr264 performs the packed symmetric rank-2 update.

A=α(xyᵀ+yxᵀ)+A, where A is a n×n symmetric matrix stored in packed format, x is a vector, and α is a scalar. If uplo == FillModeLower then the elements in the lower triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the symmetric matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: sspr2(), dspr2()

It is Handle.Sspr2 with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • ap: < type > array with A stored in packed format

Errors:

Wraps cublasSspr2_v2_64.

func (Handle) Sswap

func (h Handle) Sswap(n int32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32) error

Sswap interchanges the elements of vector x and y.

Hence, the performed operation is y[j]⇔x[k] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sswap(), dswap(), cswap(), zswap()

Handle.Sswap64 takes 64-bit sizes.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasSswap_v2.

func (Handle) Sswap64

func (h Handle) Sswap64(n int64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64) error

Sswap64 interchanges the elements of vector x and y.

Hence, the performed operation is y[j]⇔x[k] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sswap(), dswap(), cswap(), zswap()

It is Handle.Sswap with int64 sizes and strides.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasSswap_v2_64.

func (Handle) Ssymm

func (h Handle) Ssymm(side SideMode, uplo FillMode, m int32, n int32, alpha *float32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *float32, c driver.DevicePtr, ldc int32) error

Ssymm performs the symmetric matrix-matrix multiplication.

C={αAB+βCif side == [SideLeft]αBA+βCif side == SideRight where A is a symmetric matrix stored in lower or upper mode, B and C are m×n matrices, and α and β are scalars. For references please refer to NETLIB documentation: ssymm(), dsymm(), csymm(), zsymm()

Handle.Ssymm64 takes 64-bit sizes.

  • side: Indicates if matrix A is on the left or right of B
  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • m: Number of rows of matrix C and B, with matrix A sized accordingly
  • n: Number of columns of matrix C and B, with matrix A sized accordingly
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasSsymm_v2.

func (Handle) Ssymm64

func (h Handle) Ssymm64(side SideMode, uplo FillMode, m int64, n int64, alpha *float32, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *float32, c driver.DevicePtr, ldc int64) error

Ssymm64 performs the symmetric matrix-matrix multiplication.

C={αAB+βCif side == [SideLeft]αBA+βCif side == SideRight where A is a symmetric matrix stored in lower or upper mode, B and C are m×n matrices, and α and β are scalars. For references please refer to NETLIB documentation: ssymm(), dsymm(), csymm(), zsymm()

It is Handle.Ssymm with int64 sizes and strides.

  • side: Indicates if matrix A is on the left or right of B
  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • m: Number of rows of matrix C and B, with matrix A sized accordingly
  • n: Number of columns of matrix C and B, with matrix A sized accordingly
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasSsymm_v2_64.

func (Handle) Ssymv

func (h Handle) Ssymv(uplo FillMode, n int32, alpha *float32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32, beta *float32, y driver.DevicePtr, incy int32) error

Ssymv performs the symmetric matrix-vector multiplication.

y=αAx+βy where A is a n×n symmetric matrix stored in lower or upper mode, x and y are vectors, and α and β are scalars. This function has an alternate faster implementation using atomics that can be enabled with Handle.SetAtomicsMode. Please see the section on the function Handle.SetAtomicsMode for more details about the usage of atomics. For references please refer to NETLIB documentation: ssymv(), dsymv()

Handle.Ssymv64 takes 64-bit sizes.

  • uplo: Indicates if matrix lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasSsymv_v2.

func (Handle) Ssymv64

func (h Handle) Ssymv64(uplo FillMode, n int64, alpha *float32, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64, beta *float32, y driver.DevicePtr, incy int64) error

Ssymv64 performs the symmetric matrix-vector multiplication.

y=αAx+βy where A is a n×n symmetric matrix stored in lower or upper mode, x and y are vectors, and α and β are scalars. This function has an alternate faster implementation using atomics that can be enabled with Handle.SetAtomicsMode. Please see the section on the function Handle.SetAtomicsMode for more details about the usage of atomics. For references please refer to NETLIB documentation: ssymv(), dsymv()

It is Handle.Ssymv with int64 sizes and strides.

  • uplo: Indicates if matrix lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasSsymv_v2_64.

func (Handle) Ssyr

func (h Handle) Ssyr(uplo FillMode, n int32, alpha *float32, x driver.DevicePtr, incx int32, a driver.DevicePtr, lda int32) error

Ssyr performs the symmetric rank-1 update.

A=αxxᵀ+A, where A is a n×n symmetric matrix stored in column-major format, x is a vector, and α is a scalar. For references please refer to NETLIB documentation: ssyr(), dsyr()

Handle.Ssyr64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • a: < type > array of dimensions lda x n, with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasSsyr_v2.

func (Handle) Ssyr2

func (h Handle) Ssyr2(uplo FillMode, n int32, alpha *float32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, a driver.DevicePtr, lda int32) error

Ssyr2 performs the symmetric rank-2 update.

A=α(xyᵀ+yxᵀ)+A, where A is a n×n symmetric matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: ssyr2(), dsyr2()

Handle.Ssyr264 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimensions lda x n, with lda >= max(1,n)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasSsyr2_v2.

func (Handle) Ssyr2k

func (h Handle) Ssyr2k(uplo FillMode, trans Operation, n int32, k int32, alpha *float32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *float32, c driver.DevicePtr, ldc int32) error

Ssyr2k performs the symmetric rank- 2k update.

C=α(op(A)op(B)ᵀ+op(B)op(A)ᵀ)+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrix A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᵀ and Bᵀif trans == OpT For references please refer to NETLIB documentation: ssyr2k(), dsyr2k(), csyr2k(), zsyr2k()

Handle.Ssyr2k64 takes 64-bit sizes.

  • uplo: Indicates if matrix C lower or upper part, is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimensions ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, then C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If n < 0 or k < 0, or if trans is not one of OpN, OpT and OpC, or if uplo is not one of FillModeLower and FillModeUpper, or if lda < max(1, n) when trans == OpN, and lda < max(1, k) otherwise, or if ldb < max(1, n) when trans == OpN, and ldb < max(1, k) otherwise, or if ldc < max(1, n), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasSsyr2k_v2.

func (Handle) Ssyr2k64

func (h Handle) Ssyr2k64(uplo FillMode, trans Operation, n int64, k int64, alpha *float32, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *float32, c driver.DevicePtr, ldc int64) error

Ssyr2k64 performs the symmetric rank- 2k update.

C=α(op(A)op(B)ᵀ+op(B)op(A)ᵀ)+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrix A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᵀ and Bᵀif trans == OpT For references please refer to NETLIB documentation: ssyr2k(), dsyr2k(), csyr2k(), zsyr2k()

It is Handle.Ssyr2k with int64 sizes and strides.

  • uplo: Indicates if matrix C lower or upper part, is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimensions ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, then C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If n < 0 or k < 0, or if trans is not one of OpN, OpT and OpC, or if uplo is not one of FillModeLower and FillModeUpper, or if lda < max(1, n) when trans == OpN, and lda < max(1, k) otherwise, or if ldb < max(1, n) when trans == OpN, and ldb < max(1, k) otherwise, or if ldc < max(1, n), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasSsyr2k_v2_64.

func (Handle) Ssyr64

func (h Handle) Ssyr64(uplo FillMode, n int64, alpha *float32, x driver.DevicePtr, incx int64, a driver.DevicePtr, lda int64) error

Ssyr64 performs the symmetric rank-1 update.

A=αxxᵀ+A, where A is a n×n symmetric matrix stored in column-major format, x is a vector, and α is a scalar. For references please refer to NETLIB documentation: ssyr(), dsyr()

It is Handle.Ssyr with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • a: < type > array of dimensions lda x n, with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasSsyr_v2_64.

func (Handle) Ssyr264

func (h Handle) Ssyr264(uplo FillMode, n int64, alpha *float32, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, a driver.DevicePtr, lda int64) error

Ssyr264 performs the symmetric rank-2 update.

A=α(xyᵀ+yxᵀ)+A, where A is a n×n symmetric matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: ssyr2(), dsyr2()

It is Handle.Ssyr2 with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimensions lda x n, with lda >= max(1,n)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasSsyr2_v2_64.

func (Handle) Ssyrk

func (h Handle) Ssyrk(uplo FillMode, trans Operation, n int32, k int32, alpha *float32, a driver.DevicePtr, lda int32, beta *float32, c driver.DevicePtr, ldc int32) error

Ssyrk performs the symmetric rank- k update.

C=αop(A)op(A)ᵀ+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A is a matrix with dimensions op(A)n×k . Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == OpT For references please refer to NETLIB documentation: ssyrk(), dsyrk(), csyrk(), zsyrk()

Handle.Ssyrk64 takes 64-bit sizes.

  • uplo: Indicates if matrix C lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A) and C
  • k: Number of columns of matrix op( A)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if trans == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasSsyrk_v2.

func (Handle) Ssyrk64

func (h Handle) Ssyrk64(uplo FillMode, trans Operation, n int64, k int64, alpha *float32, a driver.DevicePtr, lda int64, beta *float32, c driver.DevicePtr, ldc int64) error

Ssyrk64 performs the symmetric rank- k update.

C=αop(A)op(A)ᵀ+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A is a matrix with dimensions op(A)n×k . Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == OpT For references please refer to NETLIB documentation: ssyrk(), dsyrk(), csyrk(), zsyrk()

It is Handle.Ssyrk with int64 sizes and strides.

  • uplo: Indicates if matrix C lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A) and C
  • k: Number of columns of matrix op( A)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if trans == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasSsyrk_v2_64.

func (Handle) Ssyrkx

func (h Handle) Ssyrkx(uplo FillMode, trans Operation, n int32, k int32, alpha *float32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *float32, c driver.DevicePtr, ldc int32) error

Ssyrkx performs a variation of the symmetric rank- k update.

C=αop(A)op(B)ᵀ+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrices A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᵀ and Bᵀif trans == OpT This routine can be used when B is in such way that the result is guaranteed to be symmetric. A usual example is when the matrix B is a scaled form of the matrix A: this is equivalent to B being the product of the matrix A and a diagonal matrix. For an efficient computation of the product of a regular matrix with a diagonal matrix, refer to the routine cublasdgmm(). For references please refer to NETLIB documentation: ssyrk(), dsyrk(), csyrk(), zsyrk() and ssyr2k(), dsyr2k(), csyr2k(), zsyr2k()

Handle.Ssyrkx64 takes 64-bit sizes.

  • uplo: Indicates if matrix C lower or upper part, is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimensions ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, then C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If n < 0 or k < 0, or if trans is not one of OpN, OpT and OpC, or if uplo is not one of FillModeLower and FillModeUpper, or if lda < max(1, n) when trans == OpN, and lda < max(1, k) otherwise, or if ldb < max(1, n) when trans == OpN, and ldb < max(1, k) otherwise, or if ldc < max(1, n), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasSsyrkx.

func (Handle) Ssyrkx64

func (h Handle) Ssyrkx64(uplo FillMode, trans Operation, n int64, k int64, alpha *float32, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *float32, c driver.DevicePtr, ldc int64) error

Ssyrkx64 performs a variation of the symmetric rank- k update.

C=αop(A)op(B)ᵀ+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrices A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᵀ and Bᵀif trans == OpT This routine can be used when B is in such way that the result is guaranteed to be symmetric. A usual example is when the matrix B is a scaled form of the matrix A: this is equivalent to B being the product of the matrix A and a diagonal matrix. For an efficient computation of the product of a regular matrix with a diagonal matrix, refer to the routine cublasdgmm(). For references please refer to NETLIB documentation: ssyrk(), dsyrk(), csyrk(), zsyrk() and ssyr2k(), dsyr2k(), csyr2k(), zsyr2k()

It is Handle.Ssyrkx with int64 sizes and strides.

  • uplo: Indicates if matrix C lower or upper part, is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimensions ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, then C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If n < 0 or k < 0, or if trans is not one of OpN, OpT and OpC, or if uplo is not one of FillModeLower and FillModeUpper, or if lda < max(1, n) when trans == OpN, and lda < max(1, k) otherwise, or if ldb < max(1, n) when trans == OpN, and ldb < max(1, k) otherwise, or if ldc < max(1, n), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasSsyrkx_64.

func (Handle) Stbmv

func (h Handle) Stbmv(uplo FillMode, trans Operation, diag DiagType, n int32, k int32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32) error

Stbmv performs the triangular banded matrix-vector multiplication.

x=op(A)x, where A is a triangular banded matrix, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC If uplo == FillModeLower then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k,j)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: stbmv(), dtbmv(), ctbmv(), ztbmv()

Handle.Stbmv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix
  • a: < type > array of dimension lda x n, with lda >= k + 1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasStbmv_v2.

func (Handle) Stbmv64

func (h Handle) Stbmv64(uplo FillMode, trans Operation, diag DiagType, n int64, k int64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64) error

Stbmv64 performs the triangular banded matrix-vector multiplication.

x=op(A)x, where A is a triangular banded matrix, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC If uplo == FillModeLower then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k,j)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: stbmv(), dtbmv(), ctbmv(), ztbmv()

It is Handle.Stbmv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix
  • a: < type > array of dimension lda x n, with lda >= k + 1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasStbmv_v2_64.

func (Handle) Stbsv

func (h Handle) Stbsv(uplo FillMode, trans Operation, diag DiagType, n int32, k int32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32) error

Stbsv solves the triangular banded linear system with a single right-hand-side.

op(A)x=b, where A is a triangular banded matrix, and x and b are vectors. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. If uplo == FillModeLower then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k,j)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: stbsv(), dtbsv(), ctbsv(), ztbsv()

Handle.Stbsv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix A
  • a: < type > array of dimension lda x n, with lda >= k+1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasStbsv_v2.

func (Handle) Stbsv64

func (h Handle) Stbsv64(uplo FillMode, trans Operation, diag DiagType, n int64, k int64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64) error

Stbsv64 solves the triangular banded linear system with a single right-hand-side.

op(A)x=b, where A is a triangular banded matrix, and x and b are vectors. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. If uplo == FillModeLower then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k,j)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: stbsv(), dtbsv(), ctbsv(), ztbsv()

It is Handle.Stbsv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix A
  • a: < type > array of dimension lda x n, with lda >= k+1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasStbsv_v2_64.

func (Handle) Stpmv

func (h Handle) Stpmv(uplo FillMode, trans Operation, diag DiagType, n int32, ap driver.DevicePtr, x driver.DevicePtr, incx int32) error

Stpmv performs the triangular packed matrix-vector multiplication.

x=op(A)x, where A is a triangular matrix stored in packed format, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC If uplo == FillModeLower then the elements in the lower triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for A(i,j) and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: stpmv(), dtpmv(), ctpmv(), ztpmv()

Handle.Stpmv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • ap: < type > array with A stored in packed format
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasStpmv_v2.

func (Handle) Stpmv64

func (h Handle) Stpmv64(uplo FillMode, trans Operation, diag DiagType, n int64, ap driver.DevicePtr, x driver.DevicePtr, incx int64) error

Stpmv64 performs the triangular packed matrix-vector multiplication.

x=op(A)x, where A is a triangular matrix stored in packed format, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC If uplo == FillModeLower then the elements in the lower triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for A(i,j) and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: stpmv(), dtpmv(), ctpmv(), ztpmv()

It is Handle.Stpmv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • ap: < type > array with A stored in packed format
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasStpmv_v2_64.

func (Handle) Stpsv

func (h Handle) Stpsv(uplo FillMode, trans Operation, diag DiagType, n int32, ap driver.DevicePtr, x driver.DevicePtr, incx int32) error

Stpsv solves the packed triangular linear system with a single right-hand-side.

op(A)x=b, where A is a triangular matrix stored in packed format, and x and b are vectors. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. If uplo == FillModeLower then the elements in the lower triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: stpsv(), dtpsv(), ctpsv(), ztpsv()

Handle.Stpsv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • ap: < type > array with A stored in packed format
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasStpsv_v2.

func (Handle) Stpsv64

func (h Handle) Stpsv64(uplo FillMode, trans Operation, diag DiagType, n int64, ap driver.DevicePtr, x driver.DevicePtr, incx int64) error

Stpsv64 solves the packed triangular linear system with a single right-hand-side.

op(A)x=b, where A is a triangular matrix stored in packed format, and x and b are vectors. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. If uplo == FillModeLower then the elements in the lower triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: stpsv(), dtpsv(), ctpsv(), ztpsv()

It is Handle.Stpsv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • ap: < type > array with A stored in packed format
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasStpsv_v2_64.

func (Handle) Stpttr

func (h Handle) Stpttr(uplo FillMode, n int32, ap driver.DevicePtr, a driver.DevicePtr, lda int32) error

Stpttr performs the conversion from the triangular packed format to the triangular format.

If uplo == FillModeLower then the elements of AP are copied into the lower triangular part of the triangular matrix A and the upper part of A is left untouched. If uplo == FillModeUpper then the elements of AP are copied into the upper triangular part of the triangular matrix A and the lower part of A is left untouched. For references please refer to NETLIB documentation: stpttr(), dtpttr(), ctpttr(), ztpttr()

  • uplo: Indicates if matrix AP contains lower or upper part of matrix A
  • n: Number of rows and columns of matrix A
  • ap: < type > array with A stored in packed format
  • a: < type > array of dimensions lda x n , with lda >= max(1, n). The opposite side of A is left untouched
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasStpttr.

func (Handle) Stream

func (h Handle) Stream() (driver.Stream, error)

Stream gets the cuBLAS library stream, which is being used to execute all calls to the cuBLAS library functions.

If the cuBLAS library stream is not set, all kernels use the default NULL stream.

A nil error means the stream was returned successfully.

Errors:

Wraps cublasGetStream_v2.

func (Handle) Strmm

func (h Handle) Strmm(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int32, n int32, alpha *float32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, c driver.DevicePtr, ldc int32) error

Strmm performs the triangular matrix-matrix multiplication.

C={αop(A)Bif side == [SideLeft]αBop(A)if side == SideRight where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, B and C are m×n matrix, and α is a scalar. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC Notice that in order to achieve better parallelism cuBLAS differs from the BLAS API only for this routine. The BLAS API assumes an in-place implementation (with results written back to B), while the cuBLAS API assumes an out-of-place implementation (with results written into C). The application can obtain the in-place functionality of BLAS in the cuBLAS API by passing the address of the matrix B in place of the matrix C. No other overlapping in the input parameters is supported. For references please refer to NETLIB documentation: strmm(), dtrmm(), ctrmm(), ztrmm()

Handle.Strmm64 takes 64-bit sizes.

  • side: Indicates if matrix A is on the left or right of B
  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • m: Number of rows of matrix B, with matrix A sized accordingly
  • n: Number of columns of matrix B, with matrix A sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A is not referenced and B does not have to be a valid input
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • c: < type > array of dimension ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasStrmm_v2.

func (Handle) Strmm64

func (h Handle) Strmm64(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int64, n int64, alpha *float32, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, c driver.DevicePtr, ldc int64) error

Strmm64 performs the triangular matrix-matrix multiplication.

C={αop(A)Bif side == [SideLeft]αBop(A)if side == SideRight where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, B and C are m×n matrix, and α is a scalar. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC Notice that in order to achieve better parallelism cuBLAS differs from the BLAS API only for this routine. The BLAS API assumes an in-place implementation (with results written back to B), while the cuBLAS API assumes an out-of-place implementation (with results written into C). The application can obtain the in-place functionality of BLAS in the cuBLAS API by passing the address of the matrix B in place of the matrix C. No other overlapping in the input parameters is supported. For references please refer to NETLIB documentation: strmm(), dtrmm(), ctrmm(), ztrmm()

It is Handle.Strmm with int64 sizes and strides.

  • side: Indicates if matrix A is on the left or right of B
  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • m: Number of rows of matrix B, with matrix A sized accordingly
  • n: Number of columns of matrix B, with matrix A sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A is not referenced and B does not have to be a valid input
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • c: < type > array of dimension ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasStrmm_v2_64.

func (Handle) Strmv

func (h Handle) Strmv(uplo FillMode, trans Operation, diag DiagType, n int32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32) error

Strmv performs the triangular matrix-vector multiplication.

x=op(A)x, where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC For references please refer to NETLIB documentation: strmv(), dtrmv(), ctrmv(), ztrmv()

Handle.Strmv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • a: < type > array of dimensions lda x n , with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasStrmv_v2.

func (Handle) Strmv64

func (h Handle) Strmv64(uplo FillMode, trans Operation, diag DiagType, n int64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64) error

Strmv64 performs the triangular matrix-vector multiplication.

x=op(A)x, where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC For references please refer to NETLIB documentation: strmv(), dtrmv(), ctrmv(), ztrmv()

It is Handle.Strmv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • a: < type > array of dimensions lda x n , with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasStrmv_v2_64.

func (Handle) Strsm

func (h Handle) Strsm(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int32, n int32, alpha *float32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32) error

Strsm solves the triangular linear system with multiple right-hand-sides.

{op(A)X=αBif side == CUBLAS_SIDE_LEFTXop(A)=αBif side == SideRight where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, X and B are m×n matrices, and α is a scalar. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC The solution X overwrites the right-hand-sides B on exit. No test for singularity or near-singularity is included in this function. For references please refer to NETLIB documentation: strsm(), dtrsm(), ctrsm(), ztrsm()

Handle.Strsm64 takes 64-bit sizes.

  • side: Indicates if matrix A is on the left or right of X
  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • m: Number of rows of matrix B, with matrix A sized accordingly
  • n: Number of columns of matrix B, with matrix A is sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A is not referenced and B does not have to be a valid input
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array. It has dimensions ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B

Errors:

Wraps cublasStrsm_v2.

func (Handle) Strsm64

func (h Handle) Strsm64(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int64, n int64, alpha *float32, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64) error

Strsm64 solves the triangular linear system with multiple right-hand-sides.

{op(A)X=αBif side == CUBLAS_SIDE_LEFTXop(A)=αBif side == SideRight where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, X and B are m×n matrices, and α is a scalar. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC The solution X overwrites the right-hand-sides B on exit. No test for singularity or near-singularity is included in this function. For references please refer to NETLIB documentation: strsm(), dtrsm(), ctrsm(), ztrsm()

It is Handle.Strsm with int64 sizes and strides.

  • side: Indicates if matrix A is on the left or right of X
  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • m: Number of rows of matrix B, with matrix A sized accordingly
  • n: Number of columns of matrix B, with matrix A is sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A is not referenced and B does not have to be a valid input
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array. It has dimensions ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B

Errors:

Wraps cublasStrsm_v2_64.

func (Handle) StrsmBatched

func (h Handle) StrsmBatched(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int32, n int32, alpha *float32, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, batchCount int32) error

StrsmBatched solves an array of triangular linear systems with multiple right-hand-sides.

{op(A[i])X[i]=αB[i]if side == CUBLAS_SIDE_LEFTX[i]op(A[i])=αB[i]if side == SideRight where A[i] is a triangular matrix stored in lower or upper mode with or without the main diagonal, X[i] and B[i] are m×n matrices, and α is a scalar. Also, for matrix A op(A[i])={A[i]if transa == CUBLAS_OP_NAᵀ[i]if transa == CUBLAS_OP_TAᴴ[i]if transa == OpC The solution X[i] overwrites the right-hand-sides B[i] on exit. No test for singularity or near-singularity is included in this function. This function works for any sizes but is intended to be used for matrices of small sizes where the launch overhead is a significant factor. For bigger sizes, it might be advantageous to call batchCount times the regular cublastrsm() within a set of CUDA streams. The current implementation is limited to devices with compute capability above or equal 2.0. For references please refer to NETLIB documentation: strsm(), dtrsm(), ctrsm(), ztrsm()

Handle.StrsmBatched64 takes 64-bit sizes.

  • side: Indicates if matrix A[i] is on the left or right of X[i]
  • uplo: Indicates if matrix A[i] lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A[i] are unity and should not be accessed
  • m: Number of rows of matrix B[i], with matrix A[i] sized accordingly
  • n: Number of columns of matrix B[i], with matrix A[i] is sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A[i] is not referenced and B[i] does not have to be a valid input
  • a: Array of pointers to < type > array, with each array of dim. lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A[i]
  • b: Array of pointers to < type > array, with each array of dim. ldb x n with ldb >= max(1, m). Matrices B[i] should not overlap; otherwise, undefined behavior is expected
  • ldb: Leading dimension of two-dimensional array used to store matrix B[i]
  • batchCount: Number of pointers contained in A and B

Errors:

Wraps cublasStrsmBatched.

func (Handle) StrsmBatched64

func (h Handle) StrsmBatched64(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int64, n int64, alpha *float32, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, batchCount int64) error

StrsmBatched64 solves an array of triangular linear systems with multiple right-hand-sides.

{op(A[i])X[i]=αB[i]if side == CUBLAS_SIDE_LEFTX[i]op(A[i])=αB[i]if side == SideRight where A[i] is a triangular matrix stored in lower or upper mode with or without the main diagonal, X[i] and B[i] are m×n matrices, and α is a scalar. Also, for matrix A op(A[i])={A[i]if transa == CUBLAS_OP_NAᵀ[i]if transa == CUBLAS_OP_TAᴴ[i]if transa == OpC The solution X[i] overwrites the right-hand-sides B[i] on exit. No test for singularity or near-singularity is included in this function. This function works for any sizes but is intended to be used for matrices of small sizes where the launch overhead is a significant factor. For bigger sizes, it might be advantageous to call batchCount times the regular cublastrsm() within a set of CUDA streams. The current implementation is limited to devices with compute capability above or equal 2.0. For references please refer to NETLIB documentation: strsm(), dtrsm(), ctrsm(), ztrsm()

It is Handle.StrsmBatched with int64 sizes and strides.

  • side: Indicates if matrix A[i] is on the left or right of X[i]
  • uplo: Indicates if matrix A[i] lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A[i] are unity and should not be accessed
  • m: Number of rows of matrix B[i], with matrix A[i] sized accordingly
  • n: Number of columns of matrix B[i], with matrix A[i] is sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A[i] is not referenced and B[i] does not have to be a valid input
  • a: Array of pointers to < type > array, with each array of dim. lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A[i]
  • b: Array of pointers to < type > array, with each array of dim. ldb x n with ldb >= max(1, m). Matrices B[i] should not overlap; otherwise, undefined behavior is expected
  • ldb: Leading dimension of two-dimensional array used to store matrix B[i]
  • batchCount: Number of pointers contained in A and B

Errors:

Wraps cublasStrsmBatched_64.

func (Handle) Strsv

func (h Handle) Strsv(uplo FillMode, trans Operation, diag DiagType, n int32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32) error

Strsv solves the triangular linear system with a single right-hand-side.

op(A)x=b, where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, and x and b are vectors. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. For references please refer to NETLIB documentation: strsv(), dtrsv(), ctrsv(), ztrsv()

Handle.Strsv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • a: < type > array of dimension lda x n, with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasStrsv_v2.

func (Handle) Strsv64

func (h Handle) Strsv64(uplo FillMode, trans Operation, diag DiagType, n int64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64) error

Strsv64 solves the triangular linear system with a single right-hand-side.

op(A)x=b, where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, and x and b are vectors. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. For references please refer to NETLIB documentation: strsv(), dtrsv(), ctrsv(), ztrsv()

It is Handle.Strsv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • a: < type > array of dimension lda x n, with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasStrsv_v2_64.

func (Handle) Strttp

func (h Handle) Strttp(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ap driver.DevicePtr) error

Strttp performs the conversion from the triangular format to the triangular packed format.

If uplo == FillModeLower then the lower triangular part of the triangular matrix A is copied into the array AP. If uplo == FillModeUpper then then the upper triangular part of the triangular matrix A is copied into the array AP. For references please refer to NETLIB documentation: strttp(), dtrttp(), ctrttp(), ztrttp()

  • uplo: Indicates which matrix A lower or upper part is referenced
  • n: Number of rows and columns of matrix A
  • a: < type > array of dimensions lda x n , with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • ap: < type > array with A stored in packed format

Errors:

Wraps cublasStrttp.

func (Handle) SwapEx

func (h Handle) SwapEx(n int32, x driver.DevicePtr, xType DataType, incx int32, y driver.DevicePtr, yType DataType, incy int32) error

SwapEx wraps cublasSwapEx.

Handle.SwapEx64 takes 64-bit sizes.

func (Handle) SwapEx64

func (h Handle) SwapEx64(n int64, x driver.DevicePtr, xType DataType, incx int64, y driver.DevicePtr, yType DataType, incy int64) error

SwapEx64 wraps cublasSwapEx_64.

It is Handle.SwapEx with int64 sizes and strides.

func (Handle) TSSgemvBatched

func (h Handle) TSSgemvBatched(trans Operation, m int32, n int32, alpha *float32, aarray driver.DevicePtr, lda int32, xarray driver.DevicePtr, incx int32, beta *float32, yarray driver.DevicePtr, incy int32, batchCount int32) error

TSSgemvBatched performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. The address of the input matrix and vector, and the output vector of each instance of the batch are read from arrays of pointers passed to the function by the caller. y[i]=αop(A[i])x[i]+βy[i], for i∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrice A[i] stored in column-major format with dimension m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] , op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] vectors must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemvBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

Handle.TSSgemvBatched64 takes 64-bit sizes.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x n with lda >= max(1, m). All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • xarray: Array of pointers to < type > array, with each dimension n if trans == OpN and m otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • incx: Stride of each one-dimensional array x[i]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • yarray: Array of pointers to < type > array. It has dimensions m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • incy: Stride of each one-dimensional array y[i]
  • batchCount: Number of pointers contained in Aarray, xarray and yarray

Errors:

Wraps cublasTSSgemvBatched.

func (Handle) TSSgemvBatched64

func (h Handle) TSSgemvBatched64(trans Operation, m int64, n int64, alpha *float32, aarray driver.DevicePtr, lda int64, xarray driver.DevicePtr, incx int64, beta *float32, yarray driver.DevicePtr, incy int64, batchCount int64) error

TSSgemvBatched64 performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. The address of the input matrix and vector, and the output vector of each instance of the batch are read from arrays of pointers passed to the function by the caller. y[i]=αop(A[i])x[i]+βy[i], for i∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrice A[i] stored in column-major format with dimension m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] , op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] vectors must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemvBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

It is Handle.TSSgemvBatched with int64 sizes and strides.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x n with lda >= max(1, m). All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • xarray: Array of pointers to < type > array, with each dimension n if trans == OpN and m otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • incx: Stride of each one-dimensional array x[i]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • yarray: Array of pointers to < type > array. It has dimensions m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • incy: Stride of each one-dimensional array y[i]
  • batchCount: Number of pointers contained in Aarray, xarray and yarray

Errors:

Wraps cublasTSSgemvBatched_64.

func (Handle) TSSgemvStridedBatched

func (h Handle) TSSgemvStridedBatched(trans Operation, m int32, n int32, alpha *float32, a driver.DevicePtr, lda int32, strideA int64, x driver.DevicePtr, incx int32, stridex int64, beta *float32, y driver.DevicePtr, incy int32, stridey int64, batchCount int32) error

TSSgemvStridedBatched performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. Input matrix A and vector x, and output vector y for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A matrix, x and y vectors for the first instance are passed to the function by the user along with offsets in number of elements - strideA, stridex and stridey that determine the locations of input matrices and vectors, and output vectors in future instances. y+i*stridey=αop(A+i*strideA)(x+i*stridex)+β(y+i*stridey), for i ∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrix stored in column-major format with dimension A[i]m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] matrices must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], x[i], y[i] as notation for A matrix, and x and y vectors in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, stridex, stridey away from A[i-1], x[i-1], y[i-1]. The unit for the offset is number of elements and must not be zero .

Handle.TSSgemvStridedBatched64 takes 64-bit sizes.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • x: < type >* pointer to the x vector corresponding to the first instance of the batch, with each dimension n if trans == OpN and m otherwise
  • incx: Stride of each one-dimensional array x[i]
  • stridex: Value of type long long int that gives the offset in number of elements between x[i] and x[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • y: < type >* pointer to the y vector corresponding to the first instance of the batch, with each dimension m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected
  • incy: Stride of each one-dimensional array y[i]
  • stridey: Value of type long long int that gives the offset in number of elements between y[i] and y[i+1]
  • batchCount: Number of GEMVs to perform in the batch

Errors:

Wraps cublasTSSgemvStridedBatched.

func (Handle) TSSgemvStridedBatched64

func (h Handle) TSSgemvStridedBatched64(trans Operation, m int64, n int64, alpha *float32, a driver.DevicePtr, lda int64, strideA int64, x driver.DevicePtr, incx int64, stridex int64, beta *float32, y driver.DevicePtr, incy int64, stridey int64, batchCount int64) error

TSSgemvStridedBatched64 performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. Input matrix A and vector x, and output vector y for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A matrix, x and y vectors for the first instance are passed to the function by the user along with offsets in number of elements - strideA, stridex and stridey that determine the locations of input matrices and vectors, and output vectors in future instances. y+i*stridey=αop(A+i*strideA)(x+i*stridex)+β(y+i*stridey), for i ∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrix stored in column-major format with dimension A[i]m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] matrices must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], x[i], y[i] as notation for A matrix, and x and y vectors in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, stridex, stridey away from A[i-1], x[i-1], y[i-1]. The unit for the offset is number of elements and must not be zero .

It is Handle.TSSgemvStridedBatched with int64 sizes and strides.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • x: < type >* pointer to the x vector corresponding to the first instance of the batch, with each dimension n if trans == OpN and m otherwise
  • incx: Stride of each one-dimensional array x[i]
  • stridex: Value of type long long int that gives the offset in number of elements between x[i] and x[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • y: < type >* pointer to the y vector corresponding to the first instance of the batch, with each dimension m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected
  • incy: Stride of each one-dimensional array y[i]
  • stridey: Value of type long long int that gives the offset in number of elements between y[i] and y[i+1]
  • batchCount: Number of GEMVs to perform in the batch

Errors:

Wraps cublasTSSgemvStridedBatched_64.

func (Handle) TSTgemvBatched

func (h Handle) TSTgemvBatched(trans Operation, m int32, n int32, alpha *float32, aarray driver.DevicePtr, lda int32, xarray driver.DevicePtr, incx int32, beta *float32, yarray driver.DevicePtr, incy int32, batchCount int32) error

TSTgemvBatched performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. The address of the input matrix and vector, and the output vector of each instance of the batch are read from arrays of pointers passed to the function by the caller. y[i]=αop(A[i])x[i]+βy[i], for i∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrice A[i] stored in column-major format with dimension m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] , op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] vectors must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemvBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

Handle.TSTgemvBatched64 takes 64-bit sizes.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x n with lda >= max(1, m). All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • xarray: Array of pointers to < type > array, with each dimension n if trans == OpN and m otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • incx: Stride of each one-dimensional array x[i]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • yarray: Array of pointers to < type > array. It has dimensions m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • incy: Stride of each one-dimensional array y[i]
  • batchCount: Number of pointers contained in Aarray, xarray and yarray

Errors:

Wraps cublasTSTgemvBatched.

func (Handle) TSTgemvBatched64

func (h Handle) TSTgemvBatched64(trans Operation, m int64, n int64, alpha *float32, aarray driver.DevicePtr, lda int64, xarray driver.DevicePtr, incx int64, beta *float32, yarray driver.DevicePtr, incy int64, batchCount int64) error

TSTgemvBatched64 performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. The address of the input matrix and vector, and the output vector of each instance of the batch are read from arrays of pointers passed to the function by the caller. y[i]=αop(A[i])x[i]+βy[i], for i∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrice A[i] stored in column-major format with dimension m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] , op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] vectors must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemvBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

It is Handle.TSTgemvBatched with int64 sizes and strides.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x n with lda >= max(1, m). All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • xarray: Array of pointers to < type > array, with each dimension n if trans == OpN and m otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • incx: Stride of each one-dimensional array x[i]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • yarray: Array of pointers to < type > array. It has dimensions m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • incy: Stride of each one-dimensional array y[i]
  • batchCount: Number of pointers contained in Aarray, xarray and yarray

Errors:

Wraps cublasTSTgemvBatched_64.

func (Handle) TSTgemvStridedBatched

func (h Handle) TSTgemvStridedBatched(trans Operation, m int32, n int32, alpha *float32, a driver.DevicePtr, lda int32, strideA int64, x driver.DevicePtr, incx int32, stridex int64, beta *float32, y driver.DevicePtr, incy int32, stridey int64, batchCount int32) error

TSTgemvStridedBatched performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. Input matrix A and vector x, and output vector y for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A matrix, x and y vectors for the first instance are passed to the function by the user along with offsets in number of elements - strideA, stridex and stridey that determine the locations of input matrices and vectors, and output vectors in future instances. y+i*stridey=αop(A+i*strideA)(x+i*stridex)+β(y+i*stridey), for i ∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrix stored in column-major format with dimension A[i]m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] matrices must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], x[i], y[i] as notation for A matrix, and x and y vectors in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, stridex, stridey away from A[i-1], x[i-1], y[i-1]. The unit for the offset is number of elements and must not be zero .

Handle.TSTgemvStridedBatched64 takes 64-bit sizes.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • x: < type >* pointer to the x vector corresponding to the first instance of the batch, with each dimension n if trans == OpN and m otherwise
  • incx: Stride of each one-dimensional array x[i]
  • stridex: Value of type long long int that gives the offset in number of elements between x[i] and x[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • y: < type >* pointer to the y vector corresponding to the first instance of the batch, with each dimension m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected
  • incy: Stride of each one-dimensional array y[i]
  • stridey: Value of type long long int that gives the offset in number of elements between y[i] and y[i+1]
  • batchCount: Number of GEMVs to perform in the batch

Errors:

Wraps cublasTSTgemvStridedBatched.

func (Handle) TSTgemvStridedBatched64

func (h Handle) TSTgemvStridedBatched64(trans Operation, m int64, n int64, alpha *float32, a driver.DevicePtr, lda int64, strideA int64, x driver.DevicePtr, incx int64, stridex int64, beta *float32, y driver.DevicePtr, incy int64, stridey int64, batchCount int64) error

TSTgemvStridedBatched64 performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. Input matrix A and vector x, and output vector y for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A matrix, x and y vectors for the first instance are passed to the function by the user along with offsets in number of elements - strideA, stridex and stridey that determine the locations of input matrices and vectors, and output vectors in future instances. y+i*stridey=αop(A+i*strideA)(x+i*stridex)+β(y+i*stridey), for i ∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrix stored in column-major format with dimension A[i]m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] matrices must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], x[i], y[i] as notation for A matrix, and x and y vectors in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, stridex, stridey away from A[i-1], x[i-1], y[i-1]. The unit for the offset is number of elements and must not be zero .

It is Handle.TSTgemvStridedBatched with int64 sizes and strides.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • x: < type >* pointer to the x vector corresponding to the first instance of the batch, with each dimension n if trans == OpN and m otherwise
  • incx: Stride of each one-dimensional array x[i]
  • stridex: Value of type long long int that gives the offset in number of elements between x[i] and x[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • y: < type >* pointer to the y vector corresponding to the first instance of the batch, with each dimension m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected
  • incy: Stride of each one-dimensional array y[i]
  • stridey: Value of type long long int that gives the offset in number of elements between y[i] and y[i+1]
  • batchCount: Number of GEMVs to perform in the batch

Errors:

Wraps cublasTSTgemvStridedBatched_64.

func (Handle) Uint8gemmBias

func (h Handle) Uint8gemmBias(transa Operation, transb Operation, transc Operation, m int32, n int32, k int32, a driver.DevicePtr, aBias int32, lda int32, b driver.DevicePtr, bBias int32, ldb int32, c driver.DevicePtr, cBias int32, ldc int32, cMult int32, cShift int32) error

Uint8gemmBias wraps cublasUint8gemmBias.

func (Handle) Version

func (h Handle) Version() (int32, error)

Version returns the version number of the cuBLAS library.

Note: This function can be safely called with handle set to NULL. This allows users to get the version of the library without a handle. Another way to do this is with GetProperty.

Errors:

Wraps cublasGetVersion_v2.

func (Handle) Zaxpy

func (h Handle) Zaxpy(n int32, alpha *Complex128, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32) error

Zaxpy multiplies the vector x by the scalar α and adds it to the vector y overwriting the latest vector with the result.

Hence, the performed operation is y[j]=α×x[k]+y[j] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: saxpy(), daxpy(), caxpy(), zaxpy()

Handle.Zaxpy64 takes 64-bit sizes.

  • n: Number of elements in the vector x and y
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasZaxpy_v2.

func (Handle) Zaxpy64

func (h Handle) Zaxpy64(n int64, alpha *Complex128, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64) error

Zaxpy64 multiplies the vector x by the scalar α and adds it to the vector y overwriting the latest vector with the result.

Hence, the performed operation is y[j]=α×x[k]+y[j] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: saxpy(), daxpy(), caxpy(), zaxpy()

It is Handle.Zaxpy with int64 sizes and strides.

  • n: Number of elements in the vector x and y
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasZaxpy_v2_64.

func (Handle) Zcopy

func (h Handle) Zcopy(n int32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32) error

Zcopy copies the vector x into the vector y.

Hence, the performed operation is y[j]=x[k] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: scopy(), dcopy(), ccopy(), zcopy()

Handle.Zcopy64 takes 64-bit sizes.

  • n: Number of elements in the vector x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasZcopy_v2.

func (Handle) Zcopy64

func (h Handle) Zcopy64(n int64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64) error

Zcopy64 copies the vector x into the vector y.

Hence, the performed operation is y[j]=x[k] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: scopy(), dcopy(), ccopy(), zcopy()

It is Handle.Zcopy with int64 sizes and strides.

  • n: Number of elements in the vector x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasZcopy_v2_64.

func (Handle) Zdgmm

func (h Handle) Zdgmm(mode SideMode, m int32, n int32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32, c driver.DevicePtr, ldc int32) error

Zdgmm performs the matrix-matrix multiplication.

C={A×diag(X)if mode == CUBLAS_SIDE_RIGHTdiag(X)×Aif mode == SideLeft where A and C are matrices stored in column-major format with dimensions m×n . X is a vector of size n if mode == SideRight and of size m if mode == SideLeft. X is gathered from one-dimensional array x with stride incx. The absolute value of incx is the stride and the sign of incx is direction of the stride. If incx is positive, then we forward x from the first element. Otherwise, we backward x from the last element. The formula of X is X[j]={x[j×incx]if incx≥0x[(χ−1)×|incx|−j×|incx|]if incx<0 where χ=m if mode == SideLeft and χ=n if mode == SideRight. Example 1: if the user wants to perform diag(diag(B))×A , then incx=ldb+1 where ldb is leading dimension of matrix B, either row-major or column-major. Example 2: if the user wants to perform α×A , then there are two choices, either cublasgeam() with *beta == 0 and transa == OpN or cublasdgmm() with incx == 0 and x[0] == alpha. The operation is out-of-place. The in-place only works if lda == ldc.

Handle.Zdgmm64 takes 64-bit sizes.

  • mode: Left multiply if mode == SideLeft or right multiply if mode == SideRight
  • m: Number of rows of matrix A and C
  • n: Number of columns of matrix A and C
  • a: < type > array of dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • x: One-dimensional < type > array of size abs(incx) x m if mode == SideLeft and abs(incx) x n if mode == SideRight
  • incx: Stride of one-dimensional array x
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

Wraps cublasZdgmm.

func (Handle) Zdgmm64

func (h Handle) Zdgmm64(mode SideMode, m int64, n int64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64, c driver.DevicePtr, ldc int64) error

Zdgmm64 performs the matrix-matrix multiplication.

C={A×diag(X)if mode == CUBLAS_SIDE_RIGHTdiag(X)×Aif mode == SideLeft where A and C are matrices stored in column-major format with dimensions m×n . X is a vector of size n if mode == SideRight and of size m if mode == SideLeft. X is gathered from one-dimensional array x with stride incx. The absolute value of incx is the stride and the sign of incx is direction of the stride. If incx is positive, then we forward x from the first element. Otherwise, we backward x from the last element. The formula of X is X[j]={x[j×incx]if incx≥0x[(χ−1)×|incx|−j×|incx|]if incx<0 where χ=m if mode == SideLeft and χ=n if mode == SideRight. Example 1: if the user wants to perform diag(diag(B))×A , then incx=ldb+1 where ldb is leading dimension of matrix B, either row-major or column-major. Example 2: if the user wants to perform α×A , then there are two choices, either cublasgeam() with *beta == 0 and transa == OpN or cublasdgmm() with incx == 0 and x[0] == alpha. The operation is out-of-place. The in-place only works if lda == ldc.

It is Handle.Zdgmm with int64 sizes and strides.

  • mode: Left multiply if mode == SideLeft or right multiply if mode == SideRight
  • m: Number of rows of matrix A and C
  • n: Number of columns of matrix A and C
  • a: < type > array of dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • x: One-dimensional < type > array of size abs(incx) x m if mode == SideLeft and abs(incx) x n if mode == SideRight
  • incx: Stride of one-dimensional array x
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

Wraps cublasZdgmm_64.

func (Handle) Zdotc

func (h Handle) Zdotc(n int32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32) (Complex128, error)

Zdotc computes the dot product of vectors x and y.

Hence, the result is ∑_(i=1)^(n)(x[k]×y[j]) where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that in the first equation the conjugate of the element of vector x should be used if the function name ends in character ‘c’ and that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sdot(), ddot(), cdotu(), cdotc(), zdotu(), zdotc()

Handle.Zdotc64 takes 64-bit sizes.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • result: The resulting dot product, which is set to 0 if n <= 0

Errors:

Wraps cublasZdotc_v2.

func (Handle) Zdotc64

func (h Handle) Zdotc64(n int64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64) (Complex128, error)

Zdotc64 computes the dot product of vectors x and y.

Hence, the result is ∑_(i=1)^(n)(x[k]×y[j]) where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that in the first equation the conjugate of the element of vector x should be used if the function name ends in character ‘c’ and that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sdot(), ddot(), cdotu(), cdotc(), zdotu(), zdotc()

It is Handle.Zdotc with int64 sizes and strides.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • result: The resulting dot product, which is set to 0 if n <= 0

Errors:

Wraps cublasZdotc_v2_64.

func (Handle) Zdotu

func (h Handle) Zdotu(n int32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32) (Complex128, error)

Zdotu computes the dot product of vectors x and y.

Hence, the result is ∑_(i=1)^(n)(x[k]×y[j]) where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that in the first equation the conjugate of the element of vector x should be used if the function name ends in character ‘c’ and that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sdot(), ddot(), cdotu(), cdotc(), zdotu(), zdotc()

Handle.Zdotu64 takes 64-bit sizes.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • result: The resulting dot product, which is set to 0 if n <= 0

Errors:

Wraps cublasZdotu_v2.

func (Handle) Zdotu64

func (h Handle) Zdotu64(n int64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64) (Complex128, error)

Zdotu64 computes the dot product of vectors x and y.

Hence, the result is ∑_(i=1)^(n)(x[k]×y[j]) where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that in the first equation the conjugate of the element of vector x should be used if the function name ends in character ‘c’ and that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sdot(), ddot(), cdotu(), cdotc(), zdotu(), zdotc()

It is Handle.Zdotu with int64 sizes and strides.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • result: The resulting dot product, which is set to 0 if n <= 0

Errors:

Wraps cublasZdotu_v2_64.

func (Handle) Zdrot

func (h Handle) Zdrot(n int32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, c *float64, s *float64) error

Zdrot applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):

G=(cs−sc) to vectors x and y. Hence, the result is x[k]=c×x[k]+s×y[j] and y[j]=−s×x[k]+c×y[j] where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: srot(), drot(), crot(), csrot(), zrot(), zdrot()

Handle.Zdrot64 takes 64-bit sizes.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • c: Cosine element of the rotation matrix
  • s: Sine element of the rotation matrix

Errors:

Wraps cublasZdrot_v2.

func (Handle) Zdrot64

func (h Handle) Zdrot64(n int64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, c *float64, s *float64) error

Zdrot64 applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):

G=(cs−sc) to vectors x and y. Hence, the result is x[k]=c×x[k]+s×y[j] and y[j]=−s×x[k]+c×y[j] where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: srot(), drot(), crot(), csrot(), zrot(), zdrot()

It is Handle.Zdrot with int64 sizes and strides.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • c: Cosine element of the rotation matrix
  • s: Sine element of the rotation matrix

Errors:

Wraps cublasZdrot_v2_64.

func (Handle) Zdscal

func (h Handle) Zdscal(n int32, alpha *float64, x driver.DevicePtr, incx int32) error

Zdscal scales the vector x by the scalar α and overwrites it with the result.

Hence, the performed operation is x[j]=α×x[j] for i=1,…,n and j=1+(i−1)*incx . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sscal(), dscal(), csscal(), cscal(), zdscal(), zscal()

Handle.Zdscal64 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasZdscal_v2.

func (Handle) Zdscal64

func (h Handle) Zdscal64(n int64, alpha *float64, x driver.DevicePtr, incx int64) error

Zdscal64 scales the vector x by the scalar α and overwrites it with the result.

Hence, the performed operation is x[j]=α×x[j] for i=1,…,n and j=1+(i−1)*incx . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sscal(), dscal(), csscal(), cscal(), zdscal(), zscal()

It is Handle.Zdscal with int64 sizes and strides.

  • n: Number of elements in the vector x
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasZdscal_v2_64.

func (Handle) Zgbmv

func (h Handle) Zgbmv(trans Operation, m int32, n int32, kl int32, ku int32, alpha *Complex128, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32, beta *Complex128, y driver.DevicePtr, incy int32) error

Zgbmv performs the banded matrix-vector multiplication.

y=α op(A)x+βy, where A is a banded matrix with kl subdiagonals and ku superdiagonals, x and y are vectors, and α and β are scalars. Also, for matrix A op(A)={A if trans == CUBLAS_OP_NAᵀ if trans == CUBLAS_OP_TAᴴ if trans == OpC The banded matrix A is stored column by column, with the main diagonal stored in row ku+1 (starting in first position), the first superdiagonal stored in row ku (starting in second position), the first subdiagonal stored in row ku+2 (starting in first position), etc. So that in general, the element A(i,j) is stored in the memory location A(ku+1+i-j,j) for j=1,…,n and i∈[max(1,j−ku),min(m,j+kl)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left ku×ku and bottom right kl×kl triangles) are not referenced. For references please refer to NETLIB documentation: sgbmv(), dgbmv(), cgbmv(), zgbmv()

Handle.Zgbmv64 takes 64-bit sizes.

  • trans: Operation op( A) that is non- or (conj.) transpose
  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • kl: Number of subdiagonals of matrix A
  • ku: Number of superdiagonals of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= kl + ku + 1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements if trans == OpN and m elements otherwise
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with m elements if trans == OpN and n elements otherwise
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasZgbmv_v2.

func (Handle) Zgbmv64

func (h Handle) Zgbmv64(trans Operation, m int64, n int64, kl int64, ku int64, alpha *Complex128, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64, beta *Complex128, y driver.DevicePtr, incy int64) error

Zgbmv64 performs the banded matrix-vector multiplication.

y=α op(A)x+βy, where A is a banded matrix with kl subdiagonals and ku superdiagonals, x and y are vectors, and α and β are scalars. Also, for matrix A op(A)={A if trans == CUBLAS_OP_NAᵀ if trans == CUBLAS_OP_TAᴴ if trans == OpC The banded matrix A is stored column by column, with the main diagonal stored in row ku+1 (starting in first position), the first superdiagonal stored in row ku (starting in second position), the first subdiagonal stored in row ku+2 (starting in first position), etc. So that in general, the element A(i,j) is stored in the memory location A(ku+1+i-j,j) for j=1,…,n and i∈[max(1,j−ku),min(m,j+kl)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left ku×ku and bottom right kl×kl triangles) are not referenced. For references please refer to NETLIB documentation: sgbmv(), dgbmv(), cgbmv(), zgbmv()

It is Handle.Zgbmv with int64 sizes and strides.

  • trans: Operation op( A) that is non- or (conj.) transpose
  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • kl: Number of subdiagonals of matrix A
  • ku: Number of superdiagonals of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= kl + ku + 1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements if trans == OpN and m elements otherwise
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with m elements if trans == OpN and n elements otherwise
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasZgbmv_v2_64.

func (Handle) Zgeam

func (h Handle) Zgeam(transa Operation, transb Operation, m int32, n int32, alpha *Complex128, a driver.DevicePtr, lda int32, beta *Complex128, b driver.DevicePtr, ldb int32, c driver.DevicePtr, ldc int32) error

Zgeam performs the matrix-matrix addition/transposition.

C=αop(A)+βop(B), where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×n , op(B)m×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . The operation is out-of-place if C does not overlap A or B. The in-place mode supports the following two operations, C=α*C+βop(B) C=αop(A)+β*C For in-place mode, if C == A, ldc == lda and transa == OpN. If C === B, ldc == ldb and transb == OpN. If the user does not meet above requirements, ErrInvalidValue is returned. The operation includes the following special cases: the user can reset matrix C to zero by setting *alpha = beta = 0. the user can transpose matrix A by setting *alpha = 1 and *beta = 0.

Handle.Zgeam64 takes 64-bit sizes.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • alpha: < type > scalar used for multiplication. If *alpha == 0, A does not have to be a valid input
  • a: < type > array of dimensions lda x n with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • beta: < type > scalar used for multiplication. If *beta == 0, B does not have to be a valid input
  • b: < type > array of dimension ldb x n with ldb >= max(1, m) if transb == OpN and ldb x m with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0, or if transa is not one of OpN, OpT and OpC, or if transb is not one of OpN, OpT and OpC, or if lda < max(1, m) when transa == OpN, and lda < max(1, n) otherwise, or if ldb < max(1, m) if transb == OpN, and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if A == C and `(transa != OpN)
  • ErrNotInitialized: The library was not initialized

Wraps cublasZgeam.

func (Handle) Zgeam64

func (h Handle) Zgeam64(transa Operation, transb Operation, m int64, n int64, alpha *Complex128, a driver.DevicePtr, lda int64, beta *Complex128, b driver.DevicePtr, ldb int64, c driver.DevicePtr, ldc int64) error

Zgeam64 performs the matrix-matrix addition/transposition.

C=αop(A)+βop(B), where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×n , op(B)m×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . The operation is out-of-place if C does not overlap A or B. The in-place mode supports the following two operations, C=α*C+βop(B) C=αop(A)+β*C For in-place mode, if C == A, ldc == lda and transa == OpN. If C === B, ldc == ldb and transb == OpN. If the user does not meet above requirements, ErrInvalidValue is returned. The operation includes the following special cases: the user can reset matrix C to zero by setting *alpha = beta = 0. the user can transpose matrix A by setting *alpha = 1 and *beta = 0.

It is Handle.Zgeam with int64 sizes and strides.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • alpha: < type > scalar used for multiplication. If *alpha == 0, A does not have to be a valid input
  • a: < type > array of dimensions lda x n with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • beta: < type > scalar used for multiplication. If *beta == 0, B does not have to be a valid input
  • b: < type > array of dimension ldb x n with ldb >= max(1, m) if transb == OpN and ldb x m with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0, or if transa is not one of OpN, OpT and OpC, or if transb is not one of OpN, OpT and OpC, or if lda < max(1, m) when transa == OpN, and lda < max(1, n) otherwise, or if ldb < max(1, m) if transb == OpN, and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if A == C and `(transa != OpN)
  • ErrNotInitialized: The library was not initialized

Wraps cublasZgeam_64.

func (Handle) ZgelsBatched

func (h Handle) ZgelsBatched(trans Operation, m int32, n int32, nrhs int32, aarray driver.DevicePtr, lda int32, carray driver.DevicePtr, ldc int32, info *int32, devInfoArray driver.DevicePtr, batchSize int32) error

ZgelsBatched solves a batch of overdetermined linear systems in the least-squares sense.

Aarray is an array of pointers to matrices stored in column-major format.

Carray is an array of pointers to matrices stored in column-major format. This function find the least squares solution of a batch of overdetermined systems: it solves the least squares problem described as follows :

minimize  || Carray[i] - Aarray[i]*Xarray[i] || , with i = 0, ...,batchSize-1

On exit, each Aarray[i] is overwritten with their QR factorization and each Carray[i] is overwritten with the least square solution cublasgelsBatched supports only the non-transpose operation and only solves over-determined systems (m >= n). cublasgelsBatched only supports compute capability 2.0 or above. This function is intended to be used for matrices of small sizes where the launch overhead is a significant factor. For references please refer to NETLIB documentation: sgels(), dgels(), cgels(), zgels()

  • trans: Operation op( Aarray[i]) that is non- or (conj.) transpose. Only non-transpose operation is currently supported
  • m: Number of rows of each Aarray[i] and Carray[i] if trans == OpN, numbers of columns of each Aarray[i] otherwise (not supported currently)
  • n: Number of columns of each Aarray[i] if trans == OpN, and number of rows of each Aarray[i] and Carray[i] otherwise (not supported currently)
  • nrhs: Number of columns of each Carray[i]
  • aarray: Array of pointers to < type > array, with each array of dim. m x n with lda >= max(1, m) if trans == OpN, and n x m with lda >= max(1, n) otherwise (not supported currently). Matrices Aarray[i] should not overlap; otherwise, behavior is undefined
  • lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
  • carray: Array of pointers to < type > array, with each array of dim. m x nrhs with ldc >= max(1, m) if trans == OpN, and n x nrhs with lda >= max(1, n) otherwise (not supported currently). Matrices Carray[i] should not overlap; otherwise, behavior is undefined
  • ldc: Leading dimension of two-dimensional array used to store each matrix Carray[i]
  • info: If info == 0 the parameters passed to the function are valid. If info < 0 the parameter in position -info is invalid
  • devInfoArray: Optional array of integers of dimension batchsize. If non-null, every element of devInfoArray[i] == V has the following meaning: V == 0 : the i-th problem was successfully solved. V > 0 : the V-th diagonal element of the Aarray[i] is zero. Aarray[i] does not have full rank
  • batchSize: Number of pointers contained in Aarray and Carray

Errors:

Wraps cublasZgelsBatched.

func (Handle) Zgemm

func (h Handle) Zgemm(transa Operation, transb Operation, m int32, n int32, k int32, alpha *Complex128, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *Complex128, c driver.DevicePtr, ldc int32) error

Zgemm performs the matrix-matrix multiplication.

C=αop(A)op(B)+βC, where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×k , op(B)k×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . For references please refer to NETLIB documentation: sgemm(), dgemm(), cgemm(), zgemm()

Handle.Zgemm64 takes 64-bit sizes.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • k: Number of columns of op( A) and rows of op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrArchMismatch: In the case of Handle.Hgemm the device does not support math in half precision.
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasZgemm_v2.

func (Handle) Zgemm3m

func (h Handle) Zgemm3m(transa Operation, transb Operation, m int32, n int32, k int32, alpha *Complex128, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *Complex128, c driver.DevicePtr, ldc int32) error

Zgemm3m performs the complex matrix-matrix multiplication, using Gauss complexity reduction algorithm.

This can lead to an increase in performance up to 25%. C=αop(A)op(B)+βC, where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×k , op(B)k×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B .

Note: These 2 routines are only supported on GPUs with architecture capabilities equal to or greater than 5.0 For references please refer to NETLIB documentation: cgemm(), zgemm()

Handle.Zgemm3m64 takes 64-bit sizes.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • k: Number of columns of op( A) and rows of op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrArchMismatch: The device has a compute capabilites lower than 5.0.
  • ErrExecutionFailed: The function failed to launch on the GPU.
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized.

Wraps cublasZgemm3m.

func (Handle) Zgemm3m64

func (h Handle) Zgemm3m64(transa Operation, transb Operation, m int64, n int64, k int64, alpha *Complex128, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *Complex128, c driver.DevicePtr, ldc int64) error

Zgemm3m64 performs the complex matrix-matrix multiplication, using Gauss complexity reduction algorithm.

This can lead to an increase in performance up to 25%. C=αop(A)op(B)+βC, where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×k , op(B)k×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B .

Note: These 2 routines are only supported on GPUs with architecture capabilities equal to or greater than 5.0 For references please refer to NETLIB documentation: cgemm(), zgemm()

It is Handle.Zgemm3m with int64 sizes and strides.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • k: Number of columns of op( A) and rows of op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrArchMismatch: The device has a compute capabilites lower than 5.0.
  • ErrExecutionFailed: The function failed to launch on the GPU.
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized.

Wraps cublasZgemm3m_64.

func (Handle) Zgemm64

func (h Handle) Zgemm64(transa Operation, transb Operation, m int64, n int64, k int64, alpha *Complex128, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *Complex128, c driver.DevicePtr, ldc int64) error

Zgemm64 performs the matrix-matrix multiplication.

C=αop(A)op(B)+βC, where α and β are scalars, and A , B and C are matrices stored in column-major format with dimensions op(A)m×k , op(B)k×n and Cm×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B) is defined similarly for matrix B . For references please refer to NETLIB documentation: sgemm(), dgemm(), cgemm(), zgemm()

It is Handle.Zgemm with int64 sizes and strides.

  • transa: Operation op( A) that is non- or (conj.) transpose
  • transb: Operation op( B) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A) and C
  • n: Number of columns of matrix op( B) and C
  • k: Number of columns of op( A) and rows of op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store the matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of a two-dimensional array used to store the matrix C

Errors:

  • ErrArchMismatch: In the case of Handle.Hgemm the device does not support math in half precision.
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasZgemm_v2_64.

func (Handle) ZgemmBatched

func (h Handle) ZgemmBatched(transa Operation, transb Operation, m int32, n int32, k int32, alpha *Complex128, aarray driver.DevicePtr, lda int32, barray driver.DevicePtr, ldb int32, beta *Complex128, carray driver.DevicePtr, ldc int32, batchCount int32) error

ZgemmBatched performs the matrix-matrix multiplication of a batch of matrices.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. The address of the input matrices and the output matrix of each instance of the batch are read from arrays of pointers passed to the function by the caller. C[i]=αop(A[i])op(B[i])+βC[i], for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, that is, the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemmBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

Handle.ZgemmBatched64 takes 64-bit sizes.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • barray: Array of pointers to < type > array, with each array of dim. ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • ldb: Leading dimension of two-dimensional array used to store each matrix B[i]
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • carray: Array of pointers to < type > array. It has dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • ldc: Leading dimension of two-dimensional array used to store each matrix C[i]
  • batchCount: Number of pointers contained in Aarray, Barray and Carray

Errors:

  • ErrArchMismatch: Handle.HgemmBatched is only supported for GPU with architecture capabilities equal or greater than 5.3
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m)
  • ErrNotInitialized: The library was not initialized

Wraps cublasZgemmBatched.

func (Handle) ZgemmBatched64

func (h Handle) ZgemmBatched64(transa Operation, transb Operation, m int64, n int64, k int64, alpha *Complex128, aarray driver.DevicePtr, lda int64, barray driver.DevicePtr, ldb int64, beta *Complex128, carray driver.DevicePtr, ldc int64, batchCount int64) error

ZgemmBatched64 performs the matrix-matrix multiplication of a batch of matrices.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. The address of the input matrices and the output matrix of each instance of the batch are read from arrays of pointers passed to the function by the caller. C[i]=αop(A[i])op(B[i])+βC[i], for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, that is, the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemmBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

It is Handle.ZgemmBatched with int64 sizes and strides.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • barray: Array of pointers to < type > array, with each array of dim. ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • ldb: Leading dimension of two-dimensional array used to store each matrix B[i]
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • carray: Array of pointers to < type > array. It has dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • ldc: Leading dimension of two-dimensional array used to store each matrix C[i]
  • batchCount: Number of pointers contained in Aarray, Barray and Carray

Errors:

  • ErrArchMismatch: Handle.HgemmBatched is only supported for GPU with architecture capabilities equal or greater than 5.3
  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If m < 0 or n < 0 or k < 0, or if transa and transb are not one of OpN, OpC, OpT, or if lda < max(1, m) when transa == OpN and lda < max(1, k) otherwise, or if ldb < max(1, k) when transb == OpN and ldb < max(1, n) otherwise, or if ldc < max(1, m)
  • ErrNotInitialized: The library was not initialized

Wraps cublasZgemmBatched_64.

func (Handle) ZgemmStridedBatched

func (h Handle) ZgemmStridedBatched(transa Operation, transb Operation, m int32, n int32, k int32, alpha *Complex128, a driver.DevicePtr, lda int32, strideA int64, b driver.DevicePtr, ldb int32, strideB int64, beta *Complex128, c driver.DevicePtr, ldc int32, strideC int64, batchCount int32) error

ZgemmStridedBatched performs the matrix-matrix multiplication of a batch of matrices.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. Input matrices A, B and output matrix C for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A, B and C matrices for the first instance are passed to the function by the user along with offsets in number of elements - strideA, strideB and strideC that determine the locations of input and output matrices in future instances. C+i*strideC=αop(A+i*strideA)op(B+i*strideB)+β(C+i*strideC), for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, i.e. the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], B[i], C[i] as notation for A, B and C matrices in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, strideB, strideC away from A[i-1], B[i-1], C[i-1]. The unit for the offset is number of elements and must not be zero .

Handle.ZgemmStridedBatched64 takes 64-bit sizes.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • b: < type >* pointer to the B matrix corresponding to the first instance of the batch, with dimensions ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store each matrix B[i]
  • strideB: Value of type long long int that gives the offset in number of elements between B[i] and B[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type >* pointer to the C matrix corresponding to the first instance of the batch, with dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected
  • ldc: Leading dimension of two-dimensional array used to store each matrix C[i]
  • strideC: Value of type long long int that gives the offset in number of elements between C[i] and C[i+1]
  • batchCount: Number of GEMMs to perform in the batch

Errors:

Wraps cublasZgemmStridedBatched.

func (Handle) ZgemmStridedBatched64

func (h Handle) ZgemmStridedBatched64(transa Operation, transb Operation, m int64, n int64, k int64, alpha *Complex128, a driver.DevicePtr, lda int64, strideA int64, b driver.DevicePtr, ldb int64, strideB int64, beta *Complex128, c driver.DevicePtr, ldc int64, strideC int64, batchCount int64) error

ZgemmStridedBatched64 performs the matrix-matrix multiplication of a batch of matrices.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n, k), leading dimensions (lda, ldb, ldc) and transpositions (transa, transb) for their respective A, B and C matrices. Input matrices A, B and output matrix C for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A, B and C matrices for the first instance are passed to the function by the user along with offsets in number of elements - strideA, strideB and strideC that determine the locations of input and output matrices in future instances. C+i*strideC=αop(A+i*strideA)op(B+i*strideB)+β(C+i*strideC), for i ∈[0,batchCount−1] where α and β are scalars, and A , B and C are arrays of pointers to matrices stored in column-major format with dimensions op(A[i])m×k , op(B[i])k×n and C[i]m×n , respectively. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC and op(B[i]) is defined similarly for matrix B[i] .

Note: C[i] matrices must not overlap, i.e. the individual gemm operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemm() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], B[i], C[i] as notation for A, B and C matrices in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, strideB, strideC away from A[i-1], B[i-1], C[i-1]. The unit for the offset is number of elements and must not be zero .

It is Handle.ZgemmStridedBatched with int64 sizes and strides.

  • transa: Operation op( A[i]) that is non- or (conj.) transpose
  • transb: Operation op( B[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix op( A[i]) and C[i]
  • n: Number of columns of op( B[i]) and C[i]
  • k: Number of columns of op( A[i]) and rows of op( B[i])
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x k with lda >= max(1, m) if transa == OpN and lda x m with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • b: < type >* pointer to the B matrix corresponding to the first instance of the batch, with dimensions ldb x n with ldb >= max(1, k) if transb == OpN and ldb x k with ldb >= max(1,n) otherwise
  • ldb: Leading dimension of two-dimensional array used to store each matrix B[i]
  • strideB: Value of type long long int that gives the offset in number of elements between B[i] and B[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, C does not have to be a valid input
  • c: < type >* pointer to the C matrix corresponding to the first instance of the batch, with dimensions ldc x n with ldc >= max(1, m). Matrices C[i] should not overlap; otherwise, undefined behavior is expected
  • ldc: Leading dimension of two-dimensional array used to store each matrix C[i]
  • strideC: Value of type long long int that gives the offset in number of elements between C[i] and C[i+1]
  • batchCount: Number of GEMMs to perform in the batch

Errors:

Wraps cublasZgemmStridedBatched_64.

func (Handle) Zgemv

func (h Handle) Zgemv(trans Operation, m int32, n int32, alpha *Complex128, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32, beta *Complex128, y driver.DevicePtr, incy int32) error

Zgemv performs the matrix-vector multiplication.

y=α op(A)x+βy, where A is a m×n matrix stored in column-major format, x and y are vectors, and α and β are scalars. Also, for matrix A op(A)={A if trans == CUBLAS_OP_NAᵀ if trans == CUBLAS_OP_TAᴴ if trans == OpC For references please refer to NETLIB documentation: sgemv(), dgemv(), cgemv(), zgemv()

Handle.Zgemv64 takes 64-bit sizes.

  • trans: Operation op( A) that is non- or (conj.) transpose
  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= max(1, m). Before entry, the leading m by n part of the array A must contain the matrix of coefficients. Unchanged on exit
  • lda: Leading dimension of two-dimensional array used to store matrix A. lda must be at least max(1, m)
  • x: < type > vector at least (1 + (n - 1) * abs(incx)) elements if trans == OpN and at least (1 + (m - 1) * abs(incx)) elements otherwise
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector at least (1 + (m - 1) * abs(incy)) elements if trans == OpN and at least (1 + (n - 1) * abs(incy)) elements otherwise
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasZgemv_v2.

func (Handle) Zgemv64

func (h Handle) Zgemv64(trans Operation, m int64, n int64, alpha *Complex128, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64, beta *Complex128, y driver.DevicePtr, incy int64) error

Zgemv64 performs the matrix-vector multiplication.

y=α op(A)x+βy, where A is a m×n matrix stored in column-major format, x and y are vectors, and α and β are scalars. Also, for matrix A op(A)={A if trans == CUBLAS_OP_NAᵀ if trans == CUBLAS_OP_TAᴴ if trans == OpC For references please refer to NETLIB documentation: sgemv(), dgemv(), cgemv(), zgemv()

It is Handle.Zgemv with int64 sizes and strides.

  • trans: Operation op( A) that is non- or (conj.) transpose
  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= max(1, m). Before entry, the leading m by n part of the array A must contain the matrix of coefficients. Unchanged on exit
  • lda: Leading dimension of two-dimensional array used to store matrix A. lda must be at least max(1, m)
  • x: < type > vector at least (1 + (n - 1) * abs(incx)) elements if trans == OpN and at least (1 + (m - 1) * abs(incx)) elements otherwise
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector at least (1 + (m - 1) * abs(incy)) elements if trans == OpN and at least (1 + (n - 1) * abs(incy)) elements otherwise
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasZgemv_v2_64.

func (Handle) ZgemvBatched

func (h Handle) ZgemvBatched(trans Operation, m int32, n int32, alpha *Complex128, aarray driver.DevicePtr, lda int32, xarray driver.DevicePtr, incx int32, beta *Complex128, yarray driver.DevicePtr, incy int32, batchCount int32) error

ZgemvBatched performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. The address of the input matrix and vector, and the output vector of each instance of the batch are read from arrays of pointers passed to the function by the caller. y[i]=αop(A[i])x[i]+βy[i], for i∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrice A[i] stored in column-major format with dimension m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] , op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] vectors must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemvBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

Handle.ZgemvBatched64 takes 64-bit sizes.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x n with lda >= max(1, m). All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • xarray: Array of pointers to < type > array, with each dimension n if trans == OpN and m otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • incx: Stride of each one-dimensional array x[i]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • yarray: Array of pointers to < type > array. It has dimensions m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • incy: Stride of each one-dimensional array y[i]
  • batchCount: Number of pointers contained in Aarray, xarray and yarray

Errors:

Wraps cublasZgemvBatched.

func (Handle) ZgemvBatched64

func (h Handle) ZgemvBatched64(trans Operation, m int64, n int64, alpha *Complex128, aarray driver.DevicePtr, lda int64, xarray driver.DevicePtr, incx int64, beta *Complex128, yarray driver.DevicePtr, incy int64, batchCount int64) error

ZgemvBatched64 performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. The address of the input matrix and vector, and the output vector of each instance of the batch are read from arrays of pointers passed to the function by the caller. y[i]=αop(A[i])x[i]+βy[i], for i∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrice A[i] stored in column-major format with dimension m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] , op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] vectors must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API. If math mode enables fast math modes when using Handle.SgemvBatched, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:

  • if k % 4 == 0 then ensure intptr_t(ptr) % 16 == 0,

It is Handle.ZgemvBatched with int64 sizes and strides.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • aarray: Array of pointers to < type > array, with each array of dim. lda x n with lda >= max(1, m). All pointers must meet certain alignment criteria. Please see below for details
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • xarray: Array of pointers to < type > array, with each dimension n if trans == OpN and m otherwise. All pointers must meet certain alignment criteria. Please see below for details
  • incx: Stride of each one-dimensional array x[i]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • yarray: Array of pointers to < type > array. It has dimensions m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected. All pointers must meet certain alignment criteria. Please see below for details
  • incy: Stride of each one-dimensional array y[i]
  • batchCount: Number of pointers contained in Aarray, xarray and yarray

Errors:

Wraps cublasZgemvBatched_64.

func (Handle) ZgemvStridedBatched

func (h Handle) ZgemvStridedBatched(trans Operation, m int32, n int32, alpha *Complex128, a driver.DevicePtr, lda int32, strideA int64, x driver.DevicePtr, incx int32, stridex int64, beta *Complex128, y driver.DevicePtr, incy int32, stridey int64, batchCount int32) error

ZgemvStridedBatched performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. Input matrix A and vector x, and output vector y for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A matrix, x and y vectors for the first instance are passed to the function by the user along with offsets in number of elements - strideA, stridex and stridey that determine the locations of input matrices and vectors, and output vectors in future instances. y+i*stridey=αop(A+i*strideA)(x+i*stridex)+β(y+i*stridey), for i ∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrix stored in column-major format with dimension A[i]m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] matrices must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], x[i], y[i] as notation for A matrix, and x and y vectors in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, stridex, stridey away from A[i-1], x[i-1], y[i-1]. The unit for the offset is number of elements and must not be zero .

Handle.ZgemvStridedBatched64 takes 64-bit sizes.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • x: < type >* pointer to the x vector corresponding to the first instance of the batch, with each dimension n if trans == OpN and m otherwise
  • incx: Stride of each one-dimensional array x[i]
  • stridex: Value of type long long int that gives the offset in number of elements between x[i] and x[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • y: < type >* pointer to the y vector corresponding to the first instance of the batch, with each dimension m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected
  • incy: Stride of each one-dimensional array y[i]
  • stridey: Value of type long long int that gives the offset in number of elements between y[i] and y[i+1]
  • batchCount: Number of GEMVs to perform in the batch

Errors:

Wraps cublasZgemvStridedBatched.

func (Handle) ZgemvStridedBatched64

func (h Handle) ZgemvStridedBatched64(trans Operation, m int64, n int64, alpha *Complex128, a driver.DevicePtr, lda int64, strideA int64, x driver.DevicePtr, incx int64, stridex int64, beta *Complex128, y driver.DevicePtr, incy int64, stridey int64, batchCount int64) error

ZgemvStridedBatched64 performs the matrix-vector multiplication of a batch of matrices and vectors.

The batch is considered to be “uniform”, i.e. all instances have the same dimensions (m, n), leading dimension (lda), increments (incx, incy) and transposition (trans) for their respective A matrix, x and y vectors. Input matrix A and vector x, and output vector y for each instance of the batch are located at fixed offsets in number of elements from their locations in the previous instance. Pointers to A matrix, x and y vectors for the first instance are passed to the function by the user along with offsets in number of elements - strideA, stridex and stridey that determine the locations of input matrices and vectors, and output vectors in future instances. y+i*stridey=αop(A+i*strideA)(x+i*stridex)+β(y+i*stridey), for i ∈[0,batchCount−1] where α and β are scalars, and A is an array of pointers to matrix stored in column-major format with dimension A[i]m×n , and x and y are arrays of pointers to vectors. Also, for matrix A[i] op(A[i])={A[i]if trans == CUBLAS_OP_NA[i]ᵀif trans == CUBLAS_OP_TA[i]ᴴif trans == OpC

Note: y[i] matrices must not overlap, i.e. the individual gemv operations must be computable independently; otherwise, undefined behavior is expected. On certain problem sizes, it might be advantageous to make multiple calls to cublasgemv() in different CUDA streams, rather than use this API.

Note: In the table below, we use A[i], x[i], y[i] as notation for A matrix, and x and y vectors in the ith instance of the batch, implicitly assuming they are respectively offsets in number of elements strideA, stridex, stridey away from A[i-1], x[i-1], y[i-1]. The unit for the offset is number of elements and must not be zero .

It is Handle.ZgemvStridedBatched with int64 sizes and strides.

  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • m: Number of rows of matrix A[i]
  • n: Number of columns of matrix A[i]
  • alpha: < type > scalar used for multiplication
  • a: < type >* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • strideA: Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]
  • x: < type >* pointer to the x vector corresponding to the first instance of the batch, with each dimension n if trans == OpN and m otherwise
  • incx: Stride of each one-dimensional array x[i]
  • stridex: Value of type long long int that gives the offset in number of elements between x[i] and x[i+1]
  • beta: < type > scalar used for multiplication. If beta == 0, y does not have to be a valid input
  • y: < type >* pointer to the y vector corresponding to the first instance of the batch, with each dimension m if trans == OpN and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected
  • incy: Stride of each one-dimensional array y[i]
  • stridey: Value of type long long int that gives the offset in number of elements between y[i] and y[i+1]
  • batchCount: Number of GEMVs to perform in the batch

Errors:

Wraps cublasZgemvStridedBatched_64.

func (Handle) ZgeqrfBatched

func (h Handle) ZgeqrfBatched(m int32, n int32, aarray driver.DevicePtr, lda int32, tauArray driver.DevicePtr, info *int32, batchSize int32) error

ZgeqrfBatched computes the QR factorization of each matrix in a batch.

Aarray is an array of pointers to matrices stored in column-major format with dimensions m x n and leading dimension lda.

TauArray is an array of pointers to vectors of dimension of at least max (1, min(m, n). This function performs the QR factorization of each Aarray[i] for i = 0, ...,batchSize-1 using Householder reflections. Each matrix Q[i] is represented as a product of elementary reflectors and is stored in the lower part of each Aarray[i] as follows :

Q[j] = H[j][1] H[j][2] . . . H[j](k), where k = min(m,n).

Each H[j][i] has the form

H[j][i] = I - tau[j] * v * v'

where tau[j] is a real scalar, and v is a real vector with v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in Aarray[j][i+1:m,i], and tau in TauArray[j][i]. This function is intended to be used for matrices of small sizes where the launch overhead is a significant factor. cublasgeqrfBatched supports arbitrary dimension. cublasgeqrfBatched only supports compute capability 2.0 or above. For references please refer to NETLIB documentation: sgeqrf(), dgeqrf(), cgeqrf(), zgeqrf()

  • m: Number of rows Aarray[i]
  • n: Number of columns of Aarray[i]
  • aarray: Array of pointers to < type > array, with each array of dim. m x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
  • tauArray: Array of pointers to < type > vector, with each vector of dim. max(1 ,min(m, n))
  • info: If info == 0, the parameters passed to the function are valid. If info < 0, the parameter in position -info is invalid
  • batchSize: Number of pointers contained in Aarray

Errors:

Wraps cublasZgeqrfBatched.

func (Handle) Zgerc

func (h Handle) Zgerc(m int32, n int32, alpha *Complex128, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, a driver.DevicePtr, lda int32) error

Zgerc performs the rank-1 update.

A={αxyᵀ+Aif ger(),geru() is calledαxyᴴ+Aif gerc() is called where A is a m×n matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: sger(), dger(), cgeru(), cgerc(), zgeru(), zgerc()

Handle.Zgerc64 takes 64-bit sizes.

  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with m elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimension lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasZgerc_v2.

func (Handle) Zgerc64

func (h Handle) Zgerc64(m int64, n int64, alpha *Complex128, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, a driver.DevicePtr, lda int64) error

Zgerc64 performs the rank-1 update.

A={αxyᵀ+Aif ger(),geru() is calledαxyᴴ+Aif gerc() is called where A is a m×n matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: sger(), dger(), cgeru(), cgerc(), zgeru(), zgerc()

It is Handle.Zgerc with int64 sizes and strides.

  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with m elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimension lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasZgerc_v2_64.

func (Handle) Zgeru

func (h Handle) Zgeru(m int32, n int32, alpha *Complex128, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, a driver.DevicePtr, lda int32) error

Zgeru performs the rank-1 update.

A={αxyᵀ+Aif ger(),geru() is calledαxyᴴ+Aif gerc() is called where A is a m×n matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: sger(), dger(), cgeru(), cgerc(), zgeru(), zgerc()

Handle.Zgeru64 takes 64-bit sizes.

  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with m elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimension lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasZgeru_v2.

func (Handle) Zgeru64

func (h Handle) Zgeru64(m int64, n int64, alpha *Complex128, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, a driver.DevicePtr, lda int64) error

Zgeru64 performs the rank-1 update.

A={αxyᵀ+Aif ger(),geru() is calledαxyᴴ+Aif gerc() is called where A is a m×n matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: sger(), dger(), cgeru(), cgerc(), zgeru(), zgerc()

It is Handle.Zgeru with int64 sizes and strides.

  • m: Number of rows of matrix A
  • n: Number of columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with m elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimension lda x n with lda >= max(1, m)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasZgeru_v2_64.

func (Handle) ZgetrfBatched

func (h Handle) ZgetrfBatched(n int32, a driver.DevicePtr, lda int32, p driver.DevicePtr, info driver.DevicePtr, batchSize int32) error

ZgetrfBatched computes the LU factorization of each matrix in a batch.

Aarray is an array of pointers to matrices stored in column-major format with dimensions nxn and leading dimension lda.

This function performs the LU factorization of each Aarray[i] for i = 0, …, batchSize-1 by the following equation P*Aarray[i]=L*U where P is a permutation matrix which represents partial pivoting with row interchanges. L is a lower triangular matrix with unit diagonal and U is an upper triangular matrix. Formally P is written by a product of permutation matrices Pj, for j = 1,2,...,n, say P = P1 * P2 * P3 * .... * Pn. Pj is a permutation matrix which interchanges two rows of vector x when performing Pj*x. Pj can be constructed by j element of PivotArray[i] by the following Matlab code

// In Matlab PivotArray[i] is an array of base-1.
// In C, PivotArray[i] is base-0.
Pj = eye(n);
swap Pj(j,:) and Pj(PivotArray[i][j]  ,:)

L and U are written back to original matrix A, and diagonal elements of L are discarded. The L and U can be constructed by the following Matlab code

// A is a matrix of nxn after getrf.
L = eye(n);
for j = 1:n
    L(j+1:n,j) = A(j+1:n,j)
end
U = zeros(n);
for i = 1:n
    U(i,i:n) = A(i,i:n)
end

If matrix A(=Aarray[i]) is singular, getrf still works and the value of info(=infoArray[i]) reports first row index that LU factorization cannot proceed. If info is k, U(k,k) is zero. The equation P*A == L*U still holds, however L and U reconstruction needs a different Matlab code as follows:

// A is a matrix of nxn after getrf.
// info is k, which means U(k,k) is zero.
L = eye(n);
for j = 1:k-1
    L(j+1:n,j) = A(j+1:n,j)
end
U = zeros(n);
for i = 1:k-1
    U(i,i:n) = A(i,i:n)
end
for i = k:n
    U(i,k:n) = A(i,k:n)
end

This function is intended to be used for matrices of small sizes where the launch overhead is a significant factor. cublasgetrfBatched supports non-pivot LU factorization if PivotArray is NULL. cublasgetrfBatched supports arbitrary dimension. cublasgetrfBatched only supports compute capability 2.0 or above. For references please refer to NETLIB documentation: sgeqrf(), dgeqrf(), cgeqrf(), zgeqrf()

  • n: Number of rows and columns of Aarray[i]
  • lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
  • batchSize: Number of pointers contained in A

Errors:

Wraps cublasZgetrfBatched.

func (Handle) ZgetriBatched

func (h Handle) ZgetriBatched(n int32, a driver.DevicePtr, lda int32, p driver.DevicePtr, c driver.DevicePtr, ldc int32, info driver.DevicePtr, batchSize int32) error

ZgetriBatched computes the inverse of each matrix in a batch from its LU factorization.

Aarray and Carray are arrays of pointers to matrices stored in column-major format with dimensions n*n and leading dimension lda and ldc respectively.

This function performs the inversion of matrices A[i] for i = 0, …, batchSize-1. Prior to calling cublasgetriBatched, the matrix A[i] must be factorized first using the routine cublasgetrfBatched. After the call of cublasgetrfBatched, the matrix pointing by Aarray[i] will contain the LU factors of the matrix A[i] and the vector pointing by (PivotArray+i) will contain the pivoting sequence. Following the LU factorization, cublasgetriBatched uses forward and backward triangular solvers to complete inversion of matrices A[i] for i = 0, …, batchSize-1. The inversion is out-of-place, so memory space of Carray[i] cannot overlap memory space of Array[i]. Typically all parameters in cublasgetrfBatched would be passed into cublasgetriBatched.

The user can check singularity from either cublasgetrfBatched or cublasgetriBatched. This function is intended to be used for matrices of small sizes where the launch overhead is a significant factor. If cublasgetrfBatched is performed by non-pivoting, PivotArray of cublasgetriBatched should be NULL. cublasgetriBatched supports arbitrary dimension. cublasgetriBatched only supports compute capability 2.0 or above.

  • n: Number of rows and columns of Aarray[i]
  • lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
  • ldc: Leading dimension of two-dimensional array used to store each matrix Carray[i]
  • batchSize: Number of pointers contained in A

Errors:

Wraps cublasZgetriBatched.

func (Handle) ZgetrsBatched

func (h Handle) ZgetrsBatched(trans Operation, n int32, nrhs int32, aarray driver.DevicePtr, lda int32, devIpiv driver.DevicePtr, barray driver.DevicePtr, ldb int32, info *int32, batchSize int32) error

ZgetrsBatched solves an array of systems of linear equations of the form:

op(A[i])X[i]=B[i] where A[i] is a matrix which has been LU factorized with pivoting, X[i] and B[i] are n×nrhs matrices. Also, for matrix A op(A[i])={A[i]if trans == CUBLAS_OP_NAᵀ[i]if trans == CUBLAS_OP_TAᴴ[i]if trans == OpC This function is intended to be used for matrices of small sizes where the launch overhead is a significant factor. cublasgetrsBatched() supports non-pivot LU factorization if devIpiv is NULL. cublasgetrsBatched() supports arbitrary dimension. cublasgetrsBatched() only supports compute capability 2.0 or above. For references please refer to NETLIB documentation: sgeqrs(), dgeqrs(), cgeqrs(), zgeqrs()

  • trans: Operation op( A) that is non- or (conj.) transpose
  • n: Number of rows and columns of Aarray[i]
  • nrhs: Number of columns of Barray[i]
  • aarray: Array of pointers to < type > array, with each array of dim. n x n with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store each matrix Aarray[i]
  • devIpiv: Array of size n x batchSize that contains the pivoting sequence of each factorization of Aarray[i] stored in a linear fashion. If devIpiv is NULL, pivoting for all Aarray[i] is ignored
  • barray: Array of pointers to < type > array, with each array of dim. n x nrhs with ldb >= max(1, n). Matrices Barray[i] should not overlap; otherwise, undefined behavior is expected
  • ldb: Leading dimension of two-dimensional array used to store each solution matrix Barray[i]
  • info: If info == 0, the execution is successful. If info = -j, the j-th parameter had an illegal value
  • batchSize: Number of pointers contained in A

Errors:

Wraps cublasZgetrsBatched.

func (Handle) Zhbmv

func (h Handle) Zhbmv(uplo FillMode, n int32, k int32, alpha *Complex128, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32, beta *Complex128, y driver.DevicePtr, incy int32) error

Zhbmv performs the Hermitian banded matrix-vector multiplication.

y=αAx+βy, where A is a n×n Hermitian banded matrix with k subdiagonals and superdiagonals, x and y are vectors, and α and β are scalars. If uplo == FillModeLower then the Hermitian banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the Hermitian banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k),j] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: chbmv(), zhbmv()

Handle.Zhbmv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimensions lda x n, with lda >= k + 1. The imaginary parts of the diagonal elements are assumed to be zero
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasZhbmv_v2.

func (Handle) Zhbmv64

func (h Handle) Zhbmv64(uplo FillMode, n int64, k int64, alpha *Complex128, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64, beta *Complex128, y driver.DevicePtr, incy int64) error

Zhbmv64 performs the Hermitian banded matrix-vector multiplication.

y=αAx+βy, where A is a n×n Hermitian banded matrix with k subdiagonals and superdiagonals, x and y are vectors, and α and β are scalars. If uplo == FillModeLower then the Hermitian banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the Hermitian banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k),j] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: chbmv(), zhbmv()

It is Handle.Zhbmv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimensions lda x n, with lda >= k + 1. The imaginary parts of the diagonal elements are assumed to be zero
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasZhbmv_v2_64.

func (Handle) Zhemm

func (h Handle) Zhemm(side SideMode, uplo FillMode, m int32, n int32, alpha *Complex128, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *Complex128, c driver.DevicePtr, ldc int32) error

Zhemm performs the Hermitian matrix-matrix multiplication.

C={αAB+βCif side == [SideLeft]αBA+βCif side == SideRight where A is a Hermitian matrix stored in lower or upper mode, B and C are m×n matrices, and α and β are scalars. For references please refer to NETLIB documentation: chemm(), zhemm()

Handle.Zhemm64 takes 64-bit sizes.

  • side: Indicates if matrix A is on the left or right of B
  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • m: Number of rows of matrix C and B, with matrix A sized accordingly
  • n: Number of columns of matrix C and B, with matrix A sized accordingly
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise. The imaginary parts of the diagonal elements are assumed to be zero
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasZhemm_v2.

func (Handle) Zhemm64

func (h Handle) Zhemm64(side SideMode, uplo FillMode, m int64, n int64, alpha *Complex128, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *Complex128, c driver.DevicePtr, ldc int64) error

Zhemm64 performs the Hermitian matrix-matrix multiplication.

C={αAB+βCif side == [SideLeft]αBA+βCif side == SideRight where A is a Hermitian matrix stored in lower or upper mode, B and C are m×n matrices, and α and β are scalars. For references please refer to NETLIB documentation: chemm(), zhemm()

It is Handle.Zhemm with int64 sizes and strides.

  • side: Indicates if matrix A is on the left or right of B
  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • m: Number of rows of matrix C and B, with matrix A sized accordingly
  • n: Number of columns of matrix C and B, with matrix A sized accordingly
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise. The imaginary parts of the diagonal elements are assumed to be zero
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasZhemm_v2_64.

func (Handle) Zhemv

func (h Handle) Zhemv(uplo FillMode, n int32, alpha *Complex128, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32, beta *Complex128, y driver.DevicePtr, incy int32) error

Zhemv performs the Hermitian matrix-vector multiplication.

y=αAx+βy, where A is a n×n Hermitian matrix stored in lower or upper mode, x and y are vectors, and α and β are scalars. This function has an alternate faster implementation using atomics that can be enabled with Please see the section on the for more details about the usage of atomics For references please refer to NETLIB documentation: chemv(), zhemv()

Handle.Zhemv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n, with lda >= max(1, n). The imaginary parts of the diagonal elements are assumed to be zero
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasZhemv_v2.

func (Handle) Zhemv64

func (h Handle) Zhemv64(uplo FillMode, n int64, alpha *Complex128, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64, beta *Complex128, y driver.DevicePtr, incy int64) error

Zhemv64 performs the Hermitian matrix-vector multiplication.

y=αAx+βy, where A is a n×n Hermitian matrix stored in lower or upper mode, x and y are vectors, and α and β are scalars. This function has an alternate faster implementation using atomics that can be enabled with Please see the section on the for more details about the usage of atomics For references please refer to NETLIB documentation: chemv(), zhemv()

It is Handle.Zhemv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n, with lda >= max(1, n). The imaginary parts of the diagonal elements are assumed to be zero
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasZhemv_v2_64.

func (Handle) Zher

func (h Handle) Zher(uplo FillMode, n int32, alpha *float64, x driver.DevicePtr, incx int32, a driver.DevicePtr, lda int32) error

Zher performs the Hermitian rank-1 update.

A=αxxᴴ+A, where A is a n×n Hermitian matrix stored in column-major format, x is a vector, and α is a scalar. For references please refer to NETLIB documentation: cher(), zher()

Handle.Zher64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • a: < type > array of dimensions lda x n, with lda >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasZher_v2.

func (Handle) Zher2

func (h Handle) Zher2(uplo FillMode, n int32, alpha *Complex128, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, a driver.DevicePtr, lda int32) error

Zher2 performs the Hermitian rank-2 update.

A=αxyᴴ+αˉyxᴴ+A, where A is a n×n Hermitian matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: cher2(), zher2()

Handle.Zher264 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimension lda x n with lda >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasZher2_v2.

func (Handle) Zher2k

func (h Handle) Zher2k(uplo FillMode, trans Operation, n int32, k int32, alpha *Complex128, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *float64, c driver.DevicePtr, ldc int32) error

Zher2k performs the Hermitian rank- 2k update.

C=αop(A)op(B)ᴴ+αˉop(B)op(A)ᴴ+βC, where α and β are scalars, C is a Hermitian matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrix A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᴴ and Bᴴif trans == OpC For references please refer to NETLIB documentation: cher2k(), zher2k()

Handle.Zher2k64 takes 64-bit sizes.

  • uplo: Indicates if matrix C lower or upper part is stored, the other Hermitian part is not referenced
  • trans: Operation op( A) that is non- or (conj.) transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasZher2k_v2.

func (Handle) Zher2k64

func (h Handle) Zher2k64(uplo FillMode, trans Operation, n int64, k int64, alpha *Complex128, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *float64, c driver.DevicePtr, ldc int64) error

Zher2k64 performs the Hermitian rank- 2k update.

C=αop(A)op(B)ᴴ+αˉop(B)op(A)ᴴ+βC, where α and β are scalars, C is a Hermitian matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrix A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᴴ and Bᴴif trans == OpC For references please refer to NETLIB documentation: cher2k(), zher2k()

It is Handle.Zher2k with int64 sizes and strides.

  • uplo: Indicates if matrix C lower or upper part is stored, the other Hermitian part is not referenced
  • trans: Operation op( A) that is non- or (conj.) transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasZher2k_v2_64.

func (Handle) Zher64

func (h Handle) Zher64(uplo FillMode, n int64, alpha *float64, x driver.DevicePtr, incx int64, a driver.DevicePtr, lda int64) error

Zher64 performs the Hermitian rank-1 update.

A=αxxᴴ+A, where A is a n×n Hermitian matrix stored in column-major format, x is a vector, and α is a scalar. For references please refer to NETLIB documentation: cher(), zher()

It is Handle.Zher with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • a: < type > array of dimensions lda x n, with lda >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasZher_v2_64.

func (Handle) Zher264

func (h Handle) Zher264(uplo FillMode, n int64, alpha *Complex128, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, a driver.DevicePtr, lda int64) error

Zher264 performs the Hermitian rank-2 update.

A=αxyᴴ+αˉyxᴴ+A, where A is a n×n Hermitian matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: cher2(), zher2()

It is Handle.Zher2 with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimension lda x n with lda >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasZher2_v2_64.

func (Handle) Zherk

func (h Handle) Zherk(uplo FillMode, trans Operation, n int32, k int32, alpha *float64, a driver.DevicePtr, lda int32, beta *float64, c driver.DevicePtr, ldc int32) error

Zherk performs the Hermitian rank- k update.

C=αop(A)op(A)ᴴ+βC, where α and β are scalars, C is a Hermitian matrix stored in lower or upper mode, and A is a matrix with dimensions op(A)n×k . Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᴴif transa == OpC For references please refer to NETLIB documentation: cherk(), zherk()

Handle.Zherk64 takes 64-bit sizes.

  • uplo: Indicates if matrix C lower or upper part is stored, the other Hermitian part is not referenced
  • trans: Operation op( A) that is non- or (conj.) transpose
  • n: Number of rows of matrix op( A) and C
  • k: Number of columns of matrix op( A)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasZherk_v2.

func (Handle) Zherk64

func (h Handle) Zherk64(uplo FillMode, trans Operation, n int64, k int64, alpha *float64, a driver.DevicePtr, lda int64, beta *float64, c driver.DevicePtr, ldc int64) error

Zherk64 performs the Hermitian rank- k update.

C=αop(A)op(A)ᴴ+βC, where α and β are scalars, C is a Hermitian matrix stored in lower or upper mode, and A is a matrix with dimensions op(A)n×k . Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᴴif transa == OpC For references please refer to NETLIB documentation: cherk(), zherk()

It is Handle.Zherk with int64 sizes and strides.

  • uplo: Indicates if matrix C lower or upper part is stored, the other Hermitian part is not referenced
  • trans: Operation op( A) that is non- or (conj.) transpose
  • n: Number of rows of matrix op( A) and C
  • k: Number of columns of matrix op( A)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasZherk_v2_64.

func (Handle) Zherkx

func (h Handle) Zherkx(uplo FillMode, trans Operation, n int32, k int32, alpha *Complex128, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *float64, c driver.DevicePtr, ldc int32) error

Zherkx performs a variation of the Hermitian rank- k update.

C=αop(A)op(B)ᴴ+βC, where α and β are scalars, C is a Hermitian matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrix A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᴴ and Bᴴif trans == OpC This routine can be used when the matrix B is in such way that the result is guaranteed to be hermitian. An usual example is when the matrix B is a scaled form of the matrix A: this is equivalent to B being the product of the matrix A and a diagonal matrix. For an efficient computation of the product of a regular matrix with a diagonal matrix, refer to the routine cublasdgmm(). For references please refer to NETLIB documentation: cherk(), zherk() and cher2k(), zher2k()

Handle.Zherkx64 takes 64-bit sizes.

  • uplo: Indicates if matrix C lower or upper part is stored, the other Hermitian part is not referenced
  • trans: Operation op( A) that is non- or (conj.) transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: Real scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasZherkx.

func (Handle) Zherkx64

func (h Handle) Zherkx64(uplo FillMode, trans Operation, n int64, k int64, alpha *Complex128, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *float64, c driver.DevicePtr, ldc int64) error

Zherkx64 performs a variation of the Hermitian rank- k update.

C=αop(A)op(B)ᴴ+βC, where α and β are scalars, C is a Hermitian matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrix A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᴴ and Bᴴif trans == OpC This routine can be used when the matrix B is in such way that the result is guaranteed to be hermitian. An usual example is when the matrix B is a scaled form of the matrix A: this is equivalent to B being the product of the matrix A and a diagonal matrix. For an efficient computation of the product of a regular matrix with a diagonal matrix, refer to the routine cublasdgmm(). For references please refer to NETLIB documentation: cherk(), zherk() and cher2k(), zher2k()

It is Handle.Zherkx with int64 sizes and strides.

  • uplo: Indicates if matrix C lower or upper part is stored, the other Hermitian part is not referenced
  • trans: Operation op( A) that is non- or (conj.) transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: Real scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n). The imaginary parts of the diagonal elements are assumed and set to zero
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasZherkx_64.

func (Handle) Zhpmv

func (h Handle) Zhpmv(uplo FillMode, n int32, alpha *Complex128, ap driver.DevicePtr, x driver.DevicePtr, incx int32, beta *Complex128, y driver.DevicePtr, incy int32) error

Zhpmv performs the Hermitian packed matrix-vector multiplication.

y=αAx+βy, where A is a n×n Hermitian matrix stored in packed format, x and y are vectors, and α and β are scalars. If uplo == FillModeLower then the elements in the lower triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: chpmv(), zhpmv()

Handle.Zhpmv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • ap: < type > array with A stored in packed format. The imaginary parts of the diagonal elements are assumed to be zero
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasZhpmv_v2.

func (Handle) Zhpmv64

func (h Handle) Zhpmv64(uplo FillMode, n int64, alpha *Complex128, ap driver.DevicePtr, x driver.DevicePtr, incx int64, beta *Complex128, y driver.DevicePtr, incy int64) error

Zhpmv64 performs the Hermitian packed matrix-vector multiplication.

y=αAx+βy, where A is a n×n Hermitian matrix stored in packed format, x and y are vectors, and α and β are scalars. If uplo == FillModeLower then the elements in the lower triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: chpmv(), zhpmv()

It is Handle.Zhpmv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • ap: < type > array with A stored in packed format. The imaginary parts of the diagonal elements are assumed to be zero
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasZhpmv_v2_64.

func (Handle) Zhpr

func (h Handle) Zhpr(uplo FillMode, n int32, alpha *float64, x driver.DevicePtr, incx int32, ap driver.DevicePtr) error

Zhpr performs the packed Hermitian rank-1 update.

A=αxxᴴ+A, where A is a n×n Hermitian matrix stored in packed format, x is a vector, and α is a scalar. If uplo == FillModeLower then the elements in the lower triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: chpr(), zhpr()

Handle.Zhpr64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • ap: < type > array with A stored in packed format. The imaginary parts of the diagonal elements are assumed and set to zero

Errors:

Wraps cublasZhpr_v2.

func (Handle) Zhpr2

func (h Handle) Zhpr2(uplo FillMode, n int32, alpha *Complex128, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, ap driver.DevicePtr) error

Zhpr2 performs the packed Hermitian rank-2 update.

A=αxyᴴ+αˉyxᴴ+A, where A is a n×n Hermitian matrix stored in packed format, x and y are vectors, and α is a scalar. If uplo == FillModeLower then the elements in the lower triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: chpr2, zhpr2

Handle.Zhpr264 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • ap: < type > array with A stored in packed format. The imaginary parts of the diagonal elements are assumed and set to zero

Errors:

Wraps cublasZhpr2_v2.

func (Handle) Zhpr64

func (h Handle) Zhpr64(uplo FillMode, n int64, alpha *float64, x driver.DevicePtr, incx int64, ap driver.DevicePtr) error

Zhpr64 performs the packed Hermitian rank-1 update.

A=αxxᴴ+A, where A is a n×n Hermitian matrix stored in packed format, x is a vector, and α is a scalar. If uplo == FillModeLower then the elements in the lower triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: chpr(), zhpr()

It is Handle.Zhpr with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • ap: < type > array with A stored in packed format. The imaginary parts of the diagonal elements are assumed and set to zero

Errors:

Wraps cublasZhpr_v2_64.

func (Handle) Zhpr264

func (h Handle) Zhpr264(uplo FillMode, n int64, alpha *Complex128, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, ap driver.DevicePtr) error

Zhpr264 performs the packed Hermitian rank-2 update.

A=αxyᴴ+αˉyxᴴ+A, where A is a n×n Hermitian matrix stored in packed format, x and y are vectors, and α is a scalar. If uplo == FillModeLower then the elements in the lower triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the Hermitian matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: chpr2, zhpr2

It is Handle.Zhpr2 with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • ap: < type > array with A stored in packed format. The imaginary parts of the diagonal elements are assumed and set to zero

Errors:

Wraps cublasZhpr2_v2_64.

func (Handle) ZmatinvBatched

func (h Handle) ZmatinvBatched(n int32, a driver.DevicePtr, lda int32, ainv driver.DevicePtr, ldaInv int32, info driver.DevicePtr, batchSize int32) error

ZmatinvBatched A and Ainv are arrays of pointers to matrices stored in column-major format with dimensions n*n and leading dimension lda and ldaInv respectively.

This function performs the inversion of matrices A[i] for i = 0, …, batchSize-1. This function is a short cut of cublasgetrfBatched() plus cublasgetriBatched(). However it doesn’t work if n is greater than 32. If not, the user has to go through cublasgetrfBatched() and cublasgetriBatched(). If the matrix A[i] is singular, then info[i] reports singularity, the same as cublasgetrfBatched().

  • n: Number of rows and columns of A[i]
  • a: Array of pointers to < type > array, with each array of dimension n*n with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store each matrix A[i]
  • ainv: Array of pointers to < type > array, with each array of dimension n*n with ldaInv >= max(1, n). Matrices Ainv[i] should not overlap; otherwise, undefined behavior is expected
  • ldaInv: Leading dimension of two-dimensional array used to store each matrix Ainv[i]
  • info: Array of size batchSize that info[i] contains the information of inversion of A[i]. If info[i] == 0, the execution is successful. If info[i] == k, then U(k, k) == 0. The U is exactly singular and the inversion failed
  • batchSize: Number of pointers contained in A

Errors:

Wraps cublasZmatinvBatched.

func (Handle) Zrot

func (h Handle) Zrot(n int32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, c *float64, s *Complex128) error

Zrot applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):

G=(cs−sc) to vectors x and y. Hence, the result is x[k]=c×x[k]+s×y[j] and y[j]=−s×x[k]+c×y[j] where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: srot(), drot(), crot(), csrot(), zrot(), zdrot()

Handle.Zrot64 takes 64-bit sizes.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • c: Cosine element of the rotation matrix
  • s: Sine element of the rotation matrix

Errors:

Wraps cublasZrot_v2.

func (Handle) Zrot64

func (h Handle) Zrot64(n int64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, c *float64, s *Complex128) error

Zrot64 applies Givens rotation matrix (i.e., rotation in the x,y plane counter-clockwise by angle defined by cos(alpha)=c, sin(alpha)=s):

G=(cs−sc) to vectors x and y. Hence, the result is x[k]=c×x[k]+s×y[j] and y[j]=−s×x[k]+c×y[j] where k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: srot(), drot(), crot(), csrot(), zrot(), zdrot()

It is Handle.Zrot with int64 sizes and strides.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • c: Cosine element of the rotation matrix
  • s: Sine element of the rotation matrix

Errors:

Wraps cublasZrot_v2_64.

func (Handle) Zrotg

func (h Handle) Zrotg(a *Complex128, b *Complex128, c *float64, s *Complex128) error

Zrotg constructs the Givens rotation matrix.

G=(cs−sc), that zeros out the second entry of a 2×1 vector (a,b)ᵀ . Then, for real numbers we can write (cs−sc)(ab)=(r0) where c²+s²=1 and r=±a²+b² . The parameters a and b are overwritten with r and z , respectively. The value of z is such that c and s may be recovered using the following rules: (c,s)={(1−z²,z) if |z|<1(0.0,1.0) if |z|=1(1/z,1−z²) if |z|>1 For complex numbers we can write (cs−s¯c)(ab)=(r0) where c²+(s¯×s)=1 and r=a|a|×∥(a,b)ᵀ∥₂ with ∥(a,b)ᵀ∥₂=|a|²+|B|² for a≠0 and r=b for a=0 . Finally, the parameter a is overwritten with r on exit. For references please refer to NETLIB documentation: srotg(), drotg(), crotg(), zrotg()

  • a: < type > scalar that is overwritten with r
  • b: < type > scalar that is overwritten with z
  • c: Cosine element of the rotation matrix
  • s: Sine element of the rotation matrix

Errors:

Wraps cublasZrotg_v2.

func (Handle) Zscal

func (h Handle) Zscal(n int32, alpha *Complex128, x driver.DevicePtr, incx int32) error

Zscal scales the vector x by the scalar α and overwrites it with the result.

Hence, the performed operation is x[j]=α×x[j] for i=1,…,n and j=1+(i−1)*incx . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sscal(), dscal(), csscal(), cscal(), zdscal(), zscal()

Handle.Zscal64 takes 64-bit sizes.

  • n: Number of elements in the vector x
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasZscal_v2.

func (Handle) Zscal64

func (h Handle) Zscal64(n int64, alpha *Complex128, x driver.DevicePtr, incx int64) error

Zscal64 scales the vector x by the scalar α and overwrites it with the result.

Hence, the performed operation is x[j]=α×x[j] for i=1,…,n and j=1+(i−1)*incx . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sscal(), dscal(), csscal(), cscal(), zdscal(), zscal()

It is Handle.Zscal with int64 sizes and strides.

  • n: Number of elements in the vector x
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasZscal_v2_64.

func (Handle) Zswap

func (h Handle) Zswap(n int32, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32) error

Zswap interchanges the elements of vector x and y.

Hence, the performed operation is y[j]⇔x[k] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sswap(), dswap(), cswap(), zswap()

Handle.Zswap64 takes 64-bit sizes.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasZswap_v2.

func (Handle) Zswap64

func (h Handle) Zswap64(n int64, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64) error

Zswap64 interchanges the elements of vector x and y.

Hence, the performed operation is y[j]⇔x[k] for i=1,…,n , k=1+(i−1)*incx and j=1+(i−1)*incy . Notice that the last two equations reflect 1-based indexing used for compatibility with Fortran. For references please refer to NETLIB documentation: sswap(), dswap(), cswap(), zswap()

It is Handle.Zswap with int64 sizes and strides.

  • n: Number of elements in the vectors x and y
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasZswap_v2_64.

func (Handle) Zsymm

func (h Handle) Zsymm(side SideMode, uplo FillMode, m int32, n int32, alpha *Complex128, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *Complex128, c driver.DevicePtr, ldc int32) error

Zsymm performs the symmetric matrix-matrix multiplication.

C={αAB+βCif side == [SideLeft]αBA+βCif side == SideRight where A is a symmetric matrix stored in lower or upper mode, B and C are m×n matrices, and α and β are scalars. For references please refer to NETLIB documentation: ssymm(), dsymm(), csymm(), zsymm()

Handle.Zsymm64 takes 64-bit sizes.

  • side: Indicates if matrix A is on the left or right of B
  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • m: Number of rows of matrix C and B, with matrix A sized accordingly
  • n: Number of columns of matrix C and B, with matrix A sized accordingly
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasZsymm_v2.

func (Handle) Zsymm64

func (h Handle) Zsymm64(side SideMode, uplo FillMode, m int64, n int64, alpha *Complex128, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *Complex128, c driver.DevicePtr, ldc int64) error

Zsymm64 performs the symmetric matrix-matrix multiplication.

C={αAB+βCif side == [SideLeft]αBA+βCif side == SideRight where A is a symmetric matrix stored in lower or upper mode, B and C are m×n matrices, and α and β are scalars. For references please refer to NETLIB documentation: ssymm(), dsymm(), csymm(), zsymm()

It is Handle.Zsymm with int64 sizes and strides.

  • side: Indicates if matrix A is on the left or right of B
  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • m: Number of rows of matrix C and B, with matrix A sized accordingly
  • n: Number of columns of matrix C and B, with matrix A sized accordingly
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasZsymm_v2_64.

func (Handle) Zsymv

func (h Handle) Zsymv(uplo FillMode, n int32, alpha *Complex128, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32, beta *Complex128, y driver.DevicePtr, incy int32) error

Zsymv performs the symmetric matrix-vector multiplication.

y=αAx+βy where A is a n×n symmetric matrix stored in lower or upper mode, x and y are vectors, and α and β are scalars. This function has an alternate faster implementation using atomics that can be enabled with Handle.SetAtomicsMode. Please see the section on the function Handle.SetAtomicsMode for more details about the usage of atomics. For references please refer to NETLIB documentation: ssymv(), dsymv()

Handle.Zsymv64 takes 64-bit sizes.

  • uplo: Indicates if matrix lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasZsymv_v2.

func (Handle) Zsymv64

func (h Handle) Zsymv64(uplo FillMode, n int64, alpha *Complex128, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64, beta *Complex128, y driver.DevicePtr, incy int64) error

Zsymv64 performs the symmetric matrix-vector multiplication.

y=αAx+βy where A is a n×n symmetric matrix stored in lower or upper mode, x and y are vectors, and α and β are scalars. This function has an alternate faster implementation using atomics that can be enabled with Handle.SetAtomicsMode. Please see the section on the function Handle.SetAtomicsMode for more details about the usage of atomics. For references please refer to NETLIB documentation: ssymv(), dsymv()

It is Handle.Zsymv with int64 sizes and strides.

  • uplo: Indicates if matrix lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x n with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • beta: < type > scalar used for multiplication. If beta == 0 then y does not have to be a valid input
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y

Errors:

Wraps cublasZsymv_v2_64.

func (Handle) Zsyr

func (h Handle) Zsyr(uplo FillMode, n int32, alpha *Complex128, x driver.DevicePtr, incx int32, a driver.DevicePtr, lda int32) error

Zsyr performs the symmetric rank-1 update.

A=αxxᵀ+A, where A is a n×n symmetric matrix stored in column-major format, x is a vector, and α is a scalar. For references please refer to NETLIB documentation: ssyr(), dsyr()

Handle.Zsyr64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • a: < type > array of dimensions lda x n, with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasZsyr_v2.

func (Handle) Zsyr2

func (h Handle) Zsyr2(uplo FillMode, n int32, alpha *Complex128, x driver.DevicePtr, incx int32, y driver.DevicePtr, incy int32, a driver.DevicePtr, lda int32) error

Zsyr2 performs the symmetric rank-2 update.

A=α(xyᵀ+yxᵀ)+A, where A is a n×n symmetric matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: ssyr2(), dsyr2()

Handle.Zsyr264 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimensions lda x n, with lda >= max(1,n)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasZsyr2_v2.

func (Handle) Zsyr2k

func (h Handle) Zsyr2k(uplo FillMode, trans Operation, n int32, k int32, alpha *Complex128, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *Complex128, c driver.DevicePtr, ldc int32) error

Zsyr2k performs the symmetric rank- 2k update.

C=α(op(A)op(B)ᵀ+op(B)op(A)ᵀ)+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrix A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᵀ and Bᵀif trans == OpT For references please refer to NETLIB documentation: ssyr2k(), dsyr2k(), csyr2k(), zsyr2k()

Handle.Zsyr2k64 takes 64-bit sizes.

  • uplo: Indicates if matrix C lower or upper part, is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimensions ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, then C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If n < 0 or k < 0, or if trans is not one of OpN, OpT and OpC, or if uplo is not one of FillModeLower and FillModeUpper, or if lda < max(1, n) when trans == OpN, and lda < max(1, k) otherwise, or if ldb < max(1, n) when trans == OpN, and ldb < max(1, k) otherwise, or if ldc < max(1, n), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasZsyr2k_v2.

func (Handle) Zsyr2k64

func (h Handle) Zsyr2k64(uplo FillMode, trans Operation, n int64, k int64, alpha *Complex128, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *Complex128, c driver.DevicePtr, ldc int64) error

Zsyr2k64 performs the symmetric rank- 2k update.

C=α(op(A)op(B)ᵀ+op(B)op(A)ᵀ)+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrix A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᵀ and Bᵀif trans == OpT For references please refer to NETLIB documentation: ssyr2k(), dsyr2k(), csyr2k(), zsyr2k()

It is Handle.Zsyr2k with int64 sizes and strides.

  • uplo: Indicates if matrix C lower or upper part, is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimensions ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, then C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If n < 0 or k < 0, or if trans is not one of OpN, OpT and OpC, or if uplo is not one of FillModeLower and FillModeUpper, or if lda < max(1, n) when trans == OpN, and lda < max(1, k) otherwise, or if ldb < max(1, n) when trans == OpN, and ldb < max(1, k) otherwise, or if ldc < max(1, n), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasZsyr2k_v2_64.

func (Handle) Zsyr64

func (h Handle) Zsyr64(uplo FillMode, n int64, alpha *Complex128, x driver.DevicePtr, incx int64, a driver.DevicePtr, lda int64) error

Zsyr64 performs the symmetric rank-1 update.

A=αxxᵀ+A, where A is a n×n symmetric matrix stored in column-major format, x is a vector, and α is a scalar. For references please refer to NETLIB documentation: ssyr(), dsyr()

It is Handle.Zsyr with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • a: < type > array of dimensions lda x n, with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasZsyr_v2_64.

func (Handle) Zsyr264

func (h Handle) Zsyr264(uplo FillMode, n int64, alpha *Complex128, x driver.DevicePtr, incx int64, y driver.DevicePtr, incy int64, a driver.DevicePtr, lda int64) error

Zsyr264 performs the symmetric rank-2 update.

A=α(xyᵀ+yxᵀ)+A, where A is a n×n symmetric matrix stored in column-major format, x and y are vectors, and α is a scalar. For references please refer to NETLIB documentation: ssyr2(), dsyr2()

It is Handle.Zsyr2 with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • n: Number of rows and columns of matrix A
  • alpha: < type > scalar used for multiplication
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x
  • y: < type > vector with n elements
  • incy: Stride between consecutive elements of y
  • a: < type > array of dimensions lda x n, with lda >= max(1,n)
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasZsyr2_v2_64.

func (Handle) Zsyrk

func (h Handle) Zsyrk(uplo FillMode, trans Operation, n int32, k int32, alpha *Complex128, a driver.DevicePtr, lda int32, beta *Complex128, c driver.DevicePtr, ldc int32) error

Zsyrk performs the symmetric rank- k update.

C=αop(A)op(A)ᵀ+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A is a matrix with dimensions op(A)n×k . Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == OpT For references please refer to NETLIB documentation: ssyrk(), dsyrk(), csyrk(), zsyrk()

Handle.Zsyrk64 takes 64-bit sizes.

  • uplo: Indicates if matrix C lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A) and C
  • k: Number of columns of matrix op( A)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if trans == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasZsyrk_v2.

func (Handle) Zsyrk64

func (h Handle) Zsyrk64(uplo FillMode, trans Operation, n int64, k int64, alpha *Complex128, a driver.DevicePtr, lda int64, beta *Complex128, c driver.DevicePtr, ldc int64) error

Zsyrk64 performs the symmetric rank- k update.

C=αop(A)op(A)ᵀ+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A is a matrix with dimensions op(A)n×k . Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == OpT For references please refer to NETLIB documentation: ssyrk(), dsyrk(), csyrk(), zsyrk()

It is Handle.Zsyrk with int64 sizes and strides.

  • uplo: Indicates if matrix C lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A) and C
  • k: Number of columns of matrix op( A)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if trans == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • beta: < type > scalar used for multiplication. If beta == 0 then C does not have to be a valid input
  • c: < type > array of dimension ldc x n, with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasZsyrk_v2_64.

func (Handle) Zsyrkx

func (h Handle) Zsyrkx(uplo FillMode, trans Operation, n int32, k int32, alpha *Complex128, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, beta *Complex128, c driver.DevicePtr, ldc int32) error

Zsyrkx performs a variation of the symmetric rank- k update.

C=αop(A)op(B)ᵀ+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrices A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᵀ and Bᵀif trans == OpT This routine can be used when B is in such way that the result is guaranteed to be symmetric. A usual example is when the matrix B is a scaled form of the matrix A: this is equivalent to B being the product of the matrix A and a diagonal matrix. For an efficient computation of the product of a regular matrix with a diagonal matrix, refer to the routine cublasdgmm(). For references please refer to NETLIB documentation: ssyrk(), dsyrk(), csyrk(), zsyrk() and ssyr2k(), dsyr2k(), csyr2k(), zsyr2k()

Handle.Zsyrkx64 takes 64-bit sizes.

  • uplo: Indicates if matrix C lower or upper part, is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimensions ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, then C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If n < 0 or k < 0, or if trans is not one of OpN, OpT and OpC, or if uplo is not one of FillModeLower and FillModeUpper, or if lda < max(1, n) when trans == OpN, and lda < max(1, k) otherwise, or if ldb < max(1, n) when trans == OpN, and ldb < max(1, k) otherwise, or if ldc < max(1, n), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasZsyrkx.

func (Handle) Zsyrkx64

func (h Handle) Zsyrkx64(uplo FillMode, trans Operation, n int64, k int64, alpha *Complex128, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, beta *Complex128, c driver.DevicePtr, ldc int64) error

Zsyrkx64 performs a variation of the symmetric rank- k update.

C=αop(A)op(B)ᵀ+βC, where α and β are scalars, C is a symmetric matrix stored in lower or upper mode, and A and B are matrices with dimensions op(A)n×k and op(B)n×k , respectively. Also, for matrices A and B op(A) and op(B)={A and Bif trans == CUBLAS_OP_NAᵀ and Bᵀif trans == OpT This routine can be used when B is in such way that the result is guaranteed to be symmetric. A usual example is when the matrix B is a scaled form of the matrix A: this is equivalent to B being the product of the matrix A and a diagonal matrix. For an efficient computation of the product of a regular matrix with a diagonal matrix, refer to the routine cublasdgmm(). For references please refer to NETLIB documentation: ssyrk(), dsyrk(), csyrk(), zsyrk() and ssyr2k(), dsyr2k(), csyr2k(), zsyr2k()

It is Handle.Zsyrkx with int64 sizes and strides.

  • uplo: Indicates if matrix C lower or upper part, is stored, the other symmetric part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or transpose
  • n: Number of rows of matrix op( A), op( B) and C
  • k: Number of columns of matrix op( A) and op( B)
  • alpha: < type > scalar used for multiplication
  • a: < type > array of dimension lda x k with lda >= max(1, n) if transa == OpN and lda x n with lda >= max(1, k) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimensions ldb x k with ldb >= max(1, n) if transb == OpN and ldb x n with ldb >= max(1,k) otherwise
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • beta: < type > scalar used for multiplication. If beta == 0, then C does not have to be a valid input
  • c: < type > array of dimensions ldc x n with ldc >= max(1, n)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

  • ErrExecutionFailed: The function failed to launch on the GPU
  • ErrInvalidValue: If n < 0 or k < 0, or if trans is not one of OpN, OpT and OpC, or if uplo is not one of FillModeLower and FillModeUpper, or if lda < max(1, n) when trans == OpN, and lda < max(1, k) otherwise, or if ldb < max(1, n) when trans == OpN, and ldb < max(1, k) otherwise, or if ldc < max(1, n), or if alpha or beta are NULL, or if C is NULL when beta is not zero
  • ErrNotInitialized: The library was not initialized

Wraps cublasZsyrkx_64.

func (Handle) Ztbmv

func (h Handle) Ztbmv(uplo FillMode, trans Operation, diag DiagType, n int32, k int32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32) error

Ztbmv performs the triangular banded matrix-vector multiplication.

x=op(A)x, where A is a triangular banded matrix, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC If uplo == FillModeLower then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k,j)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: stbmv(), dtbmv(), ctbmv(), ztbmv()

Handle.Ztbmv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix
  • a: < type > array of dimension lda x n, with lda >= k + 1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasZtbmv_v2.

func (Handle) Ztbmv64

func (h Handle) Ztbmv64(uplo FillMode, trans Operation, diag DiagType, n int64, k int64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64) error

Ztbmv64 performs the triangular banded matrix-vector multiplication.

x=op(A)x, where A is a triangular banded matrix, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC If uplo == FillModeLower then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k,j)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: stbmv(), dtbmv(), ctbmv(), ztbmv()

It is Handle.Ztbmv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix
  • a: < type > array of dimension lda x n, with lda >= k + 1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasZtbmv_v2_64.

func (Handle) Ztbsv

func (h Handle) Ztbsv(uplo FillMode, trans Operation, diag DiagType, n int32, k int32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32) error

Ztbsv solves the triangular banded linear system with a single right-hand-side.

op(A)x=b, where A is a triangular banded matrix, and x and b are vectors. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. If uplo == FillModeLower then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k,j)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: stbsv(), dtbsv(), ctbsv(), ztbsv()

Handle.Ztbsv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix A
  • a: < type > array of dimension lda x n, with lda >= k+1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasZtbsv_v2.

func (Handle) Ztbsv64

func (h Handle) Ztbsv64(uplo FillMode, trans Operation, diag DiagType, n int64, k int64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64) error

Ztbsv64 solves the triangular banded linear system with a single right-hand-side.

op(A)x=b, where A is a triangular banded matrix, and x and b are vectors. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. If uplo == FillModeLower then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row 1, the first subdiagonal in row 2 (starting at first position), the second subdiagonal in row 3 (starting at first position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+i-j,j) for j=1,…,n and i∈[j,min(m,j+k)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the bottom right k×k triangle) are not referenced. If uplo == FillModeUpper then the triangular banded matrix A is stored column by column, with the main diagonal of the matrix stored in row k + 1, the first superdiagonal in row k (starting at second position), the second superdiagonal in row k-1 (starting at third position), etc. So that in general, the element A(i,j) is stored in the memory location A(1+k+i-j,j) for j=1,…,n and i∈[max(1,j−k,j)] . Also, the elements in the array A that do not conceptually correspond to the elements in the banded matrix (the top left k×k triangle) are not referenced. For references please refer to NETLIB documentation: stbsv(), dtbsv(), ctbsv(), ztbsv()

It is Handle.Ztbsv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • k: Number of sub- and super-diagonals of matrix A
  • a: < type > array of dimension lda x n, with lda >= k+1
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasZtbsv_v2_64.

func (Handle) Ztpmv

func (h Handle) Ztpmv(uplo FillMode, trans Operation, diag DiagType, n int32, ap driver.DevicePtr, x driver.DevicePtr, incx int32) error

Ztpmv performs the triangular packed matrix-vector multiplication.

x=op(A)x, where A is a triangular matrix stored in packed format, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC If uplo == FillModeLower then the elements in the lower triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for A(i,j) and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: stpmv(), dtpmv(), ctpmv(), ztpmv()

Handle.Ztpmv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • ap: < type > array with A stored in packed format
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasZtpmv_v2.

func (Handle) Ztpmv64

func (h Handle) Ztpmv64(uplo FillMode, trans Operation, diag DiagType, n int64, ap driver.DevicePtr, x driver.DevicePtr, incx int64) error

Ztpmv64 performs the triangular packed matrix-vector multiplication.

x=op(A)x, where A is a triangular matrix stored in packed format, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC If uplo == FillModeLower then the elements in the lower triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for A(i,j) and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: stpmv(), dtpmv(), ctpmv(), ztpmv()

It is Handle.Ztpmv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • ap: < type > array with A stored in packed format
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasZtpmv_v2_64.

func (Handle) Ztpsv

func (h Handle) Ztpsv(uplo FillMode, trans Operation, diag DiagType, n int32, ap driver.DevicePtr, x driver.DevicePtr, incx int32) error

Ztpsv solves the packed triangular linear system with a single right-hand-side.

op(A)x=b, where A is a triangular matrix stored in packed format, and x and b are vectors. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. If uplo == FillModeLower then the elements in the lower triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: stpsv(), dtpsv(), ctpsv(), ztpsv()

Handle.Ztpsv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • ap: < type > array with A stored in packed format
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasZtpsv_v2.

func (Handle) Ztpsv64

func (h Handle) Ztpsv64(uplo FillMode, trans Operation, diag DiagType, n int64, ap driver.DevicePtr, x driver.DevicePtr, incx int64) error

Ztpsv64 solves the packed triangular linear system with a single right-hand-side.

op(A)x=b, where A is a triangular matrix stored in packed format, and x and b are vectors. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. If uplo == FillModeLower then the elements in the lower triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+((2*n-j+1)*j)/2] for j=1,…,n and i≥j . Consequently, the packed format requires only n(n+1)2 elements for storage. If uplo == FillModeUpper then the elements in the upper triangular part of the triangular matrix A are packed together column by column without gaps, so that the element A(i,j) is stored in the memory location AP[i+(j*(j+1))/2] for j=1,…,n and i≤j . Consequently, the packed format requires only n(n+1)2 elements for storage. For references please refer to NETLIB documentation: stpsv(), dtpsv(), ctpsv(), ztpsv()

It is Handle.Ztpsv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • ap: < type > array with A stored in packed format
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasZtpsv_v2_64.

func (Handle) Ztpttr

func (h Handle) Ztpttr(uplo FillMode, n int32, ap driver.DevicePtr, a driver.DevicePtr, lda int32) error

Ztpttr performs the conversion from the triangular packed format to the triangular format.

If uplo == FillModeLower then the elements of AP are copied into the lower triangular part of the triangular matrix A and the upper part of A is left untouched. If uplo == FillModeUpper then the elements of AP are copied into the upper triangular part of the triangular matrix A and the lower part of A is left untouched. For references please refer to NETLIB documentation: stpttr(), dtpttr(), ctpttr(), ztpttr()

  • uplo: Indicates if matrix AP contains lower or upper part of matrix A
  • n: Number of rows and columns of matrix A
  • ap: < type > array with A stored in packed format
  • a: < type > array of dimensions lda x n , with lda >= max(1, n). The opposite side of A is left untouched
  • lda: Leading dimension of two-dimensional array used to store matrix A

Errors:

Wraps cublasZtpttr.

func (Handle) Ztrmm

func (h Handle) Ztrmm(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int32, n int32, alpha *Complex128, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, c driver.DevicePtr, ldc int32) error

Ztrmm performs the triangular matrix-matrix multiplication.

C={αop(A)Bif side == [SideLeft]αBop(A)if side == SideRight where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, B and C are m×n matrix, and α is a scalar. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC Notice that in order to achieve better parallelism cuBLAS differs from the BLAS API only for this routine. The BLAS API assumes an in-place implementation (with results written back to B), while the cuBLAS API assumes an out-of-place implementation (with results written into C). The application can obtain the in-place functionality of BLAS in the cuBLAS API by passing the address of the matrix B in place of the matrix C. No other overlapping in the input parameters is supported. For references please refer to NETLIB documentation: strmm(), dtrmm(), ctrmm(), ztrmm()

Handle.Ztrmm64 takes 64-bit sizes.

  • side: Indicates if matrix A is on the left or right of B
  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • m: Number of rows of matrix B, with matrix A sized accordingly
  • n: Number of columns of matrix B, with matrix A sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A is not referenced and B does not have to be a valid input
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • c: < type > array of dimension ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasZtrmm_v2.

func (Handle) Ztrmm64

func (h Handle) Ztrmm64(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int64, n int64, alpha *Complex128, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, c driver.DevicePtr, ldc int64) error

Ztrmm64 performs the triangular matrix-matrix multiplication.

C={αop(A)Bif side == [SideLeft]αBop(A)if side == SideRight where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, B and C are m×n matrix, and α is a scalar. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC Notice that in order to achieve better parallelism cuBLAS differs from the BLAS API only for this routine. The BLAS API assumes an in-place implementation (with results written back to B), while the cuBLAS API assumes an out-of-place implementation (with results written into C). The application can obtain the in-place functionality of BLAS in the cuBLAS API by passing the address of the matrix B in place of the matrix C. No other overlapping in the input parameters is supported. For references please refer to NETLIB documentation: strmm(), dtrmm(), ctrmm(), ztrmm()

It is Handle.Ztrmm with int64 sizes and strides.

  • side: Indicates if matrix A is on the left or right of B
  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • m: Number of rows of matrix B, with matrix A sized accordingly
  • n: Number of columns of matrix B, with matrix A sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A is not referenced and B does not have to be a valid input
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array of dimension ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B
  • c: < type > array of dimension ldc x n with ldc >= max(1, m)
  • ldc: Leading dimension of two-dimensional array used to store matrix C

Errors:

Wraps cublasZtrmm_v2_64.

func (Handle) Ztrmv

func (h Handle) Ztrmv(uplo FillMode, trans Operation, diag DiagType, n int32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32) error

Ztrmv performs the triangular matrix-vector multiplication.

x=op(A)x, where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC For references please refer to NETLIB documentation: strmv(), dtrmv(), ctrmv(), ztrmv()

Handle.Ztrmv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • a: < type > array of dimensions lda x n , with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasZtrmv_v2.

func (Handle) Ztrmv64

func (h Handle) Ztrmv64(uplo FillMode, trans Operation, diag DiagType, n int64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64) error

Ztrmv64 performs the triangular matrix-vector multiplication.

x=op(A)x, where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, and x is a vector. Also, for matrix A op(A)={Aif trans == CUBLAS_OP_NAᵀif trans == CUBLAS_OP_TAᴴif trans == OpC For references please refer to NETLIB documentation: strmv(), dtrmv(), ctrmv(), ztrmv()

It is Handle.Ztrmv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • a: < type > array of dimensions lda x n , with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasZtrmv_v2_64.

func (Handle) Ztrsm

func (h Handle) Ztrsm(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int32, n int32, alpha *Complex128, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32) error

Ztrsm solves the triangular linear system with multiple right-hand-sides.

{op(A)X=αBif side == CUBLAS_SIDE_LEFTXop(A)=αBif side == SideRight where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, X and B are m×n matrices, and α is a scalar. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC The solution X overwrites the right-hand-sides B on exit. No test for singularity or near-singularity is included in this function. For references please refer to NETLIB documentation: strsm(), dtrsm(), ctrsm(), ztrsm()

Handle.Ztrsm64 takes 64-bit sizes.

  • side: Indicates if matrix A is on the left or right of X
  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • m: Number of rows of matrix B, with matrix A sized accordingly
  • n: Number of columns of matrix B, with matrix A is sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A is not referenced and B does not have to be a valid input
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array. It has dimensions ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B

Errors:

Wraps cublasZtrsm_v2.

func (Handle) Ztrsm64

func (h Handle) Ztrsm64(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int64, n int64, alpha *Complex128, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64) error

Ztrsm64 solves the triangular linear system with multiple right-hand-sides.

{op(A)X=αBif side == CUBLAS_SIDE_LEFTXop(A)=αBif side == SideRight where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, X and B are m×n matrices, and α is a scalar. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC The solution X overwrites the right-hand-sides B on exit. No test for singularity or near-singularity is included in this function. For references please refer to NETLIB documentation: strsm(), dtrsm(), ctrsm(), ztrsm()

It is Handle.Ztrsm with int64 sizes and strides.

  • side: Indicates if matrix A is on the left or right of X
  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • m: Number of rows of matrix B, with matrix A sized accordingly
  • n: Number of columns of matrix B, with matrix A is sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A is not referenced and B does not have to be a valid input
  • a: < type > array of dimension lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • b: < type > array. It has dimensions ldb x n with ldb >= max(1, m)
  • ldb: Leading dimension of two-dimensional array used to store matrix B

Errors:

Wraps cublasZtrsm_v2_64.

func (Handle) ZtrsmBatched

func (h Handle) ZtrsmBatched(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int32, n int32, alpha *Complex128, a driver.DevicePtr, lda int32, b driver.DevicePtr, ldb int32, batchCount int32) error

ZtrsmBatched solves an array of triangular linear systems with multiple right-hand-sides.

{op(A[i])X[i]=αB[i]if side == CUBLAS_SIDE_LEFTX[i]op(A[i])=αB[i]if side == SideRight where A[i] is a triangular matrix stored in lower or upper mode with or without the main diagonal, X[i] and B[i] are m×n matrices, and α is a scalar. Also, for matrix A op(A[i])={A[i]if transa == CUBLAS_OP_NAᵀ[i]if transa == CUBLAS_OP_TAᴴ[i]if transa == OpC The solution X[i] overwrites the right-hand-sides B[i] on exit. No test for singularity or near-singularity is included in this function. This function works for any sizes but is intended to be used for matrices of small sizes where the launch overhead is a significant factor. For bigger sizes, it might be advantageous to call batchCount times the regular cublastrsm() within a set of CUDA streams. The current implementation is limited to devices with compute capability above or equal 2.0. For references please refer to NETLIB documentation: strsm(), dtrsm(), ctrsm(), ztrsm()

Handle.ZtrsmBatched64 takes 64-bit sizes.

  • side: Indicates if matrix A[i] is on the left or right of X[i]
  • uplo: Indicates if matrix A[i] lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A[i] are unity and should not be accessed
  • m: Number of rows of matrix B[i], with matrix A[i] sized accordingly
  • n: Number of columns of matrix B[i], with matrix A[i] is sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A[i] is not referenced and B[i] does not have to be a valid input
  • a: Array of pointers to < type > array, with each array of dim. lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A[i]
  • b: Array of pointers to < type > array, with each array of dim. ldb x n with ldb >= max(1, m). Matrices B[i] should not overlap; otherwise, undefined behavior is expected
  • ldb: Leading dimension of two-dimensional array used to store matrix B[i]
  • batchCount: Number of pointers contained in A and B

Errors:

Wraps cublasZtrsmBatched.

func (Handle) ZtrsmBatched64

func (h Handle) ZtrsmBatched64(side SideMode, uplo FillMode, trans Operation, diag DiagType, m int64, n int64, alpha *Complex128, a driver.DevicePtr, lda int64, b driver.DevicePtr, ldb int64, batchCount int64) error

ZtrsmBatched64 solves an array of triangular linear systems with multiple right-hand-sides.

{op(A[i])X[i]=αB[i]if side == CUBLAS_SIDE_LEFTX[i]op(A[i])=αB[i]if side == SideRight where A[i] is a triangular matrix stored in lower or upper mode with or without the main diagonal, X[i] and B[i] are m×n matrices, and α is a scalar. Also, for matrix A op(A[i])={A[i]if transa == CUBLAS_OP_NAᵀ[i]if transa == CUBLAS_OP_TAᴴ[i]if transa == OpC The solution X[i] overwrites the right-hand-sides B[i] on exit. No test for singularity or near-singularity is included in this function. This function works for any sizes but is intended to be used for matrices of small sizes where the launch overhead is a significant factor. For bigger sizes, it might be advantageous to call batchCount times the regular cublastrsm() within a set of CUDA streams. The current implementation is limited to devices with compute capability above or equal 2.0. For references please refer to NETLIB documentation: strsm(), dtrsm(), ctrsm(), ztrsm()

It is Handle.ZtrsmBatched with int64 sizes and strides.

  • side: Indicates if matrix A[i] is on the left or right of X[i]
  • uplo: Indicates if matrix A[i] lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A[i]) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A[i] are unity and should not be accessed
  • m: Number of rows of matrix B[i], with matrix A[i] sized accordingly
  • n: Number of columns of matrix B[i], with matrix A[i] is sized accordingly
  • alpha: < type > scalar used for multiplication, if alpha == 0 then A[i] is not referenced and B[i] does not have to be a valid input
  • a: Array of pointers to < type > array, with each array of dim. lda x m with lda >= max(1, m) if side == SideLeft and lda x n with lda >= max(1, n) otherwise
  • lda: Leading dimension of two-dimensional array used to store matrix A[i]
  • b: Array of pointers to < type > array, with each array of dim. ldb x n with ldb >= max(1, m). Matrices B[i] should not overlap; otherwise, undefined behavior is expected
  • ldb: Leading dimension of two-dimensional array used to store matrix B[i]
  • batchCount: Number of pointers contained in A and B

Errors:

Wraps cublasZtrsmBatched_64.

func (Handle) Ztrsv

func (h Handle) Ztrsv(uplo FillMode, trans Operation, diag DiagType, n int32, a driver.DevicePtr, lda int32, x driver.DevicePtr, incx int32) error

Ztrsv solves the triangular linear system with a single right-hand-side.

op(A)x=b, where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, and x and b are vectors. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. For references please refer to NETLIB documentation: strsv(), dtrsv(), ctrsv(), ztrsv()

Handle.Ztrsv64 takes 64-bit sizes.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • a: < type > array of dimension lda x n, with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasZtrsv_v2.

func (Handle) Ztrsv64

func (h Handle) Ztrsv64(uplo FillMode, trans Operation, diag DiagType, n int64, a driver.DevicePtr, lda int64, x driver.DevicePtr, incx int64) error

Ztrsv64 solves the triangular linear system with a single right-hand-side.

op(A)x=b, where A is a triangular matrix stored in lower or upper mode with or without the main diagonal, and x and b are vectors. Also, for matrix A op(A)={Aif transa == CUBLAS_OP_NAᵀif transa == CUBLAS_OP_TAᴴif transa == OpC The solution x overwrites the right-hand-sides b on exit. No test for singularity or near-singularity is included in this function. For references please refer to NETLIB documentation: strsv(), dtrsv(), ctrsv(), ztrsv()

It is Handle.Ztrsv with int64 sizes and strides.

  • uplo: Indicates if matrix A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements
  • trans: Operation op( A) that is non- or (conj.) transpose
  • diag: Indicates if the elements on the main diagonal of matrix A are unity and should not be accessed
  • n: Number of rows and columns of matrix A
  • a: < type > array of dimension lda x n, with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • x: < type > vector with n elements
  • incx: Stride between consecutive elements of x

Errors:

Wraps cublasZtrsv_v2_64.

func (Handle) Ztrttp

func (h Handle) Ztrttp(uplo FillMode, n int32, a driver.DevicePtr, lda int32, ap driver.DevicePtr) error

Ztrttp performs the conversion from the triangular format to the triangular packed format.

If uplo == FillModeLower then the lower triangular part of the triangular matrix A is copied into the array AP. If uplo == FillModeUpper then then the upper triangular part of the triangular matrix A is copied into the array AP. For references please refer to NETLIB documentation: strttp(), dtrttp(), ctrttp(), ztrttp()

  • uplo: Indicates which matrix A lower or upper part is referenced
  • n: Number of rows and columns of matrix A
  • a: < type > array of dimensions lda x n , with lda >= max(1, n)
  • lda: Leading dimension of two-dimensional array used to store matrix A
  • ap: < type > array with A stored in packed format

Errors:

Wraps cublasZtrttp.

type LibraryAttempt

type LibraryAttempt struct {
	Name string // path or soname passed to dlopen
	Err  error
}

LibraryAttempt records one failed attempt to open the shared library.

type LibraryConflictError

type LibraryConflictError struct {
	Loaded    string
	Requested string

	// Implicit reports that the loaded library was opened lazily and no
	// successful Load has since acknowledged it. A
	// caller that sees this called some
	// other function first, and that call took the default search list.
	Implicit bool
}

LibraryConflictError reports a Load call naming a different library than the one already loaded. Only one library is loaded per process.

func (*LibraryConflictError) Error

func (e *LibraryConflictError) Error() string

Error reports the conflicting library paths, and whether the library that is already loaded got there without a Load call.

type LibraryError

type LibraryError struct {
	Library  string
	Env      string
	Path     string
	Attempts []LibraryAttempt
	Hint     string
}

LibraryError reports that libcublas could not be opened. Attempts lists every name tried in order. Path is set when an explicit path, from Load or CUBLAS_LIB_PATH, was requested and failed. Hint reports pkg-config discovery results and query failures, when discovery ran.

func (*LibraryError) Error

func (e *LibraryError) Error() string

Error describes the library load attempts and their errors.

func (*LibraryError) Unwrap

func (e *LibraryError) Unwrap() []error

Unwrap returns the error from each attempt.

type LibraryPropertyType

type LibraryPropertyType int32

LibraryPropertyType identifies a library property to query.

const (
	MajorVersion LibraryPropertyType = 0
	MinorVersion LibraryPropertyType = 1
	PatchLevel   LibraryPropertyType = 2
)

LibraryPropertyType constants.

type LogCallback

type LogCallback uintptr

LogCallback is a function pointer for cuBLAS logging.

type Math

type Math int32

Math is used in Handle.SetMathMode to choose compute precision modes as defined in the following table. Since this setting does not directly control the use of Tensor Cores, the mode TensorOpMath is being deprecated, and will be removed in a future release.

const (
	DefaultMath                           Math = 0
	TensorOpMath                          Math = 1
	PedanticMath                          Math = 2
	TF32TensorOpMath                      Math = 3
	FP32EmulatedBf16x9Math                Math = 4
	FP64EmulatedFixedpointMath            Math = 8
	MathDisallowReducedPrecisionReduction Math = 16
)

func (Math) String

func (e Math) String() string

String returns the constant name, or a numeric representation for unknown values.

type Operation

type Operation int32

Operation indicates which operation needs to be performed with the dense matrix.

Its values correspond to Fortran characters ‘N’ or ‘n’ (non-transpose), ‘T’ or ‘t’ (transpose) and ‘C’ or ‘c’ (conjugate transpose) that are often used as parameters to legacy BLAS implementations.

const (
	OpN        Operation = 0
	OpT        Operation = 1
	OpC        Operation = 2
	OpHermitan Operation = 2 // synonym if [OpC]
	OpConjg    Operation = 3 // conjugate, placeholder - not supported in the current release
)

func (Operation) String

func (e Operation) String() string

String returns the constant name, or a numeric representation for unknown values.

type PointerMode

type PointerMode int32

PointerMode indicates whether the scalar values are passed by reference on the host or device.

It is important to point out that if several scalar values are present in the function call, all of them must conform to the same single pointer mode. The pointer mode can be set and retrieved using Handle.SetPointerMode and Handle.PointerMode routines, respectively.

const (
	PointerModeHost   PointerMode = 0
	PointerModeDevice PointerMode = 1
)

func (PointerMode) String

func (e PointerMode) String() string

String returns the constant name, or a numeric representation for unknown values.

type Result

type Result int32

Result represents a cublas API error code (cublasStatus_t).

When the library is loaded, Result.Error returns rich messages from GetStatusName and GetStatusString. When the library is not loaded, it falls back to the numeric error code and Go-defined name.

const (
	Success            Result = 0
	ErrNotInitialized  Result = 1
	ErrAllocFailed     Result = 3
	ErrInvalidValue    Result = 7
	ErrArchMismatch    Result = 8
	ErrMappingError    Result = 11
	ErrExecutionFailed Result = 13
	ErrInternalError   Result = 14
	ErrNotSupported    Result = 15
	ErrLicenseError    Result = 16
)

cublas error codes from cublas_api.h.

func (Result) Code

func (r Result) Code() int32

Code returns the underlying result code for programmatic error handling.

func (Result) Error

func (r Result) Error() string

Error implements the error interface. When the library is loaded, it returns the error description from GetStatusName and GetStatusString. Otherwise it returns a fallback string with the Go constant name and numeric code.

func (Result) String

func (r Result) String() string

String returns the Go constant name of the result.

type Scalar

type Scalar struct {
	// contains filtered or unexported fields
}

A Scalar is a value, such as the alpha and beta of a matrix product, that the library reads through a pointer. Make one for a value in host memory with Float16BitsScalar, Float32Scalar, Float64Scalar, Complex64Scalar, Complex128Scalar, or Int32Scalar, or for a value in device memory with DeviceScalar.

A call copies a host value into memory of its own, passes the library a pointer to the copy, and reuses that memory once the call returns, so a Scalar never reaches the library and can live anywhere.

cuBLAS reads a host scalar before the call returns: "the CUDA kernels related to those functions will be launched with the value of alpha and/or beta. Therefore if they were allocated on the heap, they can be freed just after the return of the call even though the kernel launch is asynchronous" (cuBLAS documentation, section 2.1.5). A call captured into a CUDA graph keeps the value: "In the case of CUBLAS(LT)_POINTER_MODE_HOST, coefficient values are captured in the graph" (section 2.1.12).

The kind of a host Scalar must be the type the library reads. Where a call names that type in another parameter, a Scalar of another kind is a *ScalarError; where the type is in a descriptor, the call cannot check it. The zero Scalar is a host zero of every kind.

func Complex64Scalar

func Complex64Scalar(x complex64) Scalar

Complex64Scalar returns a host Scalar holding the complex64 x.

func Complex128Scalar

func Complex128Scalar(x complex128) Scalar

Complex128Scalar returns a host Scalar holding the complex128 x.

func DeviceScalar

func DeviceScalar(p driver.DevicePtr) Scalar

DeviceScalar returns a Scalar the library reads from device memory at p. A call passes p unchanged, which the library reads as an address only under Handle.SetPointerMode with PointerModeDevice. The device memory must stay valid until the stream work completes. A DeviceScalar has no kind, so no call checks it.

func Float16BitsScalar

func Float16BitsScalar(b uint16) Scalar

Float16BitsScalar returns a host Scalar holding the IEEE 754 half-precision value with bit pattern b.

func Float32Scalar

func Float32Scalar(x float32) Scalar

Float32Scalar returns a host Scalar holding the float32 x.

func Float64Scalar

func Float64Scalar(x float64) Scalar

Float64Scalar returns a host Scalar holding the float64 x.

func Int32Scalar

func Int32Scalar(x int32) Scalar

Int32Scalar returns a host Scalar holding the int32 x.

type ScalarError

type ScalarError struct {
	Func  string // the C symbol called
	Param string // the scalar parameter
	Kind  string // the Scalar's kind, such as "float32"
	Want  string // the kinds the call allows, such as "float64 or complex128"
}

A ScalarError reports a host Scalar whose kind is not the type the call names for it in another parameter.

func (*ScalarError) Error

func (e *ScalarError) Error() string

type SideMode

type SideMode int32

SideMode indicates whether the dense matrix is on the left or right side in the matrix equation solved by a particular function. Its values correspond to Fortran characters ‘L’ or ‘l’ (left) and ‘R’ or ‘r’ (right) that are often used as parameters to legacy BLAS implementations.

const (
	SideLeft  SideMode = 0
	SideRight SideMode = 1
)

func (SideMode) String

func (e SideMode) String() string

String returns the constant name, or a numeric representation for unknown values.

type SymbolError

type SymbolError struct {
	Symbol string
	Err    error
}

SymbolError reports that a symbol is not callable.

Err distinguishes the two ways that happens. A nil Err means the loaded library does not export the symbol, which is what an installation older than the symbol looks like. A non-nil Err means the library does export it and the binding itself failed; the library is not at fault.

func (*SymbolError) Error

func (e *SymbolError) Error() string

Error reports the uncallable library symbol and, when the symbol was present but could not be bound, why.

func (*SymbolError) Unwrap

func (e *SymbolError) Unwrap() error

Unwrap returns the reason the symbol could not be bound, or nil when the loaded library does not export it.

type VersionMismatchError

type VersionMismatchError struct {
	Path string // the library that was opened
	Want int    // major version these bindings were generated for
	Got  int    // major version the library reports
	Raw  int    // the version value the library reported, undecoded
}

VersionMismatchError reports that the shared library that opened is not from the version train cublas was generated for. dlsym matches on name alone, so a library from a neighbouring train opens and resolves nearly every symbol; asking it its own version is what tells the two apart.

func (*VersionMismatchError) Error

func (e *VersionMismatchError) Error() string

Error reports which library was opened and the two majors that disagree.

A decoder is only a decoder for the version schemes it was measured against, and a library from a train that predates the scheme can report a value it does not decode. Naming a major of 0 in that case would attribute to the library a claim it never made, so the raw value is reported instead.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL