einsums::blas::lascl#

Note

Generated from the C++ headers by apiary --emit-cpp-docs-json.

Defined in header Einsums/BLAS.hpp.

template<typename T>
int_t lascl(char type, int_t kl, int_t ku, T cfrom, T cto, int_t m, int_t n, T *A, int_t lda)#

Scales a general matrix. The scale factor is cto / cfrom, but the scale is performed without overflow/underflow.

Added in version 2.0.0.

Template Parameters:

T – The type this function handles.

Parameters:
  • type – The type of matrix. Case insensitive. ‘g’ is for general matrices, ‘l’ is for lower triangular matrices, ‘u’ if for upper triangular matrices, ‘h’ is for hessenberg matrices, ‘b’ is for symmetric band matrices with lower bandwidth kl and upper bandwidth of ku and with only the lower half stored, ‘q’ is the same as ‘b’ but with the upper half stored instead, and ‘z’ is the same as ‘b’ but with a more complicated storage scheme.

  • kl – The lower bandwidth of the matrix. Only used if the type is ‘b’, ‘q’, or ‘z’.

  • ku – The upper bandwidth of the matrix. Only used if the type is ‘b’, ‘q’, or ‘z’.

  • cfrom – The denominator for the scale.

  • cto – The numerator for the scale.

  • m – The number of rows in the matrix.

  • n – The number of columns in the matrix.

  • A – The matrix being scaled.

  • lda – The leading dimension of the matrix.

Returns:

0 on success. If negative, then one of the parameters had an invalid value. The absolute value of the return indicates which parameter it was.