<T>LAPACK 0.1.1
C++ Template Linear Algebra PACKage
Loading...
Searching...
No Matches
scal.hpp
Go to the documentation of this file.
1
3//
4// Copyright (c) 2017-2021, University of Tennessee. All rights reserved.
5// Copyright (c) 2021-2023, University of Colorado Denver. All rights reserved.
6//
7// This file is part of <T>LAPACK.
8// <T>LAPACK is free software: you can redistribute it and/or modify it under
9// the terms of the BSD 3-Clause license. See the accompanying LICENSE file.
10
11#ifndef TLAPACK_LEGACY_SCAL_HH
12#define TLAPACK_LEGACY_SCAL_HH
13
14#include "tlapack/blas/scal.hpp"
17
18namespace tlapack {
19namespace legacy {
20
40 template <typename TA, typename TX>
41 void scal(idx_t n, const TA& alpha, TX* x, int_t incx)
42 {
44
45 // quick return
46 if (n <= 0) return;
47
49 return scal(alpha, x_));
50 }
51
52} // namespace legacy
53} // namespace tlapack
54
55#endif // #ifndef TLAPACK_LEGACY_SCAL_HH
#define tlapack_check_false(cond)
Throw an error if cond is true.
Definition exceptionHandling.hpp:113
void scal(idx_t n, const TA &alpha, TX *x, int_t incx)
Scale vector by constant, .
Definition scal.hpp:41
#define tlapack_expr_with_vector_positiveInc(x, TX, n, X, incx, expr)
Creates a vector object and executes an expression with it.
Definition utils.hpp:106
typename traits::real_type_traits< Types..., int >::type real_type
The common real type of the list of types.
Definition scalar_type_traits.hpp:113