Chris@49
|
1 // Copyright (C) 2010-2012 NICTA (www.nicta.com.au)
|
Chris@49
|
2 // Copyright (C) 2010-2012 Conrad Sanderson
|
Chris@49
|
3 //
|
Chris@49
|
4 // This Source Code Form is subject to the terms of the Mozilla Public
|
Chris@49
|
5 // License, v. 2.0. If a copy of the MPL was not distributed with this
|
Chris@49
|
6 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
Chris@49
|
7
|
Chris@49
|
8
|
Chris@49
|
9 //! \addtogroup eglue_core
|
Chris@49
|
10 //! @{
|
Chris@49
|
11
|
Chris@49
|
12
|
Chris@49
|
13
|
Chris@49
|
14 template<typename eglue_type>
|
Chris@49
|
15 struct eglue_core
|
Chris@49
|
16 {
|
Chris@49
|
17
|
Chris@49
|
18 // matrices
|
Chris@49
|
19
|
Chris@49
|
20 template<typename T1, typename T2> arma_hot inline static void apply(Mat<typename T1::elem_type>& out, const eGlue<T1, T2, eglue_type>& x);
|
Chris@49
|
21
|
Chris@49
|
22 template<typename T1, typename T2> arma_hot inline static void apply_inplace_plus (Mat<typename T1::elem_type>& out, const eGlue<T1, T2, eglue_type>& x);
|
Chris@49
|
23 template<typename T1, typename T2> arma_hot inline static void apply_inplace_minus(Mat<typename T1::elem_type>& out, const eGlue<T1, T2, eglue_type>& x);
|
Chris@49
|
24 template<typename T1, typename T2> arma_hot inline static void apply_inplace_schur(Mat<typename T1::elem_type>& out, const eGlue<T1, T2, eglue_type>& x);
|
Chris@49
|
25 template<typename T1, typename T2> arma_hot inline static void apply_inplace_div (Mat<typename T1::elem_type>& out, const eGlue<T1, T2, eglue_type>& x);
|
Chris@49
|
26
|
Chris@49
|
27
|
Chris@49
|
28 // cubes
|
Chris@49
|
29
|
Chris@49
|
30 template<typename T1, typename T2> arma_hot inline static void apply(Cube<typename T1::elem_type>& out, const eGlueCube<T1, T2, eglue_type>& x);
|
Chris@49
|
31
|
Chris@49
|
32 template<typename T1, typename T2> arma_hot inline static void apply_inplace_plus (Cube<typename T1::elem_type>& out, const eGlueCube<T1, T2, eglue_type>& x);
|
Chris@49
|
33 template<typename T1, typename T2> arma_hot inline static void apply_inplace_minus(Cube<typename T1::elem_type>& out, const eGlueCube<T1, T2, eglue_type>& x);
|
Chris@49
|
34 template<typename T1, typename T2> arma_hot inline static void apply_inplace_schur(Cube<typename T1::elem_type>& out, const eGlueCube<T1, T2, eglue_type>& x);
|
Chris@49
|
35 template<typename T1, typename T2> arma_hot inline static void apply_inplace_div (Cube<typename T1::elem_type>& out, const eGlueCube<T1, T2, eglue_type>& x);
|
Chris@49
|
36 };
|
Chris@49
|
37
|
Chris@49
|
38
|
Chris@49
|
39
|
Chris@49
|
40 class eglue_plus : public eglue_core<eglue_plus>
|
Chris@49
|
41 {
|
Chris@49
|
42 public:
|
Chris@49
|
43
|
Chris@49
|
44 inline static const char* text() { return "addition"; }
|
Chris@49
|
45 };
|
Chris@49
|
46
|
Chris@49
|
47
|
Chris@49
|
48
|
Chris@49
|
49 class eglue_minus : public eglue_core<eglue_minus>
|
Chris@49
|
50 {
|
Chris@49
|
51 public:
|
Chris@49
|
52
|
Chris@49
|
53 inline static const char* text() { return "subtraction"; }
|
Chris@49
|
54 };
|
Chris@49
|
55
|
Chris@49
|
56
|
Chris@49
|
57
|
Chris@49
|
58 class eglue_div : public eglue_core<eglue_div>
|
Chris@49
|
59 {
|
Chris@49
|
60 public:
|
Chris@49
|
61
|
Chris@49
|
62 inline static const char* text() { return "element-wise division"; }
|
Chris@49
|
63 };
|
Chris@49
|
64
|
Chris@49
|
65
|
Chris@49
|
66
|
Chris@49
|
67 class eglue_schur : public eglue_core<eglue_schur>
|
Chris@49
|
68 {
|
Chris@49
|
69 public:
|
Chris@49
|
70
|
Chris@49
|
71 inline static const char* text() { return "element-wise multiplication"; }
|
Chris@49
|
72 };
|
Chris@49
|
73
|
Chris@49
|
74
|
Chris@49
|
75
|
Chris@49
|
76 //! @}
|