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
     39
     40
     41
     42
     43
     44
     45
     46
     47
     48
     49
     50
     51
     52
     53
     54
#ifndef ULMBLAS_CXXBLAS_LEVEL1_SCAL_TCC
#define ULMBLAS_CXXBLAS_LEVEL1_SCAL_TCC 1

#include <ulmblas/cxxblas/level1/scal.h>
#include <ulmblas/impl/level1extensions/gescal.h>
#include <ulmblas/impl/level1/scal.h>
#include <ulmblas/impl/level1extensions/trlscal.h>
#include <ulmblas/impl/level1extensions/truscal.h>

namespace cxxblas {

template <typename IndexType, typename Alpha, typename VX>
void
scal(IndexType      n,
     const Alpha    &alpha,
     VX             *x,
     IndexType      incX)
{
    ulmBLAS::scal(n, alpha, x, incX);
}

template <typename IndexType, typename Alpha, typename MA>
void
gescal(IndexType    m,
       IndexType    n,
       const Alpha  &alpha,
       MA           *A,
       IndexType    incRowA,
       IndexType    incColA)
{
    ulmBLAS::gescal(m, n, alpha, A, incRowA, incColA);
}

template <typename IndexType, typename Alpha, typename MA>
void
trscal(IndexType    m,
       IndexType    n,
       const Alpha  &alpha,
       bool         lowerA,
       bool         unitDiagA,
       MA           *A,
       IndexType    incRowA,
       IndexType    incColA)
{
    if (lowerA) {
        ulmBLAS::trlscal(m, n, unitDiagA, alpha, A, incRowA, incColA);
    } else {
        ulmBLAS::truscal(m, n, unitDiagA, alpha, A, incRowA, incColA);
    }
}

// namespace cxxblas

#endif // ULMBLAS_CXXBLAS_LEVEL1_SCAL_TCC