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 fn_strans
20 //! @{
21 
22 
23 
24 template<typename T1>
25 arma_warn_unused
26 arma_inline
27 const Op<T1, op_strans>
strans(const T1 & X,const typename enable_if<is_arma_type<T1>::value>::result * junk1=nullptr,const typename arma_cx_only<typename T1::elem_type>::result * junk2=nullptr)28 strans
29   (
30   const T1& X,
31   const typename enable_if< is_arma_type<T1>::value >::result* junk1 = nullptr,
32   const typename arma_cx_only<typename T1::elem_type>::result* junk2 = nullptr
33   )
34   {
35   arma_extra_debug_sigprint();
36   arma_ignore(junk1);
37   arma_ignore(junk2);
38 
39   return Op<T1, op_strans>(X);
40   }
41 
42 
43 
44 // NOTE: for non-complex objects, deliberately returning op_htrans instead of op_strans,
45 // NOTE: due to currently more optimisations available when using op_htrans, especially by glue_times
46 template<typename T1>
47 arma_warn_unused
48 arma_inline
49 const Op<T1, op_htrans>
strans(const T1 & X,const typename enable_if<is_arma_type<T1>::value>::result * junk1=nullptr,const typename arma_not_cx<typename T1::elem_type>::result * junk2=nullptr)50 strans
51   (
52   const T1& X,
53   const typename enable_if< is_arma_type<T1>::value >::result* junk1 = nullptr,
54   const typename arma_not_cx<typename T1::elem_type>::result*  junk2 = nullptr
55   )
56   {
57   arma_extra_debug_sigprint();
58   arma_ignore(junk1);
59   arma_ignore(junk2);
60 
61   return Op<T1, op_htrans>(X);
62   }
63 
64 
65 
66 //
67 // handling of sparse matrices
68 
69 
70 template<typename T1>
71 arma_warn_unused
72 arma_inline
73 const SpOp<T1, spop_strans>
strans(const T1 & X,const typename enable_if<is_arma_sparse_type<T1>::value>::result * junk1=nullptr,const typename arma_cx_only<typename T1::elem_type>::result * junk2=nullptr)74 strans
75   (
76   const T1& X,
77   const typename enable_if< is_arma_sparse_type<T1>::value >::result* junk1 = nullptr,
78   const typename arma_cx_only<typename T1::elem_type>::result*        junk2 = nullptr
79   )
80   {
81   arma_extra_debug_sigprint();
82   arma_ignore(junk1);
83   arma_ignore(junk2);
84 
85   return SpOp<T1, spop_strans>(X);
86   }
87 
88 
89 
90 template<typename T1>
91 arma_warn_unused
92 arma_inline
93 const SpOp<T1, spop_htrans>
strans(const T1 & X,const typename enable_if<is_arma_sparse_type<T1>::value>::result * junk1=nullptr,const typename arma_not_cx<typename T1::elem_type>::result * junk2=nullptr)94 strans
95   (
96   const T1& X,
97   const typename enable_if< is_arma_sparse_type<T1>::value >::result* junk1 = nullptr,
98   const typename arma_not_cx<typename T1::elem_type>::result*         junk2 = nullptr
99   )
100   {
101   arma_extra_debug_sigprint();
102   arma_ignore(junk1);
103   arma_ignore(junk2);
104 
105   return SpOp<T1, spop_htrans>(X);
106   }
107 
108 
109 
110 //! @}
111