forward.h
Go to the documentation of this file.
1 /*
2  * This file is a part of TiledArray.
3  * Copyright (C) 2020 Virginia Tech
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * David Williams-Young
19  * Computational Research Division, Lawrence Berkeley National Laboratory
20  *
21  * svd.h
22  * Created: 12 June, 2020
23  *
24  */
25 #ifndef TILEDARRAY_MATH_LINALG_FORWARD_H__INCLUDED
26 #define TILEDARRAY_MATH_LINALG_FORWARD_H__INCLUDED
27 
28 #include <TiledArray/config.h>
29 #include <type_traits>
30 
31 #include <blas/util.hh>
32 
33 namespace TiledArray::math::linalg {
34 
35 using Op = ::blas::Op;
36 static constexpr auto NoTranspose = Op::NoTrans;
37 static constexpr auto Transpose = Op::Trans;
38 static constexpr auto ConjTranspose = Op::ConjTrans;
39 
42 inline auto to_int(Op op) {
43  if (op == NoTranspose)
44  return 0;
45  else if (op == Transpose)
46  return 1;
47  else // op == ConjTranspose
48  return 2;
49 }
50 
51 struct SVD {
53 };
54 
55 } // namespace TiledArray::math::linalg
56 
57 namespace TiledArray {
58 using TiledArray::math::linalg::ConjTranspose;
59 using TiledArray::math::linalg::NoTranspose;
61 using TiledArray::math::linalg::Transpose;
62 } // namespace TiledArray
63 
64 #endif // TILEDARRAY_MATH_LINALG_FORWARD_H__INCLUDED
auto to_int(Op op)
Definition: forward.h:42