1 //---------------------------------------------------------------------------//
2 // Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com>
4 // Distributed under the Boost Software License, Version 1.0
5 // See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt
8 // See http://boostorg.github.com/compute for more information.
9 //---------------------------------------------------------------------------//
11 #ifndef BOOST_COMPUTE_FUNCTIONAL_DETAIL_NVIDIA_BALLOT_HPP
12 #define BOOST_COMPUTE_FUNCTIONAL_DETAIL_NVIDIA_BALLOT_HPP
14 #include <boost/compute/function.hpp>
15 #include <boost/compute/types/fundamental.hpp>
22 class nvidia_ballot : public function<uint_(T)>
26 : function<uint_(T)>("nvidia_ballot")
29 "inline uint nvidia_ballot(const uint x)\n"
33 " \"setp.ne.u32 %%p1, %1, 0;\"\n"
34 " \"vote.ballot.b32 %0, %%p1;\"\n"
44 } // end detail namespace
45 } // end compute namespace
46 } // end boost namespace
48 #endif // BOOST_COMPUTE_FUNCTIONAL_DETAIL_NVIDIA_BALLOT_HPP