NAG Library Routine Document

f06fcf (ddscl)

1
Purpose

f06fcf multiplies a real vector by a real diagonal matrix.

2
Specification

Fortran Interface
Subroutine f06fcf ( n, d, incd, x, incx)
Integer, Intent (In):: n, incd, incx
Real (Kind=nag_wp), Intent (In):: d(*)
Real (Kind=nag_wp), Intent (Inout):: x(*)
C Header Interface
#include <nagmk26.h>
void  f06fcf_ (const Integer *n, const double d[], const Integer *incd, double x[], const Integer *incx)

3
Description

f06fcf performs the operation
xDx  
where x is an n-element real vector and D=diagd is a real diagonal matrix.
Equivalently, the routine performs the element-by-element product of the vectors x and d 
xi=dixi,   i=1,2,,n.  

4
References

None.

5
Arguments

1:     n – IntegerInput
On entry: n, the number of elements in d and x.
2:     d* – Real (Kind=nag_wp) arrayInput
Note: the dimension of the array d must be at least max1, 1+n-1 ×incd .
On entry: the vector d.
If incd>0, di must be stored in di-1×incd+1 , for i=1,2,,n.
If incd<0, di must be stored in d 1-n-i×incd , for i=1,2,,n.
3:     incd – IntegerInput
On entry: the increment in the subscripts of d between successive elements of d.
4:     x* – Real (Kind=nag_wp) arrayInput/Output
Note: the dimension of the array x must be at least max1, 1+n-1 ×incx .
On entry: the array x must contain the n-element vector x.
If incx>0, xi must be stored in x 1+i-1×incx , for i=1,2,,n.
If incx<0, xi must be stored in x1-n-i×incx , for i=1,2,,n.
On exit: the updated vector x stored in the array elements used to supply the original vector x.
Intermediate elements of x are unchanged.
5:     incx – IntegerInput
On entry: the increment in the subscripts of x between successive elements of x.

6
Error Indicators and Warnings

None.

7
Accuracy

Not applicable.

8
Parallelism and Performance

f06fcf makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

9
Further Comments

None.

10
Example

None.