diff --git a/docs/thrust/api_docs/function_objects/predefined.rst b/docs/thrust/api_docs/function_objects/predefined.rst index f6b0631f778..fc66bab71d3 100644 --- a/docs/thrust/api_docs/function_objects/predefined.rst +++ b/docs/thrust/api_docs/function_objects/predefined.rst @@ -1,14 +1,12 @@ .. _thrust-module-api-function-objects-predefined: -Predefined Function Objects ----------------------------- +Function Objects +---------------- -.. toctree:: - :glob: - :maxdepth: 1 +Users are encouraged to use the standard C++ function objects available from ``. +Thrust provides the following additional function objects: - predefined/arithmetic - predefined/bitwise - predefined/comparison - predefined/identity - predefined/logical + - :cpp:struct:`thrust::square ` + - :cpp:struct:`thrust::identity ` + - :cpp:struct:`thrust::project1st ` + - :cpp:struct:`thrust::project2nd ` diff --git a/docs/thrust/api_docs/function_objects/predefined/arithmetic.rst b/docs/thrust/api_docs/function_objects/predefined/arithmetic.rst deleted file mode 100644 index c62bc9a9934..00000000000 --- a/docs/thrust/api_docs/function_objects/predefined/arithmetic.rst +++ /dev/null @@ -1,12 +0,0 @@ -.. _thrust-module-api-function-objects-predefined-arithmetic: - -Arithmetic Operations ----------------------- - - - :cpp:struct:`thrust::plus ` - - :cpp:struct:`thrust::minus ` - - :cpp:struct:`thrust::multiplies ` - - :cpp:struct:`thrust::divides ` - - :cpp:struct:`thrust::modulus ` - - :cpp:struct:`thrust::negate ` - - :cpp:struct:`thrust::square ` diff --git a/docs/thrust/api_docs/function_objects/predefined/bitwise.rst b/docs/thrust/api_docs/function_objects/predefined/bitwise.rst deleted file mode 100644 index 5e88d72acc9..00000000000 --- a/docs/thrust/api_docs/function_objects/predefined/bitwise.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. _thrust-module-api-function-objects-predefined-bitwise: - -Bitwise Operations -------------------- - -.. toctree:: - :glob: - :maxdepth: 1 - - ${repo_docs_api_path}/*bit__* diff --git a/docs/thrust/api_docs/function_objects/predefined/comparison.rst b/docs/thrust/api_docs/function_objects/predefined/comparison.rst deleted file mode 100644 index 351d937a3af..00000000000 --- a/docs/thrust/api_docs/function_objects/predefined/comparison.rst +++ /dev/null @@ -1,11 +0,0 @@ -.. _thrust-module-api-function-objects-predefined-comparison: - -Comparison Operations ----------------------- - - - :cpp:struct:`thrust::equal_to ` - - :cpp:struct:`thrust::not_equal_to ` - - :cpp:struct:`thrust::greater ` - - :cpp:struct:`thrust::less ` - - :cpp:struct:`thrust::greater_equal ` - - :cpp:struct:`thrust::less_equal ` diff --git a/docs/thrust/api_docs/function_objects/predefined/identity.rst b/docs/thrust/api_docs/function_objects/predefined/identity.rst deleted file mode 100644 index a62e980ba20..00000000000 --- a/docs/thrust/api_docs/function_objects/predefined/identity.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. _thrust-module-api-function-objects-predefined-identity: - -Generalized Identity Operations --------------------------------- - - - :cpp:struct:`thrust::identity ` - - :cpp:struct:`thrust::maximum ` - - :cpp:struct:`thrust::minimum ` - - :cpp:struct:`thrust::project1st ` - - :cpp:struct:`thrust::project2nd ` diff --git a/docs/thrust/api_docs/function_objects/predefined/logical.rst b/docs/thrust/api_docs/function_objects/predefined/logical.rst deleted file mode 100644 index 84017ee5efc..00000000000 --- a/docs/thrust/api_docs/function_objects/predefined/logical.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. _thrust-module-api-function-objects-predefined-logical: - -Logical Operations ------------------- - - - :cpp:struct:`thrust::logical_and ` - - :cpp:struct:`thrust::logical_or ` - - :cpp:struct:`thrust::logical_not ` diff --git a/thrust/thrust/adjacent_difference.h b/thrust/thrust/adjacent_difference.h index 756b42937fe..acc07be33c9 100644 --- a/thrust/thrust/adjacent_difference.h +++ b/thrust/thrust/adjacent_difference.h @@ -111,11 +111,12 @@ _CCCL_HOST_DEVICE OutputIterator adjacent_difference( * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam InputIterator is a model of Input - * Iterator, and \p InputIterator's \c value_type is convertible to \p BinaryFunction's \c first_argument_type and - * \c second_argument_type, and \p InputIterator's \c value_type is convertible to a type in \p OutputIterator's set of + * Iterator, and \p InputIterator's \c value_type is convertible to \p BinaryFunction's first and second argument + * type, and \p InputIterator's \c value_type is convertible to a type in \p OutputIterator's set of * \c value_types. \tparam OutputIterator is a model of Output Iterator. \tparam BinaryFunction's \c - * result_type is convertible to a type in \p OutputIterator's set of \c value_types. + * href="https://en.cppreference.com/w/cpp/iterator/output_iterator">Output Iterator. + * \tparam BinaryFunction The functions's return type convertible to a type in \p OutputIterator's set of \c + * value_types. * * \remark Note that \p result is permitted to be the same iterator as \p first. This is * useful for computing differences "in place". @@ -210,11 +211,12 @@ OutputIterator adjacent_difference(InputIterator first, InputIterator last, Outp * \return The iterator result + (last - first) * * \tparam InputIterator is a model of Input - * Iterator, and \p InputIterator's \c value_type is convertible to \p BinaryFunction's \c first_argument_type and - * \c second_argument_type, and \p InputIterator's \c value_type is convertible to a type in \p OutputIterator's set of - * \c value_types. \tparam OutputIterator is a model of Output Iterator. \tparam BinaryFunction's \c - * result_type is convertible to a type in \p OutputIterator's set of \c value_types. + * Iterator, and \p InputIterator's \c value_type is convertible to \p BinaryFunction's first and second argument + * type, and \p InputIterator's \c value_type is convertible to a type in \p OutputIterator's set of \c value_types. + * \tparam OutputIterator is a model of Output + * Iterator. + * \tparam BinaryFunction The function's return type must be convertible to a type in \p OutputIterator's + * set of \c value_types. * * \remark Note that \p result is permitted to be the same iterator as \p first. This is * useful for computing differences "in place". diff --git a/thrust/thrust/copy.h b/thrust/thrust/copy.h index 3b76fc78243..5a41feb2a1f 100644 --- a/thrust/thrust/copy.h +++ b/thrust/thrust/copy.h @@ -260,7 +260,7 @@ OutputIterator copy_n(InputIterator first, Size n, OutputIterator result); * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam InputIterator is a model of Input - * Iterator, and \p InputIterator's \c value_type is convertible to \p Predicate's \c argument_type. \tparam + * Iterator, and \p InputIterator's \c value_type is convertible to \p Predicate's argument type. \tparam * OutputIterator is a model of Output * Iterator. \tparam Predicate is a model of Predicate. @@ -321,7 +321,7 @@ _CCCL_HOST_DEVICE OutputIterator copy_if( * evaluated to \c true in the range [first, last). * * \tparam InputIterator is a model of Input - * Iterator, and \p InputIterator's \c value_type is convertible to \p Predicate's \c argument_type. \tparam + * Iterator, and \p InputIterator's \c value_type is convertible to \p Predicate's argument type. \tparam * OutputIterator is a model of Output * Iterator. \tparam Predicate is a model of Predicate. @@ -383,7 +383,7 @@ OutputIterator copy_if(InputIterator first, InputIterator last, OutputIterator r * \tparam InputIterator1 is a model of Input * Iterator. \tparam InputIterator2 is a model of Input Iterator, and \p InputIterator2's \c - * value_type is convertible to \p Predicate's \c argument_type. \tparam OutputIterator is a model of Output Iterator. \tparam Predicate is a model * of Predicate. * @@ -456,7 +456,7 @@ _CCCL_HOST_DEVICE OutputIterator copy_if( * \tparam InputIterator1 is a model of Input * Iterator. \tparam InputIterator2 is a model of Input Iterator, and \p InputIterator2's \c - * value_type is convertible to \p Predicate's \c argument_type. \tparam OutputIterator is a model of Output Iterator. \tparam Predicate is a model * of Predicate. * diff --git a/thrust/thrust/count.h b/thrust/thrust/count.h index 8febab33995..079322802b3 100644 --- a/thrust/thrust/count.h +++ b/thrust/thrust/count.h @@ -148,7 +148,7 @@ count(InputIterator first, InputIterator last, const EqualityComparable& value); * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam InputIterator must be a model of Input - * Iterator and \c InputIterator's \c value_type must be convertible to \c Predicate's \c argument_type. \tparam + * Iterator and \c InputIterator's \c value_type must be convertible to \c Predicate's argument type. \tparam * Predicate must be a model of Predicate. * * The following code snippet demonstrates how to use \p count to @@ -200,7 +200,7 @@ count_if(const thrust::detail::execution_policy_base& exec, * \return The number of elements where \p pred is \c true. * * \tparam InputIterator must be a model of Input - * Iterator and \c InputIterator's \c value_type must be convertible to \c Predicate's \c argument_type. \tparam + * Iterator and \c InputIterator's \c value_type must be convertible to \c Predicate's argument type. \tparam * Predicate must be a model of Predicate. * * The following code snippet demonstrates how to use \p count to diff --git a/thrust/thrust/equal.h b/thrust/thrust/equal.h index dc22aeb16b1..3029bc58b92 100644 --- a/thrust/thrust/equal.h +++ b/thrust/thrust/equal.h @@ -148,9 +148,9 @@ bool equal(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2); * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam InputIterator1 is a model of Input - * Iterator, and \p InputIterator1's \c value_type is convertible to \p BinaryPredicate's \c first_argument_type. + * Iterator, and \p InputIterator1's \c value_type is convertible to \p BinaryPredicate's first argument type. * \tparam InputIterator2 is a model of Input - * Iterator, and \p InputIterator2's \c value_type is convertible to \p BinaryPredicate's \c second_argument_type. + * Iterator, and \p InputIterator2's \c value_type is convertible to \p BinaryPredicate's second argument type. * \tparam BinaryPredicate is a model of Binary * Predicate. * @@ -204,9 +204,9 @@ equal(const thrust::detail::execution_policy_base& exec, * \return \c true, if the sequences are equal; \c false, otherwise. * * \tparam InputIterator1 is a model of Input - * Iterator, and \p InputIterator1's \c value_type is convertible to \p BinaryPredicate's \c first_argument_type. + * Iterator, and \p InputIterator1's \c value_type is convertible to \p BinaryPredicate's first argument type. * \tparam InputIterator2 is a model of Input - * Iterator, and \p InputIterator2's \c value_type is convertible to \p BinaryPredicate's \c second_argument_type. + * Iterator, and \p InputIterator2's \c value_type is convertible to \p BinaryPredicate's second argument type. * \tparam BinaryPredicate is a model of Binary * Predicate. * diff --git a/thrust/thrust/extrema.h b/thrust/thrust/extrema.h index 9011468e3ed..72b3dcf728d 100644 --- a/thrust/thrust/extrema.h +++ b/thrust/thrust/extrema.h @@ -289,8 +289,8 @@ ForwardIterator min_element(ForwardIterator first, ForwardIterator last); * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward - * Iterator, and \p ForwardIterator's \c value_type is convertible to both \p comp's \c first_argument_type and \c - * second_argument_type. \tparam BinaryPredicate is a model of , and \p ForwardIterator's \c value_type is convertible to both \p comp's first and second argument type. + * \tparam BinaryPredicate is a model of Binary Predicate. * * The following code snippet demonstrates how to use \p min_element to find the smallest element @@ -353,9 +353,9 @@ _CCCL_HOST_DEVICE ForwardIterator min_element( * if it is not an empty range; \p last, otherwise. * * \tparam ForwardIterator is a model of Forward - * Iterator, and \p ForwardIterator's \c value_type is convertible to both \p comp's \c first_argument_type and \c - * second_argument_type. \tparam BinaryPredicate is a model of Binary Predicate. + * Iterator, and \p ForwardIterator's \c value_type is convertible to both \p comp's first and second argument type. + * \tparam BinaryPredicate is a model of Binary + * Predicate. * * The following code snippet demonstrates how to use \p min_element to find the smallest element * of a collection of key-value pairs. @@ -491,9 +491,9 @@ ForwardIterator max_element(ForwardIterator first, ForwardIterator last); * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward - * Iterator, and \p ForwardIterator's \c value_type is convertible to both \p comp's \c first_argument_type and \c - * second_argument_type. \tparam BinaryPredicate is a model of Binary Predicate. + * Iterator, and \p ForwardIterator's \c value_type is convertible to both \p comp's first and second argument type. + * \tparam BinaryPredicate is a model of Binary + * Predicate. * * The following code snippet demonstrates how to use \p max_element to find the largest element * of a collection of key-value pairs using the \p thrust::host execution policy for parallelization. @@ -555,9 +555,9 @@ _CCCL_HOST_DEVICE ForwardIterator max_element( * if it is not an empty range; \p last, otherwise. * * \tparam ForwardIterator is a model of Forward - * Iterator, and \p ForwardIterator's \c value_type is convertible to both \p comp's \c first_argument_type and \c - * second_argument_type. \tparam BinaryPredicate is a model of Binary Predicate. + * Iterator, and \p ForwardIterator's \c value_type is convertible to both \p comp's first and second argument type. + * \tparam BinaryPredicate is a model of Binary + * Predicate. * * The following code snippet demonstrates how to use \p max_element to find the largest element * of a collection of key-value pairs. @@ -682,9 +682,9 @@ thrust::pair minmax_element(ForwardIterator fi * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward - * Iterator, and \p ForwardIterator's \c value_type is convertible to both \p comp's \c first_argument_type and \c - * second_argument_type. \tparam BinaryPredicate is a model of Binary Predicate. + * Iterator, and \p ForwardIterator's \c value_type is convertible to both \p comp's first and second argument type. + * \tparam BinaryPredicate is a model of Binary + * Predicate. * * The following code snippet demonstrates how to use \p minmax_element to find the smallest and largest elements * of a collection of key-value pairs using the \p thrust::host execution policy for parallelization: @@ -745,9 +745,9 @@ _CCCL_HOST_DEVICE thrust::pair minmax_element( * if it is not an empty range; \p last, otherwise. * * \tparam ForwardIterator is a model of Forward - * Iterator, and \p ForwardIterator's \c value_type is convertible to both \p comp's \c first_argument_type and \c - * second_argument_type. \tparam BinaryPredicate is a model of Binary Predicate. + * Iterator, and \p ForwardIterator's \c value_type is convertible to both \p comp's first and second argument type. + * \tparam BinaryPredicate is a model of Binary + * Predicate. * * The following code snippet demonstrates how to use \p minmax_element to find the smallest and largest elements * of a collection of key-value pairs. diff --git a/thrust/thrust/for_each.h b/thrust/thrust/for_each.h index 0bd28d8b10b..cb12f74d36e 100644 --- a/thrust/thrust/for_each.h +++ b/thrust/thrust/for_each.h @@ -55,9 +55,8 @@ THRUST_NAMESPACE_BEGIN * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam InputIterator is a model of Input - * Iterator, and \p InputIterator's \c value_type is convertible to \p UnaryFunction's \c argument_type. \tparam - * UnaryFunction is a model of Unary - * Function, and \p UnaryFunction does not apply any non-constant operation through its argument. + * Iterator, and \p InputIterator's \c value_type is convertible to \p UnaryFunction's argument type. \tparam + * UnaryFunction does not apply any non-constant operation through its argument. * * The following code snippet demonstrates how to use \p for_each to print the elements * of a \p thrust::device_vector using the \p thrust::device parallelization policy: @@ -115,10 +114,8 @@ _CCCL_HOST_DEVICE InputIterator for_each( * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam InputIterator is a model of Input - * Iterator, and \p InputIterator's \c value_type is convertible to \p UnaryFunction's \c argument_type. \tparam - * Size is an integral type. \tparam UnaryFunction is a model of Unary Function, and \p UnaryFunction - * does not apply any non-constant operation through its argument. + * Iterator, and \p InputIterator's \c value_type is convertible to \p UnaryFunction's argument type. \tparam + * Size is an integral type. \tparam UnaryFunction does not apply any non-constant operation through its argument. * * The following code snippet demonstrates how to use \p for_each_n to print the elements * of a \p device_vector using the \p thrust::device parallelization policy. @@ -169,9 +166,8 @@ _CCCL_HOST_DEVICE InputIterator for_each_n( * \return last * * \tparam InputIterator is a model of Input - * Iterator, and \p InputIterator's \c value_type is convertible to \p UnaryFunction's \c argument_type. \tparam - * UnaryFunction is a model of Unary - * Function, and \p UnaryFunction does not apply any non-constant operation through its argument. + * Iterator, and \p InputIterator's \c value_type is convertible to \p UnaryFunction's argument type. + * \tparam UnaryFunction does not apply any non-constant operation through its argument. * * The following code snippet demonstrates how to use \p for_each to print the elements * of a \p device_vector. @@ -219,10 +215,9 @@ InputIterator for_each(InputIterator first, InputIterator last, UnaryFunction f) * \return first + n * * \tparam InputIterator is a model of Input - * Iterator, and \p InputIterator's \c value_type is convertible to \p UnaryFunction's \c argument_type. \tparam - * Size is an integral type. \tparam UnaryFunction is a model of Unary Function, and \p UnaryFunction - * does not apply any non-constant operation through its argument. + * Iterator, and \p InputIterator's \c value_type is convertible to \p UnaryFunction's argument type. \tparam + * Size is an integral type. + * \tparam UnaryFunction does not apply any non-constant operation through its argument. * * The following code snippet demonstrates how to use \p for_each_n to print the elements * of a \p device_vector. diff --git a/thrust/thrust/functional.h b/thrust/thrust/functional.h index a58207d6e09..a8887d839e8 100644 --- a/thrust/thrust/functional.h +++ b/thrust/thrust/functional.h @@ -48,260 +48,12 @@ THRUST_NAMESPACE_BEGIN * \{ */ -#define THRUST_BINARY_FUNCTOR_VOID_SPECIALIZATION(func, impl) \ - template <> \ - struct func \ - { \ - using is_transparent = void; \ - _CCCL_EXEC_CHECK_DISABLE \ - template \ - _CCCL_HOST_DEVICE constexpr auto operator()(T1&& t1, T2&& t2) const noexcept(noexcept(impl)) -> decltype(impl) \ - { \ - return impl; \ - } \ - } - -/*! \p plus is a function object. Specifically, it is an Adaptable Binary Function. - * If \c f is an object of class plus, and \c x and \c y are objects - * of class \c T, then f(x,y) returns x+y. - * - * \tparam T is a model of Assignable, - * and if \c x and \c y are objects of type \p T, then x+y must be defined and must have a return type - * that is convertible to \c T. - * - * The following code snippet demonstrates how to use plus to sum two - * device_vectors of \c floats. - * - * \code - * #include - * #include - * #include - * #include - * #include - * ... - * const int N = 1000; - * thrust::device_vector V1(N); - * thrust::device_vector V2(N); - * thrust::device_vector V3(N); - * - * thrust::sequence(V1.begin(), V1.end(), 1); - * thrust::fill(V2.begin(), V2.end(), 75); - * - * thrust::transform(V1.begin(), V1.end(), V2.begin(), V3.begin(), - * thrust::plus()); - * // V3 is now {76, 77, 78, ..., 1075} - * \endcode - * - * \see https://en.cppreference.com/w/cpp/utility/functional/plus - */ -template -struct plus : public ::cuda::std::plus -{ - using first_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using second_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using result_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; -}; // end plus - -/*! \p minus is a function object. Specifically, it is an Adaptable Binary Function. - * If \c f is an object of class minus, and \c x and \c y are objects - * of class \c T, then f(x,y) returns x-y. - * - * \tparam T is a model of Assignable, - * and if \c x and \c y are objects of type \p T, then x-y must be defined and must have a return type - * that is convertible to \c T. - * - * The following code snippet demonstrates how to use minus to subtract - * a device_vector of \c floats from another. - * - * \code - * #include - * #include - * #include - * #include - * #include - * ... - * const int N = 1000; - * thrust::device_vector V1(N); - * thrust::device_vector V2(N); - * thrust::device_vector V3(N); - * - * thrust::sequence(V1.begin(), V1.end(), 1); - * thrust::fill(V2.begin(), V2.end(), 75); - * - * thrust::transform(V1.begin(), V1.end(), V2.begin(), V3.begin(), - * thrust::minus()); - * // V3 is now {-74, -73, -72, ..., 925} - * \endcode - * - * \see https://en.cppreference.com/w/cpp/utility/functional/minus - */ -template -struct minus : public ::cuda::std::minus -{ - using first_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using second_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using result_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; -}; // end minus - -/*! \p multiplies is a function object. Specifically, it is an Adaptable Binary Function. - * If \c f is an object of class multiplies, and \c x and \c y are objects - * of class \c T, then f(x,y) returns x*y. - * - * \tparam T is a model of Assignable, - * and if \c x and \c y are objects of type \p T, then x*y must be defined and must have a return type - * that is convertible to \c T. - * - * The following code snippet demonstrates how to use multiplies to multiply - * two device_vectors of \c floats. - * - * \code - * #include - * #include - * #include - * #include - * #include - * ... - * const int N = 1000; - * thrust::device_vector V1(N); - * thrust::device_vector V2(N); - * thrust::device_vector V3(N); - * - * thrust::sequence(V1.begin(), V1.end(), 1); - * thrust::fill(V2.begin(), V2.end(), 75); - * - * thrust::transform(V1.begin(), V1.end(), V2.begin(), V3.begin(), - * thrust::multiplies()); - * // V3 is now {75, 150, 225, ..., 75000} - * \endcode - * - * \see https://en.cppreference.com/w/cpp/utility/functional/multiplies - */ -template -struct multiplies : public ::cuda::std::multiplies -{ - using first_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using second_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using result_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; -}; // end multiplies - -/*! \p divides is a function object. Specifically, it is an Adaptable Binary Function. - * If \c f is an object of class divides, and \c x and \c y are objects - * of class \c T, then f(x,y) returns x/y. - * - * \tparam T is a model of Assignable, - * and if \c x and \c y are objects of type \p T, then x/y must be defined and must have a return type - * that is convertible to \c T. - * - * The following code snippet demonstrates how to use divides to divide - * one device_vectors of \c floats by another. - * - * \code - * #include - * #include - * #include - * #include - * #include - * ... - * const int N = 1000; - * thrust::device_vector V1(N); - * thrust::device_vector V2(N); - * thrust::device_vector V3(N); - * - * thrust::sequence(V1.begin(), V1.end(), 1); - * thrust::fill(V2.begin(), V2.end(), 75); - * - * thrust::transform(V1.begin(), V1.end(), V2.begin(), V3.begin(), - * thrust::divides()); - * // V3 is now {1/75, 2/75, 3/75, ..., 1000/75} - * \endcode - * - * \see https://en.cppreference.com/w/cpp/utility/functional/divides - */ -template -struct divides : public ::cuda::std::divides -{ - using first_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using second_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using result_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; -}; // end divides - -/*! \p modulus is a function object. Specifically, it is an Adaptable Binary Function. - * If \c f is an object of class modulus, and \c x and \c y are objects - * of class \c T, then f(x,y) returns x \% y. - * - * \tparam T is a model of Assignable, - * and if \c x and \c y are objects of type \p T, then x \% y must be defined and must have a return - * type that is convertible to \c T. - * - * The following code snippet demonstrates how to use modulus to take - * the modulus of one device_vectors of \c floats by another. - * - * \code - * #include - * #include - * #include - * #include - * #include - * ... - * const int N = 1000; - * thrust::device_vector V1(N); - * thrust::device_vector V2(N); - * thrust::device_vector V3(N); - * - * thrust::sequence(V1.begin(), V1.end(), 1); - * thrust::fill(V2.begin(), V2.end(), 75); - * - * thrust::transform(V1.begin(), V1.end(), V2.begin(), V3.begin(), - * thrust::modulus()); - * // V3 is now {1%75, 2%75, 3%75, ..., 1000%75} - * \endcode - * - * \see https://en.cppreference.com/w/cpp/utility/functional/modulus - */ -template -struct modulus : public ::cuda::std::modulus -{ - using first_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using second_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using result_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; -}; // end modulus - -/*! \p negate is a function object. Specifically, it is an Adaptable Unary Function. - * If \c f is an object of class negate, and \c x is an object - * of class \c T, then f(x) returns -x. - * - * \tparam T is a model of Assignable, - * and if \c x is an object of type \p T, then -x must be defined and must have a return type that is - * convertible to \c T. - * - * The following code snippet demonstrates how to use negate to negate - * the elements of a device_vector of \c floats. - * - * \code - * #include - * #include - * #include - * #include - * ... - * const int N = 1000; - * thrust::device_vector V1(N); - * thrust::device_vector V2(N); - * - * thrust::sequence(V1.begin(), V1.end(), 1); - * - * thrust::transform(V1.begin(), V1.end(), V2.begin(), - * thrust::negate()); - * // V2 is now {-1, -2, -3, ..., -1000} - * \endcode - * - * \see https://en.cppreference.com/w/cpp/utility/functional/negate - */ -template -struct negate : ::cuda::std::negate -{ - using argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using result_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; -}; // end negate +using ::cuda::std::divides; +using ::cuda::std::minus; +using ::cuda::std::modulus; +using ::cuda::std::multiplies; +using ::cuda::std::negate; +using ::cuda::std::plus; /*! \p square is a function object. Specifically, it is an Adaptable Unary Function. * If \c f is an object of class square, and \c x is an object @@ -334,15 +86,12 @@ struct negate : ::cuda::std::negate template struct square { - using argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using result_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - _CCCL_EXEC_CHECK_DISABLE _CCCL_HOST_DEVICE constexpr T operator()(const T& x) const { return x * x; } -}; // end square +}; template <> struct square @@ -365,119 +114,12 @@ struct square * \{ */ -/*! \p equal_to is a function object. Specifically, it is an Adaptable Binary - * Predicate, which means it is a function object that tests the truth or falsehood - * of some condition. If \c f is an object of class equal_to and \c x - * and \c y are objects of class \c T, then f(x,y) returns \c true if - * x == y and \c false otherwise. - * - * \tparam T is a model of Equality - * Comparable. - * - * \see https://en.cppreference.com/w/cpp/utility/functional/equal_to - */ -template -struct equal_to : public ::cuda::std::equal_to -{ - using first_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using second_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using result_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; -}; // end equal_to - -/*! \p not_equal_to is a function object. Specifically, it is an Adaptable Binary - * Predicate, which means it is a function object that tests the truth or falsehood - * of some condition. If \c f is an object of class not_equal_to and \c x - * and \c y are objects of class \c T, then f(x,y) returns \c true if - * x != y and \c false otherwise. - * - * \tparam T is a model of Equality - * Comparable. - * - * \see https://en.cppreference.com/w/cpp/utility/functional/not_equal_to - */ -template -struct not_equal_to : public ::cuda::std::not_equal_to -{ - using first_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using second_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using result_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; -}; // end not_equal_to - -/*! \p greater is a function object. Specifically, it is an Adaptable Binary - * Predicate, which means it is a function object that tests the truth or falsehood - * of some condition. If \c f is an object of class greater and \c x - * and \c y are objects of class \c T, then f(x,y) returns \c true if - * x > y and \c false otherwise. - * - * \tparam T is a model of LessThan - * Comparable. - * - * \see https://en.cppreference.com/w/cpp/utility/functional/greater - */ -template -struct greater : public ::cuda::std::greater -{ - using first_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using second_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using result_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; -}; // end greater - -/*! \p less is a function object. Specifically, it is an Adaptable Binary - * Predicate, which means it is a function object that tests the truth or falsehood - * of some condition. If \c f is an object of class less and \c x - * and \c y are objects of class \c T, then f(x,y) returns \c true if - * x < y and \c false otherwise. - * - * \tparam T is a model of LessThan - * Comparable. - * - * \see https://en.cppreference.com/w/cpp/utility/functional/less - */ -template -struct less : public ::cuda::std::less -{ - using first_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using second_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using result_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; -}; // end less - -/*! \p greater_equal is a function object. Specifically, it is an Adaptable Binary - * Predicate, which means it is a function object that tests the truth or falsehood - * of some condition. If \c f is an object of class greater_equal and \c x - * and \c y are objects of class \c T, then f(x,y) returns \c true if - * x >= y and \c false otherwise. - * - * \tparam T is a model of LessThan - * Comparable. - * - * \see https://en.cppreference.com/w/cpp/utility/functional/greater_equal - */ -template -struct greater_equal : public ::cuda::std::greater_equal -{ - using first_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using second_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using result_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; -}; // end greater_equal - -/*! \p less_equal is a function object. Specifically, it is an Adaptable Binary - * Predicate, which means it is a function object that tests the truth or falsehood - * of some condition. If \c f is an object of class less_equal and \c x - * and \c y are objects of class \c T, then f(x,y) returns \c true if - * x <= y and \c false otherwise. - * - * \tparam T is a model of LessThan - * Comparable. - * - * \see https://en.cppreference.com/w/cpp/utility/functional/less_equal - */ -template -struct less_equal : public ::cuda::std::less_equal -{ - using first_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using second_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using result_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; -}; // end less_equal +using ::cuda::std::equal_to; +using ::cuda::std::greater; +using ::cuda::std::greater_equal; +using ::cuda::std::less; +using ::cuda::std::less_equal; +using ::cuda::std::not_equal_to; /*! \} */ @@ -487,73 +129,9 @@ struct less_equal : public ::cuda::std::less_equal * \{ */ -/*! \p logical_and is a function object. Specifically, it is an Adaptable Binary Predicate, - * which means it is a function object that tests the truth or falsehood of some condition. - * If \c f is an object of class logical_and and \c x and \c y are objects of - * class \c T (where \c T is convertible to \c bool) then f(x,y) returns \c true - * if and only if both \c x and \c y are \c true. - * - * \tparam T must be convertible to \c bool. - * - * \see https://en.cppreference.com/w/cpp/utility/functional/logical_and - */ -template -struct logical_and : public ::cuda::std::logical_and -{ - using first_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using second_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using result_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; -}; // end logical_and - -/*! \p logical_or is a function object. Specifically, it is an Adaptable Binary Predicate, - * which means it is a function object that tests the truth or falsehood of some condition. - * If \c f is an object of class logical_or and \c x and \c y are objects of - * class \c T (where \c T is convertible to \c bool) then f(x,y) returns \c true - * if and only if either \c x or \c y are \c true. - * - * \tparam T must be convertible to \c bool. - * - * \see https://en.cppreference.com/w/cpp/utility/functional/logical_or - */ -template -struct logical_or : public ::cuda::std::logical_or -{ - using first_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using second_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using result_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; -}; // end logical_or - -/*! \p logical_not is a function object. Specifically, it is an Adaptable Predicate, - * which means it is a function object that tests the truth or falsehood of some condition. - * If \c f is an object of class logical_not and \c x is an object of - * class \c T (where \c T is convertible to \c bool) then f(x) returns \c true - * if and only if \c x is \c false. - * - * \tparam T must be convertible to \c bool. - * - * The following code snippet demonstrates how to use \p logical_not to transform - * a device_vector of \c bools into its logical complement. - * - * \code - * #include - * #include - * #include - * ... - * thrust::device_vector V; - * ... - * thrust::transform(V.begin(), V.end(), V.begin(), thrust::logical_not()); - * // The elements of V are now the logical complement of what they were prior - * \endcode - * - * \see https://en.cppreference.com/w/cpp/utility/functional/logical_not - */ -template -struct logical_not : public ::cuda::std::logical_not -{ - using first_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using second_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using result_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; -}; // end logical_not +using ::cuda::std::logical_and; +using ::cuda::std::logical_not; +using ::cuda::std::logical_or; /*! \} */ @@ -563,122 +141,9 @@ struct logical_not : public ::cuda::std::logical_not * \{ */ -/*! \p bit_and is a function object. Specifically, it is an Adaptable Binary Function. - * If \c f is an object of class bit_and, and \c x and \c y are objects - * of class \c T, then f(x,y) returns x&y. - * - * \tparam T is a model of Assignable, - * and if \c x and \c y are objects of type \p T, then x&y must be defined and must have a return type - * that is convertible to \c T. - * - * The following code snippet demonstrates how to use bit_and to take - * the bitwise AND of one device_vector of \c ints by another. - * - * \code - * #include - * #include - * #include - * #include - * #include - * ... - * const int N = 1000; - * thrust::device_vector V1(N); - * thrust::device_vector V2(N); - * thrust::device_vector V3(N); - * - * thrust::sequence(V1.begin(), V1.end(), 1); - * thrust::fill(V2.begin(), V2.end(), 13); - * - * thrust::transform(V1.begin(), V1.end(), V2.begin(), V3.begin(), - * thrust::bit_and()); - * // V3 is now {1&13, 2&13, 3&13, ..., 1000%13} - * \endcode - */ -template -struct bit_and : public ::cuda::std::bit_and -{ - using first_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using second_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using result_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; -}; // end bit_and - -/*! \p bit_or is a function object. Specifically, it is an Adaptable Binary Function. - * If \c f is an object of class bit_and, and \c x and \c y are objects - * of class \c T, then f(x,y) returns x|y. - * - * \tparam T is a model of Assignable, - * and if \c x and \c y are objects of type \p T, then x|y must be defined and must have a return type - * that is convertible to \c T. - * - * The following code snippet demonstrates how to use bit_or to take - * the bitwise OR of one device_vector of \c ints by another. - * - * \code - * #include - * #include - * #include - * #include - * #include - * ... - * const int N = 1000; - * thrust::device_vector V1(N); - * thrust::device_vector V2(N); - * thrust::device_vector V3(N); - * - * thrust::sequence(V1.begin(), V1.end(), 1); - * thrust::fill(V2.begin(), V2.end(), 13); - * - * thrust::transform(V1.begin(), V1.end(), V2.begin(), V3.begin(), - * thrust::bit_or()); - * // V3 is now {1|13, 2|13, 3|13, ..., 1000|13} - * \endcode - */ -template -struct bit_or : public ::cuda::std::bit_or -{ - using first_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using second_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using result_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; -}; // end bit_or - -/*! \p bit_xor is a function object. Specifically, it is an Adaptable Binary Function. - * If \c f is an object of class bit_and, and \c x and \c y are objects - * of class \c T, then f(x,y) returns x^y. - * - * \tparam T is a model of Assignable, - * and if \c x and \c y are objects of type \p T, then x^y must be defined and must have a return type - * that is convertible to \c T. - * - * The following code snippet demonstrates how to use bit_xor to take - * the bitwise XOR of one device_vector of \c ints by another. - * - * \code - * #include - * #include - * #include - * #include - * #include - * ... - * const int N = 1000; - * thrust::device_vector V1(N); - * thrust::device_vector V2(N); - * thrust::device_vector V3(N); - * - * thrust::sequence(V1.begin(), V1.end(), 1); - * thrust::fill(V2.begin(), V2.end(), 13); - * - * thrust::transform(V1.begin(), V1.end(), V2.begin(), V3.begin(), - * thrust::bit_xor()); - * // V3 is now {1^13, 2^13, 3^13, ..., 1000^13} - * \endcode - */ -template -struct bit_xor : public ::cuda::std::bit_xor -{ - using first_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using second_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using result_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; -}; // end bit_xor +using ::cuda::std::bit_and; +using ::cuda::std::bit_or; +using ::cuda::std::bit_xor; /*! \} */ @@ -711,8 +176,8 @@ struct bit_xor : public ::cuda::std::bit_xor template struct identity { - using argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - using result_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; + // FIXME(bgruber): we cannot remove this yet, because transform_iterator depends on it + using result_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; _CCCL_EXEC_CHECK_DISABLE _CCCL_HOST_DEVICE constexpr const T& operator()(const T& x) const @@ -740,97 +205,8 @@ template <> struct identity : ::cuda::std::__identity {}; -/*! \p maximum is a function object that takes two arguments and returns the greater - * of the two. Specifically, it is an Adaptable Binary Function. If \c f is an - * object of class maximum and \c x and \c y are objects of class \c T - * f(x,y) returns \c x if x > y and \c y, otherwise. - * - * \tparam T is a model of LessThan - * Comparable. - * - * The following code snippet demonstrates that \p maximum returns its - * greater argument. - * - * \code - * #include - * #include - * ... - * int x = 137; - * int y = -137; - * thrust::maximum mx; - * assert(x == mx(x,y)); - * \endcode - * - * \see minimum - * \see min - */ -template -struct maximum : ::cuda::maximum -{ - /*! \typedef first_argument_type - * \brief The type of the function object's first argument. - * deprecated [Since 2.6] - */ - using first_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - - /*! \typedef second_argument_type - * \brief The type of the function object's second argument. - * deprecated [Since 2.6] - */ - using second_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; - - /*! \typedef result_type - * \brief The type of the function object's result; - * deprecated [Since 2.6] - */ - using result_type _LIBCUDACXX_DEPRECATED_IN_CXX11 = T; -}; // end maximum - -/*! \p minimum is a function object that takes two arguments and returns the lesser - * of the two. Specifically, it is an Adaptable Binary Function. If \c f is an - * object of class minimum and \c x and \c y are objects of class \c T - * f(x,y) returns \c x if x < y and \c y, otherwise. - * - * \tparam T is a model of LessThan - * Comparable. - * - * The following code snippet demonstrates that \p minimum returns its - * lesser argument. - * - * \code - * #include - * #include - * ... - * int x = 137; - * int y = -137; - * thrust::minimum mn; - * assert(y == mn(x,y)); - * \endcode - * - * \see maximum - * \see max - */ -template -struct minimum : ::cuda::minimum -{ - /*! \typedef first_argument_type - * \brief The type of the function object's first argument. - * deprecated [Since 2.6] - */ - using first_argument_type _CCCL_ALIAS_ATTRIBUTE(CCCL_DEPRECATED) = T; - - /*! \typedef second_argument_type - * \brief The type of the function object's second argument. - * deprecated [Since 2.6] - */ - using second_argument_type _CCCL_ALIAS_ATTRIBUTE(CCCL_DEPRECATED) = T; - - /*! \typedef result_type - * \brief The type of the function object's result; - * deprecated [Since 2.6] - */ - using result_type _CCCL_ALIAS_ATTRIBUTE(CCCL_DEPRECATED) = T; -}; // end minimum +using ::cuda::maximum; +using ::cuda::minimum; /*! \p project1st is a function object that takes two arguments and returns * its first argument; the second argument is unused. It is essentially a @@ -852,31 +228,13 @@ struct minimum : ::cuda::minimum template struct project1st { - /*! \typedef first_argument_type - * \brief The type of the function object's first argument. - * deprecated [Since 2.6] - */ - using first_argument_type _CCCL_ALIAS_ATTRIBUTE(CCCL_DEPRECATED) = T1; - - /*! \typedef second_argument_type - * \brief The type of the function object's second argument. - * deprecated [Since 2.6] - */ - using second_argument_type _CCCL_ALIAS_ATTRIBUTE(CCCL_DEPRECATED) = T2; - - /*! \typedef result_type - * \brief The type of the function object's result; - * deprecated [Since 2.6] - */ - using result_type _CCCL_ALIAS_ATTRIBUTE(CCCL_DEPRECATED) = T1; - /*! Function call operator. The return value is lhs. */ _CCCL_HOST_DEVICE constexpr const T1& operator()(const T1& lhs, const T2& /*rhs*/) const { return lhs; } -}; // end project1st +}; template <> struct project1st @@ -911,24 +269,6 @@ struct project1st template struct project2nd { - /*! \typedef first_argument_type - * \brief The type of the function object's first argument. - * deprecated [Since 2.6] - */ - using first_argument_type _CCCL_ALIAS_ATTRIBUTE(CCCL_DEPRECATED) = T1; - - /*! \typedef second_argument_type - * \brief The type of the function object's second argument. - * deprecated [Since 2.6] - */ - using second_argument_type _CCCL_ALIAS_ATTRIBUTE(CCCL_DEPRECATED) = T2; - - /*! \typedef result_type - * \brief The type of the function object's result; - * deprecated [Since 2.6] - */ - using result_type _CCCL_ALIAS_ATTRIBUTE(CCCL_DEPRECATED) = T2; - /*! Function call operator. The return value is rhs. */ _CCCL_HOST_DEVICE constexpr const T2& operator()(const T1& /*lhs*/, const T2& rhs) const @@ -959,37 +299,7 @@ struct project2nd * \{ */ -namespace detail -{ -template -struct not_fun_t -{ - F f; - - template - _CCCL_HOST_DEVICE auto operator()(Ts&&... args) noexcept(noexcept(!f(std::forward(args)...))) - -> decltype(!f(std::forward(args)...)) - { - return !f(std::forward(args)...); - } - - template - _CCCL_HOST_DEVICE auto operator()(Ts&&... args) const noexcept(noexcept(!f(std::forward(args)...))) - -> decltype(!f(std::forward(args)...)) - { - return !f(std::forward(args)...); - } -}; -} // namespace detail - -//! Takes a predicate (a callable returning bool) and returns a new predicate that returns the negated result. -//! \see https://en.cppreference.com/w/cpp/utility/functional/not_fn -// TODO(bgruber): alias to ::cuda::std::not_fn in C++17 -template -_CCCL_HOST_DEVICE auto not_fn(F&& f) -> detail::not_fun_t<::cuda::std::decay_t> -{ - return detail::not_fun_t<::cuda::std::decay_t>{std::forward(f)}; -} +using ::cuda::std::not_fn; /*! \} */ @@ -1089,33 +399,7 @@ _CCCL_GLOBAL_CONSTANT thrust::detail::functional::placeholder<9>::type _10; /*! \} // placeholder_objects */ -#undef THRUST_BINARY_FUNCTOR_VOID_SPECIALIZATION - THRUST_NAMESPACE_END -#ifndef _CCCL_DOXYGEN_INVOKED // Do not document -_LIBCUDACXX_BEGIN_NAMESPACE_CUDA -_LIBCUDACXX_MARK_CAN_COPY_ARGUMENTS(THRUST_NS_QUALIFIER::plus); -_LIBCUDACXX_MARK_CAN_COPY_ARGUMENTS(THRUST_NS_QUALIFIER::minus); -_LIBCUDACXX_MARK_CAN_COPY_ARGUMENTS(THRUST_NS_QUALIFIER::multiplies); -_LIBCUDACXX_MARK_CAN_COPY_ARGUMENTS(THRUST_NS_QUALIFIER::divides); -_LIBCUDACXX_MARK_CAN_COPY_ARGUMENTS(THRUST_NS_QUALIFIER::modulus); -_LIBCUDACXX_MARK_CAN_COPY_ARGUMENTS(THRUST_NS_QUALIFIER::negate); -_LIBCUDACXX_MARK_CAN_COPY_ARGUMENTS(THRUST_NS_QUALIFIER::bit_and); -//_LIBCUDACXX_MARK_CAN_COPY_ARGUMENTS(THRUST_NS_QUALIFIER::bit_not); // does not exist? -_LIBCUDACXX_MARK_CAN_COPY_ARGUMENTS(THRUST_NS_QUALIFIER::bit_or); -_LIBCUDACXX_MARK_CAN_COPY_ARGUMENTS(THRUST_NS_QUALIFIER::bit_xor); -_LIBCUDACXX_MARK_CAN_COPY_ARGUMENTS(THRUST_NS_QUALIFIER::equal_to); -_LIBCUDACXX_MARK_CAN_COPY_ARGUMENTS(THRUST_NS_QUALIFIER::not_equal_to); -_LIBCUDACXX_MARK_CAN_COPY_ARGUMENTS(THRUST_NS_QUALIFIER::less); -_LIBCUDACXX_MARK_CAN_COPY_ARGUMENTS(THRUST_NS_QUALIFIER::less_equal); -_LIBCUDACXX_MARK_CAN_COPY_ARGUMENTS(THRUST_NS_QUALIFIER::greater_equal); -_LIBCUDACXX_MARK_CAN_COPY_ARGUMENTS(THRUST_NS_QUALIFIER::greater); -_LIBCUDACXX_MARK_CAN_COPY_ARGUMENTS(THRUST_NS_QUALIFIER::logical_and); -_LIBCUDACXX_MARK_CAN_COPY_ARGUMENTS(THRUST_NS_QUALIFIER::logical_not); -_LIBCUDACXX_MARK_CAN_COPY_ARGUMENTS(THRUST_NS_QUALIFIER::logical_or); -_LIBCUDACXX_END_NAMESPACE_CUDA -#endif // _CCCL_DOXYGEN_INVOKED - #include #include diff --git a/thrust/thrust/gather.h b/thrust/thrust/gather.h index 1825fb819c3..2d4a8e6909f 100644 --- a/thrust/thrust/gather.h +++ b/thrust/thrust/gather.h @@ -306,7 +306,7 @@ OutputIterator gather_if( * Iterator and \c InputIterator1's \c value_type must be convertible to \c RandomAccessIterator's \c * difference_type. \tparam InputIterator2 must be a model of Input Iterator and \c InputIterator2's \c - * value_type must be convertible to \c Predicate's \c argument_type. \tparam RandomAccessIterator must be a model of Random Access iterator and \c * RandomAccessIterator's \c value_type must be convertible to \c OutputIterator's \c value_type. \tparam OutputIterator * must be a model of Output Iterator. \tparam @@ -392,7 +392,7 @@ _CCCL_HOST_DEVICE OutputIterator gather_if( * Iterator and \c InputIterator1's \c value_type must be convertible to \c RandomAccessIterator's \c * difference_type. \tparam InputIterator2 must be a model of Input Iterator and \c InputIterator2's \c - * value_type must be convertible to \c Predicate's \c argument_type. \tparam RandomAccessIterator must be a model of Random Access iterator and \c * RandomAccessIterator's \c value_type must be convertible to \c OutputIterator's \c value_type. \tparam OutputIterator * must be a model of Output Iterator. \tparam diff --git a/thrust/thrust/generate.h b/thrust/thrust/generate.h index 20f5090bea4..17da0f9eda6 100644 --- a/thrust/thrust/generate.h +++ b/thrust/thrust/generate.h @@ -50,9 +50,8 @@ THRUST_NAMESPACE_BEGIN * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward - * Iterator, and \p ForwardIterator is mutable. \tparam Generator is a model of Generator, and \p Generator's \c result_type is - * convertible to \p ForwardIterator's \c value_type. + * Iterator, and \p ForwardIterator is mutable. + * \tparam Generator A nullary function with a return type convertible to \p ForwardIterator's \c value_type. * * The following code snippet demonstrates how to fill a \c host_vector with random numbers, * using the standard C library function \c rand using the \p thrust::host execution policy for parallelization: @@ -89,9 +88,8 @@ generate(const thrust::detail::execution_policy_base& exec, * elements in the range [first,last). * * \tparam ForwardIterator is a model of Forward - * Iterator, and \p ForwardIterator is mutable. \tparam Generator is a model of Generator, and \p Generator's \c result_type is - * convertible to \p ForwardIterator's \c value_type. + * Iterator, and \p ForwardIterator is mutable. + * \tparam Generator A nullary function with a return type convertible to \p ForwardIterator's \c value_type. * * The following code snippet demonstrates how to fill a \c host_vector with random numbers, * using the standard C library function \c rand. @@ -128,9 +126,8 @@ void generate(ForwardIterator first, ForwardIterator last, Generator gen); * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam OutputIterator is a model of Output - * Iterator. \tparam Size is an integral type (either signed or unsigned). \tparam Generator is a model of Generator, and \p Generator's \c result_type is - * convertible to a type in \p OutputIterator's set of \c value_types. + * Iterator. \tparam Size is an integral type (either signed or unsigned). + * \tparam Generator A nullary function with a return type convertible to \p ForwardIterator's \c value_type. * * The following code snippet demonstrates how to fill a \c host_vector with random numbers, * using the standard C library function \c rand using the \p thrust::host execution policy for parallelization: @@ -164,9 +161,8 @@ _CCCL_HOST_DEVICE OutputIterator generate_n( * elements in the range [first,first + n). * * \tparam OutputIterator is a model of Output - * Iterator. \tparam Size is an integral type (either signed or unsigned). \tparam Generator is a model of Generator, and \p Generator's \c result_type is - * convertible to a type in \p OutputIterator's set of \c value_types. + * Iterator. \tparam Size is an integral type (either signed or unsigned). + * \tparam Generator A nullary function with a return type convertible to \p ForwardIterator's \c value_type. * * The following code snippet demonstrates how to fill a \c host_vector with random numbers, * using the standard C library function \c rand. diff --git a/thrust/thrust/inner_product.h b/thrust/thrust/inner_product.h index 7f31482a17c..4219e117962 100644 --- a/thrust/thrust/inner_product.h +++ b/thrust/thrust/inner_product.h @@ -153,16 +153,14 @@ OutputType inner_product(InputIterator1 first1, InputIterator1 last1, InputItera * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam InputIterator1 is a model of Input - * Iterator, and \p InputIterator1's \c value_type is convertible to \p BinaryFunction2's \c first_argument_type. + * Iterator, and \p InputIterator1's \c value_type is convertible to \p BinaryFunction2's first argument type. * \tparam InputIterator2 is a model of Input - * Iterator. and \p InputIterator2's \c value_type is convertible to \p BinaryFunction2's \c second_argument_type. + * Iterator. and \p InputIterator2's \c value_type is convertible to \p BinaryFunction2's second argument type. * \tparam OutputType is a model of Assignable, and \p OutputType is convertible to - * \p BinaryFunction1's \c first_argument_type. \tparam BinaryFunction1 is a model of Binary Function, and \p - * BinaryFunction1's \c return_type is convertible to \p OutputType. \tparam BinaryFunction2 is a model of Binary Function, and \p - * BinaryFunction2's \c return_type is convertible to \p BinaryFunction1's \c second_argument_type. + * \p BinaryFunction1's first argument type. + * \tparam BinaryFunction1 The function's return type must be convertible to \p OutputType. + * \tparam BinaryFunction2 The function's return type must be convertible to \p BinaryFunction1's second argument type. * * \code * #include @@ -218,16 +216,14 @@ _CCCL_HOST_DEVICE OutputType inner_product( * \return The inner product of sequences [first1, last1) and [first2, last2). * * \tparam InputIterator1 is a model of Input - * Iterator, and \p InputIterator1's \c value_type is convertible to \p BinaryFunction2's \c first_argument_type. + * Iterator, and \p InputIterator1's \c value_type is convertible to \p BinaryFunction2's first argument type. * \tparam InputIterator2 is a model of Input - * Iterator. and \p InputIterator2's \c value_type is convertible to \p BinaryFunction2's \c second_argument_type. + * Iterator. and \p InputIterator2's \c value_type is convertible to \p BinaryFunction2's second argument type. * \tparam OutputType is a model of Assignable, and \p OutputType is convertible to - * \p BinaryFunction1's \c first_argument_type. \tparam BinaryFunction1 is a model of Binary Function, and \p - * BinaryFunction1's \c return_type is convertible to \p OutputType. \tparam BinaryFunction2 is a model of Binary Function, and \p - * BinaryFunction2's \c return_type is convertible to \p BinaryFunction1's \c second_argument_type. + * \p BinaryFunction1's first argument type. + * \tparam BinaryFunction1 The function's return type must be convertible to \p OutputType. + * \tparam BinaryFunction2 The function's return type must be convertible to \p BinaryFunction1's second argument type. * * \code * #include diff --git a/thrust/thrust/iterator/transform_iterator.h b/thrust/thrust/iterator/transform_iterator.h index 8d8f2063590..0fd040685c6 100644 --- a/thrust/thrust/iterator/transform_iterator.h +++ b/thrust/thrust/iterator/transform_iterator.h @@ -73,8 +73,7 @@ THRUST_NAMESPACE_BEGIN * #include * #include * - * // note: functor inherits from unary_function - * struct square_root : public thrust::unary_function + * struct square_root * { * __host__ __device__ * float operator()(float x) const @@ -116,8 +115,7 @@ THRUST_NAMESPACE_BEGIN * #include * #include * - * // note: functor inherits from unary_function - * struct square : public thrust::unary_function + * struct square * { * __host__ __device__ * float operator()(float x) const @@ -144,20 +142,13 @@ THRUST_NAMESPACE_BEGIN * } * \endcode * - * Note that in the previous two examples the transform functor (namely \c square_root - * and \c square) inherits from \c thrust::unary_function. Inheriting from - * \c thrust::unary_function ensures that a functor is a valid \c AdaptableUnaryFunction - * and provides all the necessary nested alias. The \p transform_iterator - * can also be applied to a \c UnaryFunction that does not inherit from - * \c thrust::unary_function using an optional template argument. The following example - * illustrates how to use the third template argument to specify the \c result_type of + * The following example illustrates how to use the third template argument to explicitly specify the return type of * the function. * * \code * #include * #include * - * // note: functor *does not* inherit from unary_function * struct square_root * { * __host__ __device__ diff --git a/thrust/thrust/iterator/transform_output_iterator.h b/thrust/thrust/iterator/transform_output_iterator.h index 00b6d44fee4..a009dc22fcf 100644 --- a/thrust/thrust/iterator/transform_output_iterator.h +++ b/thrust/thrust/iterator/transform_output_iterator.h @@ -59,9 +59,7 @@ THRUST_NAMESPACE_BEGIN * #include * #include * - * // note: functor inherits form unary function - * // note: functor inherits from unary_function - * struct square_root : public thrust::unary_function + * struct square_root * { * __host__ __device__ * float operator()(float x) const diff --git a/thrust/thrust/merge.h b/thrust/thrust/merge.h index baf5fc6d7b3..492852c98fb 100644 --- a/thrust/thrust/merge.h +++ b/thrust/thrust/merge.h @@ -197,10 +197,10 @@ merge(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputI * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam InputIterator1 is a model of Input - * Iterator, \p InputIterator1's \c value_type is convertible to \p StrictWeakCompare's \c first_argument_type. and + * Iterator, \p InputIterator1's \c value_type is convertible to \p StrictWeakCompare's first argument type. and * \p InputIterator1's \c value_type is convertible to a type in \p OutputIterator's set of \c value_types. \tparam * InputIterator2 is a model of Input Iterator, - * \p InputIterator2's \c value_type is convertible to \p StrictWeakCompare's \c second_argument_type. + * \p InputIterator2's \c value_type is convertible to \p StrictWeakCompare's second argument type. * and \p InputIterator2's \c value_type is convertible to a type in \p OutputIterator's set of \c value_types. * \tparam OutputIterator is a model of Output * Iterator. \tparam StrictWeakCompare is a model of Input - * Iterator, \p InputIterator1's \c value_type is convertible to \p StrictWeakCompare's \c first_argument_type. and + * Iterator, \p InputIterator1's \c value_type is convertible to \p StrictWeakCompare's first argument type. and * \p InputIterator1's \c value_type is convertible to a type in \p OutputIterator's set of \c value_types. \tparam * InputIterator2 is a model of Input Iterator, - * \p InputIterator2's \c value_type is convertible to \p StrictWeakCompare's \c second_argument_type. + * \p InputIterator2's \c value_type is convertible to \p StrictWeakCompare's second argument type. * and \p InputIterator2's \c value_type is convertible to a type in \p OutputIterator's set of \c value_types. * \tparam OutputIterator is a model of Output * Iterator. \tparam StrictWeakCompare is a model of merge_by_key( * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam InputIterator1 is a model of Input - * Iterator, \p InputIterator1's \c value_type is convertible to \p StrictWeakCompare's \c first_argument_type. and + * Iterator, \p InputIterator1's \c value_type is convertible to \p StrictWeakCompare's first argument type. and * \p InputIterator1's \c value_type is convertible to a type in \p OutputIterator1's set of \c value_types. \tparam * InputIterator2 is a model of Input Iterator, - * \p InputIterator2's \c value_type is convertible to \p StrictWeakCompare's \c second_argument_type. + * \p InputIterator2's \c value_type is convertible to \p StrictWeakCompare's second argument type. * and \p InputIterator2's \c value_type is convertible to a type in \p OutputIterator1's set of \c * value_types. \tparam InputIterator3 is a model of Input Iterator, and \p InputIterator3's \c @@ -653,10 +653,10 @@ _CCCL_HOST_DEVICE thrust::pair merge_by_key( * and such that p.second is the end of the output range of values. * * \tparam InputIterator1 is a model of Input - * Iterator, \p InputIterator1's \c value_type is convertible to \p StrictWeakCompare's \c first_argument_type. and + * Iterator, \p InputIterator1's \c value_type is convertible to \p StrictWeakCompare's first argument type. and * \p InputIterator1's \c value_type is convertible to a type in \p OutputIterator1's set of \c value_types. \tparam * InputIterator2 is a model of Input Iterator, - * \p InputIterator2's \c value_type is convertible to \p StrictWeakCompare's \c second_argument_type. + * \p InputIterator2's \c value_type is convertible to \p StrictWeakCompare's second argument type. * and \p InputIterator2's \c value_type is convertible to a type in \p OutputIterator1's set of \c * value_types. \tparam InputIterator3 is a model of Input Iterator, and \p InputIterator3's \c diff --git a/thrust/thrust/partition.h b/thrust/thrust/partition.h index a9b3a4d1989..b34c09b24db 100644 --- a/thrust/thrust/partition.h +++ b/thrust/thrust/partition.h @@ -66,7 +66,7 @@ THRUST_NAMESPACE_BEGIN * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward - * Iterator, and \p ForwardIterator's \c value_type is convertible to \p Predicate's \c argument_type, and \p + * Iterator, and \p ForwardIterator's \c value_type is convertible to \p Predicate's argument type, and \p * ForwardIterator is mutable. \tparam Predicate is a model of Predicate. * @@ -125,7 +125,7 @@ _CCCL_HOST_DEVICE ForwardIterator partition( * the sequence of the elements which do not satisfy \p pred. * * \tparam ForwardIterator is a model of Forward - * Iterator, and \p ForwardIterator's \c value_type is convertible to \p Predicate's \c argument_type, and \p + * Iterator, and \p ForwardIterator's \c value_type is convertible to \p Predicate's argument type, and \p * ForwardIterator is mutable. \tparam Predicate is a model of Predicate. * @@ -186,7 +186,7 @@ ForwardIterator partition(ForwardIterator first, ForwardIterator last, Predicate * \tparam ForwardIterator is a model of Forward * Iterator, and \p ForwardIterator is mutable. \tparam InputIterator is a model of Input Iterator, and \p InputIterator's \c - * value_type is convertible to \p Predicate's \c argument_type. \tparam Predicate is a model of Predicate. * * \pre The ranges [first,last) and [stencil, stencil + (last - first)) shall not overlap. @@ -251,7 +251,7 @@ _CCCL_HOST_DEVICE ForwardIterator partition( * \tparam ForwardIterator is a model of Forward * Iterator, and \p ForwardIterator is mutable. \tparam InputIterator is a model of Input Iterator, and \p InputIterator's \c - * value_type is convertible to \p Predicate's \c argument_type. \tparam Predicate is a model of Predicate. * * \pre The ranges [first,last) and [stencil, stencil + (last - first)) shall not overlap. @@ -309,7 +309,7 @@ ForwardIterator partition(ForwardIterator first, ForwardIterator last, InputIter * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam InputIterator is a model of Input - * Iterator, and \p InputIterator's \c value_type is convertible to \p Predicate's \c argument_type and \p + * Iterator, and \p InputIterator's \c value_type is convertible to \p Predicate's argument type and \p * InputIterator's \c value_type is convertible to \p OutputIterator1 and \p OutputIterator2's \c value_types. \tparam * OutputIterator1 is a model of Output * Iterator. \tparam OutputIterator2 is a model of partition_copy( * \p out_false. * * \tparam InputIterator is a model of Input - * Iterator, and \p InputIterator's \c value_type is convertible to \p Predicate's \c argument_type and \p + * Iterator, and \p InputIterator's \c value_type is convertible to \p Predicate's argument type and \p * InputIterator's \c value_type is convertible to \p OutputIterator1 and \p OutputIterator2's \c value_types. \tparam * OutputIterator1 is a model of Output * Iterator. \tparam OutputIterator2 is a model of partition_copy( * Iterator, and \p InputIterator's \c value_type is convertible to \p OutputIterator1 and \p OutputIterator2's \c * value_types. \tparam InputIterator2 is a model of Input Iterator, and \p InputIterator2's \c - * value_type is convertible to \p Predicate's \c argument_type. \tparam OutputIterator1 is a model of Output Iterator. \tparam OutputIterator2 is a * model of Output Iterator. \tparam Predicate * is a model of Predicate. @@ -540,7 +540,7 @@ _CCCL_HOST_DEVICE thrust::pair partition_copy( * Iterator, and \p InputIterator's \c value_type is convertible to \p OutputIterator1 and \p OutputIterator2's \c * value_types. \tparam InputIterator2 is a model of Input Iterator, and \p InputIterator2's \c - * value_type is convertible to \p Predicate's \c argument_type. \tparam OutputIterator1 is a model of Output Iterator. \tparam OutputIterator2 is a * model of Output Iterator. \tparam Predicate * is a model of Predicate. @@ -616,7 +616,7 @@ thrust::pair partition_copy( * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward - * Iterator, and \p ForwardIterator's \c value_type is convertible to \p Predicate's \c argument_type, and \p + * Iterator, and \p ForwardIterator's \c value_type is convertible to \p Predicate's argument type, and \p * ForwardIterator is mutable. \tparam Predicate is a model of Predicate. * @@ -678,7 +678,7 @@ _CCCL_HOST_DEVICE ForwardIterator stable_partition( * the sequence of the elements which do not satisfy pred. * * \tparam ForwardIterator is a model of Forward - * Iterator, and \p ForwardIterator's \c value_type is convertible to \p Predicate's \c argument_type, and \p + * Iterator, and \p ForwardIterator's \c value_type is convertible to \p Predicate's argument type, and \p * ForwardIterator is mutable. \tparam Predicate is a model of Predicate. * @@ -741,7 +741,7 @@ ForwardIterator stable_partition(ForwardIterator first, ForwardIterator last, Pr * \tparam ForwardIterator is a model of Forward * Iterator, and \p ForwardIterator is mutable. \tparam InputIterator is a model of Input Iterator, and \p InputIterator's \c - * value_type is convertible to \p Predicate's \c argument_type. \tparam Predicate is a model of Predicate. * * \pre The range [first, last) shall not overlap with the range [stencil, stencil + (last - first)). @@ -808,7 +808,7 @@ _CCCL_HOST_DEVICE ForwardIterator stable_partition( * \tparam ForwardIterator is a model of Forward * Iterator, and \p ForwardIterator is mutable. \tparam InputIterator is a model of Input Iterator, and \p InputIterator's \c - * value_type is convertible to \p Predicate's \c argument_type. \tparam Predicate is a model of Predicate. * * \pre The range [first, last) shall not overlap with the range [stencil, stencil + (last - first)). @@ -872,7 +872,7 @@ ForwardIterator stable_partition(ForwardIterator first, ForwardIterator last, In * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam InputIterator is a model of Input - * Iterator, and \p InputIterator's \c value_type is convertible to \p Predicate's \c argument_type and \p + * Iterator, and \p InputIterator's \c value_type is convertible to \p Predicate's argument type and \p * InputIterator's \c value_type is convertible to \p OutputIterator1 and \p OutputIterator2's \c value_types. \tparam * OutputIterator1 is a model of Output * Iterator. \tparam OutputIterator2 is a model of stable_partitio * \p out_false. * * \tparam InputIterator is a model of Input - * Iterator, and \p InputIterator's \c value_type is convertible to \p Predicate's \c argument_type and \p + * Iterator, and \p InputIterator's \c value_type is convertible to \p Predicate's argument type and \p * InputIterator's \c value_type is convertible to \p OutputIterator1 and \p OutputIterator2's \c value_types. \tparam * OutputIterator1 is a model of Output * Iterator. \tparam OutputIterator2 is a model of stable_partition_copy( * Iterator, and \p InputIterator's \c value_type is convertible to \p OutputIterator1 and \p OutputIterator2's \c * value_types. \tparam InputIterator2 is a model of Input Iterator, and \p InputIterator2's \c - * value_type is convertible to \p Predicate's \c argument_type. \tparam OutputIterator1 is a model of Output Iterator. \tparam OutputIterator2 is a * model of Output Iterator. \tparam Predicate * is a model of Predicate. @@ -1109,7 +1109,7 @@ _CCCL_HOST_DEVICE thrust::pair stable_partitio * Iterator, and \p InputIterator's \c value_type is convertible to \p OutputIterator1 and \p OutputIterator2's \c * value_types. \tparam InputIterator2 is a model of Input Iterator, and \p InputIterator2's \c - * value_type is convertible to \p Predicate's \c argument_type. \tparam OutputIterator1 is a model of Output Iterator. \tparam OutputIterator2 is a * model of Output Iterator. \tparam Predicate * is a model of Predicate. @@ -1181,7 +1181,7 @@ thrust::pair stable_partition_copy( * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward - * Iterator, and \p ForwardIterator's \c value_type is convertible to \p Predicate's \c argument_type. \tparam + * Iterator, and \p ForwardIterator's \c value_type is convertible to \p Predicate's argument type. \tparam * Predicate is a model of Predicate. * * \pre The range [first, last) shall be partitioned by \p pred. @@ -1233,7 +1233,7 @@ _CCCL_HOST_DEVICE ForwardIterator partition_point( * and none_of(mid, last, pred) are both true. * * \tparam ForwardIterator is a model of Forward - * Iterator, and \p ForwardIterator's \c value_type is convertible to \p Predicate's \c argument_type. \tparam + * Iterator, and \p ForwardIterator's \c value_type is convertible to \p Predicate's argument type. \tparam * Predicate is a model of Predicate. * * \pre The range [first, last) shall be partitioned by \p pred. @@ -1296,7 +1296,7 @@ ForwardIterator partition_point(ForwardIterator first, ForwardIterator last, Pre * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam InputIterator is a model of Input - * Iterator, and \p InputIterator's \c value_type is convertible to \p Predicate's \c argument_type. \tparam + * Iterator, and \p InputIterator's \c value_type is convertible to \p Predicate's argument type. \tparam * Predicate is a model of Predicate. * * \code @@ -1345,7 +1345,7 @@ _CCCL_HOST_DEVICE bool is_partitioned( * to \p pred, or if [first, last) is empty. \c false, otherwise. * * \tparam InputIterator is a model of Input - * Iterator, and \p InputIterator's \c value_type is convertible to \p Predicate's \c argument_type. \tparam + * Iterator, and \p InputIterator's \c value_type is convertible to \p Predicate's argument type. \tparam * Predicate is a model of Predicate. * * \code diff --git a/thrust/thrust/reduce.h b/thrust/thrust/reduce.h index 7ef7152d61e..49ff978bbf5 100644 --- a/thrust/thrust/reduce.h +++ b/thrust/thrust/reduce.h @@ -242,11 +242,10 @@ T reduce(InputIterator first, InputIterator last, T init); * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam InputIterator is a model of Input - * Iterator and \c InputIterator's \c value_type is convertible to \c T. \tparam T is a model of Assignable, and is convertible to \p - * BinaryFunction's \c first_argument_type and \c second_argument_type. \tparam BinaryFunction is a model of Binary Function, and \p - * BinaryFunction's \c result_type is convertible to \p OutputType. + * Iterator and \c InputIterator's \c value_type is convertible to \c T. + * \tparam T is a model of Assignable, and is + * convertible to \p BinaryFunction's first and second argument type. + * \tparam BinaryFunction The function's return type must be convertible to \p OutputType. * * The following code snippet demonstrates how to use \p reduce to * compute the maximum value of a sequence of integers using the \p thrust::host execution policy @@ -298,11 +297,10 @@ _CCCL_HOST_DEVICE T reduce( * \return The result of the reduction. * * \tparam InputIterator is a model of Input - * Iterator and \c InputIterator's \c value_type is convertible to \c T. \tparam T is a model of Assignable, and is convertible to \p - * BinaryFunction's \c first_argument_type and \c second_argument_type. \tparam BinaryFunction is a model of Binary Function, and \p - * BinaryFunction's \c result_type is convertible to \p OutputType. + * Iterator and \c InputIterator's \c value_type is convertible to \c T. + * \tparam T is a model of Assignable, and is + * convertible to \p BinaryFunction's first and second argument type. + * \tparam BinaryFunction The function's return type must be convertible to \p OutputType. * * The following code snippet demonstrates how to use \p reduce to * compute the maximum value of a sequence of integers. @@ -628,9 +626,8 @@ thrust::pair reduce_by_key( * InputIterator1's \c value_type is convertible to \c OutputIterator1's \c value_type. \tparam OutputIterator2 is a * model of Output Iterator and and \p * InputIterator2's \c value_type is convertible to \c OutputIterator2's \c value_type. \tparam BinaryPredicate is a - * model of Binary Predicate. \tparam - * BinaryFunction is a model of Binary - * Function and \c BinaryFunction's \c result_type is convertible to \c OutputIterator2's \c value_type. + * model of Binary Predicate. + * \tparam BinaryFunction The function's return type must be convertible to \c OutputIterator2's \c value_type. * * \pre The input ranges shall not overlap either output range. * @@ -708,9 +705,8 @@ _CCCL_HOST_DEVICE thrust::pair reduce_by_key( * InputIterator1's \c value_type is convertible to \c OutputIterator1's \c value_type. \tparam OutputIterator2 is a * model of Output Iterator and and \p * InputIterator2's \c value_type is convertible to \c OutputIterator2's \c value_type. \tparam BinaryPredicate is a - * model of Binary Predicate. \tparam - * BinaryFunction is a model of Binary - * Function and \c BinaryFunction's \c result_type is convertible to \c OutputIterator2's \c value_type. + * model of Binary Predicate. + * \tparam BinaryFunction The function's return type must be convertible to \c OutputIterator2's \c value_type. * * \pre The input ranges shall not overlap either output range. * diff --git a/thrust/thrust/remove.h b/thrust/thrust/remove.h index 80dfa786dcc..6a047632652 100644 --- a/thrust/thrust/remove.h +++ b/thrust/thrust/remove.h @@ -281,7 +281,7 @@ OutputIterator remove_copy(InputIterator first, InputIterator last, OutputIterat * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward * Iterator, \p ForwardIterator is mutable, and \p ForwardIterator's \c value_type is convertible to \p Predicate's - * \c argument_type. \tparam Predicate is a model of Predicate. * * The following code snippet demonstrates how to use \p remove_if to remove @@ -353,7 +353,7 @@ _CCCL_HOST_DEVICE ForwardIterator remove_if( * * \tparam ForwardIterator is a model of Forward * Iterator, \p ForwardIterator is mutable, and \p ForwardIterator's \c value_type is convertible to \p Predicate's - * \c argument_type. \tparam Predicate is a model of Predicate. * * The following code snippet demonstrates how to use \p remove_if to remove @@ -422,7 +422,7 @@ ForwardIterator remove_if(ForwardIterator first, ForwardIterator last, Predicate * \tparam DerivedPolicy The name of the derived execution policy. * \tparam InputIterator is a model of Input * Iterator, \p InputIterator's \c value_type is convertible to a type in \p OutputIterator's set of \c value_types, - * and \p InputIterator's \c value_type is convertible to \p Predicate's \c argument_type. + * and \p InputIterator's \c value_type is convertible to \p Predicate's argument type. * \tparam OutputIterator is a model of Output * Iterator. \tparam Predicate is a model of Predicate. @@ -484,7 +484,7 @@ _CCCL_HOST_DEVICE OutputIterator remove_copy_if( * * \tparam InputIterator is a model of Input * Iterator, \p InputIterator's \c value_type is convertible to a type in \p OutputIterator's set of \c value_types, - * and \p InputIterator's \c value_type is convertible to \p Predicate's \c argument_type. + * and \p InputIterator's \c value_type is convertible to \p Predicate's argument type. * \tparam OutputIterator is a model of Output * Iterator. \tparam Predicate is a model of Predicate. @@ -546,7 +546,7 @@ OutputIterator remove_copy_if(InputIterator first, InputIterator last, OutputIte * \tparam ForwardIterator is a model of Forward * Iterator and \p ForwardIterator is mutable. \tparam InputIterator is a model of Input Iterator, and \p InputIterator's \c - * value_type is convertible to \p Predicate's \c argument_type. \tparam Predicate is a model of Predicate. * * \pre The range [first, last) shall not overlap the range [result, result + (last - first)). @@ -606,7 +606,7 @@ _CCCL_HOST_DEVICE ForwardIterator remove_if( * \tparam ForwardIterator is a model of Forward * Iterator and \p ForwardIterator is mutable. \tparam InputIterator is a model of Input Iterator, and \p InputIterator's \c - * value_type is convertible to \p Predicate's \c argument_type. \tparam Predicate is a model of Predicate. * * \pre The range [first, last) shall not overlap the range [result, result + (last - first)). @@ -664,7 +664,7 @@ ForwardIterator remove_if(ForwardIterator first, ForwardIterator last, InputIter * Iterator, \p InputIterator1's \c value_type is convertible to a type in \p OutputIterator's set of \c * value_types. \tparam InputIterator2 is a model of Input Iterator, and \p InputIterator2's \c - * value_type is convertible to \p Predicate's \c argument_type. \tparam OutputIterator is a model of Output Iterator. \tparam Predicate is a model * of Predicate. * @@ -728,7 +728,7 @@ _CCCL_HOST_DEVICE OutputIterator remove_copy_if( * Iterator, \p InputIterator1's \c value_type is convertible to a type in \p OutputIterator's set of \c * value_types. \tparam InputIterator2 is a model of Input Iterator, and \p InputIterator2's \c - * value_type is convertible to \p Predicate's \c argument_type. \tparam OutputIterator is a model of Output Iterator. \tparam Predicate is a model * of Predicate. * diff --git a/thrust/thrust/replace.h b/thrust/thrust/replace.h index 5d0b58e6d06..7e32ef41eb9 100644 --- a/thrust/thrust/replace.h +++ b/thrust/thrust/replace.h @@ -154,7 +154,7 @@ void replace(ForwardIterator first, ForwardIterator last, const T& old_value, co * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward * Iterator, \p ForwardIterator is mutable, and \p ForwardIterator's \c value_type is convertible to \p Predicate's - * \c argument_type. \tparam Predicate is a model of Predicate. \tparam T is a model of Assignable, and \p T is convertible to \p * ForwardIterator's \c value_type. @@ -217,7 +217,7 @@ _CCCL_HOST_DEVICE void replace_if( * * \tparam ForwardIterator is a model of Forward * Iterator, \p ForwardIterator is mutable, and \p ForwardIterator's \c value_type is convertible to \p Predicate's - * \c argument_type. \tparam Predicate is a model of Predicate. \tparam T is a model of Assignable, and \p T is convertible to \p * ForwardIterator's \c value_type. @@ -280,7 +280,7 @@ void replace_if(ForwardIterator first, ForwardIterator last, Predicate pred, con * \tparam ForwardIterator is a model of Forward * Iterator, and \p ForwardIterator is mutable. \tparam InputIterator is a model of Input Iterator, and \p InputIterator's \c - * value_type is convertible to \p Predicate's \c argument_type. \tparam Predicate is a model of Predicate. \tparam T is a model of Assignable, and \p T is convertible to \p * ForwardIterator's \c value_type. @@ -352,7 +352,7 @@ _CCCL_HOST_DEVICE void replace_if( * \tparam ForwardIterator is a model of Forward * Iterator, and \p ForwardIterator is mutable. \tparam InputIterator is a model of Input Iterator, and \p InputIterator's \c - * value_type is convertible to \p Predicate's \c argument_type. \tparam Predicate is a model of Predicate. \tparam T is a model of Assignable, and \p T is convertible to \p * ForwardIterator's \c value_type. @@ -536,7 +536,7 @@ replace_copy(InputIterator first, InputIterator last, OutputIterator result, con * \tparam DerivedPolicy The name of the derived execution policy. * \tparam InputIterator is a model of Input Iterator, - * and \p InputIterator's \c value_type is convertible to \p Predicate's \c argument_type. + * and \p InputIterator's \c value_type is convertible to \p Predicate's argument type. * \tparam OutputIterator is a model of Output Iterator. * \tparam Predicate is a model of Predicate. @@ -607,7 +607,7 @@ _CCCL_HOST_DEVICE OutputIterator replace_copy_if( * * \tparam InputIterator is a model of Input Iterator, - * and \p InputIterator's \c value_type is convertible to \p Predicate's \c argument_type. + * and \p InputIterator's \c value_type is convertible to \p Predicate's argument type. * \tparam OutputIterator is a model of Output Iterator. * \tparam Predicate is a model of Predicate. @@ -678,7 +678,7 @@ replace_copy_if(InputIterator first, InputIterator last, OutputIterator result, * \tparam InputIterator1 is a model of Input * Iterator. \tparam InputIterator2 is a model of Input Iterator and \p InputIterator2's \c - * value_type is convertible to \p Predicate's \c argument_type. \tparam OutputIterator is a model of Output Iterator. \tparam Predicate is a model * of Predicate. \tparam T is a model of Assignable, and \p T is convertible to \p @@ -761,7 +761,7 @@ _CCCL_HOST_DEVICE OutputIterator replace_copy_if( * \tparam InputIterator1 is a model of Input * Iterator. \tparam InputIterator2 is a model of Input Iterator and \p InputIterator2's \c - * value_type is convertible to \p Predicate's \c argument_type. \tparam OutputIterator is a model of Output Iterator. \tparam Predicate is a model * of Predicate. \tparam T is a model of Assignable, and \p T is convertible to \p diff --git a/thrust/thrust/scan.h b/thrust/thrust/scan.h index f0711704a83..bde015fe978 100644 --- a/thrust/thrust/scan.h +++ b/thrust/thrust/scan.h @@ -180,11 +180,8 @@ OutputIterator inclusive_scan(InputIterator first, InputIterator last, OutputIte * Iterator and \c InputIterator's \c value_type is convertible to \c OutputIterator's \c value_type. \tparam * OutputIterator is a model of Output Iterator * and \c OutputIterator's \c value_type is convertible to - * both \c AssociativeOperator's \c first_argument_type and - * \c second_argument_type. - * \tparam AssociativeOperator is a model of Binary Function and \c - * AssociativeOperator's \c result_type is convertible to \c OutputIterator's \c value_type. + * both \c AssociativeOperator's first and second argument type. + * \tparam AssociativeOperator The function's return type must be convertible to \c OutputIterator's \c value_type. * * \pre \p first may equal \p result but the range [first, last) and the range * [result, result + (last - first)) shall not overlap otherwise. @@ -236,11 +233,8 @@ _CCCL_HOST_DEVICE OutputIterator inclusive_scan( * Iterator and \c InputIterator's \c value_type is convertible to \c OutputIterator's \c value_type. \tparam * OutputIterator is a model of Output Iterator * and \c OutputIterator's \c value_type is convertible to - * both \c AssociativeOperator's \c first_argument_type and - * \c second_argument_type. - * \tparam AssociativeOperator is a model of Binary Function and \c - * AssociativeOperator's \c result_type is convertible to \c OutputIterator's \c value_type. + * both \c AssociativeOperator's first and second argument type. + * \tparam AssociativeOperator The function's return type must be convertible to \c OutputIterator's \c value_type. * * \pre \p first may equal \p result but the range [first, last) and the range * [result, result + (last - first)) shall not overlap otherwise. @@ -289,12 +283,9 @@ inclusive_scan(InputIterator first, InputIterator last, OutputIterator result, A * \tparam InputIterator is a model of Input * Iterator and \c InputIterator's \c value_type is convertible to \c OutputIterator's \c value_type. \tparam * OutputIterator is a model of Output Iterator - * and \c OutputIterator's \c value_type is convertible to both \c AssociativeOperator's \c first_argument_type and - * \c second_argument_type. + * and \c OutputIterator's \c value_type is convertible to both \c AssociativeOperator's first and second argument type. * \tparam T is convertible to \c OutputIterator's \c value_type. - * \tparam AssociativeOperator is a model of Binary Function and \c - * AssociativeOperator's \c result_type is convertible to \c OutputIterator's \c value_type. + * \tparam AssociativeOperator The function's return type must be convertible to \c OutputIterator's \c value_type. * * \pre \p first may equal \p result but the range [first, last) and the range [result, result + (last - * first)) shall not overlap otherwise. @@ -341,12 +332,9 @@ _CCCL_HOST_DEVICE OutputIterator inclusive_scan( * \tparam InputIterator is a model of Input * Iterator and \c InputIterator's \c value_type is convertible to \c OutputIterator's \c value_type. \tparam * OutputIterator is a model of Output Iterator - * and \c OutputIterator's \c value_type is convertible to both \c AssociativeOperator's \c first_argument_type and - * \c second_argument_type. + * and \c OutputIterator's \c value_type is convertible to both \c AssociativeOperator's first and second argument type. * \tparam T is convertible to \c OutputIterator's \c value_type. - * \tparam AssociativeOperator is a model of Binary Function and \c - * AssociativeOperator's \c result_type is convertible to \c OutputIterator's \c value_type. + * \tparam AssociativeOperator The function's return type must be convertible to \c OutputIterator's \c value_type. * * \pre \p first may equal \p result but the range [first, last) and the range [result, result + (last - * first)) shall not overlap otherwise. @@ -594,12 +582,9 @@ OutputIterator exclusive_scan(InputIterator first, InputIterator last, OutputIte * Iterator and \c InputIterator's \c value_type is convertible to \c OutputIterator's \c value_type. \tparam * OutputIterator is a model of Output Iterator * and \c OutputIterator's \c value_type is convertible to - * both \c AssociativeOperator's \c first_argument_type and - * \c second_argument_type. + * both \c AssociativeOperator's first and second argument type. * \tparam T is convertible to \c OutputIterator's \c value_type. - * \tparam AssociativeOperator is a model of Binary Function and \c - * AssociativeOperator's \c result_type is convertible to \c OutputIterator's \c value_type. + * \tparam AssociativeOperator The function's return type must be convertible to \c OutputIterator's \c value_type. * * \pre \p first may equal \p result but the range [first, last) and the range * [result, result + (last - first)) shall not overlap otherwise. @@ -657,12 +642,9 @@ _CCCL_HOST_DEVICE OutputIterator exclusive_scan( * Iterator and \c InputIterator's \c value_type is convertible to \c OutputIterator's \c value_type. \tparam * OutputIterator is a model of Output Iterator * and \c OutputIterator's \c value_type is convertible to - * both \c AssociativeOperator's \c first_argument_type and - * \c second_argument_type. + * both \c AssociativeOperator's first and second argument type. * \tparam T is convertible to \c OutputIterator's \c value_type. - * \tparam AssociativeOperator is a model of Binary Function and \c - * AssociativeOperator's \c result_type is convertible to \c OutputIterator's \c value_type. + * \tparam AssociativeOperator The function's return type must be convertible to \c OutputIterator's \c value_type. * * \pre \p first may equal \p result but the range [first, last) and the range * [result, result + (last - first)) shall not overlap otherwise. @@ -1014,9 +996,7 @@ OutputIterator inclusive_scan_by_key( * href="https://en.cppreference.com/w/cpp/iterator/output_iterator">Output Iterator, and if \c x and \c y are * objects of \c OutputIterator's \c value_type, then binary_op(x,y) is defined. \tparam BinaryPredicate is a * model of Binary Predicate. \tparam - * AssociativeOperator is a model of Binary Function and \c - * AssociativeOperator's \c result_type is convertible to \c OutputIterator's \c value_type. + * AssociativeOperator The function's return type must be convertible to \c OutputIterator's \c value_type. * * \pre \p first1 may equal \p result but the range [first1, last1) and the range * [result, result + (last1 - first1)) shall not overlap otherwise. @@ -1098,9 +1078,7 @@ _CCCL_HOST_DEVICE OutputIterator inclusive_scan_by_key( * href="https://en.cppreference.com/w/cpp/iterator/output_iterator">Output Iterator, and if \c x and \c y are * objects of \c OutputIterator's \c value_type, then binary_op(x,y) is defined. \tparam BinaryPredicate is a * model of Binary Predicate. \tparam - * AssociativeOperator is a model of Binary Function and \c - * AssociativeOperator's \c result_type is convertible to \c OutputIterator's \c value_type. + * AssociativeOperator The function's return type must be convertible to \c OutputIterator's \c value_type. * * \pre \p first1 may equal \p result but the range [first1, last1) and the range * [result, result + (last1 - first1)) shall not overlap otherwise. @@ -1545,9 +1523,8 @@ OutputIterator exclusive_scan_by_key( * href="https://en.cppreference.com/w/cpp/iterator/output_iterator">Output Iterator, and if \c x and \c y are * objects of \c OutputIterator's \c value_type, then binary_op(x,y) is defined. \tparam T is convertible to \c * OutputIterator's \c value_type. \tparam BinaryPredicate is a model of Binary Predicate. \tparam AssociativeOperator - * is a model of Binary Function and - * \c AssociativeOperator's \c result_type is convertible to \c OutputIterator's \c value_type. + * href="https://en.cppreference.com/w/cpp/named_req/BinaryPredicate">Binary Predicate. + * \tparam AssociativeOperator The function's return type must be convertible to \c OutputIterator's \c value_type. * * \pre \p first1 may equal \p result but the range [first1, last1) and the range * [result, result + (last1 - first1)) shall not overlap otherwise. @@ -1637,9 +1614,8 @@ _CCCL_HOST_DEVICE OutputIterator exclusive_scan_by_key( * href="https://en.cppreference.com/w/cpp/iterator/output_iterator">Output Iterator, and if \c x and \c y are * objects of \c OutputIterator's \c value_type, then binary_op(x,y) is defined. \tparam T is convertible to \c * OutputIterator's \c value_type. \tparam BinaryPredicate is a model of Binary Predicate. \tparam AssociativeOperator - * is a model of Binary Function and - * \c AssociativeOperator's \c result_type is convertible to \c OutputIterator's \c value_type. + * href="https://en.cppreference.com/w/cpp/named_req/BinaryPredicate">Binary Predicate. + * \tparam AssociativeOperator The function's return type must be convertible to \c OutputIterator's \c value_type. * * \pre \p first1 may equal \p result but the range [first1, last1) and the range * [result, result + (last1 - first1)) shall not overlap otherwise. diff --git a/thrust/thrust/scatter.h b/thrust/thrust/scatter.h index de46c812fb4..4ee4e031bb1 100644 --- a/thrust/thrust/scatter.h +++ b/thrust/thrust/scatter.h @@ -303,7 +303,7 @@ void scatter_if( * Iterator and \c InputIterator2's \c value_type must be convertible to \c RandomAccessIterator's \c * difference_type. \tparam InputIterator3 must be a model of Input Iterator and \c InputIterator3's \c - * value_type must be convertible to \c Predicate's \c argument_type. \tparam RandomAccessIterator must be a model of Random Access iterator. \tparam * Predicate must be a model of Predicate. * @@ -383,7 +383,7 @@ _CCCL_HOST_DEVICE void scatter_if( * Iterator and \c InputIterator2's \c value_type must be convertible to \c RandomAccessIterator's \c * difference_type. \tparam InputIterator3 must be a model of Input Iterator and \c InputIterator3's \c - * value_type must be convertible to \c Predicate's \c argument_type. \tparam RandomAccessIterator must be a model of Random Access iterator. \tparam * Predicate must be a model of Predicate. * diff --git a/thrust/thrust/set_operations.h b/thrust/thrust/set_operations.h index f2b3f2c74bd..eaaebe7c062 100644 --- a/thrust/thrust/set_operations.h +++ b/thrust/thrust/set_operations.h @@ -214,10 +214,10 @@ OutputIterator set_difference( * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam InputIterator1 is a model of Input - * Iterator, \p InputIterator1's \c value_type is convertible to \p StrictWeakCompare's \c first_argument_type. and + * Iterator, \p InputIterator1's \c value_type is convertible to \p StrictWeakCompare's first argument type. and * \p InputIterator1's \c value_type is convertible to a type in \p OutputIterator's set of \c value_types. \tparam * InputIterator2 is a model of Input Iterator, - * \p InputIterator2's \c value_type is convertible to \p StrictWeakCompare's \c second_argument_type. + * \p InputIterator2's \c value_type is convertible to \p StrictWeakCompare's second argument type. * and \p InputIterator2's \c value_type is convertible to a type in \p OutputIterator's set of \c value_types. * \tparam OutputIterator is a model of Output * Iterator. \tparam StrictWeakCompare is a model of Input - * Iterator, \p InputIterator1's \c value_type is convertible to \p StrictWeakCompare's \c first_argument_type. and + * Iterator, \p InputIterator1's \c value_type is convertible to \p StrictWeakCompare's first argument type. and * \p InputIterator1's \c value_type is convertible to a type in \p OutputIterator's set of \c value_types. \tparam * InputIterator2 is a model of Input Iterator, - * \p InputIterator2's \c value_type is convertible to \p StrictWeakCompare's \c second_argument_type. + * \p InputIterator2's \c value_type is convertible to \p StrictWeakCompare's second argument type. * and \p InputIterator2's \c value_type is convertible to a type in \p OutputIterator's set of \c value_types. * \tparam OutputIterator is a model of Output * Iterator. \tparam StrictWeakCompare is a model of Input - * Iterator, \p InputIterator1's \c value_type is convertible to \p StrictWeakCompare's \c first_argument_type. and + * Iterator, \p InputIterator1's \c value_type is convertible to \p StrictWeakCompare's first argument type. and * \p InputIterator1's \c value_type is convertible to a type in \p OutputIterator's set of \c value_types. \tparam * InputIterator2 is a model of Input Iterator, - * \p InputIterator2's \c value_type is convertible to \p StrictWeakCompare's \c second_argument_type. + * \p InputIterator2's \c value_type is convertible to \p StrictWeakCompare's second argument type. * and \p InputIterator2's \c value_type is convertible to a type in \p OutputIterator's set of \c value_types. * \tparam OutputIterator is a model of Output * Iterator. \tparam StrictWeakCompare is a model of Input - * Iterator, \p InputIterator1's \c value_type is convertible to \p StrictWeakCompare's \c first_argument_type. and + * Iterator, \p InputIterator1's \c value_type is convertible to \p StrictWeakCompare's first argument type. and * \p InputIterator1's \c value_type is convertible to a type in \p OutputIterator's set of \c value_types. \tparam * InputIterator2 is a model of Input Iterator, - * \p InputIterator2's \c value_type is convertible to \p StrictWeakCompare's \c second_argument_type. + * \p InputIterator2's \c value_type is convertible to \p StrictWeakCompare's second argument type. * and \p InputIterator2's \c value_type is convertible to a type in \p OutputIterator's set of \c value_types. * \tparam OutputIterator is a model of Output * Iterator. \tparam StrictWeakCompare is a model of Random Access Iterator, \p * RandomAccessIterator is mutable, and \p RandomAccessIterator's \c value_type is convertible to \p - * StrictWeakOrdering's \c first_argument_type and \c second_argument_type. \tparam StrictWeakOrdering is a model of Strict Weak Ordering. * * The following code demonstrates how to sort integers in descending order @@ -191,7 +191,7 @@ sort(const thrust::detail::execution_policy_base& exec, * \tparam RandomAccessIterator is a model of Random Access Iterator, \p * RandomAccessIterator is mutable, and \p RandomAccessIterator's \c value_type is convertible to \p - * StrictWeakOrdering's \c first_argument_type and \c second_argument_type. \tparam StrictWeakOrdering is a model of Strict Weak Ordering. * * The following code demonstrates how to sort integers in descending order @@ -333,7 +333,7 @@ void stable_sort(RandomAccessIterator first, RandomAccessIterator last); * \tparam RandomAccessIterator is a model of Random Access Iterator, \p * RandomAccessIterator is mutable, and \p RandomAccessIterator's \c value_type is convertible to \p - * StrictWeakOrdering's \c first_argument_type and \c second_argument_type. \tparam StrictWeakOrdering is a model of Strict Weak Ordering. * * The following code demonstrates how to sort integers in descending order @@ -383,7 +383,7 @@ _CCCL_HOST_DEVICE void stable_sort( * \tparam RandomAccessIterator is a model of Random Access Iterator, \p * RandomAccessIterator is mutable, and \p RandomAccessIterator's \c value_type is convertible to \p - * StrictWeakOrdering's \c first_argument_type and \c second_argument_type. \tparam StrictWeakOrdering is a model of Strict Weak Ordering. * * The following code demonstrates how to sort integers in descending order @@ -555,7 +555,7 @@ void sort_by_key(RandomAccessIterator1 keys_first, RandomAccessIterator1 keys_la * \tparam RandomAccessIterator1 is a model of Random Access Iterator, \p * RandomAccessIterator1 is mutable, and \p RandomAccessIterator1's \c value_type is convertible to \p - * StrictWeakOrdering's \c first_argument_type and \c second_argument_type. \tparam RandomAccessIterator2 is a model of + * StrictWeakOrdering's first argument type and second argument type. \tparam RandomAccessIterator2 is a model of * Random Access Iterator, and \p * RandomAccessIterator2 is mutable. \tparam StrictWeakOrdering is a model of Strict Weak Ordering. @@ -619,7 +619,7 @@ _CCCL_HOST_DEVICE void sort_by_key( * \tparam RandomAccessIterator1 is a model of Random Access Iterator, \p * RandomAccessIterator1 is mutable, and \p RandomAccessIterator1's \c value_type is convertible to \p - * StrictWeakOrdering's \c first_argument_type and \c second_argument_type. \tparam RandomAccessIterator2 is a model of + * StrictWeakOrdering's first argument type and second argument type. \tparam RandomAccessIterator2 is a model of * Random Access Iterator, and \p * RandomAccessIterator2 is mutable. \tparam StrictWeakOrdering is a model of Strict Weak Ordering. @@ -804,7 +804,7 @@ void stable_sort_by_key( * \tparam RandomAccessIterator1 is a model of Random Access Iterator, \p * RandomAccessIterator1 is mutable, and \p RandomAccessIterator1's \c value_type is convertible to \p - * StrictWeakOrdering's \c first_argument_type and \c second_argument_type. \tparam RandomAccessIterator2 is a model of + * StrictWeakOrdering's first argument type and second argument type. \tparam RandomAccessIterator2 is a model of * Random Access Iterator, and \p * RandomAccessIterator2 is mutable. \tparam StrictWeakOrdering is a model of Strict Weak Ordering. @@ -871,7 +871,7 @@ _CCCL_HOST_DEVICE void stable_sort_by_key( * \tparam RandomAccessIterator1 is a model of Random Access Iterator, \p * RandomAccessIterator1 is mutable, and \p RandomAccessIterator1's \c value_type is convertible to \p - * StrictWeakOrdering's \c first_argument_type and \c second_argument_type. \tparam RandomAccessIterator2 is a model of + * StrictWeakOrdering's first argument type and second argument type. \tparam RandomAccessIterator2 is a model of * Random Access Iterator, and \p * RandomAccessIterator2 is mutable. \tparam StrictWeakOrdering is a model of Strict Weak Ordering. @@ -1043,8 +1043,8 @@ bool is_sorted(ForwardIterator first, ForwardIterator last); * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward - * Iterator, and \p ForwardIterator's \c value_type is convertible to both \c StrictWeakOrdering's \c - * first_argument_type and \c second_argument_type. \tparam Compare is a model of , and \p ForwardIterator's \c value_type is convertible to both \c StrictWeakOrdering's first and second + * argument type. \tparam Compare is a model of Strict Weak Ordering. * * The following code snippet demonstrates how to use \p is_sorted to test whether the @@ -1100,8 +1100,9 @@ is_sorted(const thrust::detail::execution_policy_base& exec, * \return \c true, if the sequence is sorted according to comp; \c false, otherwise. * * \tparam ForwardIterator is a model of Forward - * Iterator, and \p ForwardIterator's \c value_type is convertible to both \c StrictWeakOrdering's \c - * first_argument_type and \c second_argument_type. \tparam Compare is a model of , and \p ForwardIterator's \c value_type is convertible to both \c StrictWeakOrdering's first and second + * argument type. + * \tparam Compare is a model of Strict Weak Ordering. * * The following code snippet demonstrates how to use \p is_sorted to test whether the @@ -1234,7 +1235,7 @@ ForwardIterator is_sorted_until(ForwardIterator first, ForwardIterator last); * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward - * Iterator and \p ForwardIterator's \c value_type is convertible to \p Compare's \c argument_type. \tparam Compare + * Iterator and \p ForwardIterator's \c value_type is convertible to \p Compare's argument type. \tparam Compare * is a model of Strict Weak Ordering. * * The following code snippet demonstrates how to use \p is_sorted_until to find the first position @@ -1280,7 +1281,7 @@ _CCCL_HOST_DEVICE ForwardIterator is_sorted_until( * \return The last iterator in the input range for which it is sorted. * * \tparam ForwardIterator is a model of Forward - * Iterator and \p ForwardIterator's \c value_type is convertible to \p Compare's \c argument_type. \tparam Compare + * Iterator and \p ForwardIterator's \c value_type is convertible to \p Compare's argument type. \tparam Compare * is a model of Strict Weak Ordering. * * The following code snippet demonstrates how to use \p is_sorted_until to find the first position diff --git a/thrust/thrust/system/cuda/detail/sort.h b/thrust/thrust/system/cuda/detail/sort.h index 895119a0389..fbb9913cb03 100644 --- a/thrust/thrust/system/cuda/detail/sort.h +++ b/thrust/thrust/system/cuda/detail/sort.h @@ -241,14 +241,6 @@ struct dispatch> } }; // struct dispatch -- sort pairs in descending order; -template -struct dispatch> : dispatch> -{}; - -template -struct dispatch> : dispatch> -{}; - template THRUST_RUNTIME_FUNCTION void radix_sort(execution_policy& policy, Key* keys, Item* items, Size count, CompareOp) { diff --git a/thrust/thrust/tabulate.h b/thrust/thrust/tabulate.h index 300a32363ef..ad55322d118 100644 --- a/thrust/thrust/tabulate.h +++ b/thrust/thrust/tabulate.h @@ -54,9 +54,8 @@ THRUST_NAMESPACE_BEGIN * \tparam ForwardIterator is a model of Forward * Iterator, and \p ForwardIterator is mutable, and if \c x and \c y are objects of \c ForwardIterator's \c * value_type, then x + y is defined, and if \c T is \p ForwardIterator's \c value_type, then T(0) is - * defined. \tparam UnaryOperation is a model of Unary Function and \c UnaryFunction's - * \c result_type is convertible to \c OutputIterator's \c value_type. + * defined. + * \tparam UnaryOperation The function's return type must be convertible to \c OutputIterator's \c value_type. * * The following code snippet demonstrates how to use \p tabulate to generate the first \c n non-positive integers * using the \p thrust::host execution policy for parallelization: @@ -96,9 +95,8 @@ tabulate(const thrust::detail::execution_policy_base& exec, * \tparam ForwardIterator is a model of Forward * Iterator, and \p ForwardIterator is mutable, and if \c x and \c y are objects of \c ForwardIterator's \c * value_type, then x + y is defined, and if \c T is \p ForwardIterator's \c value_type, then T(0) is - * defined. \tparam UnaryOperation is a model of Unary Function and \c UnaryFunction's - * \c result_type is convertible to \c OutputIterator's \c value_type. + * defined. + * \tparam UnaryOperation The function's return type must be convertible to \c OutputIterator's \c value_type. * * The following code snippet demonstrates how to use \p tabulate to generate the first \c n non-positive integers: * diff --git a/thrust/thrust/transform.h b/thrust/thrust/transform.h index 9c96f9ca6f5..c1689eecddd 100644 --- a/thrust/thrust/transform.h +++ b/thrust/thrust/transform.h @@ -59,7 +59,7 @@ THRUST_NAMESPACE_BEGIN //! //! \tparam DerivedPolicy The name of the derived execution policy. //! \tparam InputIterator is a model of Input -//! Iterator and \c InputIterator's \c value_type is convertible to \c UnaryFunction's \c argument_type. \tparam +//! Iterator and \c InputIterator's \c value_type is convertible to \c UnaryFunction's argument type. \tparam //! OutputIterator is a model of Output //! Iterator. //! \tparam UnaryFunction is a unary function type which's return type is convertible to \c OutputIterator's \c @@ -113,7 +113,7 @@ _CCCL_HOST_DEVICE OutputIterator transform( //! \return The end of the output sequence. //! //! \tparam InputIterator is a model of Input -//! Iterator and \c InputIterator's \c value_type is convertible to \c UnaryFunction's \c argument_type. +//! Iterator and \c InputIterator's \c value_type is convertible to \c UnaryFunction's argument type. //! \tparam OutputIterator is a model of Output //! Iterator. //! \tparam UnaryFunction is a unary function type which's return type is convertible to \c OutputIterator's \c @@ -165,9 +165,9 @@ OutputIterator transform(InputIterator first, InputIterator last, OutputIterator //! //! \tparam DerivedPolicy The name of the derived execution policy. //! \tparam InputIterator1 is a model of Input -//! Iterator and \c InputIterator1's \c value_type is convertible to \c BinaryFunction's \c first_argument_type. +//! Iterator and \c InputIterator1's \c value_type is convertible to \c BinaryFunction's first argument type. //! \tparam InputIterator2 is a model of Input -//! Iterator and \c InputIterator2's \c value_type is convertible to \c BinaryFunction's \c second_argument_type. +//! Iterator and \c InputIterator2's \c value_type is convertible to \c BinaryFunction's second argument type. //! \tparam OutputIterator is a model of Output //! Iterator. //! \tparam BinaryFunction is a binary function type which's return type is convertible to \c OutputIterator's \c @@ -231,9 +231,9 @@ _CCCL_HOST_DEVICE OutputIterator transform( //! \return The end of the output sequence. //! //! \tparam InputIterator1 is a model of Input -//! Iterator and \c InputIterator1's \c value_type is convertible to \c BinaryFunction's \c first_argument_type. +//! Iterator and \c InputIterator1's \c value_type is convertible to \c BinaryFunction's first argument type. //! \tparam InputIterator2 is a model of Input -//! Iterator and \c InputIterator2's \c value_type is convertible to \c BinaryFunction's \c second_argument_type. +//! Iterator and \c InputIterator2's \c value_type is convertible to \c BinaryFunction's second argument type. //! \tparam OutputIterator is a model of Output //! Iterator. //! \tparam BinaryFunction is a binary function type which's return type is convertible to \c OutputIterator's \c @@ -296,12 +296,11 @@ transform(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, Ou * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam InputIterator is a model of Input - * Iterator, and \c InputIterator's \c value_type is convertible to \c Predicate's \c argument_type, and \c - * InputIterator's \c value_type is convertible to \c UnaryFunction's \c argument_type. \tparam ForwardIterator is a - * model of Forward Iterator. \tparam - * UnaryFunction is a model of Unary - * Function and \c UnaryFunction's \c result_type is convertible to \c OutputIterator's \c value_type. \tparam - * Predicate is a model of Predicate. + * Iterator, and \c InputIterator's \c value_type is convertible to \c Predicate's argument type, and \c + * InputIterator's \c value_type is convertible to \c UnaryFunction's argument type. \tparam ForwardIterator is a + * model of Forward Iterator. + * \tparam UnaryFunction The function's return type must be convertible to \c OutputIterator's \c value_type. + * \tparam Predicate is a model of Predicate. * * \pre \p first may equal \p result, but the range [first, last) shall not overlap the range [result, * result + (last - first)) otherwise. @@ -374,12 +373,11 @@ _CCCL_HOST_DEVICE ForwardIterator transform_if( * \return The end of the output sequence. * * \tparam InputIterator is a model of Input - * Iterator, and \c InputIterator's \c value_type is convertible to \c Predicate's \c argument_type, and \c - * InputIterator's \c value_type is convertible to \c UnaryFunction's \c argument_type. \tparam ForwardIterator is a - * model of Forward Iterator. \tparam - * UnaryFunction is a model of Unary - * Function and \c UnaryFunction's \c result_type is convertible to \c OutputIterator's \c value_type. \tparam - * Predicate is a model of Predicate. + * Iterator, and \c InputIterator's \c value_type is convertible to \c Predicate's argument type, and \c + * InputIterator's \c value_type is convertible to \c UnaryFunction's argument type. \tparam ForwardIterator is a + * model of Forward Iterator. + * \tparam UnaryFunction The function's return type must be convertible to \c OutputIterator's \c value_type. + * \tparam Predicate is a model of Predicate. * * \pre \p first may equal \p result, but the range [first, last) shall not overlap the range [result, * result + (last - first)) otherwise. @@ -446,14 +444,13 @@ transform_if(InputIterator first, InputIterator last, ForwardIterator result, Un * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam InputIterator1 is a model of Input - * Iterator and \c InputIterator1's \c value_type is convertible to \c UnaryFunction's \c argument_type. \tparam + * Iterator and \c InputIterator1's \c value_type is convertible to \c UnaryFunction's argument type. \tparam * InputIterator2 is a model of Input Iterator - * and \c InputIterator2's \c value_type is convertible to \c Predicate's \c argument_type. + * and \c InputIterator2's \c value_type is convertible to \c Predicate's argument type. * \tparam ForwardIterator is a model of Forward - * Iterator. \tparam UnaryFunction is a model of Unary Function and \c UnaryFunction's - * \c result_type is convertible to \c OutputIterator's \c value_type. \tparam Predicate is a model of Predicate. + * Iterator. + * \tparam UnaryFunction The function's return type must be convertible to \c OutputIterator's \c value_type. + * \tparam Predicate is a model of Predicate. * * \pre \p first may equal \p result, but the range [first, last) shall not overlap the range [result, * result + (last - first)) otherwise. \pre \p stencil may equal \p result, but the range [stencil, stencil + @@ -522,14 +519,13 @@ _CCCL_HOST_DEVICE ForwardIterator transform_if( * \return The end of the output sequence. * * \tparam InputIterator1 is a model of Input - * Iterator and \c InputIterator1's \c value_type is convertible to \c UnaryFunction's \c argument_type. \tparam + * Iterator and \c InputIterator1's \c value_type is convertible to \c UnaryFunction's argument type. \tparam * InputIterator2 is a model of Input Iterator - * and \c InputIterator2's \c value_type is convertible to \c Predicate's \c argument_type. + * and \c InputIterator2's \c value_type is convertible to \c Predicate's argument type. * \tparam ForwardIterator is a model of Forward - * Iterator. \tparam UnaryFunction is a model of Unary Function and \c UnaryFunction's - * \c result_type is convertible to \c OutputIterator's \c value_type. \tparam Predicate is a model of Predicate. + * Iterator. + * \tparam UnaryFunction The function's return type must be convertible to \c OutputIterator's \c value_type. + * \tparam Predicate is a model of Predicate. * * \pre \p first may equal \p result, but the range [first, last) shall not overlap the range [result, * result + (last - first)) otherwise. \pre \p stencil may equal \p result, but the range [stencil, stencil + @@ -598,14 +594,13 @@ ForwardIterator transform_if( * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam InputIterator1 is a model of Input - * Iterator and \c InputIterator1's \c value_type is convertible to \c BinaryFunction's \c first_argument_type. + * Iterator and \c InputIterator1's \c value_type is convertible to \c BinaryFunction's first argument type. * \tparam InputIterator2 is a model of Input - * Iterator and \c InputIterator2's \c value_type is convertible to \c BinaryFunction's \c second_argument_type. + * Iterator and \c InputIterator2's \c value_type is convertible to \c BinaryFunction's second argument type. * \tparam ForwardIterator is a model of Forward - * Iterator. \tparam BinaryFunction is a model of Binary Function and \c - * BinaryFunction's \c result_type is convertible to \c OutputIterator's \c value_type. \tparam Predicate is a model of - * Predicate. + * Iterator. + * \tparam BinaryFunction The function's return type must be convertible to \c OutputIterator's \c value_type. + * \tparam Predicate is a model of Predicate. * * \pre \p first1 may equal \p result, but the range [first1, last1) shall not overlap the range [result, * result + (last1 - first1)) otherwise. \pre \p first2 may equal \p result, but the range [first2, first2 + @@ -682,14 +677,13 @@ _CCCL_HOST_DEVICE ForwardIterator transform_if( * \return The end of the output sequence. * * \tparam InputIterator1 is a model of Input - * Iterator and \c InputIterator1's \c value_type is convertible to \c BinaryFunction's \c first_argument_type. + * Iterator and \c InputIterator1's \c value_type is convertible to \c BinaryFunction's first argument type. * \tparam InputIterator2 is a model of Input - * Iterator and \c InputIterator2's \c value_type is convertible to \c BinaryFunction's \c second_argument_type. + * Iterator and \c InputIterator2's \c value_type is convertible to \c BinaryFunction's second argument type. * \tparam ForwardIterator is a model of Forward - * Iterator. \tparam BinaryFunction is a model of Binary Function and \c - * BinaryFunction's \c result_type is convertible to \c OutputIterator's \c value_type. \tparam Predicate is a model of - * Predicate. + * Iterator. + * \tparam BinaryFunction The function's return type must be convertible to \c OutputIterator's \c value_type. + * \tparam Predicate is a model of Predicate. * * \pre \p first1 may equal \p result, but the range [first1, last1) shall not overlap the range [result, * result + (last1 - first1)) otherwise. \pre \p first2 may equal \p result, but the range [first2, first2 + diff --git a/thrust/thrust/transform_reduce.h b/thrust/thrust/transform_reduce.h index 227dd2d2e6e..681553fbe75 100644 --- a/thrust/thrust/transform_reduce.h +++ b/thrust/thrust/transform_reduce.h @@ -66,13 +66,12 @@ THRUST_NAMESPACE_BEGIN * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam InputIterator is a model of Input - * Iterator, and \p InputIterator's \c value_type is convertible to \p UnaryFunction's \c argument_type. \tparam - * UnaryFunction is a model of Unary - * Function, and \p UnaryFunction's \c result_type is convertible to \c OutputType. \tparam OutputType is a model of + * Iterator, and \p InputIterator's \c value_type is convertible to \p UnaryFunction's argument type. + * \tparam UnaryFunction The function's return type must be convertible to \c OutputType. + * \tparam OutputType is a model of * Assignable, and is convertible to \p - * BinaryFunction's \c first_argument_type and \c second_argument_type. \tparam BinaryFunction is a model of Binary Function, and \p - * BinaryFunction's \c result_type is convertible to \p OutputType. + * BinaryFunction's first and second argument type. + * \tparam BinaryFunction The function's return type must be convertible to \p OutputType. * * The following code snippet demonstrates how to use \p transform_reduce * to compute the maximum value of the absolute value of the elements @@ -84,7 +83,7 @@ THRUST_NAMESPACE_BEGIN * #include * * template - * struct absolute_value : public unary_function + * struct absolute_value * { * __host__ __device__ T operator()(const T &x) const * { @@ -141,13 +140,12 @@ _CCCL_HOST_DEVICE OutputType transform_reduce( * \return The result of the transformed reduction. * * \tparam InputIterator is a model of Input - * Iterator, and \p InputIterator's \c value_type is convertible to \p UnaryFunction's \c argument_type. \tparam - * UnaryFunction is a model of Unary - * Function, and \p UnaryFunction's \c result_type is convertible to \c OutputType. \tparam OutputType is a model of + * Iterator, and \p InputIterator's \c value_type is convertible to \p UnaryFunction's argument type. + * \tparam UnaryFunction The function's return type must be convertible to \c OutputType. + * \tparam OutputType is a model of * Assignable, and is convertible to \p - * BinaryFunction's \c first_argument_type and \c second_argument_type. \tparam BinaryFunction is a model of Binary Function, and \p - * BinaryFunction's \c result_type is convertible to \p OutputType. + * BinaryFunction's first and second argument type. + * \tparam BinaryFunction The function's return type must be convertible to \p OutputType. * * The following code snippet demonstrates how to use \p transform_reduce * to compute the maximum value of the absolute value of the elements @@ -158,7 +156,7 @@ _CCCL_HOST_DEVICE OutputType transform_reduce( * #include * * template - * struct absolute_value : public unary_function + * struct absolute_value * { * __host__ __device__ T operator()(const T &x) const * { diff --git a/thrust/thrust/transform_scan.h b/thrust/thrust/transform_scan.h index 6ec5d8f2e21..d1bb7679fcf 100644 --- a/thrust/thrust/transform_scan.h +++ b/thrust/thrust/transform_scan.h @@ -70,12 +70,11 @@ THRUST_NAMESPACE_BEGIN * \tparam DerivedPolicy The name of the derived execution policy. * \tparam InputIterator is a model of Input * Iterator and \c InputIterator's \c value_type is convertible to \c unary_op's input type. \tparam OutputIterator - * is a model of Output Iterator. \tparam - * UnaryFunction is a model of Unary - * Function and accepts inputs of \c InputIterator's \c value_type. \c UnaryFunction's result_type is convertible - * to \c OutputIterator's \c value_type. \tparam AssociativeOperator is a model of Binary Function and \c - * AssociativeOperator's \c result_type is convertible to \c OutputIterator's \c value_type. + * is a model of Output Iterator. + * \tparam UnaryFunction accepts inputs of \c InputIterator's \c value_type. The functions return type must be + * convertible to \c OutputIterator's \c value_type. + * \tparam AssociativeOperator is a binary function and the function's return type must be convertible to \c + * OutputIterator's \c value_type. * * \pre \p first may equal \p result, but the range [first, last) and the range [result, result + (last - * first)) shall not overlap otherwise. @@ -135,12 +134,11 @@ _CCCL_HOST_DEVICE OutputIterator transform_inclusive_scan( * * \tparam InputIterator is a model of Input * Iterator and \c InputIterator's \c value_type is convertible to \c unary_op's input type. \tparam OutputIterator - * is a model of Output Iterator. \tparam - * UnaryFunction is a model of Unary - * Function and accepts inputs of \c InputIterator's \c value_type. \c UnaryFunction's result_type is convertible - * to \c OutputIterator's \c value_type. \tparam AssociativeOperator is a model of Binary Function and \c - * AssociativeOperator's \c result_type is convertible to \c OutputIterator's \c value_type. + * is a model of Output Iterator. + * \tparam UnaryFunction accepts inputs of \c InputIterator's \c value_type. The function's return type is convertible + * to \c OutputIterator's \c value_type. + * \tparam AssociativeOperator is a binary function and the function's return type must be convertible to \c + * OutputIterator's \c value_type. * * \pre \p first may equal \p result, but the range [first, last) and the range [result, result + (last - * first)) shall not overlap otherwise. @@ -195,13 +193,11 @@ OutputIterator transform_inclusive_scan( * Iterator and \c InputIterator's \c value_type is convertible to \c unary_op's input type. * \tparam OutputIterator is a model of Output * Iterator. - * \tparam UnaryFunction is a model of - * Unary Function and accepts inputs of \c InputIterator's \c value_type. \c UnaryFunction's result_type is + * \tparam UnaryFunction accepts inputs of \c InputIterator's \c value_type. The function's return type is * convertible to \c OutputIterator's \c value_type. * \tparam T is convertible to \c OutputIterator's \c value_type. - * \tparam AssociativeOperator is a model of - * Binary Function and \c - * AssociativeOperator's \c result_type is convertible to \c OutputIterator's \c value_type. + * \tparam AssociativeOperator is a binary function and the function's return type must be convertible to \c + * OutputIterator's \c value_type. * * \pre \p first may equal \p result, but the range [first, last) and the range [result, result + (last - * first)) shall not overlap otherwise. @@ -266,13 +262,11 @@ _CCCL_HOST_DEVICE OutputIterator transform_inclusive_scan( * Iterator and \c InputIterator's \c value_type is convertible to \c unary_op's input type. * \tparam OutputIterator is a model of Output * Iterator. - * \tparam UnaryFunction is a model of - * Unary Function and accepts inputs of \c InputIterator's \c value_type. \c UnaryFunction's result_type is + * \tparam UnaryFunction accepts inputs of \c InputIterator's \c value_type. The function's return type is * convertible to \c OutputIterator's \c value_type. * \tparam T is convertible to \c OutputIterator's \c value_type. - * \tparam AssociativeOperator is a model of - * Binary Function and \c - * AssociativeOperator's \c result_type is convertible to \c OutputIterator's \c value_type. + * \tparam AssociativeOperator is a binary function and the function's return type must be convertible to \c + * OutputIterator's \c value_type. * * \pre \p first may equal \p result, but the range [first, last) and the range [result, result + (last - * first)) shall not overlap otherwise. @@ -331,13 +325,12 @@ OutputIterator transform_inclusive_scan( * \tparam DerivedPolicy The name of the derived execution policy. * \tparam InputIterator is a model of Input * Iterator and \c InputIterator's \c value_type is convertible to \c unary_op's input type. \tparam OutputIterator - * is a model of Output Iterator. \tparam - * UnaryFunction is a model of Unary - * Function and accepts inputs of \c InputIterator's \c value_type. \c UnaryFunction's result_type is convertible - * to \c OutputIterator's \c value_type. \tparam T is convertible to \c OutputIterator's \c value_type. \tparam - * AssociativeOperator is a model of Binary Function and \c - * AssociativeOperator's \c result_type is convertible to \c OutputIterator's \c value_type. + * is a model of Output Iterator. + * \tparam UnaryFunction accepts inputs of \c InputIterator's \c value_type. The function's return type must be + * convertible to \c OutputIterator's \c value_type. + * \tparam T is convertible to \c OutputIterator's \c value_type. + * \tparam AssociativeOperator is a binary function and the function's return type must be convertible to \c + * OutputIterator's \c value_type. * * \pre \p first may equal \p result, but the range [first, last) and the range [result, result + (last - * first)) shall not overlap otherwise. @@ -400,13 +393,12 @@ _CCCL_HOST_DEVICE OutputIterator transform_exclusive_scan( * * \tparam InputIterator is a model of Input * Iterator and \c InputIterator's \c value_type is convertible to \c unary_op's input type. \tparam OutputIterator - * is a model of Output Iterator. \tparam - * UnaryFunction is a model of Unary - * Function and accepts inputs of \c InputIterator's \c value_type. \c UnaryFunction's result_type is convertible - * to \c OutputIterator's \c value_type. \tparam T is convertible to \c OutputIterator's \c value_type. \tparam - * AssociativeOperator is a model of Binary Function and \c - * AssociativeOperator's \c result_type is convertible to \c OutputIterator's \c value_type. + * is a model of Output Iterator. + * \tparam UnaryFunction accepts inputs of \c InputIterator's \c value_type. The function's return type must be + * convertible to \c OutputIterator's \c value_type. + * \tparam T is convertible to \c OutputIterator's \c value_type. + * \tparam AssociativeOperator is a binary function and the function's return type must be convertible to \c + * OutputIterator's \c value_type. * * \pre \p first may equal \p result, but the range [first, last) and the range [result, result + (last - * first)) shall not overlap otherwise. diff --git a/thrust/thrust/unique.h b/thrust/thrust/unique.h index e5711bd2d40..6310b17ebd9 100644 --- a/thrust/thrust/unique.h +++ b/thrust/thrust/unique.h @@ -145,7 +145,7 @@ ForwardIterator unique(ForwardIterator first, ForwardIterator last); * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward * Iterator, and \p ForwardIterator is mutable, and \p ForwardIterator's \c value_type is convertible to \p - * BinaryPredicate's \c first_argument_type and to \p BinaryPredicate's \c second_argument_type. \tparam BinaryPredicate + * BinaryPredicate's first argument type and to \p BinaryPredicate's second argument type. \tparam BinaryPredicate * is a model of Binary Predicate. * * The following code snippet demonstrates how to use \p unique to @@ -192,7 +192,7 @@ _CCCL_HOST_DEVICE ForwardIterator unique( * * \tparam ForwardIterator is a model of Forward * Iterator, and \p ForwardIterator is mutable, and \p ForwardIterator's \c value_type is convertible to \p - * BinaryPredicate's \c first_argument_type and to \p BinaryPredicate's \c second_argument_type. \tparam BinaryPredicate + * BinaryPredicate's first argument type and to \p BinaryPredicate's second argument type. \tparam BinaryPredicate * is a model of Binary Predicate. * * The following code snippet demonstrates how to use \p unique to @@ -938,8 +938,8 @@ thrust::pair unique_by_key_copy( * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward - * Iterator, and \p ForwardIterator's \c value_type is convertible to \p BinaryPredicate's \c first_argument_type - * and to \p BinaryPredicate's \c second_argument_type. \tparam BinaryPredicate is a model of , and \p ForwardIterator's \c value_type is convertible to \p BinaryPredicate's first argument type + * and to \p BinaryPredicate's second argument type. \tparam BinaryPredicate is a model of Binary Predicate. * * The following code snippet demonstrates how to use \p unique_count to @@ -982,8 +982,8 @@ _CCCL_HOST_DEVICE typename thrust::iterator_traits::difference_ * * \tparam DerivedPolicy The name of the derived execution policy. * \tparam ForwardIterator is a model of Forward - * Iterator, and \p ForwardIterator's \c value_type is convertible to \p BinaryPredicate's \c first_argument_type - * and to \p BinaryPredicate's \c second_argument_type. \tparam BinaryPredicate is a model of , and \p ForwardIterator's \c value_type is convertible to \p BinaryPredicate's first argument type + * and to \p BinaryPredicate's second argument type. \tparam BinaryPredicate is a model of Binary Predicate. * * The following code snippet demonstrates how to use \p unique_count to @@ -1019,8 +1019,8 @@ _CCCL_HOST_DEVICE typename thrust::iterator_traits::difference_ * \return The number of runs of equal elements in [first, new_last) * * \tparam ForwardIterator is a model of Forward - * Iterator, and \p ForwardIterator's \c value_type is convertible to \p BinaryPredicate's \c first_argument_type - * and to \p BinaryPredicate's \c second_argument_type. + * Iterator, and \p ForwardIterator's \c value_type is convertible to \p BinaryPredicate's first argument type + * and to \p BinaryPredicate's second argument type. * \tparam BinaryPredicate is a model of Binary Predicate. * @@ -1056,8 +1056,8 @@ unique_count(ForwardIterator first, ForwardIterator last, BinaryPredicate binary * \return The number of runs of equal elements in [first, new_last) * * \tparam ForwardIterator is a model of Forward - * Iterator, and \p ForwardIterator's \c value_type is convertible to \p BinaryPredicate's \c first_argument_type - * and to \p BinaryPredicate's \c second_argument_type. + * Iterator, and \p ForwardIterator's \c value_type is convertible to \p BinaryPredicate's first argument type + * and to \p BinaryPredicate's second argument type. * \tparam BinaryPredicate is a model of Binary Predicate. *