update boost on linux
This commit is contained in:
75
linx64/include/boost/qvm/detail/mat_assign.hpp
Normal file
75
linx64/include/boost/qvm/detail/mat_assign.hpp
Normal file
@@ -0,0 +1,75 @@
|
||||
//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
|
||||
|
||||
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef UUID_47136D2C385411E7BA27D3B681262D2E
|
||||
#define UUID_47136D2C385411E7BA27D3B681262D2E
|
||||
|
||||
#include <boost/qvm/gen/mat_assign2.hpp>
|
||||
#include <boost/qvm/gen/mat_assign3.hpp>
|
||||
#include <boost/qvm/gen/mat_assign4.hpp>
|
||||
|
||||
namespace
|
||||
boost
|
||||
{
|
||||
namespace
|
||||
qvm
|
||||
{
|
||||
namespace
|
||||
qvm_detail
|
||||
{
|
||||
template <int M,int N>
|
||||
struct
|
||||
assign_mm_defined
|
||||
{
|
||||
static bool const value=false;
|
||||
};
|
||||
|
||||
template <int I,int N>
|
||||
struct
|
||||
copy_matrix_elements
|
||||
{
|
||||
template <class A,class B>
|
||||
static
|
||||
BOOST_QVM_INLINE_CRITICAL
|
||||
void
|
||||
f( A & a, B const & b )
|
||||
{
|
||||
mat_traits<A>::template write_element<I/mat_traits<A>::cols,I%mat_traits<A>::cols>(a) =
|
||||
mat_traits<B>::template read_element<I/mat_traits<B>::cols,I%mat_traits<B>::cols>(b);
|
||||
copy_matrix_elements<I+1,N>::f(a,b);
|
||||
}
|
||||
};
|
||||
|
||||
template <int N>
|
||||
struct
|
||||
copy_matrix_elements<N,N>
|
||||
{
|
||||
template <class A,class B>
|
||||
static
|
||||
BOOST_QVM_INLINE_CRITICAL
|
||||
void
|
||||
f( A &, B const & )
|
||||
{
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
template <class A,class B>
|
||||
BOOST_QVM_INLINE_TRIVIAL
|
||||
typename boost::enable_if_c<
|
||||
is_mat<A>::value && is_mat<B>::value &&
|
||||
mat_traits<A>::rows==mat_traits<B>::rows &&
|
||||
mat_traits<A>::cols==mat_traits<B>::cols &&
|
||||
!qvm_detail::assign_mm_defined<mat_traits<A>::rows,mat_traits<A>::cols>::value,
|
||||
A &>::type
|
||||
assign( A & a, B const & b )
|
||||
{
|
||||
qvm_detail::copy_matrix_elements<0,mat_traits<A>::rows*mat_traits<A>::cols>::f(a,b);
|
||||
return a;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
35
linx64/include/boost/qvm/detail/quat_assign.hpp
Normal file
35
linx64/include/boost/qvm/detail/quat_assign.hpp
Normal file
@@ -0,0 +1,35 @@
|
||||
//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
|
||||
|
||||
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef UUID_86A42DA4385511E7822024B881262D2E
|
||||
#define UUID_86A42DA4385511E7822024B881262D2E
|
||||
|
||||
#include <boost/qvm/inline.hpp>
|
||||
#include <boost/qvm/enable_if.hpp>
|
||||
#include <boost/qvm/quat_traits.hpp>
|
||||
|
||||
namespace
|
||||
boost
|
||||
{
|
||||
namespace
|
||||
qvm
|
||||
{
|
||||
template <class A,class B>
|
||||
BOOST_QVM_INLINE_OPERATIONS
|
||||
typename enable_if_c<
|
||||
is_quat<A>::value && is_quat<B>::value,
|
||||
A &>::type
|
||||
assign( A & a, B const & b )
|
||||
{
|
||||
quat_traits<A>::template write_element<0>(a) = quat_traits<B>::template read_element<0>(b);
|
||||
quat_traits<A>::template write_element<1>(a) = quat_traits<B>::template read_element<1>(b);
|
||||
quat_traits<A>::template write_element<2>(a) = quat_traits<B>::template read_element<2>(b);
|
||||
quat_traits<A>::template write_element<3>(a) = quat_traits<B>::template read_element<3>(b);
|
||||
return a;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
71
linx64/include/boost/qvm/detail/vec_assign.hpp
Normal file
71
linx64/include/boost/qvm/detail/vec_assign.hpp
Normal file
@@ -0,0 +1,71 @@
|
||||
//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
|
||||
|
||||
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef UUID_185557CE385511E780ACD7B781262D2E
|
||||
#define UUID_185557CE385511E780ACD7B781262D2E
|
||||
|
||||
#include <boost/qvm/gen/vec_assign2.hpp>
|
||||
#include <boost/qvm/gen/vec_assign3.hpp>
|
||||
#include <boost/qvm/gen/vec_assign4.hpp>
|
||||
|
||||
namespace
|
||||
boost
|
||||
{
|
||||
namespace
|
||||
qvm
|
||||
{
|
||||
namespace
|
||||
qvm_detail
|
||||
{
|
||||
template <int D>
|
||||
struct
|
||||
assign_vv_defined
|
||||
{
|
||||
static bool const value=false;
|
||||
};
|
||||
|
||||
template <int I,int N>
|
||||
struct
|
||||
copy_vector_elements
|
||||
{
|
||||
template <class A,class B>
|
||||
static
|
||||
void
|
||||
f( A & a, B const & b )
|
||||
{
|
||||
vec_traits<A>::template write_element<I>(a)=vec_traits<B>::template read_element<I>(b);
|
||||
copy_vector_elements<I+1,N>::f(a,b);
|
||||
}
|
||||
};
|
||||
|
||||
template <int N>
|
||||
struct
|
||||
copy_vector_elements<N,N>
|
||||
{
|
||||
template <class A,class B>
|
||||
static
|
||||
void
|
||||
f( A &, B const & )
|
||||
{
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
template <class A,class B>
|
||||
inline
|
||||
typename boost::enable_if_c<
|
||||
is_vec<A>::value && is_vec<B>::value &&
|
||||
vec_traits<A>::dim==vec_traits<B>::dim &&
|
||||
!qvm_detail::assign_vv_defined<vec_traits<A>::dim>::value,
|
||||
A &>::type
|
||||
assign( A & a, B const & b )
|
||||
{
|
||||
qvm_detail::copy_vector_elements<0,vec_traits<A>::dim>::f(a,b);
|
||||
return a;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
138
linx64/include/boost/qvm/detail/vec_register_impl.hpp
Normal file
138
linx64/include/boost/qvm/detail/vec_register_impl.hpp
Normal file
@@ -0,0 +1,138 @@
|
||||
//Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
|
||||
//Copyright (c) 2018 agate-pris
|
||||
|
||||
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_QVM_DETAIL_VEC_REGISTER_IMPL_HPP
|
||||
#define BOOST_QVM_DETAIL_VEC_REGISTER_IMPL_HPP
|
||||
|
||||
#include <boost/qvm/assert.hpp>
|
||||
#include <boost/qvm/inline.hpp>
|
||||
#include <boost/qvm/static_assert.hpp>
|
||||
#include <boost/qvm/vec_traits.hpp>
|
||||
|
||||
namespace boost { namespace qvm { namespace qvm_detail {
|
||||
|
||||
template<class VecType, class ScalarType, int Dim>
|
||||
struct vec_register_common
|
||||
{
|
||||
typedef VecType vec_type;
|
||||
typedef ScalarType scalar_type;
|
||||
static int const dim = Dim;
|
||||
};
|
||||
|
||||
template<class VecType, class ScalarType, int Dim>
|
||||
struct vec_register_read
|
||||
{
|
||||
template<int I> static ScalarType read_element(VecType const& v);
|
||||
|
||||
template<int I, int N> struct read_element_idx_detail
|
||||
{
|
||||
static BOOST_QVM_INLINE_CRITICAL ScalarType impl(int const i, VecType const& v)
|
||||
{
|
||||
return I == i
|
||||
? read_element<I>(v)
|
||||
: read_element_idx_detail<I + 1, N>::impl(i, v);
|
||||
}
|
||||
};
|
||||
|
||||
template<int N> struct read_element_idx_detail<N, N>
|
||||
{
|
||||
static BOOST_QVM_INLINE_TRIVIAL ScalarType impl(int, VecType const& v)
|
||||
{
|
||||
BOOST_QVM_ASSERT(0);
|
||||
return read_element<0>(v);
|
||||
}
|
||||
};
|
||||
|
||||
static BOOST_QVM_INLINE_CRITICAL ScalarType read_element_idx(int const i, VecType const& v)
|
||||
{
|
||||
return read_element_idx_detail<0, Dim>::impl(i, v);
|
||||
}
|
||||
};
|
||||
|
||||
template<class VecType, class ScalarType, int Dim>
|
||||
struct vec_register_write
|
||||
{
|
||||
template<int I> static ScalarType& write_element(VecType& v);
|
||||
|
||||
template<int I, int N> struct write_element_idx_detail
|
||||
{
|
||||
static BOOST_QVM_INLINE_CRITICAL ScalarType& impl(int const i, VecType& v)
|
||||
{
|
||||
return I == i
|
||||
? write_element<I>(v)
|
||||
: write_element_idx_detail<I + 1, N>::impl(i, v);
|
||||
}
|
||||
};
|
||||
|
||||
template<int N> struct write_element_idx_detail<N, N>
|
||||
{
|
||||
static BOOST_QVM_INLINE_TRIVIAL ScalarType& impl(int, VecType& v)
|
||||
{
|
||||
BOOST_QVM_ASSERT(0);
|
||||
return write_element<0>(v);
|
||||
}
|
||||
};
|
||||
|
||||
static BOOST_QVM_INLINE_CRITICAL ScalarType& write_element_idx(int const i, VecType& v)
|
||||
{
|
||||
return write_element_idx_detail<0, Dim>::impl(i, v);
|
||||
}
|
||||
};
|
||||
|
||||
}}}
|
||||
|
||||
#define BOOST_QVM_DETAIL_SPECIALIZE_QVM_DETAIL_VEC_REGISTER_READ(VecType, ScalarType, Dim, I, Read) \
|
||||
namespace boost { namespace qvm {namespace qvm_detail{ \
|
||||
template<> \
|
||||
template<> \
|
||||
BOOST_QVM_INLINE_CRITICAL \
|
||||
ScalarType vec_register_read<VecType, ScalarType, Dim>::read_element<I>(VecType const& v) \
|
||||
{ \
|
||||
BOOST_QVM_STATIC_ASSERT(I>=0); \
|
||||
BOOST_QVM_STATIC_ASSERT(I<Dim); \
|
||||
return v. Read; \
|
||||
} \
|
||||
}}}
|
||||
|
||||
#define BOOST_QVM_DETAIL_SPECIALIZE_QVM_DETAIL_VEC_REGISTER_WRITE(VecType, ScalarType, Dim, I, Write) \
|
||||
namespace boost { namespace qvm {namespace qvm_detail{ \
|
||||
template<> \
|
||||
template<> \
|
||||
BOOST_QVM_INLINE_CRITICAL \
|
||||
ScalarType& vec_register_write<VecType, ScalarType, Dim>::write_element<I>(VecType& v) \
|
||||
{ \
|
||||
BOOST_QVM_STATIC_ASSERT(I>=0); \
|
||||
BOOST_QVM_STATIC_ASSERT(I<Dim); \
|
||||
return v. Write; \
|
||||
}; \
|
||||
}}}
|
||||
|
||||
#define BOOST_QVM_DETAIL_SPECIALIZE_QVM_DETAIL_VEC_REGISTER_READ_WRITE(VecType, ScalarType, Dim, I, Read, Write)\
|
||||
BOOST_QVM_DETAIL_SPECIALIZE_QVM_DETAIL_VEC_REGISTER_READ(VecType, ScalarType, Dim, I, Read) \
|
||||
BOOST_QVM_DETAIL_SPECIALIZE_QVM_DETAIL_VEC_REGISTER_WRITE(VecType, ScalarType, Dim, I, Write)
|
||||
|
||||
#define BOOST_QVM_DETAIL_REGISTER_VEC_SPECIALIZE_VEC_TRAITS_READ(VecType, ScalarType, Dim) \
|
||||
namespace boost { namespace qvm { \
|
||||
template<> \
|
||||
struct vec_traits<VecType> \
|
||||
: qvm_detail::vec_register_common<VecType, ScalarType, Dim> \
|
||||
, qvm_detail::vec_register_read<VecType, ScalarType, Dim> \
|
||||
{ \
|
||||
}; \
|
||||
}}
|
||||
|
||||
#define BOOST_QVM_DETAIL_REGISTER_VEC_SPECIALIZE_VEC_TRAITS_READ_WRITE(VecType, ScalarType, Dim)\
|
||||
namespace boost { namespace qvm { \
|
||||
template<> \
|
||||
struct vec_traits<VecType> \
|
||||
: qvm_detail::vec_register_common<VecType, ScalarType, Dim> \
|
||||
, qvm_detail::vec_register_read<VecType, ScalarType, Dim> \
|
||||
, qvm_detail::vec_register_write<VecType, ScalarType, Dim> \
|
||||
{ \
|
||||
}; \
|
||||
}}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user