F16ECF (BLAS_DAXPBY) (PDF version)
F16 Chapter Contents
F16 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

F16ECF (BLAS_DAXPBY)

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

 Contents

    1  Purpose
    7  Accuracy

1  Purpose

F16ECF (BLAS_DAXPBY) computes the sum of two scaled vectors, for real vectors and scalars.

2  Specification

SUBROUTINE F16ECF ( N, ALPHA, X, INCX, BETA, Y, INCY)
INTEGER  N, INCX, INCY
REAL (KIND=nag_wp)  ALPHA, X(1+(N-1)*ABS(INCX)), BETA, Y(1+(N-1)*ABS(INCY))
The routine may be called by its BLAST name blas_daxpby.

3  Description

F16ECF (BLAS_DAXPBY) performs the operation
yα x+β y  
where x and y are n-element real vectors, and α and β real scalars. If n is equal to zero, or if α is equal to zero and β is equal to 1, this routine returns immediately.

4  References

Basic Linear Algebra Subprograms Technical (BLAST) Forum (2001) Basic Linear Algebra Subprograms Technical (BLAST) Forum Standard University of Tennessee, Knoxville, Tennessee http://www.netlib.org/blas/blast-forum/blas-report.pdf

5  Parameters

1:     N – INTEGERInput
On entry: n, the number of elements in x and y.
2:     ALPHA – REAL (KIND=nag_wp)Input
On entry: the scalar α.
3:     X1+N-1×INCX – REAL (KIND=nag_wp) arrayInput
On entry: the n-element vector x.
If INCX>0, xi must be stored in Xi-1×INCX+1, for i=1,2,,N.
If INCX<0, xi must be stored in XN-i×INCX-1, for i=1,2,,N.
Intermediate elements of X are not referenced.
4:     INCX – INTEGERInput
On entry: the increment in the subscripts of X between successive elements of x.
Constraint: INCX0.
5:     BETA – REAL (KIND=nag_wp)Input
On entry: the scalar β.
6:     Y1+N-1×INCY – REAL (KIND=nag_wp) arrayInput/Output
On entry: the n-element vector y.
If INCY>0, yi must be stored in Y1+i-1×INCY, for i=1,2,,N.
If INCY<0, yi must be stored in Y1-N-i×INCY, for i=1,2,,N.
Intermediate elements of Y are not referenced.
On exit: the updated vector y stored in the array elements used to supply the original vector y.
Intermediate elements of Y are unchanged.
7:     INCY – INTEGERInput
On entry: the increment in the subscripts of Y between successive elements of y.
Constraint: INCY0.

6  Error Indicators and Warnings

If INCX=0 or INCY=0, an error message is printed and program execution is terminated.

7  Accuracy

The BLAS standard requires accurate implementations which avoid unnecessary over/underflow (see Section 2.7 of Basic Linear Algebra Subprograms Technical (BLAST) Forum (2001)).

8  Parallelism and Performance

F16ECF (BLAS_DAXPBY) is not threaded by NAG in any implementation.
F16ECF (BLAS_DAXPBY) 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

This example computes the result of a scaled vector accumulation for
α=3,   x = -4,2.1,3.7,4.5,-6T , β=-1,   y = -3,-2.4,6.4,-5,-5.1T .  

10.1  Program Text

Program Text (f16ecfe.f90)

10.2  Program Data

Program Data (f16ecfe.d)

10.3  Program Results

Program Results (f16ecfe.r)


F16ECF (BLAS_DAXPBY) (PDF version)
F16 Chapter Contents
F16 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2015