# NAG FL Interfacef06fcf (ddscl)

## ▸▿ Contents

Settings help

FL Name Style:

FL Specification Language:

## 1Purpose

f06fcf multiplies a real vector by a real diagonal matrix.

## 2Specification

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(*)
#include <nag.h>
 void f06fcf_ (const Integer *n, const double d[], const Integer *incd, double x[], const Integer *incx)
The routine may be called by the names f06fcf or nagf_blas_ddscl.

## 3Description

f06fcf performs the operation
 $x←Dx$
where $x$ is an $n$-element real vector and $D=\mathrm{diag}\left(d\right)$ 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.$

None.

## 5Arguments

1: $\mathbf{n}$Integer Input
On entry: $n$, the number of elements in $d$ and $x$.
2: $\mathbf{d}\left(*\right)$Real (Kind=nag_wp) array Input
Note: the dimension of the array d must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,1+\left({\mathbf{n}}-1\right)×|{\mathbf{incd}}|\right)$.
On entry: the vector $d$.
If ${\mathbf{incd}}>0$, ${d}_{\mathit{i}}$ must be stored in ${\mathbf{d}}\left(\left(\mathit{i}-1\right)×{\mathbf{incd}}+1\right)$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$.
If ${\mathbf{incd}}<0$, ${d}_{\mathit{i}}$ must be stored in ${\mathbf{d}}\left(1-\left({\mathbf{n}}-\mathit{i}\right)×{\mathbf{incd}}\right)$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$.
3: $\mathbf{incd}$Integer Input
On entry: the increment in the subscripts of d between successive elements of $d$.
4: $\mathbf{x}\left(*\right)$Real (Kind=nag_wp) array Input/Output
Note: the dimension of the array x must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,1+\left({\mathbf{n}}-1\right)×|{\mathbf{incx}}|\right)$.
On entry: the array x must contain the $n$-element vector $x$.
If ${\mathbf{incx}}>0$, ${x}_{\mathit{i}}$ must be stored in ${\mathbf{x}}\left(1+\left(\mathit{i}-1\right)×{\mathbf{incx}}\right)$, for $\mathit{i}=1,2,\dots ,{\mathbf{n}}$.
If ${\mathbf{incx}}<0$, ${x}_{\mathit{i}}$ must be stored in ${\mathbf{x}}\left(1-\left({\mathbf{n}}-\mathit{i}\right)×{\mathbf{incx}}\right)$, for $\mathit{i}=1,2,\dots ,{\mathbf{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: $\mathbf{incx}$Integer Input
On entry: the increment in the subscripts of x between successive elements of $x$.

None.

Not applicable.

## 8Parallelism 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.