mat_assign3.hpp 4.2 KB

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