1 // SPDX-License-Identifier: Apache-2.0
2 //
3 // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
4 // Copyright 2008-2016 National ICT Australia (NICTA)
5 //
6 // Licensed under the Apache License, Version 2.0 (the "License");
7 // you may not use this file except in compliance with the License.
8 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 // ------------------------------------------------------------------------
17 
18 
19 //! \addtogroup op_cx_scalar
20 //! @{
21 
22 
23 
24 class op_cx_scalar_times
25   : public traits_op_passthru
26   {
27   public:
28 
29   template<typename T1>
30   inline static void
31   apply
32     (
33           Mat< typename std::complex<typename T1::pod_type> >& out,
34     const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_times>& X
35     );
36 
37   template<typename T1>
38   inline static void
39   apply
40     (
41              Cube< typename std::complex<typename T1::pod_type> >& out,
42     const mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_times>& X
43     );
44   };
45 
46 
47 
48 class op_cx_scalar_plus
49   : public traits_op_passthru
50   {
51   public:
52 
53   template<typename T1>
54   inline static void
55   apply
56     (
57           Mat< typename std::complex<typename T1::pod_type> >& out,
58     const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_plus>& X
59     );
60 
61   template<typename T1>
62   inline static void
63   apply
64     (
65              Cube< typename std::complex<typename T1::pod_type> >& out,
66     const mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_plus>& X
67     );
68   };
69 
70 
71 
72 class op_cx_scalar_minus_pre
73   : public traits_op_passthru
74   {
75   public:
76 
77   template<typename T1>
78   inline static void
79   apply
80     (
81           Mat< typename std::complex<typename T1::pod_type> >& out,
82     const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_minus_pre>& X
83     );
84 
85   template<typename T1>
86   inline static void
87   apply
88     (
89              Cube< typename std::complex<typename T1::pod_type> >& out,
90     const mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_minus_pre>& X
91     );
92   };
93 
94 
95 
96 class op_cx_scalar_minus_post
97   : public traits_op_passthru
98   {
99   public:
100 
101   template<typename T1>
102   inline static void
103   apply
104     (
105           Mat< typename std::complex<typename T1::pod_type> >& out,
106     const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_minus_post>& X
107     );
108 
109   template<typename T1>
110   inline static void
111   apply
112     (
113              Cube< typename std::complex<typename T1::pod_type> >& out,
114     const mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_minus_post>& X
115     );
116   };
117 
118 
119 
120 class op_cx_scalar_div_pre
121   : public traits_op_passthru
122   {
123   public:
124 
125   template<typename T1>
126   inline static void
127   apply
128     (
129           Mat< typename std::complex<typename T1::pod_type> >& out,
130     const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_div_pre>& X
131     );
132 
133   template<typename T1>
134   inline static void
135   apply
136     (
137              Cube< typename std::complex<typename T1::pod_type> >& out,
138     const mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_div_pre>& X
139     );
140   };
141 
142 
143 
144 class op_cx_scalar_div_post
145   : public traits_op_passthru
146   {
147   public:
148 
149   template<typename T1>
150   inline static void
151   apply
152     (
153           Mat< typename std::complex<typename T1::pod_type> >& out,
154     const mtOp<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_div_post>& X
155     );
156 
157   template<typename T1>
158   inline static void
159   apply
160     (
161              Cube< typename std::complex<typename T1::pod_type> >& out,
162     const mtOpCube<typename std::complex<typename T1::pod_type>, T1, op_cx_scalar_div_post>& X
163     );
164   };
165 
166 
167 
168 //! @}
169