Skip to main content

cusolverDnXlarft

Function cusolverDnXlarft 

Source
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_t
Expand 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

DataTypeVDataTypeTauDataTypeTComputeTypeMeaning
CUDA_R_32FCUDA_R_32FCUDA_R_32FCUDA_R_32FSLARFT
CUDA_R_64FCUDA_R_64FCUDA_R_64FCUDA_R_64FDLARFT
CUDA_C_32FCUDA_C_32FCUDA_C_32FCUDA_C_32FCLARFT
CUDA_C_64FCUDA_C_64FCUDA_C_64FCUDA_C_64FZLARFT

§Parameters

  • handle: Handle to the cuSolverDN library context.
  • params: Structure with information collected by cusolverDnSetAdvOptions.
  • 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 reflector H. n >= 0.
  • k: The order of the triangular factor T (= the number of elementary reflectors). k >= 1.
  • dataTypeV: Data type of array V.
  • V: The matrix V of dimension lda * k.
  • ldv: Leading dimension of the array V. ldv >= max(1,n).
  • dataTypeTau: Data type of array tau.
  • tau: Dimension k. tau(i) must contain the scalar factor of the elementary reflector H(i).
  • dataTypeT: Data type of array T.
  • T: Dimension ldt * k. The $k \times k$ triangular factor T of the block reflector. If direct == CUBLAS_DIRECT_FORWARD, T is upper triangular; if direct == CUBLAS_DIRECT_BACKWARD, T is lower triangular.
  • ldt: The leading dimension of the array T. ldt >= k.
  • computeType: Data type of computation.
  • bufferOnDevice: Device workspace. Array of type void of size workspaceInBytesOnDevice bytes.
  • workspaceInBytesOnDevice: Size in bytes of bufferOnDevice, returned by cusolverDnXlarft_bufferSize.
  • bufferOnHost: Host workspace. Array of type void of size workspaceInBytesOnHost bytes.
  • workspaceInBytesOnHost: Size in bytes of bufferOnHost, returned by cusolverDnXlarft_bufferSize.

§Return value