Skip to content

Commit 736a3f7

Browse files
committed
Regards #3: Doxygen comment corrections and some invalid comment text deletions
1 parent df6e2f2 commit 736a3f7

File tree

3 files changed

+15
-28
lines changed

3 files changed

+15
-28
lines changed

examples/by_api_module/module_management.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,6 @@ std::string make_instantiation_name(string_view base_name, Ts&&... args)
8383
return sstr.str();
8484
}
8585

86-
/**
87-
*
88-
* @param compilation_output
89-
* @param fine_day hello world
90-
*/
9186
void handle_compilation_failure(
9287
const cuda::rtc::compilation_output_t<cuda::cuda_cpp> & compilation_output,
9388
const cuda::rtc::compilation_options_t<cuda::cuda_cpp> & compilation_options = {})

src/cuda/api/memory.hpp

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,6 @@ inline void zero(void* ptr, size_t num_bytes, optional_ref<const stream_t> strea
757757
* @param ptr pointer to a single element of a certain type, which may
758758
* be in host-side memory, global CUDA-device-side memory or CUDA-managed
759759
* memory.
760-
* @param stream A stream on which to schedule this action; may be omitted.
761760
*/
762761
template <typename T>
763762
inline void zero(T* ptr)
@@ -833,9 +832,8 @@ void copy(copy_parameters_t<NumDimensions> params, optional_ref<const stream_t>
833832
* @param destination A {@tparam NumDimensions}-dimensional CUDA array, including a specification
834833
* of the context in which the array is defined.
835834
* @param source A pointer to a region of contiguous memory holding `destination.size()` values
836-
* of type @tparam T. The memory may be located either on a CUDA device or in host memory.
837-
* @param context The context in which the source memory was allocated - possibly different than
838-
* the target array context
835+
* of type {@tparam T}. The memory may be located either on a CUDA device or in host memory.
836+
* @param stream A stream on which to schedule the copy action
839837
*/
840838
template<typename T, dimensionality_t NumDimensions>
841839
void copy(const array_t<T, NumDimensions>& destination, const context_t& source_context, const T *source, optional_ref<const stream_t> stream = {})
@@ -858,14 +856,14 @@ void copy(const array_t<T, NumDimensions>& destination, const context_t& source_
858856
*
859857
* @param destination A {@tparam NumDimensions}-dimensional CUDA array
860858
* @param source A pointer to a region of contiguous memory holding `destination.size()` values
861-
* of type @tparam T. The memory may be located either on a CUDA device or in host memory.
859+
* of type {@tparam T}. The memory may be located either on a CUDA device or in host memory.
862860
*
863861
* Asynchronously copies data into a CUDA array.
864862
*
865863
* @note asynchronous version of @ref memory::copy<T>(array_t<T, NumDimensions>&, const T*)
866864
*
867865
* @param destination A CUDA array to copy data into
868-
* @param source A pointer to a a memory region of size `destination.size() * sizeof(T)`
866+
* @param source A pointer to a memory region of size `destination.size() * sizeof(T)`
869867
* @param stream schedule the copy operation into this CUDA stream
870868
*/
871869
template <typename T, dimensionality_t NumDimensions>
@@ -899,7 +897,7 @@ void copy(const array_t<T, NumDimensions>& destination, span<T const> source, op
899897
* @tparam T array element type
900898
*
901899
* @param destination A pointer to a region of contiguous memory holding `destination.size()` values
902-
* of type @tparam T. The memory may be located either on a CUDA device or in host memory.
900+
* of type {@tparam T}. The memory may be located either on a CUDA device or in host memory.
903901
* @param source A {@tparam NumDimensions}-dimensional CUDA array
904902
*/
905903
template <typename T, dimensionality_t NumDimensions>
@@ -924,7 +922,7 @@ void copy(const context_t& context, T *destination, const array_t<T, NumDimensio
924922
* @tparam T array element type
925923
*
926924
* @param destination A pointer to a region of contiguous memory holding `destination.size()` values
927-
* of type @tparam T. The memory may be located either on a CUDA device or in host memory.
925+
* of type {@tparam T}. The memory may be located either on a CUDA device or in host memory.
928926
* @param source A {@tparam NumDimensions}-dimensional CUDA array
929927
*
930928
* Asynchronously copies data from a CUDA array elsewhere
@@ -1829,7 +1827,7 @@ inline void set(region_t region, int byte_value)
18291827
/**
18301828
* Zero-out a region of host memory
18311829
*
1832-
* @param ptr the beginning of a region of host memory to zero-out
1830+
* @param start the beginning of a region of host memory to zero-out
18331831
* @param num_bytes the size in bytes of the region of memory to zero-out
18341832
*/
18351833
inline void zero(void* start, size_t num_bytes)
@@ -2361,12 +2359,11 @@ namespace detail_ {
23612359
* @note We allow this only for "convenient" types; see @ref detail_check_allocation_type
23622360
*
23632361
* @tparam T Element of the created unique_span
2364-
* @tparam UntypedAllocator can allocate untyped memory given a size
2365-
* @tparam UntypedDeleter can delete memory given a pointer (disregarding the type)
2362+
* @tparam RegionAllocator can allocate untyped memory given a size
2363+
* @tparam RawDeleter can delete memory given a pointer (disregarding the type)
23662364
*
23672365
* @param size number of elements in the unique_span to be created
2368-
* @param raw_allocator a gadget for allocating untyped memory
2369-
* @param raw_deleter a gadget which can de-allocate/delete allocations by @p raw_allocator
2366+
* @param allocator a gadget for allocating untyped memory
23702367
* @return the newly-created unique_span
23712368
*/
23722369
template <typename T, typename RawDeleter, typename RegionAllocator>

src/cuda/api/multi_wrapper_impls/unique_region.hpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ namespace managed {
7676
* @brief Allocate a region of managed memory, accessible both from CUDA devices
7777
* and from the CPU.
7878
*
79-
* @param context A context of possible single-device-visibility
80-
*
8179
* @returns An owning RAII/CADRe object for the allocated managed memory region
8280
*/
81+
///@{
82+
/// @param context A context of possible single-device-visibility
8383
inline unique_region make_unique_region(
8484
const context_t& context,
8585
size_t num_bytes,
@@ -89,14 +89,7 @@ inline unique_region make_unique_region(
8989
return unique_region { detail_::allocate_in_current_context(num_bytes, initial_visibility) };
9090
}
9191

92-
/**
93-
* @brief Allocate a region of managed memory, accessible both from CUDA devices
94-
* and from the CPU.
95-
*
96-
* @param context A context of possible single-device-visibility
97-
*
98-
* @returns An owning RAII/CADRe object for the allocated managed memory region
99-
*/
92+
/// @param[in] device whose primary context's memory the unique reqion is to be allocated in.
10093
inline unique_region make_unique_region(
10194
const device_t& device,
10295
size_t num_bytes,
@@ -106,6 +99,7 @@ inline unique_region make_unique_region(
10699
return make_unique_region(pc, num_bytes, initial_visibility);
107100
}
108101

102+
/// @note allocates the unique region on the (primary context of) the current device
109103
inline unique_region make_unique_region(
110104
size_t num_bytes,
111105
initial_visibility_t initial_visibility)
@@ -114,6 +108,7 @@ inline unique_region make_unique_region(
114108
auto pc = cuda::device::primary_context::detail_::leaky_get(current_device_id);
115109
return make_unique_region(pc, num_bytes, initial_visibility);
116110
}
111+
///@}
117112

118113
} // namespace managed
119114

0 commit comments

Comments
 (0)