Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 0 additions & 123 deletions thrust/thrust/functional.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,101 +39,6 @@

THRUST_NAMESPACE_BEGIN

/*! \addtogroup function_object_adaptors Function Object Adaptors
* \ingroup function_objects
* \{
*/

/*! \p unary_function is an empty base class: it contains no member functions
* or member variables, but only type information. The only reason it exists
* is to make it more convenient to define types that are models of the
* concept Adaptable Unary Function. Specifically, any model of Adaptable
* Unary Function must define nested aliases. Those are
* provided by the base class \p unary_function.
*
* deprecated [Since 2.6]
*
* The following code snippet demonstrates how to construct an
* Adaptable Unary Function using \p unary_function.
*
* \code
* struct sine : public thrust::unary_function<float,float>
* {
* __host__ __device__
* float operator()(float x) { return sinf(x); }
* };
* \endcode
*
* \note Because C++11 language support makes the functionality of
* \c unary_function obsolete, its use is optional if C++11 language
* features are enabled.
*
* \see https://en.cppreference.com/w/cpp/utility/functional/unary_function
* \see binary_function
*/
template <typename Argument, typename Result>
struct CCCL_DEPRECATED unary_function
{
/*! \typedef argument_type
* \brief The type of the function object's argument.
*/
using argument_type = Argument;

/*! \typedef result_type;
* \brief The type of the function object's result.
*/
using result_type = Result;
}; // end unary_function

/*! \p binary_function is an empty base class: it contains no member functions
* or member variables, but only type information. The only reason it exists
* is to make it more convenient to define types that are models of the
* concept Adaptable Binary Function. Specifically, any model of Adaptable
* Binary Function must define nested aliases. Those are
* provided by the base class \p binary_function.
*
* deprecated [Since 2.6]
*
* The following code snippet demonstrates how to construct an
* Adaptable Binary Function using \p binary_function.
*
* \code
* struct exponentiate : public thrust::binary_function<float,float,float>
* {
* __host__ __device__
* float operator()(float x, float y) { return powf(x,y); }
* };
* \endcode
*
* \note Because C++11 language support makes the functionality of
* \c binary_function obsolete, its use is optional if C++11 language
* features are enabled.
*
* \see https://en.cppreference.com/w/cpp/utility/functional/binary_function
* \see unary_function
*/
template <typename Argument1, typename Argument2, typename Result>
struct CCCL_DEPRECATED binary_function
{
/*! \typedef first_argument_type
* \brief The type of the function object's first argument.
*/
using first_argument_type = Argument1;

/*! \typedef second_argument_type
* \brief The type of the function object's second argument.
*/
using second_argument_type = Argument2;

/*! \typedef result_type
* \brief The type of the function object's result;
*/
using result_type = Result;
}; // end binary_function

/*! \}
*/

/*! \addtogroup predefined_function_objects Predefined Function Objects
* \ingroup function_objects
*/
Expand Down Expand Up @@ -188,7 +93,6 @@ struct CCCL_DEPRECATED binary_function
* \endcode
*
* \see https://en.cppreference.com/w/cpp/utility/functional/plus
* \see binary_function
*/
template <typename T = void>
struct plus : public ::cuda::std::plus<T>
Expand Down Expand Up @@ -230,7 +134,6 @@ struct plus : public ::cuda::std::plus<T>
* \endcode
*
* \see https://en.cppreference.com/w/cpp/utility/functional/minus
* \see binary_function
*/
template <typename T = void>
struct minus : public ::cuda::std::minus<T>
Expand Down Expand Up @@ -272,7 +175,6 @@ struct minus : public ::cuda::std::minus<T>
* \endcode
*
* \see https://en.cppreference.com/w/cpp/utility/functional/multiplies
* \see binary_function
*/
template <typename T = void>
struct multiplies : public ::cuda::std::multiplies<T>
Expand Down Expand Up @@ -314,7 +216,6 @@ struct multiplies : public ::cuda::std::multiplies<T>
* \endcode
*
* \see https://en.cppreference.com/w/cpp/utility/functional/divides
* \see binary_function
*/
template <typename T = void>
struct divides : public ::cuda::std::divides<T>
Expand Down Expand Up @@ -356,7 +257,6 @@ struct divides : public ::cuda::std::divides<T>
* \endcode
*
* \see https://en.cppreference.com/w/cpp/utility/functional/modulus
* \see binary_function
*/
template <typename T = void>
struct modulus : public ::cuda::std::modulus<T>
Expand Down Expand Up @@ -395,7 +295,6 @@ struct modulus : public ::cuda::std::modulus<T>
* \endcode
*
* \see https://en.cppreference.com/w/cpp/utility/functional/negate
* \see unary_function
*/
template <typename T = void>
struct negate : ::cuda::std::negate<T>
Expand Down Expand Up @@ -431,8 +330,6 @@ struct negate : ::cuda::std::negate<T>
* thrust::square<float>());
* // V2 is now {1, 4, 9, ..., 1000000}
* \endcode
*
* \see unary_function
*/
template <typename T = void>
struct square
Expand Down Expand Up @@ -478,7 +375,6 @@ struct square<void>
* Comparable</a>.
*
* \see https://en.cppreference.com/w/cpp/utility/functional/equal_to
* \see binary_function
*/
template <typename T = void>
struct equal_to : public ::cuda::std::equal_to<T>
Expand All @@ -498,7 +394,6 @@ struct equal_to : public ::cuda::std::equal_to<T>
* Comparable</a>.
*
* \see https://en.cppreference.com/w/cpp/utility/functional/not_equal_to
* \see binary_function
*/
template <typename T = void>
struct not_equal_to : public ::cuda::std::not_equal_to<T>
Expand All @@ -518,7 +413,6 @@ struct not_equal_to : public ::cuda::std::not_equal_to<T>
* Comparable</a>.
*
* \see https://en.cppreference.com/w/cpp/utility/functional/greater
* \see binary_function
*/
template <typename T = void>
struct greater : public ::cuda::std::greater<T>
Expand All @@ -538,7 +432,6 @@ struct greater : public ::cuda::std::greater<T>
* Comparable</a>.
*
* \see https://en.cppreference.com/w/cpp/utility/functional/less
* \see binary_function
*/
template <typename T = void>
struct less : public ::cuda::std::less<T>
Expand All @@ -558,7 +451,6 @@ struct less : public ::cuda::std::less<T>
* Comparable</a>.
*
* \see https://en.cppreference.com/w/cpp/utility/functional/greater_equal
* \see binary_function
*/
template <typename T = void>
struct greater_equal : public ::cuda::std::greater_equal<T>
Expand All @@ -578,7 +470,6 @@ struct greater_equal : public ::cuda::std::greater_equal<T>
* Comparable</a>.
*
* \see https://en.cppreference.com/w/cpp/utility/functional/less_equal
* \see binary_function
*/
template <typename T = void>
struct less_equal : public ::cuda::std::less_equal<T>
Expand All @@ -605,7 +496,6 @@ struct less_equal : public ::cuda::std::less_equal<T>
* \tparam T must be convertible to \c bool.
*
* \see https://en.cppreference.com/w/cpp/utility/functional/logical_and
* \see binary_function
*/
template <typename T = void>
struct logical_and : public ::cuda::std::logical_and<T>
Expand All @@ -624,7 +514,6 @@ struct logical_and : public ::cuda::std::logical_and<T>
* \tparam T must be convertible to \c bool.
*
* \see https://en.cppreference.com/w/cpp/utility/functional/logical_or
* \see binary_function
*/
template <typename T = void>
struct logical_or : public ::cuda::std::logical_or<T>
Expand Down Expand Up @@ -657,7 +546,6 @@ struct logical_or : public ::cuda::std::logical_or<T>
* \endcode
*
* \see https://en.cppreference.com/w/cpp/utility/functional/logical_not
* \see unary_function
*/
template <typename T = void>
struct logical_not : public ::cuda::std::logical_not<T>
Expand Down Expand Up @@ -705,8 +593,6 @@ struct logical_not : public ::cuda::std::logical_not<T>
* thrust::bit_and<int>());
* // V3 is now {1&13, 2&13, 3&13, ..., 1000%13}
* \endcode
*
* \see binary_function
*/
template <typename T = void>
struct bit_and : public ::cuda::std::bit_and<T>
Expand Down Expand Up @@ -746,8 +632,6 @@ struct bit_and : public ::cuda::std::bit_and<T>
* thrust::bit_or<int>());
* // V3 is now {1|13, 2|13, 3|13, ..., 1000|13}
* \endcode
*
* \see binary_function
*/
template <typename T = void>
struct bit_or : public ::cuda::std::bit_or<T>
Expand Down Expand Up @@ -787,8 +671,6 @@ struct bit_or : public ::cuda::std::bit_or<T>
* thrust::bit_xor<int>());
* // V3 is now {1^13, 2^13, 3^13, ..., 1000^13}
* \endcode
*
* \see binary_function
*/
template <typename T = void>
struct bit_xor : public ::cuda::std::bit_xor<T>
Expand Down Expand Up @@ -824,7 +706,6 @@ struct bit_xor : public ::cuda::std::bit_xor<T>
* \endcode
*
* \see https://en.cppreference.com/w/cpp/utility/functional/identity
* \see unary_function
*/
// TODO(bgruber): this version can also act as a functor casting to T making it not equivalent to ::cuda::std::identity
template <typename T = void>
Expand Down Expand Up @@ -882,7 +763,6 @@ struct identity<void> : ::cuda::std::__identity
*
* \see minimum
* \see min
* \see binary_function
*/
template <typename T = void>
struct maximum : ::cuda::maximum<T>
Expand Down Expand Up @@ -929,7 +809,6 @@ struct maximum : ::cuda::maximum<T>
*
* \see maximum
* \see max
* \see binary_function
*/
template <typename T = void>
struct minimum : ::cuda::minimum<T>
Expand Down Expand Up @@ -969,7 +848,6 @@ struct minimum : ::cuda::minimum<T>
*
* \see identity
* \see project2nd
* \see binary_function
*/
template <typename T1 = void, typename T2 = void>
struct project1st
Expand Down Expand Up @@ -1029,7 +907,6 @@ struct project1st<void, void>
*
* \see identity
* \see project1st
* \see binary_function
*/
template <typename T1 = void, typename T2 = void>
struct project2nd
Expand Down