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