comparison armadillo-3.900.4/include/armadillo_bits/strip.hpp @ 49:1ec0e2823891

Switch to using subrepo copies of qm-dsp, nnls-chroma, vamp-plugin-sdk; update Armadillo version; assume build without external BLAS/LAPACK
author Chris Cannam
date Thu, 13 Jun 2013 10:25:24 +0100
parents
children
comparison
equal deleted inserted replaced
48:69251e11a913 49:1ec0e2823891
1 // Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
2 // Copyright (C) 2010-2012 Conrad Sanderson
3 //
4 // This Source Code Form is subject to the terms of the Mozilla Public
5 // License, v. 2.0. If a copy of the MPL was not distributed with this
6 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
8
9 //! \addtogroup strip
10 //! @{
11
12
13
14 template<typename T1>
15 struct strip_diagmat
16 {
17 typedef T1 stored_type;
18
19 arma_hot inline
20 strip_diagmat(const T1& X)
21 : M(X)
22 {
23 arma_extra_debug_sigprint();
24 }
25
26 static const bool do_diagmat = false;
27
28 const T1& M;
29 };
30
31
32
33 template<typename T1>
34 struct strip_diagmat< Op<T1, op_diagmat> >
35 {
36 typedef T1 stored_type;
37
38 arma_hot inline
39 strip_diagmat(const Op<T1, op_diagmat>& X)
40 : M(X.m)
41 {
42 arma_extra_debug_sigprint();
43 }
44
45 static const bool do_diagmat = true;
46
47 const T1& M;
48 };
49
50
51
52 template<typename T1>
53 struct strip_inv
54 {
55 typedef T1 stored_type;
56
57 arma_hot inline
58 strip_inv(const T1& X)
59 : M(X)
60 {
61 arma_extra_debug_sigprint();
62 }
63
64 const T1& M;
65
66 static const bool slow = false;
67 static const bool do_inv = false;
68 };
69
70
71
72 template<typename T1>
73 struct strip_inv< Op<T1, op_inv> >
74 {
75 typedef T1 stored_type;
76
77 arma_hot inline
78 strip_inv(const Op<T1, op_inv>& X)
79 : M(X.m)
80 , slow(X.aux_uword_a == 1)
81 {
82 arma_extra_debug_sigprint();
83 }
84
85 const T1& M;
86 const bool slow;
87
88 static const bool do_inv = true;
89 };
90
91
92
93 //! @}