1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
     24
     25
     26
     27
     28
     29
     30
     31
     32
     33
     34
     35
     36
     37
     38
#ifndef ULMBLAS_IMPL_LEVEL1EXTENSIONS_DOTAXPY_TCC
#define ULMBLAS_IMPL_LEVEL1EXTENSIONS_DOTAXPY_TCC 1

#include <ulmblas/impl/level1extensions/dotaxpy.h>
#include <ulmblas/impl/level1extensions/kernel/dotaxpy.h>

namespace ulmBLAS {

//
//  Fuse the computations:
//  (1) $z \leftarrow z + \alpha x$
//  (2) $\rho = x^T y$
//
//  Arguments $x$, $x^T$ or $y$ can be conjugated in the computation
//
template <typename IndexType, typename Alpha, typename VX, typename VY,
          typename VZ, typename Rho>
void
dotaxpy(IndexType      n,
        bool           conjX,
        bool           conjXt,
        bool           conjY,
        const Alpha    &alpha,
        const VX       *x,
        IndexType      incX,
        const VY       *y,
        IndexType      incY,
        VZ             *z,
        IndexType      incZ,
        Rho            &rho)
{
    SELECT_DOTAXPY_KERNEL::dotaxpy(n, conjX, conjXt, conjY, alpha,
                                   x, incX, y, incY, z, incZ, rho);
}

// namespace ulmBLAS

#endif // ULMBLAS_IMPL_LEVEL1EXTENSIONS_DOTAXPY_TCC 1