mat_assign4.hpp 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. #ifndef BOOST_QVM_GEN_MAT_ASSIGN4_HPP_INCLUDED
  2. #define BOOST_QVM_GEN_MAT_ASSIGN4_HPP_INCLUDED
  3. // Copyright 2008-2022 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/config.hpp>
  8. #include <boost/qvm/enable_if.hpp>
  9. #include <boost/qvm/mat_traits.hpp>
  10. namespace boost { namespace qvm {
  11. template <class A,class B>
  12. BOOST_QVM_CONSTEXPR BOOST_QVM_INLINE_OPERATIONS
  13. typename enable_if_c<
  14. mat_traits<A>::rows==4 && mat_traits<B>::rows==4 &&
  15. mat_traits<A>::cols==4 && mat_traits<B>::cols==4,
  16. A &>::type
  17. assign( A & a, B const & b )
  18. {
  19. write_mat_element<0,0>(a,mat_traits<B>::template read_element<0,0>(b));
  20. write_mat_element<0,1>(a,mat_traits<B>::template read_element<0,1>(b));
  21. write_mat_element<0,2>(a,mat_traits<B>::template read_element<0,2>(b));
  22. write_mat_element<0,3>(a,mat_traits<B>::template read_element<0,3>(b));
  23. write_mat_element<1,0>(a,mat_traits<B>::template read_element<1,0>(b));
  24. write_mat_element<1,1>(a,mat_traits<B>::template read_element<1,1>(b));
  25. write_mat_element<1,2>(a,mat_traits<B>::template read_element<1,2>(b));
  26. write_mat_element<1,3>(a,mat_traits<B>::template read_element<1,3>(b));
  27. write_mat_element<2,0>(a,mat_traits<B>::template read_element<2,0>(b));
  28. write_mat_element<2,1>(a,mat_traits<B>::template read_element<2,1>(b));
  29. write_mat_element<2,2>(a,mat_traits<B>::template read_element<2,2>(b));
  30. write_mat_element<2,3>(a,mat_traits<B>::template read_element<2,3>(b));
  31. write_mat_element<3,0>(a,mat_traits<B>::template read_element<3,0>(b));
  32. write_mat_element<3,1>(a,mat_traits<B>::template read_element<3,1>(b));
  33. write_mat_element<3,2>(a,mat_traits<B>::template read_element<3,2>(b));
  34. write_mat_element<3,3>(a,mat_traits<B>::template read_element<3,3>(b));
  35. return a;
  36. }
  37. namespace
  38. sfinae
  39. {
  40. using ::boost::qvm::assign;
  41. }
  42. namespace
  43. qvm_detail
  44. {
  45. template <int R,int C>
  46. struct assign_mm_defined;
  47. template <>
  48. struct
  49. assign_mm_defined<4,4>
  50. {
  51. static bool const value=true;
  52. };
  53. }
  54. template <class A,class B>
  55. BOOST_QVM_CONSTEXPR BOOST_QVM_INLINE_OPERATIONS
  56. typename enable_if_c<
  57. mat_traits<A>::rows==4 && mat_traits<B>::rows==4 &&
  58. mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
  59. A &>::type
  60. assign( A & a, B const & b )
  61. {
  62. write_mat_element<0,0>(a,mat_traits<B>::template read_element<0,0>(b));
  63. write_mat_element<1,0>(a,mat_traits<B>::template read_element<1,0>(b));
  64. write_mat_element<2,0>(a,mat_traits<B>::template read_element<2,0>(b));
  65. write_mat_element<3,0>(a,mat_traits<B>::template read_element<3,0>(b));
  66. return a;
  67. }
  68. namespace
  69. sfinae
  70. {
  71. using ::boost::qvm::assign;
  72. }
  73. namespace
  74. qvm_detail
  75. {
  76. template <int R,int C>
  77. struct assign_mm_defined;
  78. template <>
  79. struct
  80. assign_mm_defined<4,1>
  81. {
  82. static bool const value=true;
  83. };
  84. }
  85. template <class A,class B>
  86. BOOST_QVM_CONSTEXPR BOOST_QVM_INLINE_OPERATIONS
  87. typename enable_if_c<
  88. mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
  89. mat_traits<A>::cols==4 && mat_traits<B>::cols==4,
  90. A &>::type
  91. assign( A & a, B const & b )
  92. {
  93. write_mat_element<0,0>(a,mat_traits<B>::template read_element<0,0>(b));
  94. write_mat_element<0,1>(a,mat_traits<B>::template read_element<0,1>(b));
  95. write_mat_element<0,2>(a,mat_traits<B>::template read_element<0,2>(b));
  96. write_mat_element<0,3>(a,mat_traits<B>::template read_element<0,3>(b));
  97. return a;
  98. }
  99. namespace
  100. sfinae
  101. {
  102. using ::boost::qvm::assign;
  103. }
  104. namespace
  105. qvm_detail
  106. {
  107. template <int R,int C>
  108. struct assign_mm_defined;
  109. template <>
  110. struct
  111. assign_mm_defined<1,4>
  112. {
  113. static bool const value=true;
  114. };
  115. }
  116. } }
  117. #endif