eGlueCube_bones.hpp 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
  2. // Copyright 2008-2016 National ICT Australia (NICTA)
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. // ------------------------------------------------------------------------
  15. //! \addtogroup eGlueCube
  16. //! @{
  17. template<typename T1, typename T2, typename eglue_type>
  18. class eGlueCube : public BaseCube<typename T1::elem_type, eGlueCube<T1, T2, eglue_type> >
  19. {
  20. public:
  21. typedef typename T1::elem_type elem_type;
  22. typedef typename get_pod_type<elem_type>::result pod_type;
  23. static const bool use_at = (ProxyCube<T1>::use_at || ProxyCube<T2>::use_at );
  24. static const bool use_mp = (ProxyCube<T1>::use_mp || ProxyCube<T2>::use_mp );
  25. static const bool has_subview = (ProxyCube<T1>::has_subview || ProxyCube<T2>::has_subview);
  26. arma_aligned const ProxyCube<T1> P1;
  27. arma_aligned const ProxyCube<T2> P2;
  28. arma_inline ~eGlueCube();
  29. arma_inline eGlueCube(const T1& in_A, const T2& in_B);
  30. arma_inline uword get_n_rows() const;
  31. arma_inline uword get_n_cols() const;
  32. arma_inline uword get_n_elem_slice() const;
  33. arma_inline uword get_n_slices() const;
  34. arma_inline uword get_n_elem() const;
  35. arma_inline elem_type operator[] (const uword i) const;
  36. arma_inline elem_type at (const uword row, const uword col, const uword slice) const;
  37. arma_inline elem_type at_alt (const uword i) const;
  38. };
  39. //! @}