X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fboost%2Flibs%2Fqvm%2Ftest%2Ftest_qvm_vector.hpp;h=a732061f072f1a476c4d6cd6acd8cf714616853d;hb=b32b81446b3b05102be0267e79203f59329c1d97;hp=3f0d3de99c1488cbb2c99072607c06a543e20017;hpb=215dd7151453fae88e6f968c975b6ce309d42dcf;p=ceph.git diff --git a/ceph/src/boost/libs/qvm/test/test_qvm_vector.hpp b/ceph/src/boost/libs/qvm/test/test_qvm_vector.hpp index 3f0d3de99..a732061f0 100644 --- a/ceph/src/boost/libs/qvm/test/test_qvm_vector.hpp +++ b/ceph/src/boost/libs/qvm/test/test_qvm_vector.hpp @@ -1,110 +1,82 @@ -//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_02C176D6B3AB11DE979F9A0D56D89593 -#define UUID_02C176D6B3AB11DE979F9A0D56D89593 - -#include -#include -#include "test_qvm.hpp" - -namespace -test_qvm - { - template - struct - vector - { - T a[Dim]; - mutable T b[Dim]; - - explicit - vector( T start=T(0), T step=T(0) ) - { - for( int i=0; i!=Dim; ++i,start+=step ) - a[i]=b[i]=start; - } - }; - - template - void - dump_ab( vector const & a, vector const & b ) - { - detail::dump_ab(a.a,b.a); - } - } - -namespace -boost - { - namespace - qvm - { - template - struct - vec_traits< test_qvm::vector > - { - static int const dim=Dim; - typedef T scalar_type; - typedef test_qvm::vector this_vector_type; - - template - static - scalar_type & - write_element( this_vector_type & m ) - { - BOOST_QVM_STATIC_ASSERT(I>=0); - BOOST_QVM_STATIC_ASSERT(I - static - scalar_type - read_element( this_vector_type const & m ) - { - BOOST_QVM_STATIC_ASSERT(I>=0); - BOOST_QVM_STATIC_ASSERT(I=0); - BOOST_QVM_ASSERT(i=0); - BOOST_QVM_ASSERT(i - struct - deduce_vec2,test_qvm::vector,Dim> - { - typedef test_qvm::vector type; - }; - } - } - -namespace - { - struct V1; - struct V2; - struct V3; - } - -#endif +//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_02C176D6B3AB11DE979F9A0D56D89593 +#define UUID_02C176D6B3AB11DE979F9A0D56D89593 + +#include +#include +#include +#include "test_qvm.hpp" + +namespace +test_qvm + { + template + struct + vector + { + T a[Dim]; + mutable T b[Dim]; + + explicit + vector( T start=T(0), T step=T(0) ) + { + for( int i=0; i!=Dim; ++i,start+=step ) + a[i]=b[i]=start; + } + }; + + template + void + dump_ab( vector const & a, vector const & b ) + { + detail::dump_ab(a.a,b.a); + } + } + +namespace +boost + { + namespace + qvm + { + template + struct + vec_traits< test_qvm::vector >: + vec_traits_defaults,T,Dim> + { + typedef vec_traits_defaults,T,Dim>base; + + template + static + typename base::scalar_type & + write_element( typename base::vec_type & m ) + { + BOOST_QVM_STATIC_ASSERT(I>=0); + BOOST_QVM_STATIC_ASSERT(I + struct + deduce_vec2,test_qvm::vector,Dim> + { + typedef test_qvm::vector type; + }; + } + } + +namespace + { + struct V1; + struct V2; + struct V3; + } + +#endif