mtSpOp_meat.hpp 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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 mtSpOp
  16. //! @{
  17. template<typename out_eT, typename T1, typename op_type>
  18. inline
  19. mtSpOp<out_eT, T1, op_type>::mtSpOp(const T1& in_m)
  20. : m(in_m)
  21. {
  22. arma_extra_debug_sigprint();
  23. }
  24. template<typename out_eT, typename T1, typename op_type>
  25. inline
  26. mtSpOp<out_eT, T1, op_type>::mtSpOp(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b)
  27. : m(in_m)
  28. , aux_uword_a(in_aux_uword_a)
  29. , aux_uword_b(in_aux_uword_b)
  30. {
  31. arma_extra_debug_sigprint();
  32. }
  33. template<typename out_eT, typename T1, typename op_type>
  34. inline
  35. mtSpOp<out_eT, T1, op_type>::mtSpOp(const char junk, const T1& in_m, const out_eT in_aux)
  36. : m(in_m)
  37. , aux_out_eT(in_aux)
  38. {
  39. arma_ignore(junk);
  40. arma_extra_debug_sigprint();
  41. }
  42. template<typename out_eT, typename T1, typename op_type>
  43. inline
  44. mtSpOp<out_eT, T1, op_type>::~mtSpOp()
  45. {
  46. arma_extra_debug_sigprint();
  47. }
  48. template<typename out_eT, typename T1, typename op_type>
  49. template<typename eT2>
  50. arma_inline
  51. bool
  52. mtSpOp<out_eT, T1, op_type>::is_alias(const SpMat<eT2>& X) const
  53. {
  54. return (void_ptr(&X) == void_ptr(&m));
  55. }
  56. //! @}