# NAG FL Interfacef06hcf (zdscl)

## 1Purpose

f06hcf multiplies a complex vector by a complex diagonal matrix.

## 2Specification

Fortran Interface
 Subroutine f06hcf ( n, d, incd, x, incx)
 Integer, Intent (In) :: n, incd, incx Complex (Kind=nag_wp), Intent (In) :: d(*) Complex (Kind=nag_wp), Intent (Inout) :: x(*)
#include <nag.h>
 void f06hcf_ (const Integer *n, const Complex d[], const Integer *incd, Complex x[], const Integer *incx)
The routine may be called by the names f06hcf or nagf_blas_zdscl.

## 3Description

f06hcf performs the operation
 $x←Dx$
where $x$ is an $n$-element complex vector and $D=\mathrm{diag}\left(d\right)$ is a complex 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)$Complex (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)×\left|{\mathbf{incd}}\right|\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)$Complex (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)×\left|{\mathbf{incx}}\right|\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

f06hcf 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.