-
Notifications
You must be signed in to change notification settings - Fork 298
/
diag_tag.hpp
56 lines (43 loc) · 1.18 KB
/
diag_tag.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
//
// 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_DIAG_TAG_HPP
#define BOOST_NUMERIC_BINDINGS_DIAG_TAG_HPP
#include <Core/Utils/numeric/bindings/tag.hpp>
#include <Core/Utils/numeric/bindings/detail/property_map.hpp>
namespace boost {
namespace numeric {
namespace bindings {
namespace detail {
template< typename T >
struct diag_tag_impl {
typedef tag::non_unit type;
};
template<>
struct diag_tag_impl< tag::unit_triangular > {
typedef tag::unit type;
};
} // namespace detail
namespace result_of {
template< typename T >
struct diag_tag {
typedef typename detail::diag_tag_impl<
typename detail::property_at< T, tag::matrix_type >::type
>::type type;
};
} // namespace result_of
//
// diag_tag will output tags that are compatible with BLAS and LAPACK
//
template< typename T, typename Order >
typename result_of::diag_tag< T >::type diag_tag( const T& t ) {
return result_of::diag_tag< T >::type();
}
} // namespace bindings
} // namespace numeric
} // namespace boost
#endif