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 eOp
20 //! @{
21 
22 
23 
24 template<typename T1, typename eop_type>
25 class eOp : public Base< typename T1::elem_type, eOp<T1, eop_type> >
26   {
27   public:
28 
29   typedef typename T1::elem_type                   elem_type;
30   typedef typename get_pod_type<elem_type>::result pod_type;
31   typedef          Proxy<T1>                       proxy_type;
32 
33   static constexpr bool use_at      = Proxy<T1>::use_at;
34   static constexpr bool use_mp      = Proxy<T1>::use_mp || eop_type::use_mp;
35   static constexpr bool has_subview = Proxy<T1>::has_subview;
36 
37   static constexpr bool is_row  = Proxy<T1>::is_row;
38   static constexpr bool is_col  = Proxy<T1>::is_col;
39   static constexpr bool is_xvec = Proxy<T1>::is_xvec;
40 
41   arma_aligned const Proxy<T1> P;
42 
43   arma_aligned       elem_type aux;          //!< storage of auxiliary data, user defined format
44   arma_aligned       uword     aux_uword_a;  //!< storage of auxiliary data, uword format
45   arma_aligned       uword     aux_uword_b;  //!< storage of auxiliary data, uword format
46 
47   inline         ~eOp();
48   inline explicit eOp(const T1& in_m);
49   inline          eOp(const T1& in_m, const elem_type in_aux);
50   inline          eOp(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b);
51   inline          eOp(const T1& in_m, const elem_type in_aux, const uword in_aux_uword_a, const uword in_aux_uword_b);
52 
53   arma_inline uword get_n_rows() const;
54   arma_inline uword get_n_cols() const;
55   arma_inline uword get_n_elem() const;
56 
57   arma_inline elem_type operator[] (const uword ii)                   const;
58   arma_inline elem_type at         (const uword row, const uword col) const;
59   arma_inline elem_type at_alt     (const uword ii)                   const;
60   };
61 
62 
63 
64 //! @}
65