text: //==============================================================================
  //         Copyright 2003 - 2011 LASMEA UMR 6602 CNRS/Univ. Clermont II
  //         Copyright 2009 - 2011 LRI    UMR 8623 CNRS/Univ Paris Sud XI
  //
  //          Distributed under the Boost Software License, Version 1.0.
  //                 See accompanying file LICENSE.txt or copy at
  //                     http://www.boost.org/LICENSE_1_0.txt
  //==============================================================================
  #ifndef BOOST_SIMD_TOOLBOX_ARITHMETIC_FUNCTIONS_SIMD_SSE_SSE2_FAST_TOINT_HPP_INCLUDED
  #define BOOST_SIMD_TOOLBOX_ARITHMETIC_FUNCTIONS_SIMD_SSE_SSE2_FAST_TOINT_HPP_INCLUDED
  #ifdef BOOST_SIMD_HAS_SSE2_SUPPORT
  #include <boost/simd/toolbox/arithmetic/functions/fast_toint.hpp>
  #include <boost/simd/include/functions/simd/make.hpp>
  #include <boost/dispatch/meta/as_integer.hpp>
  
  namespace boost { namespace simd { namespace ext
  {
    BOOST_SIMD_FUNCTOR_IMPLEMENTATION( boost::simd::tag::fast_toint_, boost::simd::tag::sse2_
                              , (A0)
                              , ((simd_<double_<A0>,boost::simd::tag::sse_>))
                              )
    {
  
      typedef typename dispatch::meta::as_integer<A0>::type result_type;
  
      BOOST_SIMD_FUNCTOR_CALL(1)
      {
        typedef typename meta::scalar_of<result_type>::type stype;
        return boost::simd::make<result_type>(static_cast<stype>(a0[0]),static_cast<stype>(a0[1]));
      }
    };
  
    BOOST_SIMD_FUNCTOR_IMPLEMENTATION( boost::simd::tag::fast_toint_, boost::simd::tag::sse2_
                              , (A0)
                              , ((simd_<single_<A0>,boost::simd::tag::sse_>))
                              )
    {
      typedef typename dispatch::meta::as_integer<A0>::type result_type;
  
      BOOST_SIMD_FUNCTOR_CALL(1)
      {
        return _mm_cvttps_epi32(a0);
      }
    };
  } } }
  
  #endif
  #endif
  