comparison armadillo-3.900.4/include/armadillo_bits/op_strans_bones.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) 2008-2013 NICTA (www.nicta.com.au)
2 // Copyright (C) 2008-2013 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 op_strans
10 //! @{
11
12
13 //! 'matrix transpose' operation (simple transpose, ie. without taking the conjugate of the elements)
14
15 class op_strans
16 {
17 public:
18
19 template<const bool do_flip, const uword row, const uword col>
20 struct pos
21 {
22 static const uword n2 = (do_flip == false) ? (row + col*2) : (col + row*2);
23 static const uword n3 = (do_flip == false) ? (row + col*3) : (col + row*3);
24 static const uword n4 = (do_flip == false) ? (row + col*4) : (col + row*4);
25 };
26
27 template<typename eT, typename TA>
28 arma_hot inline static void apply_noalias_tinysq(Mat<eT>& out, const TA& A);
29
30 template<typename eT, typename TA>
31 arma_hot inline static void apply_noalias(Mat<eT>& out, const TA& A);
32
33 template<typename eT, typename TA>
34 arma_hot inline static void apply(Mat<eT>& out, const TA& A);
35
36 template<typename T1>
37 arma_hot inline static void apply_proxy(Mat<typename T1::elem_type>& out, const T1& X);
38
39 template<typename T1>
40 arma_hot inline static void apply(Mat<typename T1::elem_type>& out, const Op<T1,op_strans>& in);
41 };
42
43
44
45 class op_strans2
46 {
47 public:
48
49 template<const bool do_flip, const uword row, const uword col>
50 struct pos
51 {
52 static const uword n2 = (do_flip == false) ? (row + col*2) : (col + row*2);
53 static const uword n3 = (do_flip == false) ? (row + col*3) : (col + row*3);
54 static const uword n4 = (do_flip == false) ? (row + col*4) : (col + row*4);
55 };
56
57 template<typename eT, typename TA>
58 arma_hot inline static void apply_noalias_tinysq(Mat<eT>& out, const TA& A, const eT val);
59
60 template<typename eT, typename TA>
61 arma_hot inline static void apply_noalias(Mat<eT>& out, const TA& A, const eT val);
62
63 template<typename eT, typename TA>
64 arma_hot inline static void apply(Mat<eT>& out, const TA& A, const eT val);
65
66 template<typename T1>
67 arma_hot inline static void apply_proxy(Mat<typename T1::elem_type>& out, const T1& X, const typename T1::elem_type val);
68
69 // NOTE: there is no direct handling of Op<T1,op_strans2>, as op_strans2::apply_proxy() is currently only called by op_htrans2 for non-complex numbers
70 };
71
72
73
74 //! @}