Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:50:43

0001 #ifndef BOOST_QVM_GEN_MAT_ASSIGN4_HPP_INCLUDED
0002 #define BOOST_QVM_GEN_MAT_ASSIGN4_HPP_INCLUDED
0003 
0004 // Copyright 2008-2022 Emil Dotchevski and Reverge Studios, Inc.
0005 
0006 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0007 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0008 
0009 // This file was generated by a program. Do not edit manually.
0010 
0011 #include <boost/qvm/config.hpp>
0012 #include <boost/qvm/enable_if.hpp>
0013 #include <boost/qvm/mat_traits.hpp>
0014 
0015 namespace boost { namespace qvm {
0016 
0017 template <class A,class B>
0018 BOOST_QVM_CONSTEXPR BOOST_QVM_INLINE_OPERATIONS
0019 typename enable_if_c<
0020     mat_traits<A>::rows==4 && mat_traits<B>::rows==4 &&
0021     mat_traits<A>::cols==4 && mat_traits<B>::cols==4,
0022     A &>::type
0023 assign( A & a, B const & b )
0024     {
0025     write_mat_element<0,0>(a,mat_traits<B>::template read_element<0,0>(b));
0026     write_mat_element<0,1>(a,mat_traits<B>::template read_element<0,1>(b));
0027     write_mat_element<0,2>(a,mat_traits<B>::template read_element<0,2>(b));
0028     write_mat_element<0,3>(a,mat_traits<B>::template read_element<0,3>(b));
0029     write_mat_element<1,0>(a,mat_traits<B>::template read_element<1,0>(b));
0030     write_mat_element<1,1>(a,mat_traits<B>::template read_element<1,1>(b));
0031     write_mat_element<1,2>(a,mat_traits<B>::template read_element<1,2>(b));
0032     write_mat_element<1,3>(a,mat_traits<B>::template read_element<1,3>(b));
0033     write_mat_element<2,0>(a,mat_traits<B>::template read_element<2,0>(b));
0034     write_mat_element<2,1>(a,mat_traits<B>::template read_element<2,1>(b));
0035     write_mat_element<2,2>(a,mat_traits<B>::template read_element<2,2>(b));
0036     write_mat_element<2,3>(a,mat_traits<B>::template read_element<2,3>(b));
0037     write_mat_element<3,0>(a,mat_traits<B>::template read_element<3,0>(b));
0038     write_mat_element<3,1>(a,mat_traits<B>::template read_element<3,1>(b));
0039     write_mat_element<3,2>(a,mat_traits<B>::template read_element<3,2>(b));
0040     write_mat_element<3,3>(a,mat_traits<B>::template read_element<3,3>(b));
0041     return a;
0042     }
0043 
0044 namespace
0045 sfinae
0046     {
0047     using ::boost::qvm::assign;
0048     }
0049 
0050 namespace
0051 qvm_detail
0052     {
0053     template <int R,int C>
0054     struct assign_mm_defined;
0055 
0056     template <>
0057     struct
0058     assign_mm_defined<4,4>
0059         {
0060         static bool const value=true;
0061         };
0062     }
0063 
0064 template <class A,class B>
0065 BOOST_QVM_CONSTEXPR BOOST_QVM_INLINE_OPERATIONS
0066 typename enable_if_c<
0067     mat_traits<A>::rows==4 && mat_traits<B>::rows==4 &&
0068     mat_traits<A>::cols==1 && mat_traits<B>::cols==1,
0069     A &>::type
0070 assign( A & a, B const & b )
0071     {
0072     write_mat_element<0,0>(a,mat_traits<B>::template read_element<0,0>(b));
0073     write_mat_element<1,0>(a,mat_traits<B>::template read_element<1,0>(b));
0074     write_mat_element<2,0>(a,mat_traits<B>::template read_element<2,0>(b));
0075     write_mat_element<3,0>(a,mat_traits<B>::template read_element<3,0>(b));
0076     return a;
0077     }
0078 
0079 namespace
0080 sfinae
0081     {
0082     using ::boost::qvm::assign;
0083     }
0084 
0085 namespace
0086 qvm_detail
0087     {
0088     template <int R,int C>
0089     struct assign_mm_defined;
0090 
0091     template <>
0092     struct
0093     assign_mm_defined<4,1>
0094         {
0095         static bool const value=true;
0096         };
0097     }
0098 
0099 template <class A,class B>
0100 BOOST_QVM_CONSTEXPR BOOST_QVM_INLINE_OPERATIONS
0101 typename enable_if_c<
0102     mat_traits<A>::rows==1 && mat_traits<B>::rows==1 &&
0103     mat_traits<A>::cols==4 && mat_traits<B>::cols==4,
0104     A &>::type
0105 assign( A & a, B const & b )
0106     {
0107     write_mat_element<0,0>(a,mat_traits<B>::template read_element<0,0>(b));
0108     write_mat_element<0,1>(a,mat_traits<B>::template read_element<0,1>(b));
0109     write_mat_element<0,2>(a,mat_traits<B>::template read_element<0,2>(b));
0110     write_mat_element<0,3>(a,mat_traits<B>::template read_element<0,3>(b));
0111     return a;
0112     }
0113 
0114 namespace
0115 sfinae
0116     {
0117     using ::boost::qvm::assign;
0118     }
0119 
0120 namespace
0121 qvm_detail
0122     {
0123     template <int R,int C>
0124     struct assign_mm_defined;
0125 
0126     template <>
0127     struct
0128     assign_mm_defined<1,4>
0129         {
0130         static bool const value=true;
0131         };
0132     }
0133 
0134 } }
0135 
0136 #endif