<T>LAPACK 0.1.1
C++ Template Linear Algebra PACKage
Loading...
Searching...
No Matches
conjugate.hpp
Go to the documentation of this file.
1
3//
4// Copyright (c) 2021-2023, University of Colorado Denver. All rights reserved.
5//
6// This file is part of <T>LAPACK.
7// <T>LAPACK is free software: you can redistribute it and/or modify it under
8// the terms of the BSD 3-Clause license. See the accompanying LICENSE file.
9
10#ifndef TLAPACK_CONJUGATE_HH
11#define TLAPACK_CONJUGATE_HH
12
14
15namespace tlapack {
16
23template <TLAPACK_VECTOR vector_t>
25{
26 using idx_t = size_type<vector_t>;
27 using tlapack::conj;
28
29 for (idx_t i = 0; i < size(x); ++i) {
30 x[i] = conj(x[i]);
31 }
32}
33
34} // namespace tlapack
35
36#endif // TLAPACK_CONJUGATE_HH
constexpr T conj(const T &x) noexcept
Extends std::conj() to real datatypes.
Definition utils.hpp:100
void conjugate(vector_t &x)
Conjugates a vector.
Definition conjugate.hpp:24
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