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_OPERATOR_FUNCTIONS_SIMD_SSE_SSE2_IS_NOT_EQUAL_HPP_INCLUDED
  #define BOOST_SIMD_OPERATOR_FUNCTIONS_SIMD_SSE_SSE2_IS_NOT_EQUAL_HPP_INCLUDED
  #ifdef BOOST_SIMD_HAS_SSE2_SUPPORT
  #include <boost/simd/operator/functions/is_not_equal.hpp>
  #include <boost/simd/include/functions/simd/bitwise_cast.hpp>
  #include <boost/simd/include/functions/simd/complement.hpp>
  #include <boost/simd/include/functions/simd/is_equal.hpp>
  #include <boost/simd/include/functions/simd/bitwise_or.hpp>
  #include <boost/simd/include/functions/simd/minus.hpp>
  #include <boost/simd/include/constants/zero.hpp>
  #include <boost/simd/sdk/simd/logical.hpp>
  #include <boost/dispatch/meta/downgrade.hpp>
  #include <boost/simd/swar/functions/details/shuffle.hpp>
  
  namespace boost { namespace simd { namespace ext
  {
    BOOST_SIMD_FUNCTOR_IMPLEMENTATION( boost::simd::tag::is_not_equal_, boost::simd::tag::sse2_
                              , (A0)
                              , ((simd_<double_<A0>,boost::simd::tag::sse_>))
                                ((simd_<double_<A0>,boost::simd::tag::sse_>))
                              )
    {
      typedef typename meta::as_logical<A0>::type result_type;
      BOOST_SIMD_FUNCTOR_CALL_REPEAT(2)
      {
        return _mm_cmpneq_pd(a0,a1);
      }
    };
  
    BOOST_SIMD_FUNCTOR_IMPLEMENTATION( boost::simd::tag::is_not_equal_, boost::simd::tag::sse2_
                              , (A0)
                              , ((simd_<single_<A0>,boost::simd::tag::sse_>))
                                ((simd_<single_<A0>,boost::simd::tag::sse_>))
                              )
    {
      typedef typename meta::as_logical<A0>::type result_type;
      BOOST_SIMD_FUNCTOR_CALL_REPEAT(2)
      {
        return _mm_cmpneq_ps(a0,a1);
      }
    };
  
    BOOST_SIMD_FUNCTOR_IMPLEMENTATION( boost::simd::tag::is_not_equal_, boost::simd::tag::sse2_
                              , (A0)
                              , ((simd_<integer_<A0>,boost::simd::tag::sse_>))
                                ((simd_<integer_<A0>,boost::simd::tag::sse_>))
                              )
    {
      typedef typename meta::as_logical<A0>::type result_type;
      BOOST_SIMD_FUNCTOR_CALL_REPEAT(2)
      {
        return bitwise_cast<result_type>(boost::simd::complement(bitwise_cast<A0>(boost::simd::eq(a0,a1))));
      }
    };
  
    BOOST_SIMD_FUNCTOR_IMPLEMENTATION( boost::simd::tag::is_not_equal_, boost::simd::tag::sse2_
                              , (A0)
                              , ((simd_<ints64_<A0>,boost::simd::tag::sse_>))
                                ((simd_<ints64_<A0>,boost::simd::tag::sse_>))
                              )
    {
      typedef typename meta::as_logical<A0>::type result_type;
      BOOST_SIMD_FUNCTOR_CALL_REPEAT(2)
      {
        typedef typename dispatch::meta::downgrade<A0, unsigned>::type  type;
        type tmp      = bitwise_cast<type>(a0 - a1);
        tmp           = bitwise_cast<type>(boost::simd::neq(tmp,Zero<type>()));
        type tmp2     = details::shuffle<1,0,3,2>(tmp);
        return bitwise_cast<result_type>(tmp | tmp2);
      }
    };
  } } }
  
  #endif
  #endif
  