mat_assign3.hpp 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. #ifndef BOOST_QVM_GEN_MAT_ASSIGN3_HPP_INCLUDED
  2. #define BOOST_QVM_GEN_MAT_ASSIGN3_HPP_INCLUDED
  3. /// Copyright (c) 2008-2021 Emil Dotchevski and Reverge Studios, Inc.
  4. /// Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. /// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. /// This file was generated by a program. Do not edit manually.
  7. #include <boost/qvm/enable_if.hpp>
  8. #include <boost/qvm/inline.hpp>
  9. #include <boost/qvm/mat_traits.hpp>
  10. namespace boost { namespace qvm {
  11. template <class A,class B>
  12. BOOST_QVM_INLINE_OPERATIONS
  13. typename enable_if_c<
  14. mat_traits<A>::rows==3 && mat_traits<B>::rows==3 &&
  15. mat_traits<A>::cols==3 && mat_traits<B>::cols==3,
  16. A &>::type
  17. assign( A & a, B const & b )
  18. {
  19. mat_traits<A>::template write_element<0,0>(a)=mat_traits<B>::template read_element<0,0>(b);
  20. mat_traits<A>::template write_element<0,1>(a)=mat_traits<B>::template read_element<0,1>(b);
  21. mat_traits<A>::template write_element<0,2>(a)=mat_traits<B>::template read_element<0,2>(b);
  22. mat_traits<A>::template write_element<1,0>(a)=mat_traits<B>::template read_element<1,0>(b);
  23. mat_traits<A>::template write_element<1,1>(a)=mat_traits<B>::template read_element<1,1>(b);
  24. mat_traits<A>::template write_element<1,2>(a)=mat_traits<B>::template read_element<1,2>(b);
  25. mat_traits<A>::template write_element<2,0>(a)=mat_traits<B>::template read_element<2,0>(b);
  26. mat_traits<A>::template write_element<2,1>(a)=mat_traits<B>::template read_element<2,1>(b);
  27. mat_traits<A>::template write_element<2,2>(a)=mat_traits<B>::template read_element<2,2>(b);
  28. return a;
  29. }
  30. namespace
  31. sfinae
  32. {
  33. using ::boost::qvm::assign;
  34. }
  35. namespace
  36. qvm_detail
  37. {
  38. template <int R,int C>
  39. struct assign_mm_defined;
  40. template <>
  41. struct
  42. assign_mm_defined<3,3>
  43. {
  44. static bool const value=true;
  45. };
  46. }
  47. template <class A,class B>
  48. BOOST_QVM_INLINE_OPERATIONS
  49. typename enable_if_c<
  50. mat_traits<A>::rows==3 && mat_traits<B>::rows==3 &&
  51. mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
  52. A &>::type
  53. assign( A & a, B const & b )
  54. {
  55. mat_traits<A>::template write_element<0,0>(a)=mat_traits<B>::template read_element<0,0>(b);
  56. mat_traits<A>::template write_element<1,0>(a)=mat_traits<B>::template read_element<1,0>(b);
  57. mat_traits<A>::template write_element<2,0>(a)=mat_traits<B>::template read_element<2,0>(b);
  58. return a;
  59. }
  60. namespace
  61. sfinae
  62. {
  63. using ::boost::qvm::assign;
  64. }
  65. namespace
  66. qvm_detail
  67. {
  68. template <int R,int C>
  69. struct assign_mm_defined;
  70. template <>
  71. struct
  72. assign_mm_defined<3,1>
  73. {
  74. static bool const value=true;
  75. };
  76. }
  77. template <class A,class B>
  78. BOOST_QVM_INLINE_OPERATIONS
  79. typename enable_if_c<
  80. mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
  81. mat_traits<A>::cols==3 && mat_traits<B>::cols==3,
  82. A &>::type
  83. assign( A & a, B const & b )
  84. {
  85. mat_traits<A>::template write_element<0,0>(a)=mat_traits<B>::template read_element<0,0>(b);
  86. mat_traits<A>::template write_element<0,1>(a)=mat_traits<B>::template read_element<0,1>(b);
  87. mat_traits<A>::template write_element<0,2>(a)=mat_traits<B>::template read_element<0,2>(b);
  88. return a;
  89. }
  90. namespace
  91. sfinae
  92. {
  93. using ::boost::qvm::assign;
  94. }
  95. namespace
  96. qvm_detail
  97. {
  98. template <int R,int C>
  99. struct assign_mm_defined;
  100. template <>
  101. struct
  102. assign_mm_defined<1,3>
  103. {
  104. static bool const value=true;
  105. };
  106. }
  107. } }
  108. #endif