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 eOpCube
20 //! @{
21 
22 
23 
24 template<typename T1, typename eop_type>
25 class eOpCube : public BaseCube< typename T1::elem_type, eOpCube<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 
32   static constexpr bool use_at      = ProxyCube<T1>::use_at;
33   static constexpr bool use_mp      = ProxyCube<T1>::use_mp || eop_type::use_mp;
34   static constexpr bool has_subview = ProxyCube<T1>::has_subview;
35 
36   arma_aligned const ProxyCube<T1> P;
37   arma_aligned       elem_type     aux;          //!< storage of auxiliary data, user defined format
38   arma_aligned       uword         aux_uword_a;  //!< storage of auxiliary data, uword format
39   arma_aligned       uword         aux_uword_b;  //!< storage of auxiliary data, uword format
40   arma_aligned       uword         aux_uword_c;  //!< storage of auxiliary data, uword format
41 
42   inline         ~eOpCube();
43   inline explicit eOpCube(const BaseCube<typename T1::elem_type, T1>& in_m);
44   inline          eOpCube(const BaseCube<typename T1::elem_type, T1>& in_m, const elem_type in_aux);
45   inline          eOpCube(const BaseCube<typename T1::elem_type, T1>& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b);
46   inline          eOpCube(const BaseCube<typename T1::elem_type, T1>& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b, const uword in_aux_uword_c);
47   inline          eOpCube(const BaseCube<typename T1::elem_type, T1>& in_m, const elem_type in_aux, const uword in_aux_uword_a, const uword in_aux_uword_b, const uword in_aux_uword_c);
48 
49   arma_inline uword get_n_rows()       const;
50   arma_inline uword get_n_cols()       const;
51   arma_inline uword get_n_elem_slice() const;
52   arma_inline uword get_n_slices()     const;
53   arma_inline uword get_n_elem()       const;
54 
55   arma_inline elem_type operator[] (const uword i)                                       const;
56   arma_inline elem_type at         (const uword row, const uword col, const uword slice) const;
57   arma_inline elem_type at_alt     (const uword i)                                       const;
58   };
59 
60 
61 
62 //! @}
63