-
Notifications
You must be signed in to change notification settings - Fork 296
/
cblas_option.hpp
85 lines (68 loc) · 1.8 KB
/
cblas_option.hpp
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
//
// Copyright (c) 2009 Rutger ter Borg
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef BOOST_NUMERIC_BINDINGS_BLAS_DETAIL_CBLAS_OPTION_HPP
#define BOOST_NUMERIC_BINDINGS_BLAS_DETAIL_CBLAS_OPTION_HPP
#include <Core/Utils/numeric/bindings/blas/detail/cblas.h>
#include <Core/Utils/numeric/bindings/tag.hpp>
namespace boost {
namespace numeric {
namespace bindings {
namespace blas {
namespace detail {
template< typename Tag >
struct cblas_option {};
template<>
struct cblas_option< tag::row_major > {
static const CBLAS_ORDER value = CblasRowMajor;
};
template<>
struct cblas_option< tag::column_major > {
static const CBLAS_ORDER value = CblasColMajor;
};
template<>
struct cblas_option< tag::transpose > {
static const CBLAS_TRANSPOSE value = CblasTrans;
};
template<>
struct cblas_option< tag::no_transpose > {
static const CBLAS_TRANSPOSE value = CblasNoTrans;
};
template<>
struct cblas_option< tag::conjugate > {
static const CBLAS_TRANSPOSE value = CblasConjTrans;
};
template<>
struct cblas_option< tag::upper > {
static const CBLAS_UPLO value = CblasUpper;
};
template<>
struct cblas_option< tag::lower > {
static const CBLAS_UPLO value = CblasLower;
};
template<>
struct cblas_option< tag::unit > {
static const CBLAS_DIAG value = CblasUnit;
};
template<>
struct cblas_option< tag::non_unit > {
static const CBLAS_DIAG value = CblasNonUnit;
};
template<>
struct cblas_option< tag::left > {
static const CBLAS_SIDE value = CblasLeft;
};
template<>
struct cblas_option< tag::right > {
static const CBLAS_SIDE value = CblasRight;
};
} // namespace detail
} // namespace blas
} // namespace bindings
} // namespace numeric
} // namespace boost
#endif