pub unsafe extern "C" fn cusolverDnXlarft(
handle: cusolverDnHandle_t,
params: cusolverDnParams_t,
direct: cusolverDirectMode_t,
storev: cusolverStorevMode_t,
n: i64,
k: i64,
dataTypeV: cudaDataType,
V: *const c_void,
ldv: i64,
dataTypeTau: cudaDataType,
tau: *const c_void,
dataTypeT: cudaDataType,
T: *mut c_void,
ldt: i64,
computeType: cudaDataType,
bufferOnDevice: *mut c_void,
workspaceInBytesOnDevice: size_t,
bufferOnHost: *mut c_void,
workspaceInBytesOnHost: size_t,
) -> cusolverStatus_tExpand description
The helper functions below can calculate the sizes needed for pre-allocated buffer.
The following routine:
forms the triangular factor T of a real block reflector H of order n, which is defined as a product of k elementary reflectors.
If:
Only storev == CUBLAS_STOREV_COLUMNWISE is supported, which indicates that the vector defining the elementary reflector H(i) is stored in the i-th column of the array V, and $H = I - V \* T \* V^{T}$ ($H = I - V \* T \* V^{H}$ for complex types).
The user has to provide device and host working spaces which are pointed by input parameters bufferOnDevice and bufferOnHost. The input parameters workspaceInBytesOnDevice (and workspaceInBytesOnHost) is size in bytes of the device (and host) working space, and it is returned by cusolverDnXlarft_bufferSize.
Currently, only n >= k scenario is supported.
The generic API has four different types:
cusolverDnXlarft only supports the following four combinations.
Valid combinations of data types and compute types
| DataTypeV | DataTypeTau | DataTypeT | ComputeType | Meaning |
|---|---|---|---|---|
CUDA_R_32F | CUDA_R_32F | CUDA_R_32F | CUDA_R_32F | SLARFT |
CUDA_R_64F | CUDA_R_64F | CUDA_R_64F | CUDA_R_64F | DLARFT |
CUDA_C_32F | CUDA_C_32F | CUDA_C_32F | CUDA_C_32F | CLARFT |
CUDA_C_64F | CUDA_C_64F | CUDA_C_64F | CUDA_C_64F | ZLARFT |
§Parameters
handle: Handle to the cuSolverDN library context.params: Structure with information collected bycusolverDnSetAdvOptions.direct: Specifies the order in which the elementary reflectors are multiplied to form the block reflector.storev: Specifies how the vectors which define the elementary reflectors are stored.n: The order of the block reflectorH.n >= 0.k: The order of the triangular factorT(= the number of elementary reflectors).k >= 1.dataTypeV: Data type of arrayV.V: The matrixVof dimensionlda * k.ldv: Leading dimension of the arrayV.ldv >= max(1,n).dataTypeTau: Data type of arraytau.tau: Dimensionk.tau(i)must contain the scalar factor of the elementary reflectorH(i).dataTypeT: Data type of arrayT.T: Dimensionldt * k. The $k \times k$ triangular factorTof the block reflector. Ifdirect == CUBLAS_DIRECT_FORWARD,Tis upper triangular; ifdirect == CUBLAS_DIRECT_BACKWARD,Tis lower triangular.ldt: The leading dimension of the arrayT.ldt >= k.computeType: Data type of computation.bufferOnDevice: Device workspace. Array of typevoidof sizeworkspaceInBytesOnDevicebytes.workspaceInBytesOnDevice: Size in bytes ofbufferOnDevice, returned bycusolverDnXlarft_bufferSize.bufferOnHost: Host workspace. Array of typevoidof sizeworkspaceInBytesOnHostbytes.workspaceInBytesOnHost: Size in bytes ofbufferOnHost, returned bycusolverDnXlarft_bufferSize.
§Return value
cusolverStatus_t::CUSOLVER_STATUS_INTERNAL_ERROR: An internal operation failed.cusolverStatus_t::CUSOLVER_STATUS_INVALID_VALUE: Invalid parameters were passed (n == 0,k > n, orstorev == CUBLAS_STOREV_ROWWISE).cusolverStatus_t::CUSOLVER_STATUS_NOT_INITIALIZED: The library was not initialized.cusolverStatus_t::CUSOLVER_STATUS_SUCCESS: The operation completed successfully.