Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
more doxygen tweaking
Browse files Browse the repository at this point in the history
--HG--
extra : convert_revision : svn%3A83215879-3e5a-4751-8c9d-778f44bb06a5/trunk%40468
  • Loading branch information
wnbell committed Sep 10, 2009
1 parent e28f9d5 commit 9c73166
Show file tree
Hide file tree
Showing 13 changed files with 114 additions and 92 deletions.
15 changes: 3 additions & 12 deletions thrust/binary_search.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ namespace thrust
* \{
*/

/*! \addtogroup scalar_search Scalar Search
* \ingroup binary_search
* \{
*/


//////////////////////
// Scalar Functions //
//////////////////////
Expand Down Expand Up @@ -497,9 +491,6 @@ equal_range(ForwardIterator first,
const T& value,
StrictWeakOrdering comp);

/*! \} // end binary_search
*/

/*! \addtogroup vectorized_binary_search Vectorized Searches
* \ingroup binary_search
* \{
Expand Down Expand Up @@ -906,13 +897,13 @@ OutputIterator binary_search(ForwardIterator first,
OutputIterator output,
StrictWeakOrdering comp);

/*! \} // binary_search
/*! \} // end vectorized_binary_search
*/

/*! \} // end searching
/*! \} // end binary_search
*/

/*! \} // end algorithms
/*! \} // end searching
*/

} // end namespace thrust
Expand Down
8 changes: 0 additions & 8 deletions thrust/copy.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ namespace thrust
* \{
*/

/*! \addtogroup regular_copying Regular Copying
* \ingroup copying
* \{
*/

/*! \p copy copies elements from the range [\p first, \p last) to the range
* [\p result, \p result + (\p last - \p first)). That is, it performs
* the assignments *\p result = *\p first, *(\p result + \c 1) = *(\p first + \c 1),
Expand Down Expand Up @@ -182,9 +177,6 @@ template<typename InputIterator,
OutputIterator result,
Predicate pred);

/*! \} // end regular_copying
*/

/*! \} // end copying
*/

Expand Down
9 changes: 3 additions & 6 deletions thrust/for_each.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,8 @@
namespace thrust
{

/*! \addtogroup algorithms
*/

/*! \addtogroup parallelization
* \ingroup algorithms
/*! \addtogroup modifying
* \ingroup transformations
* \{
*/

Expand Down Expand Up @@ -58,7 +55,7 @@ void for_each(InputIterator first,
InputIterator last,
UnaryFunction f);

/*! \} // end parallelization
/*! \} // end modifying
*/

} // end namespace thrust
Expand Down
7 changes: 2 additions & 5 deletions thrust/gather.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
namespace thrust
{

/*! \addtogroup copying
* \{
* \addtogroup irregular_copying Irregular Copying
/*! \addtogroup gathering
* \ingroup copying
* \{
*/
Expand Down Expand Up @@ -141,8 +139,7 @@ template<typename ForwardIterator,
RandomAccessIterator input,
Predicate pred);

/*! \} // irregular_copying
* \} // copying
/*! \} // gathering
*/

}; // end namespace thrust
Expand Down
2 changes: 1 addition & 1 deletion thrust/partition.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace thrust
/*! \addtogroup reordering
* \ingroup algorithms
*
* \addtogroup stream_compaction Stream Compaction
* \addtogroup partitioning
* \ingroup reordering
* \{
*/
Expand Down
95 changes: 92 additions & 3 deletions thrust/remove.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@
namespace thrust
{

/*! \addtogroup stream_compaction
/*! \addtogroup stream_compaction Stream Compaction
* \ingroup reordering
* \{
*
*/

/*! \p remove removes from the range <tt>[first, last)</tt> all elements that are
Expand Down Expand Up @@ -262,7 +264,49 @@ template<typename InputIterator,
OutputIterator result,
Predicate pred);

// XXX new functions
/*! \p remove_if removes from the range <tt>[first, last)</tt> every element \p x
* such that <tt>pred(x)</tt> is \c true. That is, \p remove_if returns an
* iterator \c new_last such that the range <tt>[first, new_last)</tt> contains
* no elements for which \p pred of the corresponding stencil value is \c true.
* The iterators in the range <tt>[new_last,last)</tt> are all still dereferenceable,
* but the elements that they point to are unspecified. \p remove_if is stable,
* meaning that the relative order of elements that are not removed is unchanged.
*
* \param first The beginning of the range of interest.
* \param last The end of the range of interest.
* \param stencil The beginning of the stencil sequence.
* \param pred A predicate to evaluate for each element of the range
* <tt>[stencil, stencil + (last - first))</tt>. Elements for which \p pred evaluates to
* \c false are removed from the sequence <tt>[first, last)</tt>
* \return A ForwardIterator pointing to the end of the resulting range of
* elements for which \p pred evaluated to \c true.
*
* \tparam ForwardIterator is a model of <a href="http://www.sgi.com/tech/ForwardIterator.html">Forward Iterator</a>
* and \p ForwardIterator is mutable.
* \tparam InputIterator is a model of <a href="http://www.sgi.com/tech/stl/InputIterator.html">Input Iterator</a>,
* and \p InputIterator's \c value_type is convertible to \p Predicate's \c argument_type.
* \tparam Predicate is a model of <a href="http://www.sgi.com/tech/Predicate.html">Predicate</a>.
*
* The following code snippet demonstrates how to use \p remove_if to remove
* specific elements from an array of integers.
*
* \code
* #include <thrust/remove.h>
* ...
* const int N = 6;
* int A[N] = {1, 4, 2, 8, 5, 7};
* int S[N] = {0, 1, 1, 1, 0, 0};
*
* int *new_end = thrust::remove(A, A + N, S, thrust::identity<int>());
* // The first three values of A are now {1, 5, 7}
* // Values beyond new_end are unspecified
* \endcode
*
* \see http://www.sgi.com/tech/stl/remove_if.html
* \see remove
* \see remove_copy
* \see remove_copy_if
*/
template<typename ForwardIterator,
typename InputIterator,
typename Predicate>
Expand All @@ -271,6 +315,51 @@ template<typename ForwardIterator,
InputIterator stencil,
Predicate pred);

/*! \p remove_copy_if copies elements from the range <tt>[first,last)</tt> to a
* range beginning at \p result, except that elements for which \p pred of the
* corresponding stencil value is \c true are not copied. The return value is
* the end of the resulting range. This operation is stable, meaning that the
* relative order of the elements that are copied is the same as the
* range <tt>[first,last)</tt>.
*
* \param first The beginning of the range of interest.
* \param last The end of the range of interest.
* \param stencil The beginning of the stencil sequence.
* \param result The resulting range is copied to the sequence beginning at this
* location.
* \param pred A predicate to evaluate for each element of the range <tt>[first,last)</tt>.
* Elements for which \p pred evaluates to \c false are not copied
* to the resulting sequence.
* \return An OutputIterator pointing to the end of the resulting range.
*
* \tparam InputIterator1 is a model of <a href="http://www.sgi.com/tech/stl/InputIterator.html">Input Iterator</a>,
* \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 <a href="http://www.sgi.com/tech/stl/InputIterator.html">Input Iterator</a>,
* and \p InputIterator2's \c value_type is convertible to \p Predicate's \c argument_type.
* \tparam OutputIterator is a model of <a href="http://www.sgi.com/tech/stl/OutputIterator.html">Output Iterator</a>.
* \tparam Predicate is a model of <a href="http://www.sgi.com/tech/stl/Predicate.html">Predicate</a>.
*
* The following code snippet demonstrates how to use \p remove_copy_if to copy
* a sequence of numbers to an output range while omitting specific elements.
*
* \code
* #include <thrust/remove.h>
* ...
* const int N = 6;
* int V[N] = {-2, 0, -1, 0, 1, 2};
* int S[N] = { 1, 1, 0, 1, 0, 1};
* int result[2];
* thrust::remove_copy_if(V, V + N, result, thrust::identity<int>());
* // V remains {-2, 0, -1, 0, 1, 2}
* // result is now {-1, 1}
* \endcode
*
* \see http://www.sgi.com/tech/stl/remove_copy_if.html
* \see remove
* \see remove_copy
* \see remove_if
* \see copy_if
*/
template<typename InputIterator1,
typename InputIterator2,
typename OutputIterator,
Expand All @@ -281,7 +370,7 @@ template<typename InputIterator1,
OutputIterator result,
Predicate pred);

/*! \{ // end stream_compaction
/*! \} // end stream_compaction
*/

} // end thrust
Expand Down
7 changes: 2 additions & 5 deletions thrust/scatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
namespace thrust
{

/*! \addtogroup copying
* \{
* \addtogroup irregular_copying Irregular Copying
/*! \addtogroup scattering
* \ingroup copying
* \{
*/
Expand Down Expand Up @@ -147,8 +145,7 @@ template<typename InputIterator1,
RandomAccessIterator output,
Predicate pred);

/*! \} // end irregular_copying
* \} // end copying
/*! \} // end scattering
*/

} // end namespace thrust
Expand Down
5 changes: 1 addition & 4 deletions thrust/segmented_scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,13 @@ namespace thrust
namespace experimental
{

/*! \addtogroup algorithms
*/

/*! \addtogroup prefixsums Prefix Sums
* \ingroup algorithms
* \{
*/

/*! \addtogroup segmentedprefixsums Segmented Prefix Sums
* \ingroup algorithms
* \ingroup prefixsums
* \{
*/

Expand Down
17 changes: 1 addition & 16 deletions thrust/sort.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ namespace thrust


/*! \addtogroup sorting
* \ingroup reordering
*
* \addtogroup key_sorting Key Sorting
* \ingroup sorting
* \ingroup algorithms
* \{
*/

Expand Down Expand Up @@ -184,19 +181,10 @@ template<typename RandomAccessIterator,
RandomAccessIterator last,
StrictWeakOrdering comp);

/*! \} // end key_sorting
*/


///////////////
// Key Value //
///////////////

/*! \addtogroup key_value_sorting Key-Value Sorting
* \ingroup sorting
* \{
*/

/*! \p sort_by_key performs a key-value sort. That is, \p sort_by_key sorts the
* elements in <tt>[keys_first, keys_last)</tt> and <tt>[values_first,
* values_first + (keys_last - keys_first))</tt> into ascending key order,
Expand Down Expand Up @@ -389,9 +377,6 @@ template<typename RandomAccessKeyIterator,
RandomAccessValueIterator values_first,
StrictWeakOrdering comp);

/*! \} // end key_value_sorting
*/

/*! \} // end sorting
*/

Expand Down
19 changes: 2 additions & 17 deletions thrust/sorting/merge_sort.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,8 @@ namespace thrust
namespace sorting
{

/*! \addtogroup sorting
* \ingroup reordering
*
* \addtogroup key_sorting Key Sorting
/*! \addtogroup merge_sort Merge Sort
* \ingroup sorting
* \addtogroup merge_sorting Merge Sorting
* \ingroup key_sorting
* \{
*/

Expand Down Expand Up @@ -191,16 +186,6 @@ template<typename RandomAccessIterator,
RandomAccessIterator last,
StrictWeakOrdering comp);

/*! \}
*/

/*! \addtogroup key_value_sorting Key-Value Sorting
* \ingroup sorting
* \addtogroup merge_sorting Merge Sorting
* \ingroup key_value_sorting
* \{
*/

/*! \p merge_sort_by_key performs a key-value sort. That is, \p merge_sort_by_key sorts the
* elements in <tt>[keys_first, keys_last)</tt> and <tt>[values_first,
* values_first + (keys_last - keys_first))</tt> into ascending key order,
Expand Down Expand Up @@ -393,7 +378,7 @@ template<typename RandomAccessIterator1,
RandomAccessIterator2 values_first,
StrictWeakOrdering comp);

/*! \}
/*! \} merge_sort
*/

} // end namespace sorting
Expand Down
14 changes: 3 additions & 11 deletions thrust/sorting/radix_sort.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ namespace thrust
namespace sorting
{

/*! \addtogroup radix_sorting Radix Sorting
* \ingroup key_sorting
/*! \addtogroup radix_sort Radix Sort
* \ingroup sorting
* \{
*/

Expand Down Expand Up @@ -109,14 +109,6 @@ template<typename RandomAccessIterator>
void stable_radix_sort(RandomAccessIterator first,
RandomAccessIterator last);

/*! \}
*/

/*! \addtogroup radix_sorting Radix Sorting
* \ingroup key_value_sorting
* \{
*/

/*! \p radix_sort_by_key performs a key-value sort. That is, \p radix_sort_by_key sorts the
* elements in <tt>[keys_first, keys_last)</tt> and <tt>[values_first,
* values_first + (keys_last - keys_first))</tt> into ascending key order,
Expand Down Expand Up @@ -215,7 +207,7 @@ template<typename RandomAccessIterator1,
RandomAccessIterator1 keys_last,
RandomAccessIterator2 values_first);

/*! \}
/*! \} end radix_sort
*/

} // end namespace sorting
Expand Down
Loading

0 comments on commit 9c73166

Please sign in to comment.