pub fn xlarft<TV: DataTypeLike, TTau: DataTypeLike, TT: DataTypeLike>(
ctx: &Context,
params: &Params,
direct: DirectMode,
storev: StorevMode,
n: usize,
k: usize,
v: MatrixRef<'_, TV>,
tau: VectorRef<'_, TTau>,
t: MatrixMut<'_, TT>,
compute_type: DataType,
workspace: ByteWorkspaceMut<'_>,
) -> Result<()>Expand description
Use the matching buffer-size helper to calculate the sizes needed for pre-allocated workspace.
Forms the triangular factor T of a real block reflector H of order n,
which is defined as a product of k elementary reflectors.
Only StorevMode::Columnwise storage is supported. This means the vector
defining the elementary reflector H(i) is stored in the ith column of
V, and $H = I - V \cdot T \cdot V^{T}$ ($H = I - V \cdot T \cdot V^{H}$
for complex types).
Provide device and host workspace through workspace.
Use xlarft_buffer_size to determine the required sizes for
workspace.device and workspace.host.
Currently, only the n >= k scenario is supported.
The generic cuSOLVER routine has four data types:
xlarft only supports the following four combinations.
Valid combinations of data types and compute types
| data_type_v | data_type_tau | data_type_t | compute_type | Meaning |
|---|---|---|---|---|
DataType::F32 | DataType::F32 | DataType::F32 | DataType::F32 | SLARFT |
DataType::F64 | DataType::F64 | DataType::F64 | DataType::F64 | DLARFT |
DataType::ComplexF32 | DataType::ComplexF32 | DataType::ComplexF32 | DataType::ComplexF32 | CLARFT |
DataType::ComplexF64 | DataType::ComplexF64 | DataType::ComplexF64 | DataType::ComplexF64 | ZLARFT |
ยงErrors
Returns an error if cuSOLVER has not been initialized, if the reflector dimensions or storage mode are invalid, or if cuSOLVER reports an internal failure.