TABLE OF CONTENTS


CmiscUtils/diagmvWrapper [ Functions ]

NAME

    diagmvWrapper --- Wrapper for Fortran call to diagmv

FUNCTION

Compute the element by element product of vectors v1 and v2. This is equivalent to computing diag(v1) %*% v2.

Wrapper for BLAS call to dsbmv for this special case.

SYNOPSIS

546 static inline void diagmvWrapper(int n, double *v1, double *v2, double *out)

INPUTS

    n     number of elements to multiply
    v1    first vector
    v2    second vector
    out   storage for output vector

SOURCE

550 {
551     int c1 = 1;
552     int c0 = 0;
553     double d1 = 1.0;
554     double d0 = 0.0;
555     char uplo = 'u';
556     F77_CALL(dsbmv)( &uplo, &n, &c0,
557         &d1, v1, &c1, 
558         v2, &c1,
559         &d0, out, &c1);
560 }