lassq#
Functions
-
void slassq(const INT n, const f32 *restrict X, const INT incx, f32 *scale, f32 *sumsq)#
SLASSQ returns the values scale_out and sumsq_out such that.
(scale_out**2)*sumsq_out = x(1)**2 +…+ x(n)**2 + (scale**2)*sumsq,
where x(i) = X[incx * i] for 0 <= i < n (0-based indexing). The value of sumsq is assumed to be non-negative.
scale and sumsq must be supplied in SCALE and SUMSQ and scale_out and sumsq_out are overwritten on SCALE and SUMSQ respectively.
This routine uses the “Blue” algorithm for safe scaling, as described in: Anderson E. (2017) Algorithm 978: Safe Scaling in the Level 1 BLAS ACM Trans Math Softw 44:1—28
Parameters
innThe number of elements to be used from the vector x.
inXThe vector for which a scaled sum of squares is computed. Array of dimension (1 + (n-1)*abs(incx)).
inincxThe increment between successive values of the vector x. If incx > 0, X[incx * i] = x(i) for 0 <= i < n. If incx < 0, X[incx * (n-1-i)] = x(i) for 0 <= i < n. If incx = 0, x isn’t a vector so there is no need to call this subroutine. If you call it anyway, it will count x(0) in the vector norm n times.
inoutscaleOn entry, the value scale in the equation above. On exit, SCALE is overwritten by scale_out, the scaling factor for the sum of squares.
inoutsumsqOn entry, the value sumsq in the equation above. On exit, SUMSQ is overwritten by sumsq_out, the basic sum of squares from which scale_out has been factored out.
void slassq(
const INT n,
const f32* restrict X,
const INT incx,
f32* scale,
f32* sumsq
);
Functions
-
void dlassq(const INT n, const f64 *restrict X, const INT incx, f64 *scale, f64 *sumsq)#
DLASSQ returns the values scale_out and sumsq_out such that.
(scale_out**2)*sumsq_out = x(1)**2 +…+ x(n)**2 + (scale**2)*sumsq,
where x(i) = X[incx * i] for 0 <= i < n (0-based indexing). The value of sumsq is assumed to be non-negative.
scale and sumsq must be supplied in SCALE and SUMSQ and scale_out and sumsq_out are overwritten on SCALE and SUMSQ respectively.
This routine uses the “Blue” algorithm for safe scaling, as described in: Anderson E. (2017) Algorithm 978: Safe Scaling in the Level 1 BLAS ACM Trans Math Softw 44:1—28
Parameters
innThe number of elements to be used from the vector x.
inXThe vector for which a scaled sum of squares is computed. Array of dimension (1 + (n-1)*abs(incx)).
inincxThe increment between successive values of the vector x. If incx > 0, X[incx * i] = x(i) for 0 <= i < n. If incx < 0, X[incx * (n-1-i)] = x(i) for 0 <= i < n. If incx = 0, x isn’t a vector so there is no need to call this subroutine. If you call it anyway, it will count x(0) in the vector norm n times.
inoutscaleOn entry, the value scale in the equation above. On exit, SCALE is overwritten by scale_out, the scaling factor for the sum of squares.
inoutsumsqOn entry, the value sumsq in the equation above. On exit, SUMSQ is overwritten by sumsq_out, the basic sum of squares from which scale_out has been factored out.
void dlassq(
const INT n,
const f64* restrict X,
const INT incx,
f64* scale,
f64* sumsq
);
Functions
-
void classq(const INT n, const c64 *restrict X, const INT incx, f32 *scale, f32 *sumsq)#
CLASSQ returns the values scale_out and sumsq_out such that.
(scale_out**2)*sumsq_out = x(1)**2 +…+ x(n)**2 + (scale**2)*sumsq,
where x(i) = X[incx * i] for 0 <= i < n (0-based indexing). The value of sumsq is assumed to be non-negative.
scale and sumsq must be supplied in SCALE and SUMSQ and scale_out and sumsq_out are overwritten on SCALE and SUMSQ respectively.
This routine uses the “Blue” algorithm for safe scaling, as described in: Anderson E. (2017) Algorithm 978: Safe Scaling in the Level 1 BLAS ACM Trans Math Softw 44:1—28
Parameters
innThe number of elements to be used from the vector x.
inXThe vector for which a scaled sum of squares is computed. Array of dimension (1 + (n-1)*abs(incx)).
inincxThe increment between successive values of the vector x. If incx > 0, X[incx * i] = x(i) for 0 <= i < n. If incx < 0, X[incx * (n-1-i)] = x(i) for 0 <= i < n. If incx = 0, x isn’t a vector so there is no need to call this subroutine. If you call it anyway, it will count x(0) in the vector norm n times.
inoutscaleOn entry, the value scale in the equation above. On exit, SCALE is overwritten by scale_out, the scaling factor for the sum of squares.
inoutsumsqOn entry, the value sumsq in the equation above. On exit, SUMSQ is overwritten by sumsq_out, the basic sum of squares from which scale_out has been factored out.
void classq(
const INT n,
const c64* restrict X,
const INT incx,
f32* scale,
f32* sumsq
);
Functions
-
void zlassq(const INT n, const c128 *restrict X, const INT incx, f64 *scale, f64 *sumsq)#
ZLASSQ returns the values scale_out and sumsq_out such that.
(scale_out**2)*sumsq_out = x(1)**2 +…+ x(n)**2 + (scale**2)*sumsq,
where x(i) = X[incx * i] for 0 <= i < n (0-based indexing). The value of sumsq is assumed to be non-negative.
scale and sumsq must be supplied in SCALE and SUMSQ and scale_out and sumsq_out are overwritten on SCALE and SUMSQ respectively.
This routine uses the “Blue” algorithm for safe scaling, as described in: Anderson E. (2017) Algorithm 978: Safe Scaling in the Level 1 BLAS ACM Trans Math Softw 44:1—28
Parameters
innThe number of elements to be used from the vector x.
inXThe vector for which a scaled sum of squares is computed. Array of dimension (1 + (n-1)*abs(incx)).
inincxThe increment between successive values of the vector x. If incx > 0, X[incx * i] = x(i) for 0 <= i < n. If incx < 0, X[incx * (n-1-i)] = x(i) for 0 <= i < n. If incx = 0, x isn’t a vector so there is no need to call this subroutine. If you call it anyway, it will count x(0) in the vector norm n times.
inoutscaleOn entry, the value scale in the equation above. On exit, SCALE is overwritten by scale_out, the scaling factor for the sum of squares.
inoutsumsqOn entry, the value sumsq in the equation above. On exit, SUMSQ is overwritten by sumsq_out, the basic sum of squares from which scale_out has been factored out.
void zlassq(
const INT n,
const c128* restrict X,
const INT incx,
f64* scale,
f64* sumsq
);