psb_norm2 -- 2-Norm of Vector

This function computes the 2-norm of a vector $x$.
If $x$ is a real vector it computes 2-norm as:

\begin{displaymath}nrm2 \leftarrow \sqrt{x^T x}\end{displaymath}

else if $x$ is a complex vector then it computes 2-norm as:

\begin{displaymath}nrm2 \leftarrow \sqrt{x^H x}\end{displaymath}


Table 8: Data types
$nrm2$ $x$ Function
Short Precision Real Short Precision Real psb_genrm2
Long Precision Real Long Precision Real psb_genrm2
Short Precision Real Short Precision Complex psb_genrm2
Long Precision Real Long Precision Complex psb_genrm2


psb_genrm2(x, desc_a, info)
psb_norm2(x, desc_a, info)

Type:
Synchronous.
On Entry
x
the local portion of global dense matrix $x$.
Scope: local
Type: required
Intent: in.
Specified as: a rank one or two array or an object of type vdatapsb_T_vect_type containing numbers of type specified in Table 8.
desc_a
contains data structures for communications.
Scope: local
Type: required
Intent: in.
Specified as: an object of type descdatapsb_desc_type.

On Return
Function Value
is the 2-norm of subvector $x$.
Scope: global
Type: required
Specified as: a long precision real number.
info
Error code.
Scope: local
Type: required
Intent: out.
An integer value; 0 means no error has been detected.