Skip to content

Commit f35f27e

Browse files
griwesbrycelelbach
authored andcommitted
Thrust CMake conversion:
* Various changes to make the doxygen generated API reference make sense. * WIP.
1 parent b762cda commit f35f27e

41 files changed

Lines changed: 2350 additions & 738 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ thrust/system/cuda/detail/.gitignore
22
.p4config
33
run
44
build
5+
doc/html

doc/thrust.dox

Lines changed: 2001 additions & 619 deletions
Large diffs are not rendered by default.

thrust/addressof.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ THRUST_BEGIN_NS
1515

1616
///////////////////////////////////////////////////////////////////////////////
1717

18+
/*! Obtains the actual address of the object or function arg, even in presence of overloaded operator&.
19+
*/
1820
template <typename T>
1921
__host__ __device__
2022
T* addressof(T& arg)

thrust/complex.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,11 @@ struct complex
361361
operator std::complex<T>() const { return std::complex<T>(real(), imag()); }
362362

363363
private:
364+
/*! \cond
365+
*/
364366
struct generic_storage_type { T x; T y; };
367+
/*! \endcond
368+
*/
365369

366370
#if THRUST_DEVICE_COMPILER == THRUST_DEVICE_COMPILER_NVCC
367371
typedef typename detail::conditional<

thrust/copy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717

18-
/*! \file copy.h
18+
/*! \file thrust/copy.h
1919
* \brief Copies elements from one range to another
2020
*/
2121

thrust/device_allocator.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,8 @@
3232
namespace thrust
3333
{
3434

35-
/*! \addtogroup memory_management Memory Management
36-
* \addtogroup memory_management_classes Memory Management Classes
37-
* \addtogroup memory_resources Memory Resources
38-
* \ingroup memory_management
35+
/** \addtogroup memory_resources Memory Resources
36+
* \ingroup memory_management_classes
3937
* \{
4038
*/
4139

thrust/device_new_allocator.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
namespace thrust
3333
{
3434

35-
/*! \addtogroup memory_management Memory Management
36-
* \addtogroup memory_management_classes Memory Management Classes
35+
/*! \addtogroup memory_management_classes Memory Management Classes
3736
* \ingroup memory_management
3837
* \{
3938
*/
@@ -137,7 +136,7 @@ template<typename T>
137136
* allocated with \p allocate.
138137
*/
139138
__host__
140-
inline void deallocate(pointer p, size_type)
139+
inline void deallocate(pointer p, size_type cnt)
141140
{
142141
// use "::operator delete" rather than keyword delete
143142
device_delete(p);

thrust/device_vector.h

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ template<typename T, typename Alloc = thrust::device_allocator<T> >
7373
:Parent() {}
7474

7575
/*! This constructor creates an empty \p device_vector.
76-
* \param alloc The allocator to use by this vector_base.
76+
* \param alloc The allocator to use by this device_vector.
7777
*/
7878
__host__
7979
device_vector(const Alloc &alloc)
@@ -97,7 +97,7 @@ template<typename T, typename Alloc = thrust::device_allocator<T> >
9797
/*! This constructor creates a \p device_vector with the given
9898
* size.
9999
* \param n The number of elements to initially create.
100-
* \param alloc The allocator to use by this vector_base.
100+
* \param alloc The allocator to use by this device_vector.
101101
*/
102102
__host__
103103
explicit device_vector(size_type n, const Alloc &alloc)
@@ -116,7 +116,7 @@ template<typename T, typename Alloc = thrust::device_allocator<T> >
116116
* of an exemplar element.
117117
* \param n The number of elements to initially create.
118118
* \param value An element to copy.
119-
* \param alloc The allocator to use by this vector_base.
119+
* \param alloc The allocator to use by this device_vector.
120120
*/
121121
__host__
122122
explicit device_vector(size_type n, const value_type &value, const Alloc &alloc)
@@ -131,7 +131,7 @@ template<typename T, typename Alloc = thrust::device_allocator<T> >
131131

132132
/*! Copy constructor copies from an exemplar \p device_vector.
133133
* \param v The \p device_vector to copy.
134-
* \param alloc The allocator to use by this vector_base.
134+
* \param alloc The allocator to use by this device_vector.
135135
*/
136136
__host__
137137
device_vector(const device_vector &v, const Alloc &alloc)
@@ -147,7 +147,7 @@ template<typename T, typename Alloc = thrust::device_allocator<T> >
147147

148148
/*! Move constructor moves from another \p device_vector.
149149
* \param v The device_vector to move.
150-
* \param alloc The allocator to use by this vector_base.
150+
* \param alloc The allocator to use by this device_vector.
151151
*/
152152
__host__
153153
device_vector(device_vector &&v, const Alloc &alloc)
@@ -230,7 +230,7 @@ template<typename T, typename Alloc = thrust::device_allocator<T> >
230230
/*! This constructor builds a \p device_vector from a range.
231231
* \param first The beginning of the range.
232232
* \param last The end of the range.
233-
* \param alloc The allocator to use by this vector_base.
233+
* \param alloc The allocator to use by this device_vector.
234234
*/
235235
template<typename InputIterator>
236236
__host__
@@ -427,7 +427,7 @@ template<typename T, typename Alloc = thrust::device_allocator<T> >
427427
*/
428428
void pop_back(void);
429429

430-
/*! This method swaps the contents of this vector_base with another vector.
430+
/*! This method swaps the contents of this device_vector with another vector.
431431
* \param v The vector with which to swap.
432432
*/
433433
void swap(device_vector &v);
@@ -498,6 +498,10 @@ template<typename T, typename Alloc = thrust::device_allocator<T> >
498498
#endif // end doxygen-only members
499499
}; // end device_vector
500500

501+
/*! Exchanges the values of two vectors.
502+
* \p x The first \p device_vector of interest.
503+
* \p y The second \p device_vector of interest.
504+
*/
501505
template<typename T, typename Alloc>
502506
void swap(device_vector<T,Alloc> &a, device_vector<T,Alloc> &b)
503507
{

thrust/execution_policy.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
#include <thrust/detail/execute_with_allocator.h>
2626
#include <thrust/detail/seq.h>
2727

28+
//! \cond
29+
2830
// #include the host system's execution_policy header
2931
#define __THRUST_HOST_SYSTEM_EXECUTION_POLICY_HEADER <__THRUST_HOST_SYSTEM_ROOT/execution_policy.h>
3032
#include __THRUST_HOST_SYSTEM_EXECUTION_POLICY_HEADER
@@ -35,6 +37,8 @@
3537
#include __THRUST_DEVICE_SYSTEM_EXECUTION_POLICY_HEADER
3638
#undef __THRUST_DEVICE_SYSTEM_EXECUTION_POLICY_HEADER
3739

40+
//! \endcond
41+
3842
namespace thrust
3943
{
4044

thrust/for_each.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515

1616

17-
/*! \file for_each.h
17+
/*! \file thrust/for_each.h
1818
* \brief Applies a function to each element in a range
1919
*/
2020

0 commit comments

Comments
 (0)