]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/qvm/include/boost/qvm/gen/vec_mat_operations3.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / qvm / include / boost / qvm / gen / vec_mat_operations3.hpp
CommitLineData
7c673cae
FG
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_2C807EC599D5E980B2EAC9CC53BF67D6
7#define BOOST_QVM_2C807EC599D5E980B2EAC9CC53BF67D6
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
16namespace
17boost
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==3 && mat_traits<A>::cols==3 &&
26 vec_traits<B>::dim==3,
27 deduce_vec2<A,B,3> >::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 a10 = mat_traits<A>::template read_element<1,0>(a);
36 Ta const a11 = mat_traits<A>::template read_element<1,1>(a);
37 Ta const a12 = mat_traits<A>::template read_element<1,2>(a);
38 Ta const a20 = mat_traits<A>::template read_element<2,0>(a);
39 Ta const a21 = mat_traits<A>::template read_element<2,1>(a);
40 Ta const a22 = mat_traits<A>::template read_element<2,2>(a);
41 Tb const b0 = vec_traits<B>::template read_element<0>(b);
42 Tb const b1 = vec_traits<B>::template read_element<1>(b);
43 Tb const b2 = vec_traits<B>::template read_element<2>(b);
44 typedef typename deduce_vec2<A,B,3>::type R;
45 BOOST_QVM_STATIC_ASSERT(vec_traits<R>::dim==3);
46 R r;
47 vec_traits<R>::template write_element<0>(r)=a00*b0+a01*b1+a02*b2;
48 vec_traits<R>::template write_element<1>(r)=a10*b0+a11*b1+a12*b2;
49 vec_traits<R>::template write_element<2>(r)=a20*b0+a21*b1+a22*b2;
50 return r;
51 }
52
53 namespace
54 sfinae
55 {
56 using ::boost::qvm::operator*;
57 }
58
59 namespace
60 qvm_detail
61 {
62 template <int R,int C>
63 struct mul_mv_defined;
64
65 template <>
66 struct
67 mul_mv_defined<3,3>
68 {
69 static bool const value=true;
70 };
71 }
72
73 template <class A,class B>
74 BOOST_QVM_INLINE_OPERATIONS
75 typename lazy_enable_if_c<
76 mat_traits<B>::rows==3 && mat_traits<B>::cols==3 &&
77 vec_traits<A>::dim==3,
78 deduce_vec2<A,B,3> >::type
79 operator*( A const & a, B const & b )
80 {
81 typedef typename vec_traits<A>::scalar_type Ta;
82 typedef typename mat_traits<B>::scalar_type Tb;
83 Ta const a0 = vec_traits<A>::template read_element<0>(a);
84 Ta const a1 = vec_traits<A>::template read_element<1>(a);
85 Ta const a2 = vec_traits<A>::template read_element<2>(a);
86 Tb const b00 = mat_traits<B>::template read_element<0,0>(b);
87 Tb const b01 = mat_traits<B>::template read_element<0,1>(b);
88 Tb const b02 = mat_traits<B>::template read_element<0,2>(b);
89 Tb const b10 = mat_traits<B>::template read_element<1,0>(b);
90 Tb const b11 = mat_traits<B>::template read_element<1,1>(b);
91 Tb const b12 = mat_traits<B>::template read_element<1,2>(b);
92 Tb const b20 = mat_traits<B>::template read_element<2,0>(b);
93 Tb const b21 = mat_traits<B>::template read_element<2,1>(b);
94 Tb const b22 = mat_traits<B>::template read_element<2,2>(b);
95 typedef typename deduce_vec2<A,B,3>::type R;
96 BOOST_QVM_STATIC_ASSERT(vec_traits<R>::dim==3);
97 R r;
98 vec_traits<R>::template write_element<0>(r)=a0*b00+a1*b10+a2*b20;
99 vec_traits<R>::template write_element<1>(r)=a0*b01+a1*b11+a2*b21;
100 vec_traits<R>::template write_element<2>(r)=a0*b02+a1*b12+a2*b22;
101 return r;
102 }
103
104 namespace
105 sfinae
106 {
107 using ::boost::qvm::operator*;
108 }
109
110 namespace
111 qvm_detail
112 {
113 template <int R,int C>
114 struct mul_vm_defined;
115
116 template <>
117 struct
118 mul_vm_defined<3,3>
119 {
120 static bool const value=true;
121 };
122 }
123
124 }
125 }
126
127#endif