]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/qvm/include/boost/qvm/gen/vec_mat_operations4.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / qvm / include / boost / qvm / gen / vec_mat_operations4.hpp
1 //Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
2
3 //Distributed under the Boost Software License, Version 1.0. (See accompanying
4 //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6 #ifndef BOOST_QVM_BF14D67E2DDC8E6683EF574961FF698F
7 #define BOOST_QVM_BF14D67E2DDC8E6683EF574961FF698F
8
9 //This file was generated by a program. Do not edit manually.
10
11 #include <boost/qvm/deduce_vec.hpp>
12 #include <boost/qvm/enable_if.hpp>
13 #include <boost/qvm/inline.hpp>
14 #include <boost/qvm/mat_traits.hpp>
15
16 namespace
17 boost
18 {
19 namespace
20 qvm
21 {
22 template <class A,class B>
23 BOOST_QVM_INLINE_OPERATIONS
24 typename lazy_enable_if_c<
25 mat_traits<A>::rows==4 && mat_traits<A>::cols==4 &&
26 vec_traits<B>::dim==4,
27 deduce_vec2<A,B,4> >::type
28 operator*( A const & a, B const & b )
29 {
30 typedef typename mat_traits<A>::scalar_type Ta;
31 typedef typename vec_traits<B>::scalar_type Tb;
32 Ta const a00 = mat_traits<A>::template read_element<0,0>(a);
33 Ta const a01 = mat_traits<A>::template read_element<0,1>(a);
34 Ta const a02 = mat_traits<A>::template read_element<0,2>(a);
35 Ta const a03 = mat_traits<A>::template read_element<0,3>(a);
36 Ta const a10 = mat_traits<A>::template read_element<1,0>(a);
37 Ta const a11 = mat_traits<A>::template read_element<1,1>(a);
38 Ta const a12 = mat_traits<A>::template read_element<1,2>(a);
39 Ta const a13 = mat_traits<A>::template read_element<1,3>(a);
40 Ta const a20 = mat_traits<A>::template read_element<2,0>(a);
41 Ta const a21 = mat_traits<A>::template read_element<2,1>(a);
42 Ta const a22 = mat_traits<A>::template read_element<2,2>(a);
43 Ta const a23 = mat_traits<A>::template read_element<2,3>(a);
44 Ta const a30 = mat_traits<A>::template read_element<3,0>(a);
45 Ta const a31 = mat_traits<A>::template read_element<3,1>(a);
46 Ta const a32 = mat_traits<A>::template read_element<3,2>(a);
47 Ta const a33 = mat_traits<A>::template read_element<3,3>(a);
48 Tb const b0 = vec_traits<B>::template read_element<0>(b);
49 Tb const b1 = vec_traits<B>::template read_element<1>(b);
50 Tb const b2 = vec_traits<B>::template read_element<2>(b);
51 Tb const b3 = vec_traits<B>::template read_element<3>(b);
52 typedef typename deduce_vec2<A,B,4>::type R;
53 BOOST_QVM_STATIC_ASSERT(vec_traits<R>::dim==4);
54 R r;
55 vec_traits<R>::template write_element<0>(r)=a00*b0+a01*b1+a02*b2+a03*b3;
56 vec_traits<R>::template write_element<1>(r)=a10*b0+a11*b1+a12*b2+a13*b3;
57 vec_traits<R>::template write_element<2>(r)=a20*b0+a21*b1+a22*b2+a23*b3;
58 vec_traits<R>::template write_element<3>(r)=a30*b0+a31*b1+a32*b2+a33*b3;
59 return r;
60 }
61
62 namespace
63 sfinae
64 {
65 using ::boost::qvm::operator*;
66 }
67
68 namespace
69 qvm_detail
70 {
71 template <int R,int C>
72 struct mul_mv_defined;
73
74 template <>
75 struct
76 mul_mv_defined<4,4>
77 {
78 static bool const value=true;
79 };
80 }
81
82 template <class A,class B>
83 BOOST_QVM_INLINE_OPERATIONS
84 typename lazy_enable_if_c<
85 mat_traits<B>::rows==4 && mat_traits<B>::cols==4 &&
86 vec_traits<A>::dim==4,
87 deduce_vec2<A,B,4> >::type
88 operator*( A const & a, B const & b )
89 {
90 typedef typename vec_traits<A>::scalar_type Ta;
91 typedef typename mat_traits<B>::scalar_type Tb;
92 Ta const a0 = vec_traits<A>::template read_element<0>(a);
93 Ta const a1 = vec_traits<A>::template read_element<1>(a);
94 Ta const a2 = vec_traits<A>::template read_element<2>(a);
95 Ta const a3 = vec_traits<A>::template read_element<3>(a);
96 Tb const b00 = mat_traits<B>::template read_element<0,0>(b);
97 Tb const b01 = mat_traits<B>::template read_element<0,1>(b);
98 Tb const b02 = mat_traits<B>::template read_element<0,2>(b);
99 Tb const b03 = mat_traits<B>::template read_element<0,3>(b);
100 Tb const b10 = mat_traits<B>::template read_element<1,0>(b);
101 Tb const b11 = mat_traits<B>::template read_element<1,1>(b);
102 Tb const b12 = mat_traits<B>::template read_element<1,2>(b);
103 Tb const b13 = mat_traits<B>::template read_element<1,3>(b);
104 Tb const b20 = mat_traits<B>::template read_element<2,0>(b);
105 Tb const b21 = mat_traits<B>::template read_element<2,1>(b);
106 Tb const b22 = mat_traits<B>::template read_element<2,2>(b);
107 Tb const b23 = mat_traits<B>::template read_element<2,3>(b);
108 Tb const b30 = mat_traits<B>::template read_element<3,0>(b);
109 Tb const b31 = mat_traits<B>::template read_element<3,1>(b);
110 Tb const b32 = mat_traits<B>::template read_element<3,2>(b);
111 Tb const b33 = mat_traits<B>::template read_element<3,3>(b);
112 typedef typename deduce_vec2<A,B,4>::type R;
113 BOOST_QVM_STATIC_ASSERT(vec_traits<R>::dim==4);
114 R r;
115 vec_traits<R>::template write_element<0>(r)=a0*b00+a1*b10+a2*b20+a3*b30;
116 vec_traits<R>::template write_element<1>(r)=a0*b01+a1*b11+a2*b21+a3*b31;
117 vec_traits<R>::template write_element<2>(r)=a0*b02+a1*b12+a2*b22+a3*b32;
118 vec_traits<R>::template write_element<3>(r)=a0*b03+a1*b13+a2*b23+a3*b33;
119 return r;
120 }
121
122 namespace
123 sfinae
124 {
125 using ::boost::qvm::operator*;
126 }
127
128 namespace
129 qvm_detail
130 {
131 template <int R,int C>
132 struct mul_vm_defined;
133
134 template <>
135 struct
136 mul_vm_defined<4,4>
137 {
138 static bool const value=true;
139 };
140 }
141
142 }
143 }
144
145 #endif