sdot(3S)
SDOT, DDOT, CDOTC, ZDOTC, CDOTU, ZDOTU - Computes a dot product (inner product) of two real or complex vectors
As shipped in IRIX 6.5.19. Last changed in IRIX 6.5.19.
NAME SDOT, DDOT, CDOTC, ZDOTC, CDOTU, ZDOTU - Computes a dot product (inner product) of two real or complex vectors SYNOPSIS Single precision Fortran: real SDOT real dot dot = SDOT (n, x, incx, y, incy) C/C++: #include <scsl_blas.h> float sdot(int n, float *x, int incx, float *y, int incy); Double precision Fortran: double precision DDOT double precision dot dot = DDOT (n, x, incx, y, incy) C/C++: #include <scsl_blas.h> double ddot(int n, double *x, int incx, double *y, int incy); Single precision complex Fortran: complex CDOTC CDOTU complex dot dot = CDOTC (n, x, incx, y, incy) dot = CDOTU (n, x, incx, y, incy) C/C++: #include <scsl_blas.h> scsl_complex cdotc(int n, scsl_complex *x, int incx, scsl_complex *y, int incy); scsl_complex cdotu(int n, scsl_complex *x, int incx, scsl_complex *y, int incy); C++ STL: #include <complex.h> #include <scsl_blas.h> complex<float> cdotc(int n, complex<float> *x, int incx, complex<float> *y, int incy); complex<float> cdotu(int n, complex<float> *x, int incx, complex<float> *y, int incy); Double precision complex Fortran: double complex ZDOTC ZDOTU double complex dot dot = ZDOTC (n, x, incx, y, incy) dot = ZDOTU (n, x, incx, y, incy) C/C++: #include <scsl_blas.h> scsl_zomplex zdotc(int n, scsl_zomplex *x, int incx, scsl_zomplex *y, int incy); scsl_zomplex zdotu(int n, scsl_zomplex *x, int incx, scsl_zomplex *y, int incy); C++ STL: #include <complex.h> #include <scsl_blas.h> complex<double> zdotc (int n, complex<double> *x, int incx, complex<double> *y, int incy); complex<double> zdotu (int n, complex<double> *x, int incx, complex<double> *y, int incy); IMPLEMENTATION These routines are part of the SCSL Scientific Library and can be loaded using either the -lscs or the -lscs_mp option. The -lscs_mp option directs the linker to use the multi-processor version of the library. When linking to SCSL with -lscs or -lscs_mp, the default integer size is 4 bytes (32 bits). Another version of SCSL is available in which integers are 8 bytes (64 bits). This version allows the user access to larger memory sizes and helps when porting legacy Cray codes. It can be loaded by using the -lscs_i8 option or the -lscs_i8_mp option. A program may use only one of the two versions; 4-byte integer and 8-byte integer library calls cannot be mixed. The C and C++ prototypes shown above are appropriate for the 4-byte integer version of SCSL. When using the 8-byte integer version, the variables of type int become long long and the <scsl_blas_i8.h> header file should be included. DESCRIPTION SDOT/DDOT computes a dot product of two real vectors (l2 real inner product). CDOTC/ZDOTC computes a dot product of the conjugate of a complex vector and another complex vector (l2 complex inner product). CDOTU/ZDOTU computes a dot product of two complex vectors. SDOT/DDOT and CDOTU/ZDOTU perform the following vector operation: T n dot <- x y = Sum x y i=1 i i where x and y are real or complex vectors, and xT is the transpose of x. CDOTC/ZDOTC performs the following vector operation: H n _ dot <- x y = Sum x y i=1 i i where x and y are complex vectors, and xH is the conjugate transpose of x. If n <= 0, dot is set to 0. See the NOTES section of this man page for information about the interpretation of the data types described in the following arguments. These functions have the following arguments: n Integer. (input) Number of elements in each vector. x Array of dimension (n-1) * |incx| + 1. (input) SDOT: Single precision array. DDOT: Double precision array. CDOTC, CDOTU: Single precision complex array. ZDOTC, CDOTU: Double precision complex array. Array x contains the first vector operand. incx Integer. (input) Increment between elements of x. If incx = 0, the results will be unpredictable. y Array of dimension (n-1) * |incy| + 1. (input) SDOT: Single precision array. DDOT: Double precision array. CDOTC, CDOTU: Single precision complex array. ZDOTC, ZDOTU: Double precision complex array. Array y contains the second vector operand. incy Integer. (input) Increment between elements of y. If incy = 0, the results will be unpredictable. NOTES These routines are Level 1 Basic Linear Algebra Subprograms (Level 1 BLAS). When working backward (incx < 0 or incy < 0), each routine starts at the end of the vector and moves backward, as follows: x(1-incx * (n-1)), x(1-incx * n-2)), ..., x(1) y(1-incy * (n-1)), y(1-incy * (n-2)), ..., y(1) Data Types The following data types are described in this documentation: Term Used Data type Fortran: Array dimensioned n x(n) Integer INTEGER (INTEGER*8 for -lscs_i8[_mp]) Character CHARACTER Single precision REAL Double precision DOUBLE PRECISION Single precision complex COMPLEX Double precision complex DOUBLE COMPLEX C/C++: Array dimensioned n x[n] Character char Integer int (long long for -lscs_i8[_mp]) Single precision float Double precision double Single precision complex scsl_complex Double precision complex scsl_zomplex C++ STL: Array dimensioned n x[n] Character char Integer int (long long for -lscs_i8[_mp]) Single precision float Double precision double Single precision complex complex<float> Double precision complex complex<double> SEE ALSO INTRO_SCSL(3S), INTRO_BLAS1(3S) INTRO_CBLAS(3S) for information about using the C interface to Fortran 77 Basic Linear Algebra Subprograms (legacy BLAS) set forth by the Basic Linear Algebra Subprograms Technical Forum.