From 0e01ed51a9ab53b90926e574480786f84f941429 Mon Sep 17 00:00:00 2001 From: Alexey Bader Date: Sat, 7 Mar 2020 11:14:41 +0300 Subject: [PATCH 1/3] [SYCL][NFC] Change doxygen comments style JAVADOC -> C/C++ style Fix one typo: @retun -> \return Signed-off-by: Alexey Bader --- sycl/include/CL/sycl/context.hpp | 34 ++-- .../CL/sycl/detail/host_profiling_info.hpp | 4 +- sycl/include/CL/sycl/detail/pi.h | 120 ++++++------ sycl/include/CL/sycl/device.hpp | 34 ++-- sycl/include/CL/sycl/event.hpp | 18 +- sycl/include/CL/sycl/handler.hpp | 154 +++++++-------- sycl/include/CL/sycl/kernel.hpp | 28 +-- sycl/include/CL/sycl/platform.hpp | 18 +- sycl/include/CL/sycl/program.hpp | 80 ++++---- sycl/include/CL/sycl/queue.hpp | 175 +++++++++--------- sycl/include/CL/sycl/usm.hpp | 8 +- sycl/include/CL/sycl/usm/usm_allocator.hpp | 16 +- sycl/plugins/cuda/pi_cuda.cpp | 14 +- sycl/plugins/opencl/pi_opencl.cpp | 124 ++++++------- sycl/source/detail/context_impl.hpp | 32 ++-- sycl/source/detail/device_impl.hpp | 44 ++--- sycl/source/detail/event_impl.hpp | 32 ++-- sycl/source/detail/kernel_impl.hpp | 40 ++-- sycl/source/detail/platform_impl.hpp | 20 +- sycl/source/detail/program_impl.hpp | 96 +++++----- sycl/source/detail/queue_impl.hpp | 90 ++++----- sycl/source/detail/usm/usm_impl.cpp | 8 +- 22 files changed, 595 insertions(+), 594 deletions(-) diff --git a/sycl/include/CL/sycl/context.hpp b/sycl/include/CL/sycl/context.hpp index f640bd2f53e23..599ea43e4576f 100644 --- a/sycl/include/CL/sycl/context.hpp +++ b/sycl/include/CL/sycl/context.hpp @@ -32,8 +32,8 @@ class context { /// The constructed SYCL context will use the AsyncHandler parameter to handle /// exceptions. /// - /// @param AsyncHandler is an instance of async_handler. - /// @param UseCUDAPrimaryContext is a bool determining whether to use the + /// \param AsyncHandler is an instance of async_handler. + /// \param UseCUDAPrimaryContext is a bool determining whether to use the /// primary context in the CUDA backend. explicit context(const async_handler &AsyncHandler = {}, bool UseCUDAPrimaryContext = false); @@ -45,9 +45,9 @@ class context { /// The constructed SYCL context will use the AsyncHandler parameter to handle /// exceptions. /// - /// @param Device is an instance of SYCL device. - /// @param AsyncHandler is an instance of async_handler. - /// @param UseCUDAPrimaryContext is a bool determining whether to use the + /// \param Device is an instance of SYCL device. + /// \param AsyncHandler is an instance of async_handler. + /// \param UseCUDAPrimaryContext is a bool determining whether to use the /// primary context in the CUDA backend. explicit context(const device &Device, async_handler AsyncHandler = {}, bool UseCUDAPrimaryContext = false); @@ -59,9 +59,9 @@ class context { /// The constructed SYCL context will use the AsyncHandler parameter to handle /// exceptions. /// - /// @param Platform is an instance of SYCL platform. - /// @param AsyncHandler is an instance of async_handler. - /// @param UseCUDAPrimaryContext is a bool determining whether to use the + /// \param Platform is an instance of SYCL platform. + /// \param AsyncHandler is an instance of async_handler. + /// \param UseCUDAPrimaryContext is a bool determining whether to use the /// primary context in the CUDA backend. explicit context(const platform &Platform, async_handler AsyncHandler = {}, bool UseCUDAPrimaryContext = false); @@ -74,9 +74,9 @@ class context { /// The constructed SYCL context will use the AsyncHandler parameter to handle /// exceptions. /// - /// @param DeviceList is a list of SYCL device instances. - /// @param AsyncHandler is an instance of async_handler. - /// @param UseCUDAPrimaryContext is a bool determining whether to use the + /// \param DeviceList is a list of SYCL device instances. + /// \param AsyncHandler is an instance of async_handler. + /// \param UseCUDAPrimaryContext is a bool determining whether to use the /// primary context in the CUDA backend. explicit context(const vector_class &DeviceList, async_handler AsyncHandler = {}, @@ -88,8 +88,8 @@ class context { /// The constructed SYCL context will use the AsyncHandler parameter to handle /// exceptions. /// - /// @param ClContext is an instance of OpenCL cl_context. - /// @param AsyncHandler is an instance of async_handler. + /// \param ClContext is an instance of OpenCL cl_context. + /// \param AsyncHandler is an instance of async_handler. context(cl_context ClContext, async_handler AsyncHandler = {}); /// Queries this SYCL context for information. @@ -115,22 +115,22 @@ class context { /// /// The OpenCL cl_context handle is retained on return. /// - /// @return a valid instance of OpenCL cl_context. + /// \return a valid instance of OpenCL cl_context. cl_context get() const; /// Checks if this context is a SYCL host context. /// - /// @return true if this context is a SYCL host context. + /// \return true if this context is a SYCL host context. bool is_host() const; /// Gets platform associated with this SYCL context. /// - /// @return a valid instance of SYCL platform. + /// \return a valid instance of SYCL platform. platform get_platform() const; /// Gets devices associated with this SYCL context. /// - /// @return a vector of valid SYCL device instances. + /// \return a vector of valid SYCL device instances. vector_class get_devices() const; private: diff --git a/sycl/include/CL/sycl/detail/host_profiling_info.hpp b/sycl/include/CL/sycl/detail/host_profiling_info.hpp index 04458a85326b4..8a98de238e10a 100644 --- a/sycl/include/CL/sycl/detail/host_profiling_info.hpp +++ b/sycl/include/CL/sycl/detail/host_profiling_info.hpp @@ -22,11 +22,11 @@ class HostProfilingInfo { public: /// Returns event's start time. /// - /// @return event's start time in nanoseconds. + /// \return event's start time in nanoseconds. cl_ulong getStartTime() const { return StartTime; } /// Returns event's end time. /// - /// @return event's end time in nanoseconds. + /// \return event's end time in nanoseconds. cl_ulong getEndTime() const { return EndTime; } /// Measures event's start time. diff --git a/sycl/include/CL/sycl/detail/pi.h b/sycl/include/CL/sycl/detail/pi.h index a33c5808b642e..ce491b24d1527 100644 --- a/sycl/include/CL/sycl/detail/pi.h +++ b/sycl/include/CL/sycl/detail/pi.h @@ -788,20 +788,20 @@ pi_result piKernelRelease(pi_kernel kernel); /// Sets up pointer arguments for CL kernels. An extra indirection /// is required due to CL argument conventions. /// -/// @param kernel is the kernel to be launched -/// @param arg_index is the index of the kernel argument -/// @param arg_size is the size in bytes of the argument (ignored in CL) -/// @param arg_value is the pointer argument +/// \param kernel is the kernel to be launched +/// \param arg_index is the index of the kernel argument +/// \param arg_size is the size in bytes of the argument (ignored in CL) +/// \param arg_value is the pointer argument pi_result piextKernelSetArgPointer(pi_kernel kernel, pi_uint32 arg_index, size_t arg_size, const void *arg_value); /// API to set attributes controlling kernel execution /// -/// @param kernel is the pi kernel to execute -/// @param param_name is a pi_kernel_exec_info value that specifies the info +/// \param kernel is the pi kernel to execute +/// \param param_name is a pi_kernel_exec_info value that specifies the info /// passed to the kernel -/// @param param_value_size is the size of the value in bytes -/// @param param_value is a pointer to the value to set for the kernel +/// \param param_value_size is the size of the value in bytes +/// \param param_value is a pointer to the value to set for the kernel /// /// If param_name is PI_USM_INDIRECT_ACCESS, the value will be a ptr to /// the pi_bool value PI_TRUE @@ -1025,23 +1025,23 @@ typedef _pi_usm_migration_flags pi_usm_migration_flags; /// Allocates host memory accessible by the device. /// -/// @param result_ptr contains the allocated memory -/// @param context is the pi_context -/// @param pi_usm_mem_properties are optional allocation properties -/// @param size_t is the size of the allocation -/// @param alignment is the desired alignment of the allocation +/// \param result_ptr contains the allocated memory +/// \param context is the pi_context +/// \param pi_usm_mem_properties are optional allocation properties +/// \param size_t is the size of the allocation +/// \param alignment is the desired alignment of the allocation pi_result piextUSMHostAlloc(void **result_ptr, pi_context context, pi_usm_mem_properties *properties, size_t size, pi_uint32 alignment); /// Allocates device memory /// -/// @param result_ptr contains the allocated memory -/// @param context is the pi_context -/// @param device is the device the memory will be allocated on -/// @param pi_usm_mem_properties are optional allocation properties -/// @param size_t is the size of the allocation -/// @param alignment is the desired alignment of the allocation +/// \param result_ptr contains the allocated memory +/// \param context is the pi_context +/// \param device is the device the memory will be allocated on +/// \param pi_usm_mem_properties are optional allocation properties +/// \param size_t is the size of the allocation +/// \param alignment is the desired alignment of the allocation pi_result piextUSMDeviceAlloc(void **result_ptr, pi_context context, pi_device device, pi_usm_mem_properties *properties, size_t size, @@ -1049,12 +1049,12 @@ pi_result piextUSMDeviceAlloc(void **result_ptr, pi_context context, /// Allocates memory accessible on both host and device /// -/// @param result_ptr contains the allocated memory -/// @param context is the pi_context -/// @param device is the device the memory will be allocated on -/// @param pi_usm_mem_properties are optional allocation properties -/// @param size_t is the size of the allocation -/// @param alignment is the desired alignment of the allocation +/// \param result_ptr contains the allocated memory +/// \param context is the pi_context +/// \param device is the device the memory will be allocated on +/// \param pi_usm_mem_properties are optional allocation properties +/// \param size_t is the size of the allocation +/// \param alignment is the desired alignment of the allocation pi_result piextUSMSharedAlloc(void **result_ptr, pi_context context, pi_device device, pi_usm_mem_properties *properties, size_t size, @@ -1062,21 +1062,21 @@ pi_result piextUSMSharedAlloc(void **result_ptr, pi_context context, /// Frees allocated USM memory /// -/// @param context is the pi_context of the allocation -/// @param ptr is the memory to be freed +/// \param context is the pi_context of the allocation +/// \param ptr is the memory to be freed pi_result piextUSMFree(pi_context context, void *ptr); /// USM Memset API /// -/// @param queue is the queue to submit to -/// @param ptr is the ptr to memset -/// @param value is value to set. It is interpreted as an 8-bit value and the +/// \param queue is the queue to submit to +/// \param ptr is the ptr to memset +/// \param value is value to set. It is interpreted as an 8-bit value and the /// upper /// 24 bits are ignored -/// @param count is the size in bytes to memset -/// @param num_events_in_waitlist is the number of events to wait on -/// @param events_waitlist is an array of events to wait on -/// @param event is the event that represents this operation +/// \param count is the size in bytes to memset +/// \param num_events_in_waitlist is the number of events to wait on +/// \param events_waitlist is an array of events to wait on +/// \param event is the event that represents this operation pi_result piextUSMEnqueueMemset(pi_queue queue, void *ptr, pi_int32 value, size_t count, pi_uint32 num_events_in_waitlist, const pi_event *events_waitlist, @@ -1084,14 +1084,14 @@ pi_result piextUSMEnqueueMemset(pi_queue queue, void *ptr, pi_int32 value, /// USM Memcpy API /// -/// @param queue is the queue to submit to -/// @param blocking is whether this operation should block the host -/// @param src_ptr is the data to be copied -/// @param dst_ptr is the location the data will be copied -/// @param size is number of bytes to copy -/// @param num_events_in_waitlist is the number of events to wait on -/// @param events_waitlist is an array of events to wait on -/// @param event is the event that represents this operation +/// \param queue is the queue to submit to +/// \param blocking is whether this operation should block the host +/// \param src_ptr is the data to be copied +/// \param dst_ptr is the location the data will be copied +/// \param size is number of bytes to copy +/// \param num_events_in_waitlist is the number of events to wait on +/// \param events_waitlist is an array of events to wait on +/// \param event is the event that represents this operation pi_result piextUSMEnqueueMemcpy(pi_queue queue, pi_bool blocking, void *dst_ptr, const void *src_ptr, size_t size, pi_uint32 num_events_in_waitlist, @@ -1100,13 +1100,13 @@ pi_result piextUSMEnqueueMemcpy(pi_queue queue, pi_bool blocking, void *dst_ptr, /// Hint to migrate memory to the device /// -/// @param queue is the queue to submit to -/// @param ptr points to the memory to migrate -/// @param size is the number of bytes to migrate -/// @param flags is a bitfield used to specify memory migration options -/// @param num_events_in_waitlist is the number of events to wait on -/// @param events_waitlist is an array of events to wait on -/// @param event is the event that represents this operation +/// \param queue is the queue to submit to +/// \param ptr points to the memory to migrate +/// \param size is the number of bytes to migrate +/// \param flags is a bitfield used to specify memory migration options +/// \param num_events_in_waitlist is the number of events to wait on +/// \param events_waitlist is an array of events to wait on +/// \param event is the event that represents this operation pi_result piextUSMEnqueuePrefetch(pi_queue queue, const void *ptr, size_t size, pi_usm_migration_flags flags, pi_uint32 num_events_in_waitlist, @@ -1115,11 +1115,11 @@ pi_result piextUSMEnqueuePrefetch(pi_queue queue, const void *ptr, size_t size, /// USM Memadvise API /// -/// @param queue is the queue to submit to -/// @param ptr is the data to be advised -/// @param length is the size in bytes of the memory to advise -/// @param advice is device specific advice -/// @param event is the event that represents this operation +/// \param queue is the queue to submit to +/// \param ptr is the data to be advised +/// \param length is the size in bytes of the memory to advise +/// \param advice is device specific advice +/// \param event is the event that represents this operation // USM memadvise API to govern behavior of automatic migration mechanisms pi_result piextUSMEnqueueMemAdvise(pi_queue queue, const void *ptr, size_t length, int advice, pi_event *event); @@ -1134,12 +1134,12 @@ pi_result piextUSMEnqueueMemAdvise(pi_queue queue, const void *ptr, /// allocation is in bytes. Result is a size_t. /// PI_MEM_ALLOC_DEVICE returns the pi_device this was allocated against /// -/// @param context is the pi_context -/// @param ptr is the pointer to query -/// @param param_name is the type of query to perform -/// @param param_value_size is the size of the result in bytes -/// @param param_value is the result -/// @param param_value_ret is how many bytes were written +/// \param context is the pi_context +/// \param ptr is the pointer to query +/// \param param_name is the type of query to perform +/// \param param_value_size is the size of the result in bytes +/// \param param_value is the result +/// \param param_value_ret is how many bytes were written pi_result piextUSMGetMemAllocInfo(pi_context context, const void *ptr, pi_mem_info param_name, size_t param_value_size, void *param_value, diff --git a/sycl/include/CL/sycl/device.hpp b/sycl/include/CL/sycl/device.hpp index cdd0b76428f0e..ac9d0e1da222b 100644 --- a/sycl/include/CL/sycl/device.hpp +++ b/sycl/include/CL/sycl/device.hpp @@ -30,13 +30,13 @@ class device { /// Constructs a SYCL device instance from an OpenCL cl_device_id /// in accordance with the requirements described in 4.3.1. /// - /// @param DeviceId is OpenCL device represented with cl_device_id + /// \param DeviceId is OpenCL device represented with cl_device_id explicit device(cl_device_id DeviceId); /// Constructs a SYCL device instance using the device selected /// by the DeviceSelector provided. /// - /// @param deviceSelector SYCL device selector to be used (see 4.6.1.1). + /// \param deviceSelector SYCL device selector to be used (see 4.6.1.1). explicit device(const device_selector &DeviceSelector); bool operator==(const device &rhs) const { return impl == rhs.impl; } @@ -53,27 +53,27 @@ class device { /// Get instance of device /// - /// @return a valid cl_device_id instance in accordance with the requirements described in 4.3.1. + /// \return a valid cl_device_id instance in accordance with the requirements described in 4.3.1. cl_device_id get() const; /// Check if device is a host device /// - /// @return true if SYCL device is a host device + /// \return true if SYCL device is a host device bool is_host() const; /// Check if device is a CPU device /// - /// @return true if SYCL device is a CPU device + /// \return true if SYCL device is a CPU device bool is_cpu() const; /// Check if device is a GPU device /// - /// @return true if SYCL device is a GPU device + /// \return true if SYCL device is a GPU device bool is_gpu() const; /// Check if device is an accelerator device /// - /// @return true if SYCL device is an accelerator device + /// \return true if SYCL device is an accelerator device bool is_accelerator() const; /// Get associated SYCL platform @@ -84,7 +84,7 @@ class device { /// is a host device then the SYCL platform must be a host platform. /// The value returned must be equal to that returned by get_info(). /// - /// @return The associated SYCL platform. + /// \return The associated SYCL platform. platform get_platform() const; /// Partition device into sub devices @@ -93,8 +93,8 @@ class device { /// If this SYCL device does not support info::partition_property::partition_equally /// a feature_not_supported exception must be thrown. /// - /// @param ComputeUnits is a desired count of compute units in each sub device. - /// @return A vector class of sub devices partitioned from this SYCL device equally based on the ComputeUnits parameter. + /// \param ComputeUnits is a desired count of compute units in each sub device. + /// \return A vector class of sub devices partitioned from this SYCL device equally based on the ComputeUnits parameter. template vector_class create_sub_devices(size_t ComputeUnits) const; @@ -104,8 +104,8 @@ class device { /// If this SYCL device does not support info::partition_property::partition_by_counts /// a feature_not_supported exception must be thrown. /// - /// @param Counts is a vector_class of desired compute units in sub devices. - /// @return a vector_class of sub devices partitioned from this SYCL device by count sizes based on the Counts parameter. + /// \param Counts is a vector_class of desired compute units in sub devices. + /// \return a vector_class of sub devices partitioned from this SYCL device by count sizes based on the Counts parameter. template vector_class create_sub_devices(const vector_class &Counts) const; @@ -117,8 +117,8 @@ class device { /// or the SYCL device does not support info::affinity_domain provided /// a feature_not_supported exception must be thrown. /// - /// @param AffinityDomain is one of the values described in Table 4.20 of SYCL Spec - /// @return a vector class of sub devices partitioned from this SYCL device by affinity domain based on the AffinityDomain parameter + /// \param AffinityDomain is one of the values described in Table 4.20 of SYCL Spec + /// \return a vector class of sub devices partitioned from this SYCL device by affinity domain based on the AffinityDomain parameter template vector_class create_sub_devices(info::partition_affinity_domain AffinityDomain) const; @@ -129,7 +129,7 @@ class device { /// parameters in Table 4.20 of SYCL Spec to facilitate returning the type /// associated with the param parameter. /// - /// @return device info of type described in Table 4.20. + /// \return device info of type described in Table 4.20. template typename info::param_traits::return_type get_info() const; @@ -137,7 +137,7 @@ class device { /// Check SYCL extension support by device /// /// @extension_name is a name of queried extension. - /// @return true if SYCL device supports the extension. + /// \return true if SYCL device supports the extension. bool has_extension(const string_class &extension_name) const; /// Query available SYCL devices @@ -146,7 +146,7 @@ class device { /// that is a host device, permitted by the deviceType parameter /// /// @deviceType is one of the values described in A.3 of SYCL Spec - /// @return a vector_class containing all SYCL devices available in the system of the device type specified + /// \return a vector_class containing all SYCL devices available in the system of the device type specified static vector_class get_devices(info::device_type deviceType = info::device_type::all); diff --git a/sycl/include/CL/sycl/event.hpp b/sycl/include/CL/sycl/event.hpp index ba6248a2b8908..86e24dda794fc 100644 --- a/sycl/include/CL/sycl/event.hpp +++ b/sycl/include/CL/sycl/event.hpp @@ -33,8 +33,8 @@ class event { /// /// The SyclContext must match the OpenCL context associated with the ClEvent. /// - /// @param ClEvent is a valid instance of OpenCL cl_event. - /// @param SyclContext is an instance of SYCL context. + /// \param ClEvent is a valid instance of OpenCL cl_event. + /// \param SyclContext is an instance of SYCL context. event(cl_event ClEvent, const context &SyclContext); event(const event &rhs) = default; @@ -51,12 +51,12 @@ class event { /// Returns a valid OpenCL event interoperability handle. /// - /// @return a valid instance of OpenCL cl_event. + /// \return a valid instance of OpenCL cl_event. cl_event get(); /// Checks if this event is a SYCL host event. /// - /// @return true if this event is a SYCL host event. + /// \return true if this event is a SYCL host event. bool is_host() const; /// Return the list of events that this event waits for. @@ -64,7 +64,7 @@ class event { /// Only direct dependencies are returned. Already completed events are not /// included in the returned vector. /// - /// @return a vector of SYCL events. + /// \return a vector of SYCL events. vector_class get_wait_list(); /// Wait for the event. @@ -72,7 +72,7 @@ class event { /// Synchronously wait on a list of events. /// - /// @param EventList is a vector of SYCL events. + /// \param EventList is a vector of SYCL events. static void wait(const vector_class &EventList); /// Wait for the event. @@ -88,12 +88,12 @@ class event { /// events are waiting on executions from, then call those contexts' /// asynchronous error handlers with those errors. /// - /// @param EventList is a vector of SYCL events. + /// \param EventList is a vector of SYCL events. static void wait_and_throw(const vector_class &EventList); /// Queries this SYCL event for information. /// - /// @return depends on the information being requested. + /// \return depends on the information being requested. template typename info::param_traits::return_type get_info() const; @@ -107,7 +107,7 @@ class event { /// property::queue::enable_profiling property, an invalid_object_error SYCL /// exception is thrown. /// - /// @return depends on template parameter. + /// \return depends on template parameter. template typename info::param_traits::return_type get_profiling_info() const; diff --git a/sycl/include/CL/sycl/handler.hpp b/sycl/include/CL/sycl/handler.hpp index a753190079f49..ba5c15c29ee9e 100644 --- a/sycl/include/CL/sycl/handler.hpp +++ b/sycl/include/CL/sycl/handler.hpp @@ -139,8 +139,8 @@ class handler { private: /// Constructs SYCL handler from queue. /// - /// @param Queue is a SYCL queue. - /// @param IsHost indicates if this handler is created for SYCL host device. + /// \param Queue is a SYCL queue. + /// \param IsHost indicates if this handler is created for SYCL host device. handler(shared_ptr_class Queue, bool IsHost) : MQueue(std::move(Queue)), MIsHost(IsHost) {} @@ -175,7 +175,7 @@ class handler { const int Size, const size_t Index, size_t &IndexShift, bool IsKernelCreatedFromSource); - /// @retun a string containing name of SYCL kernel. + /// \return a string containing name of SYCL kernel. string_class getKernelName(); template bool lambdaAndKernelHaveEqualName() { @@ -195,14 +195,14 @@ class handler { /// It's expected that the method is the latest method executed before /// object destruction. /// - /// @return a SYCL event object representing the command group. + /// \return a SYCL event object representing the command group. event finalize(); /// Saves streams associated with this handler. /// /// Streams are then forwarded to command group and flushed in the scheduler. /// - /// @param Stream is a pointer to SYCL stream. + /// \param Stream is a pointer to SYCL stream. void addStream(shared_ptr_class Stream) { MStreamStorage.push_back(std::move(Stream)); } @@ -327,7 +327,7 @@ class handler { /// Also initializes kernel name, list of arguments and requirements using /// information from the integration header. /// - /// @param KernelFunc is a SYCL kernel function. + /// \param KernelFunc is a SYCL kernel function. template > void StoreLambda(KernelType KernelFunc) { @@ -454,7 +454,7 @@ class handler { /// The command group has a requirement to gain access to the given memory /// object before executing. /// - /// @param Acc is a SYCL accessor describing required memory region. + /// \param Acc is a SYCL accessor describing required memory region. template void @@ -476,14 +476,14 @@ class handler { /// Registers event dependencies on this command group. /// - /// @param Event is a valid SYCL event to wait on. + /// \param Event is a valid SYCL event to wait on. void depends_on(event Event) { MEvents.push_back(std::move(detail::getSyclObjImpl(Event))); } /// Registers event dependencies on this command group. /// - /// @param Event is a vector of valid SYCL events to wait on. + /// \param Event is a vector of valid SYCL events to wait on. void depends_on(vector_class Events) { for (event &Event : Events) { MEvents.push_back(std::move(detail::getSyclObjImpl(Event))); @@ -494,8 +494,8 @@ class handler { /// /// Registers Arg passed as argument # ArgIndex. /// - /// @param ArgIndex is a positional number of argument to be set. - /// @param Arg is an argument value to be set. + /// \param ArgIndex is a positional number of argument to be set. + /// \param Arg is an argument value to be set. template void set_arg(int ArgIndex, T &&Arg) { setArgHelper(ArgIndex, std::move(Arg)); } @@ -504,7 +504,7 @@ class handler { /// /// Registers pack of arguments(Args) with indexes starting from 0. /// - /// @param Args are argument values to be set. + /// \param Args are argument values to be set. template void set_args(Ts &&... Args) { setArgsHelper(0, std::move(Args)...); } @@ -515,7 +515,7 @@ class handler { /// globally visible, there is no need for the developer to provide /// a kernel name for it. /// - /// @param KernelFunc is a SYCL kernel function. + /// \param KernelFunc is a SYCL kernel function. template void single_task(KernelType KernelFunc) { throwIfActionIsCreated(); @@ -540,8 +540,8 @@ class handler { /// globally visible, there is no need for the developer to provide /// a kernel name for it. /// - /// @param NumWorkItems is a range defining indexing space. - /// @param KernelFunc is a SYCL kernel function. + /// \param NumWorkItems is a range defining indexing space. + /// \param KernelFunc is a SYCL kernel function. template void parallel_for(range NumWorkItems, KernelType KernelFunc) { @@ -559,7 +559,7 @@ class handler { /// Defines and invokes a SYCL kernel on host device. /// - /// @param Func is a SYCL kernel function defined by lambda function or a + /// \param Func is a SYCL kernel function defined by lambda function or a /// named function object type. template void run_on_host_intel(FuncT Func) { throwIfActionIsCreated(); @@ -580,9 +580,9 @@ class handler { /// globally visible, there is no need for the developer to provide /// a kernel name for it. /// - /// @param NumWorkItems is a range defining indexing space. - /// @param WorkItemOffset is an offset to be applied to each work item index. - /// @param KernelFunc is a SYCL kernel function. + /// \param NumWorkItems is a range defining indexing space. + /// \param WorkItemOffset is an offset to be applied to each work item index. + /// \param KernelFunc is a SYCL kernel function. template void parallel_for(range NumWorkItems, id WorkItemOffset, @@ -608,9 +608,9 @@ class handler { /// globally visible, there is no need for the developer to provide /// a kernel name for it. /// - /// @param ExecutionRange is a ND-range defining global and local sizes as + /// \param ExecutionRange is a ND-range defining global and local sizes as /// well as offset. - /// @param KernelFunc is a SYCL kernel function. + /// \param KernelFunc is a SYCL kernel function. template void parallel_for(nd_range ExecutionRange, KernelType KernelFunc) { @@ -633,9 +633,9 @@ class handler { /// representing the execution on each work-item. Launches NumWorkGroups /// work-groups of runtime-defined size. /// - /// @param NumWorkGroups is a range describing the number of work-groups in + /// \param NumWorkGroups is a range describing the number of work-groups in /// each dimension. - /// @param KernelFunc is a lambda representing kernel. + /// \param KernelFunc is a lambda representing kernel. template void parallel_for_work_group(range NumWorkGroups, @@ -659,11 +659,11 @@ class handler { /// representing the execution on each work-item. Launches NumWorkGroups /// work-groups of WorkGroupSize size. /// - /// @param NumWorkGroups is a range describing the number of work-groups in + /// \param NumWorkGroups is a range describing the number of work-groups in /// each dimension. - /// @param WorkGroupSize is a range describing the size of work-groups in + /// \param WorkGroupSize is a range describing the size of work-groups in /// each dimension. - /// @param KernelFunc is a lambda representing kernel. + /// \param KernelFunc is a lambda representing kernel. template void parallel_for_work_group(range NumWorkGroups, @@ -686,7 +686,7 @@ class handler { /// Executes exactly once. The kernel invocation method has no functors and /// cannot be called on host. /// - /// @param SyclKernel is a SYCL kernel object. + /// \param SyclKernel is a SYCL kernel object. void single_task(kernel SyclKernel) { throwIfActionIsCreated(); verifySyclKernelInvoc(SyclKernel); @@ -701,9 +701,9 @@ class handler { /// The SYCL kernel function is defined as SYCL kernel object. The kernel /// invocation method has no functors and cannot be called on host. /// - /// @param NumWorkItems is a range defining indexing space. - /// @param WorkItemOffset is an offset to be applied to each work item index. - /// @param KernelFunc is a SYCL kernel function. + /// \param NumWorkItems is a range defining indexing space. + /// \param WorkItemOffset is an offset to be applied to each work item index. + /// \param KernelFunc is a SYCL kernel function. template void parallel_for(range NumWorkItems, kernel SyclKernel) { throwIfActionIsCreated(); @@ -719,9 +719,9 @@ class handler { /// /// The SYCL kernel function is defined as SYCL kernel object. /// - /// @param NumWorkItems is a range defining indexing space. - /// @param WorkItemOffset is an offset to be applied to each work item index. - /// @param KernelFunc is a SYCL kernel function. + /// \param NumWorkItems is a range defining indexing space. + /// \param WorkItemOffset is an offset to be applied to each work item index. + /// \param KernelFunc is a SYCL kernel function. template void parallel_for(range NumWorkItems, id WorkItemOffset, kernel SyclKernel) { @@ -738,9 +738,9 @@ class handler { /// /// The SYCL kernel function is defined as SYCL kernel object. /// - /// @param ExecutionRange is a ND-range defining global and local sizes as + /// \param ExecutionRange is a ND-range defining global and local sizes as /// well as offset. - /// @param KernelFunc is a SYCL kernel function. + /// \param KernelFunc is a SYCL kernel function. template void parallel_for(nd_range NDRange, kernel SyclKernel) { throwIfActionIsCreated(); @@ -753,9 +753,9 @@ class handler { /// Defines and invokes a SYCL kernel function. /// - /// @param SyclKernel is a SYCL kernel that is executed on a SYCL device + /// \param SyclKernel is a SYCL kernel that is executed on a SYCL device /// (except for the host device). - /// @param KernelFunc is a lambda that is used if device, queue is bound to, + /// \param KernelFunc is a lambda that is used if device, queue is bound to, /// is a host device. template void single_task(kernel SyclKernel, KernelType KernelFunc) { @@ -777,7 +777,7 @@ class handler { /// Invokes a lambda on the host. Dependencies are satisfied on the host. /// - /// @param Func is a lambda that is executed on the host + /// \param Func is a lambda that is executed on the host template void interop_task(FuncT Func) { MInteropTask.reset(new detail::InteropTask(std::move(Func))); @@ -786,10 +786,10 @@ class handler { /// Defines and invokes a SYCL kernel function for the specified range. /// - /// @param SyclKernel is a SYCL kernel that is executed on a SYCL device + /// \param SyclKernel is a SYCL kernel that is executed on a SYCL device /// (except for the host device). - /// @param NumWorkItems is a range defining indexing space. - /// @param KernelFunc is a lambda that is used if device, queue is bound to, + /// \param NumWorkItems is a range defining indexing space. + /// \param KernelFunc is a lambda that is used if device, queue is bound to, /// is a host device. template @@ -814,11 +814,11 @@ class handler { /// Defines and invokes a SYCL kernel function for the specified range and /// offsets. /// - /// @param SyclKernel is a SYCL kernel that is executed on a SYCL device + /// \param SyclKernel is a SYCL kernel that is executed on a SYCL device /// (except for the host device). - /// @param NumWorkItems is a range defining indexing space. - /// @param WorkItemOffset is an offset to be applied to each work item index. - /// @param KernelFunc is a lambda that is used if device, queue is bound to, + /// \param NumWorkItems is a range defining indexing space. + /// \param WorkItemOffset is an offset to be applied to each work item index. + /// \param KernelFunc is a lambda that is used if device, queue is bound to, /// is a host device. template @@ -843,11 +843,11 @@ class handler { /// Defines and invokes a SYCL kernel function for the specified range and /// offsets. /// - /// @param SyclKernel is a SYCL kernel that is executed on a SYCL device + /// \param SyclKernel is a SYCL kernel that is executed on a SYCL device /// (except for the host device). - /// @param NumWorkItems is a range defining indexing space. - /// @param WorkItemOffset is an offset to be applied to each work item index. - /// @param KernelFunc is a lambda that is used if device, queue is bound to, + /// \param NumWorkItems is a range defining indexing space. + /// \param WorkItemOffset is an offset to be applied to each work item index. + /// \param KernelFunc is a lambda that is used if device, queue is bound to, /// is a host device. template @@ -878,10 +878,10 @@ class handler { /// yielding multiple kernel class objects accessible via the \c program class /// interface. /// - /// @param SyclKernel is a compiled SYCL kernel. - /// @param NumWorkGroups is a range describing the number of work-groups in + /// \param SyclKernel is a compiled SYCL kernel. + /// \param NumWorkGroups is a range describing the number of work-groups in /// each dimension. - /// @param KernelFunc is a lambda representing kernel. + /// \param KernelFunc is a lambda representing kernel. template void parallel_for_work_group(kernel SyclKernel, range NumWorkGroups, @@ -908,12 +908,12 @@ class handler { /// yielding multiple kernel class objects accessible via the \c program class /// interface. /// - /// @param SyclKernel is a compiled SYCL kernel. - /// @param NumWorkGroups is a range describing the number of work-groups in + /// \param SyclKernel is a compiled SYCL kernel. + /// \param NumWorkGroups is a range describing the number of work-groups in /// each dimension. - /// @param WorkGroupSize is a range describing the size of work-groups in + /// \param WorkGroupSize is a range describing the size of work-groups in /// each dimension. - /// @param KernelFunc is a lambda representing kernel. + /// \param KernelFunc is a lambda representing kernel. template void parallel_for_work_group(kernel SyclKernel, range NumWorkGroups, @@ -939,8 +939,8 @@ class handler { /// /// Source must have at least as many bytes as the range accessed by Dst. /// - /// @param Src is a source SYCL accessor. - /// @param Dst is a smart pointer to destination memory. + /// \param Src is a source SYCL accessor. + /// \param Dst is a smart pointer to destination memory. template @@ -961,8 +961,8 @@ class handler { /// /// Source must have at least as many bytes as the range accessed by Dst. /// - /// @param Src is a smart pointer to source memory. - /// @param Dst is a destination SYCL accessor. + /// \param Src is a smart pointer to source memory. + /// \param Dst is a destination SYCL accessor. template @@ -984,8 +984,8 @@ class handler { /// /// Source must have at least as many bytes as the range accessed by Dst. /// - /// @param Src is a source SYCL accessor. - /// @param Dst is a pointer to destination memory. + /// \param Src is a source SYCL accessor. + /// \param Dst is a pointer to destination memory. template @@ -1029,8 +1029,8 @@ class handler { /// /// Source must have at least as many bytes as the range accessed by Dst. /// - /// @param Src is a pointer to source memory. - /// @param Dst is a destination SYCL accessor. + /// \param Src is a pointer to source memory. + /// \param Dst is a destination SYCL accessor. template @@ -1075,8 +1075,8 @@ class handler { /// /// Source must have at least as many bytes as the range accessed by Dst. /// - /// @param Src is a source SYCL accessor. - /// @param Dst is a destination SYCL accessor. + /// \param Src is a source SYCL accessor. + /// \param Dst is a destination SYCL accessor. template < typename T_Src, int Dims_Src, access::mode AccessMode_Src, access::target AccessTarget_Src, typename T_Dst, int Dims_Dst, @@ -1141,7 +1141,7 @@ class handler { /// Provides guarantees that the memory object accessed via Acc is updated /// on the host after command group object execution is complete. /// - /// @param Acc is a SYCL accessor that needs to be updated on host. + /// \param Acc is a SYCL accessor that needs to be updated on host. template @@ -1166,8 +1166,8 @@ class handler { /// accessor points to one dimensional memory object then use special type for /// filling. Otherwise fill using regular kernel. /// - /// @param Dst is a destination SYCL accessor. - /// @param Pattern is a value to be used to fill the memory. + /// \param Dst is a destination SYCL accessor. + /// \param Pattern is a value to be used to fill the memory. template @@ -1206,9 +1206,9 @@ class handler { /// Copies data from one memory region to another, both pointed by /// USM pointers. /// - /// @param Dest is a USM pointer to the destination memory. - /// @param Src is a USM pointer to the source memory. - /// @param Count is a number of bytes to copy. + /// \param Dest is a USM pointer to the destination memory. + /// \param Src is a USM pointer to the source memory. + /// \param Count is a number of bytes to copy. void memcpy(void *Dest, const void *Src, size_t Count) { throwIfActionIsCreated(); MSrcPtr = const_cast(Src); @@ -1219,9 +1219,9 @@ class handler { /// Fills the memory pointed by a USM pointer with the value specified. /// - /// @param Dest is a USM pointer to the memory to fill. - /// @param Value is a value to be set. Value is cast as an unsigned char. - /// @param Count is a number of bytes to fill. + /// \param Dest is a USM pointer to the memory to fill. + /// \param Value is a value to be set. Value is cast as an unsigned char. + /// \param Count is a number of bytes to fill. void memset(void *Dest, int Value, size_t Count) { throwIfActionIsCreated(); MDstPtr = Dest; @@ -1234,8 +1234,8 @@ class handler { /// on a device earlier than Unified Shared Memory would normally require it /// to be available. /// - /// @param Ptr is a USM pointer to the memory to be prefetched to the device. - /// @param Count is a number of bytes to be prefetched. + /// \param Ptr is a USM pointer to the memory to be prefetched to the device. + /// \param Count is a number of bytes to be prefetched. void prefetch(const void *Ptr, size_t Count) { throwIfActionIsCreated(); MDstPtr = const_cast(Ptr); diff --git a/sycl/include/CL/sycl/kernel.hpp b/sycl/include/CL/sycl/kernel.hpp index cdf02bf253147..1aa8afec7703e 100644 --- a/sycl/include/CL/sycl/kernel.hpp +++ b/sycl/include/CL/sycl/kernel.hpp @@ -30,8 +30,8 @@ class kernel { /// The requirements for this constructor are described in section 4.3.1 /// of the SYCL specification. /// - /// @param ClKernel is a valid OpenCL cl_kernel instance - /// @param SyclContext is a valid SYCL context + /// \param ClKernel is a valid OpenCL cl_kernel instance + /// \param SyclContext is a valid SYCL context kernel(cl_kernel ClKernel, const context &SyclContext); kernel(const kernel &RHS) = default; @@ -52,12 +52,12 @@ class kernel { /// cl_kernel will be returned. If this kernel is a host kernel, /// an invalid_object_error exception will be thrown. /// - /// @return a valid cl_kernel instance + /// \return a valid cl_kernel instance cl_kernel get() const; /// Check if the associated SYCL context is a SYCL host context. /// - /// @return true if this SYCL kernel is a host kernel. + /// \return true if this SYCL kernel is a host kernel. bool is_host() const; /// Get the context that this kernel is defined for. @@ -65,7 +65,7 @@ class kernel { /// The value returned must be equal to that returned by /// get_info(). /// - /// @return a valid SYCL context + /// \return a valid SYCL context context get_context() const; /// Get the program that this kernel is defined for. @@ -73,13 +73,13 @@ class kernel { /// The value returned must be equal to that returned by /// get_info(). /// - /// @return a valid SYCL program + /// \return a valid SYCL program program get_program() const; /// Query information from the kernel object using the info::kernel_info /// descriptor. /// - /// @return depends on information being queried. + /// \return depends on information being queried. template typename info::param_traits::return_type get_info() const; @@ -87,8 +87,8 @@ class kernel { /// Query work-group information from a kernel using the /// info::kernel_work_group descriptor for a specific device. /// - /// @param Device is a valid SYCL device. - /// @return depends on information being queried. + /// \param Device is a valid SYCL device. + /// \return depends on information being queried. template typename info::param_traits::return_type get_work_group_info(const device &Device) const; @@ -96,8 +96,8 @@ class kernel { /// Query sub-group information from a kernel using the /// info::kernel_sub_group descriptor for a specific device. /// - /// @param Device is a valid SYCL device. - /// @return depends on information being queried. + /// \param Device is a valid SYCL device. + /// \return depends on information being queried. template typename info::param_traits::return_type get_sub_group_info(const device &Device) const; @@ -105,9 +105,9 @@ class kernel { /// Query sub-group information from a kernel using the /// info::kernel_sub_group descriptor for a specific device and value. /// - /// @param Device is a valid SYCL device. - /// @param Value depends on information being queried. - /// @return depends on information being queried. + /// \param Device is a valid SYCL device. + /// \param Value depends on information being queried. + /// \return depends on information being queried. template typename info::param_traits::return_type get_sub_group_info( diff --git a/sycl/include/CL/sycl/platform.hpp b/sycl/include/CL/sycl/platform.hpp index 4e7088f19f6f2..5841a0bbfd1d6 100644 --- a/sycl/include/CL/sycl/platform.hpp +++ b/sycl/include/CL/sycl/platform.hpp @@ -33,7 +33,7 @@ class platform { /// The provided OpenCL platform handle is retained on SYCL platform /// construction. /// - /// @param PlatformId is an OpenCL cl_platform_id instance. + /// \param PlatformId is an OpenCL cl_platform_id instance. explicit platform(cl_platform_id PlatformId); /// Constructs a SYCL platform instance using device selector. @@ -42,7 +42,7 @@ class platform { /// platform instance must be the SYCL device that is produced from the /// provided device selector. /// - /// @param DeviceSelector is an instance of SYCL device_selector. + /// \param DeviceSelector is an instance of SYCL device_selector. explicit platform(const device_selector &DeviceSelector); platform(const platform &rhs) = default; @@ -59,18 +59,18 @@ class platform { /// Returns an OpenCL interoperability platform. /// - /// @return an instance of OpenCL cl_platform_id. + /// \return an instance of OpenCL cl_platform_id. cl_platform_id get() const; /// Checks if platform supports specified extension. /// - /// @param ExtensionName is a string containing extension name. - /// @return true if specified extension is supported by this SYCL platform. + /// \param ExtensionName is a string containing extension name. + /// \return true if specified extension is supported by this SYCL platform. bool has_extension(const string_class &ExtensionName) const; /// Checks if this SYCL platform is a host platform. /// - /// @return true if this SYCL platform is a host platform. + /// \return true if this SYCL platform is a host platform. bool is_host() const; /// Returns all SYCL devices associated with this platform. @@ -79,8 +79,8 @@ class platform { /// a single SYCL host device. If there are no devices that match given device /// type, resulting vector is empty. /// - /// @param DeviceType is a SYCL device type. - /// @return a vector of SYCL devices. + /// \param DeviceType is a SYCL device type. + /// \return a vector of SYCL devices. vector_class get_devices(info::device_type DeviceType = info::device_type::all) const; @@ -95,7 +95,7 @@ class platform { /// /// The resulting vector always contains a single SYCL host platform instance. /// - /// @return a vector of all available SYCL platforms. + /// \return a vector of all available SYCL platforms. static vector_class get_platforms(); private: diff --git a/sycl/include/CL/sycl/program.hpp b/sycl/include/CL/sycl/program.hpp index 59f42d2e727ac..bc0d51c3ed0fb 100644 --- a/sycl/include/CL/sycl/program.hpp +++ b/sycl/include/CL/sycl/program.hpp @@ -37,7 +37,7 @@ class program { /// associated with the provided context and the SYCL devices that are /// associated with the context. /// - /// @param Context is an instance of SYCL context. + /// \param Context is an instance of SYCL context. explicit program(const context &Context); /// Constructs an instance of SYCL program for the provided DeviceList. @@ -46,8 +46,8 @@ class program { /// associated with the provided context and the SYCL devices in the provided /// DeviceList. /// - /// @param Context is an instance of SYCL context. - /// @param DeviceList is a list of SYCL devices. + /// \param Context is an instance of SYCL context. + /// \param DeviceList is a list of SYCL devices. program(const context &context, vector_class DeviceList); /// Constructs an instance of SYCL program by linking together each SYCL @@ -60,8 +60,8 @@ class program { /// program is to be linked for returns false for the device information query /// info::device::is_linker_available. /// - /// @param ProgramList is a list of SYCL program instances. - /// @param LinkOptions is a string containing valid OpenCL link options. + /// \param ProgramList is a list of SYCL program instances. + /// \param LinkOptions is a string containing valid OpenCL link options. program(vector_class ProgramList, string_class LinkOptions = ""); /// Constructs a SYCL program instance from an OpenCL cl_program. @@ -73,8 +73,8 @@ class program { /// /// The instance of OpenCL cl_program will be retained on construction. /// - /// @param Context is an instance of SYCL Context. - /// @param ClProgram is an instance of OpenCL cl_program. + /// \param Context is an instance of SYCL Context. + /// \param ClProgram is an instance of OpenCL cl_program. program(const context &Context, cl_program ClProgram); program(const program &rhs) = default; @@ -95,10 +95,10 @@ class program { /// If the program is created for a SYCL host device, an invalid_object_error /// exception is thrown. /// - /// @return a valid OpenCL cl_program instance. + /// \return a valid OpenCL cl_program instance. cl_program get() const; - /// @return true if this SYCL program is a host program. + /// \return true if this SYCL program is a host program. bool is_host() const; /// Compiles the SYCL kernel function into the encapsulated raw program. @@ -112,7 +112,7 @@ class program { /// query info::device::is_compiler_available, a feature_not_supported /// exception is thrown. /// - /// @param CompileOptions is a string of valid OpenCL compile options. + /// \param CompileOptions is a string of valid OpenCL compile options. template void compile_with_kernel_type(string_class CompileOptions = "") { detail::OSModuleHandle M = detail::OSUtil::getOSModuleHandle( @@ -132,8 +132,8 @@ class program { /// information query info::device::is_compiler_available, a /// feature_not_supported SYCL exception is thrown. /// - /// @param KernelSource is a string containing OpenCL C kernel source code. - /// @param CompileOptions is a string containing OpenCL compile options. + /// \param KernelSource is a string containing OpenCL C kernel source code. + /// \param CompileOptions is a string containing OpenCL compile options. void compile_with_source(string_class KernelSource, string_class CompileOptions = ""); @@ -149,7 +149,7 @@ class program { /// info::device::is_linker_available, a feature_not_supported SYCL exception /// is thrown. /// - /// @param BuildOptions is a string containing OpenCL compile options. + /// \param BuildOptions is a string containing OpenCL compile options. template void build_with_kernel_type(string_class BuildOptions = "") { detail::OSModuleHandle M = detail::OSUtil::getOSModuleHandle( @@ -169,8 +169,8 @@ class program { /// info::device::is_linker_available, a feature_not_supported SYCL exception /// is thrown. /// - /// @param KernelSource is a string containing OpenCL C kernel source code. - /// @param BuildOptions is a string containing OpenCL build options. + /// \param KernelSource is a string containing OpenCL C kernel source code. + /// \param BuildOptions is a string containing OpenCL build options. void build_with_source(string_class KernelSource, string_class BuildOptions = ""); @@ -184,7 +184,7 @@ class program { /// information query info::device::is_linker_available, a /// feature_not_supported exception is thrown. /// - /// @param LinkOptions is a string containing OpenCL link options. + /// \param LinkOptions is a string containing OpenCL link options. void link(string_class LinkOptions = ""); /// Checks if kernel is available for this program. @@ -192,7 +192,7 @@ class program { /// The SYCL kernel is defined by type KernelT. If the program state is /// program_state::none an invalid_object_error SYCL exception is thrown. /// - /// @return true if the SYCL kernel is available. + /// \return true if the SYCL kernel is available. template bool has_kernel() const { return has_kernel(detail::KernelInfo::getName(), /*IsCreatedFromSource*/ false); @@ -204,8 +204,8 @@ class program { /// program_stateP::none state, an invalid_object_error SYCL exception /// is thrown. /// - /// @param KernelName is a string containing kernel name. - /// @return true if the SYCL kernel is available and the program is not a + /// \param KernelName is a string containing kernel name. + /// \return true if the SYCL kernel is available and the program is not a /// SYCL host program. bool has_kernel(string_class kernelName) const; @@ -214,7 +214,7 @@ class program { /// If program is in the program_state::none state or if the SYCL kernel /// function is not available, an invalid_object_error exception is thrown. /// - /// @return a valid instance of SYCL kernel. + /// \return a valid instance of SYCL kernel. template kernel get_kernel() const { return get_kernel(detail::KernelInfo::getName(), /*IsCreatedFromSource*/ false); @@ -226,7 +226,7 @@ class program { /// program, if program is in the program_state::none state or if the SYCL /// kernel is not available. /// - /// @param KernelName is a string containing SYCL kernel name. + /// \param KernelName is a string containing SYCL kernel name. kernel get_kernel(string_class KernelName) const; /// Queries this SYCL program for information. @@ -242,14 +242,14 @@ class program { /// program_state::linked states, an invalid_object_error SYCL exception /// is thrown. /// - /// @return a vector of vectors representing the compiled binaries for each + /// \return a vector of vectors representing the compiled binaries for each /// associated SYCL device. vector_class> get_binaries() const; - /// @return the SYCL context that this program was constructed with. + /// \return the SYCL context that this program was constructed with. context get_context() const; - /// @return a vector of devices that are associated with this program. + /// \return a vector of devices that are associated with this program. vector_class get_devices() const; /// Returns compile options that were provided when the encapsulated program @@ -261,7 +261,7 @@ class program { /// cl_program was explicitly compiled, in which case the compile options used /// in the explicit compile are returned. /// - /// @return a string of valid OpenCL compile options. + /// \return a string of valid OpenCL compile options. string_class get_compile_options() const; /// Returns compile options that were provided to the most recent invocation @@ -277,7 +277,7 @@ class program { /// a vector of programs, then the link options passed to this constructor /// are returned. /// - /// @return a string of valid OpenCL compile options. + /// \return a string of valid OpenCL compile options. string_class get_link_options() const; /// Returns the compile, link, or build options, from whichever of those @@ -287,10 +287,10 @@ class program { /// program, or if the program includes the host device in its device list, /// then an empty string is returned. /// - /// @return a string of valid OpenCL build options. + /// \return a string of valid OpenCL build options. string_class get_build_options() const; - /// @return the current state of this SYCL program. + /// \return the current state of this SYCL program. program_state get_state() const; private: @@ -298,34 +298,34 @@ class program { /// Template-free version of get_kernel. /// - /// @param KernelName is a stringified kernel name. - /// @param IsCreatedFromSource is a flag indicating whether this program was + /// \param KernelName is a stringified kernel name. + /// \param IsCreatedFromSource is a flag indicating whether this program was /// created from OpenCL C source code string. - /// @return a valid instance of SYCL kernel. + /// \return a valid instance of SYCL kernel. kernel get_kernel(string_class KernelName, bool IsCreatedFromSource) const; /// Template-free version of has_kernel. /// - /// @param KernelName is a stringified kernel name. - /// @param IsCreatedFromSource is a flag indicating whether this program was + /// \param KernelName is a stringified kernel name. + /// \param IsCreatedFromSource is a flag indicating whether this program was /// created from OpenCL C source code string. - /// @return true if kernel with KernelName is available. + /// \return true if kernel with KernelName is available. bool has_kernel(string_class KernelName, bool IsCreatedFromSource) const; /// Template-free version of compile_with_kernel_type. /// - /// @param KernelName is a stringified kernel name. - /// @param CompileOptions is a string of valid OpenCL compile options. - /// @param M is a valid OS handle to the user executable or library. + /// \param KernelName is a stringified kernel name. + /// \param CompileOptions is a string of valid OpenCL compile options. + /// \param M is a valid OS handle to the user executable or library. void compile_with_kernel_name(string_class KernelName, string_class CompileOptions, detail::OSModuleHandle M); /// Template-free version of build_with_kernel_type. /// - /// @param KernelName is a stringified kernel name. - /// @param CompileOptions is a string of valid OpenCL compile options. - /// @param M is a valid OS handle to the user executable or library. + /// \param KernelName is a stringified kernel name. + /// \param CompileOptions is a string of valid OpenCL compile options. + /// \param M is a valid OS handle to the user executable or library. void build_with_kernel_name(string_class KernelName, string_class buildOptions, detail::OSModuleHandle M); diff --git a/sycl/include/CL/sycl/queue.hpp b/sycl/include/CL/sycl/queue.hpp index bb811decac723..a02675b077891 100644 --- a/sycl/include/CL/sycl/queue.hpp +++ b/sycl/include/CL/sycl/queue.hpp @@ -35,23 +35,23 @@ class queue { /// Constructs a SYCL queue instance using the device returned by an instance /// of default_selector. /// - /// @param PropList is a list of properties for queue construction. + /// \param PropList is a list of properties for queue construction. explicit queue(const property_list &PropList = {}) : queue(default_selector(), async_handler{}, PropList) {} /// Constructs a SYCL queue instance with an async_handler using the device /// returned by an instance of default_selector. /// - /// @param AsyncHandler is a SYCL asynchronous exception handler. - /// @param PropList is a list of properties for queue construction. + /// \param AsyncHandler is a SYCL asynchronous exception handler. + /// \param PropList is a list of properties for queue construction. queue(const async_handler &AsyncHandler, const property_list &PropList = {}) : queue(default_selector(), AsyncHandler, PropList) {} /// Constructs a SYCL queue instance using the device returned by the /// DeviceSelector provided. /// - /// @param DeviceSelector is an instance of SYCL device selector. - /// @param PropList is a list of properties for queue construction. + /// \param DeviceSelector is an instance of SYCL device selector. + /// \param PropList is a list of properties for queue construction. queue(const device_selector &DeviceSelector, const property_list &PropList = {}) : queue(DeviceSelector.select_device(), async_handler{}, PropList) {} @@ -59,35 +59,35 @@ class queue { /// Constructs a SYCL queue instance with an async_handler using the device /// returned by the DeviceSelector provided. /// - /// @param DeviceSelector is an instance of SYCL device selector. - /// @param AsyncHandler is a SYCL asynchronous exception handler. - /// @param PropList is a list of properties for queue construction. + /// \param DeviceSelector is an instance of SYCL device selector. + /// \param AsyncHandler is a SYCL asynchronous exception handler. + /// \param PropList is a list of properties for queue construction. queue(const device_selector &DeviceSelector, const async_handler &AsyncHandler, const property_list &PropList = {}) : queue(DeviceSelector.select_device(), AsyncHandler, PropList) {} /// Constructs a SYCL queue instance using the device provided. /// - /// @param SyclDevice is an instance of SYCL device. - /// @param PropList is a list of properties for queue construction. + /// \param SyclDevice is an instance of SYCL device. + /// \param PropList is a list of properties for queue construction. queue(const device &SyclDevice, const property_list &PropList = {}) : queue(SyclDevice, async_handler{}, PropList) {} /// Constructs a SYCL queue instance with an async_handler using the device /// provided. /// - /// @param SyclDevice is an instance of SYCL device. - /// @param AsyncHandler is a SYCL asynchronous exception handler. - /// @param PropList is a list of properties for queue construction. + /// \param SyclDevice is an instance of SYCL device. + /// \param AsyncHandler is a SYCL asynchronous exception handler. + /// \param PropList is a list of properties for queue construction. queue(const device &SyclDevice, const async_handler &AsyncHandler, const property_list &PropList = {}); /// Constructs a SYCL queue instance that is associated with the context /// provided, using the device returned by the device selector. /// - /// @param SyclContext is an instance of SYCL context. - /// @param DeviceSelector is an instance of SYCL device selector. - /// @param PropList is a list of properties for queue construction. + /// \param SyclContext is an instance of SYCL context. + /// \param DeviceSelector is an instance of SYCL device selector. + /// \param PropList is a list of properties for queue construction. queue(const context &SyclContext, const device_selector &DeviceSelector, const property_list &PropList = {}); @@ -95,29 +95,29 @@ class queue { /// with the context provided, using the device returned by the device /// selector. /// - /// @param SyclContext is an instance of SYCL context. - /// @param DeviceSelector is an instance of SYCL device selector. - /// @param AsyncHandler is a SYCL asynchronous exception handler. - /// @param PropList is a list of properties for queue construction. + /// \param SyclContext is an instance of SYCL context. + /// \param DeviceSelector is an instance of SYCL device selector. + /// \param AsyncHandler is a SYCL asynchronous exception handler. + /// \param PropList is a list of properties for queue construction. queue(const context &SyclContext, const device_selector &DeviceSelector, const async_handler &AsyncHandler, const property_list &PropList = {}); /// Constructs a SYCL queue associated with the given context, device /// and optional properties list. /// - /// @param SyclContext is an instance of SYCL context. - /// @param SyclDevice is an instance of SYCL device. - /// @param PropList is a list of properties for queue construction. + /// \param SyclContext is an instance of SYCL context. + /// \param SyclDevice is an instance of SYCL device. + /// \param PropList is a list of properties for queue construction. queue(const context &SyclContext, const device &SyclDevice, const property_list &PropList = {}); /// Constructs a SYCL queue associated with the given context, device, /// asynchronous exception handler and optional properties list. /// - /// @param SyclContext is an instance of SYCL context. - /// @param SyclDevice is an instance of SYCL device. - /// @param AsyncHandler is a SYCL asynchronous exception handler. - /// @param PropList is a list of properties for queue construction. + /// \param SyclContext is an instance of SYCL context. + /// \param SyclDevice is an instance of SYCL device. + /// \param AsyncHandler is a SYCL asynchronous exception handler. + /// \param PropList is a list of properties for queue construction. queue(const context &SyclContext, const device &SyclDevice, const async_handler &AsyncHandler, const property_list &PropList = {}); @@ -126,9 +126,9 @@ class queue { /// /// The instance of cl_command_queue is retained on construction. /// - /// @param ClQueue is a valid instance of OpenCL queue. - /// @param SyclContext is a valid SYCL context. - /// @param AsyncHandler is a SYCL asynchronous exception handler. + /// \param ClQueue is a valid instance of OpenCL queue. + /// \param SyclContext is a valid SYCL context. + /// \param AsyncHandler is a SYCL asynchronous exception handler. queue(cl_command_queue ClQueue, const context &SyclContext, const async_handler &AsyncHandler = {}); @@ -144,17 +144,17 @@ class queue { bool operator!=(const queue &rhs) const { return !(*this == rhs); } - /// @return a valid instance of OpenCL queue, which is retained before being + /// \return a valid instance of OpenCL queue, which is retained before being /// returned. cl_command_queue get() const; - /// @return an associated SYCL context. + /// \return an associated SYCL context. context get_context() const; - /// @return SYCL device this queue was constructed with. + /// \return SYCL device this queue was constructed with. device get_device() const; - /// @return true if this queue is a SYCL host queue. + /// \return true if this queue is a SYCL host queue. bool is_host() const; /// Queries SYCL queue for information. @@ -166,8 +166,8 @@ class queue { /// Submits a command group function object to the queue, in order to be /// scheduled for execution on the device. /// - /// @param CGF is a function object containing command group. - /// @return a SYCL event object for the submitted command group. + /// \param CGF is a function object containing command group. + /// \return a SYCL event object for the submitted command group. template event submit(T CGF) { return submit_impl(CGF); } /// Submits a command group function object to the queue, in order to be @@ -176,9 +176,9 @@ class queue { /// On a kernel error, this command group function object is then scheduled /// for execution on a secondary queue. /// - /// @param CGF is a function object containing command group. - /// @param SecondaryQueue is a fallback SYCL queue. - /// @return a SYCL event object, which corresponds to the queue the command + /// \param CGF is a function object containing command group. + /// \param SecondaryQueue is a fallback SYCL queue. + /// \return a SYCL event object, which corresponds to the queue the command /// group is being enqueued on. template event submit(T CGF, queue &SecondaryQueue) { return submit_impl(CGF, SecondaryQueue); @@ -206,54 +206,54 @@ class queue { /// lost. void throw_asynchronous(); - /// @return true if the queue was constructed with property specified by + /// \return true if the queue was constructed with property specified by /// PropertyT. template bool has_property() const; - /// @return a copy of the property of type PropertyT that the queue was + /// \return a copy of the property of type PropertyT that the queue was /// constructed with. If the queue was not constructed with the PropertyT /// property, an invalid_object_error SYCL exception. template propertyT get_property() const; /// Fills the memory pointed by a USM pointer with the value specified. /// - /// @param Ptr is a USM pointer to the memory to fill. - /// @param Value is a value to be set. Value is cast as an unsigned char. - /// @param Count is a number of bytes to fill. - /// @return an event representing fill operation. + /// \param Ptr is a USM pointer to the memory to fill. + /// \param Value is a value to be set. Value is cast as an unsigned char. + /// \param Count is a number of bytes to fill. + /// \return an event representing fill operation. event memset(void *Ptr, int Value, size_t Count); /// Copies data from one memory region to another, both pointed by /// USM pointers. /// - /// @param Dest is a USM pointer to the destination memory. - /// @param Src is a USM pointer to the source memory. - /// @param Count is a number of bytes to copy. - /// @return an event representing copy operation. + /// \param Dest is a USM pointer to the destination memory. + /// \param Src is a USM pointer to the source memory. + /// \param Count is a number of bytes to copy. + /// \return an event representing copy operation. event memcpy(void *Dest, const void *Src, size_t Count); /// Provides additional information to the underlying runtime about how /// different allocations are used. /// - /// @param Ptr is a USM pointer to the allocation. - /// @param Length is a number of bytes in the allocation. - /// @param Advice is a device-defined advice for the specified allocation. - /// @return an event representing advice operation. + /// \param Ptr is a USM pointer to the allocation. + /// \param Length is a number of bytes in the allocation. + /// \param Advice is a device-defined advice for the specified allocation. + /// \return an event representing advice operation. event mem_advise(const void *Ptr, size_t Length, int Advice); /// Provides hints to the runtime library that data should be made available /// on a device earlier than Unified Shared Memory would normally require it /// to be available. /// - /// @param Ptr is a USM pointer to the memory to be prefetched to the device. - /// @param Count is a number of bytes to be prefetched. + /// \param Ptr is a USM pointer to the memory to be prefetched to the device. + /// \param Count is a number of bytes to be prefetched. event prefetch(const void* Ptr, size_t Count) { return submit([=](handler &CGH) { CGH.prefetch(Ptr, Count); }); } /// single_task version with a kernel represented as a lambda. /// - /// @param KernelFunc is the Kernel functor or lambda + /// \param KernelFunc is the Kernel functor or lambda template event single_task(KernelType KernelFunc) { return submit([&](handler &CGH) { @@ -263,8 +263,8 @@ class queue { /// single_task version with a kernel represented as a lambda. /// - /// @param DepEvent is an event that specifies the kernel dependencies - /// @param KernelFunc is the Kernel functor or lambda + /// \param DepEvent is an event that specifies the kernel dependencies + /// \param KernelFunc is the Kernel functor or lambda template event single_task(event DepEvent, KernelType KernelFunc) { return submit([&](handler &CGH) { @@ -275,9 +275,9 @@ class queue { /// single_task version with a kernel represented as a lambda. /// - /// @param DepEvents is a vector of events that specifies the kernel + /// \param DepEvents is a vector of events that specifies the kernel /// dependencies - /// @param KernelFunc is the Kernel functor or lambda + /// \param KernelFunc is the Kernel functor or lambda template event single_task(const vector_class &DepEvents, KernelType KernelFunc) { @@ -290,8 +290,8 @@ class queue { /// parallel_for version with a kernel represented as a lambda + range that /// specifies global size only. /// - /// @param NumWorkItems is a range that specifies the work space of the kernel - /// @param KernelFunc is the Kernel functor or lambda + /// \param NumWorkItems is a range that specifies the work space of the kernel + /// \param KernelFunc is the Kernel functor or lambda template event parallel_for(range NumWorkItems, KernelType KernelFunc) { @@ -304,9 +304,9 @@ class queue { /// parallel_for version with a kernel represented as a lambda + range that /// specifies global size only. /// - /// @param NumWorkItems is a range that specifies the work space of the kernel - /// @param DepEvent is an event that specifies the kernel dependencies - /// @param KernelFunc is the Kernel functor or lambda + /// \param NumWorkItems is a range that specifies the work space of the kernel + /// \param DepEvent is an event that specifies the kernel dependencies + /// \param KernelFunc is the Kernel functor or lambda template event parallel_for(range NumWorkItems, event DepEvent, @@ -321,10 +321,10 @@ class queue { /// parallel_for version with a kernel represented as a lambda + range that /// specifies global size only. /// - /// @param NumWorkItems is a range that specifies the work space of the kernel - /// @param DepEvents is a vector of events that specifies the kernel + /// \param NumWorkItems is a range that specifies the work space of the kernel + /// \param DepEvents is a vector of events that specifies the kernel /// dependencies - /// @param KernelFunc is the Kernel functor or lambda + /// \param KernelFunc is the Kernel functor or lambda template event parallel_for(range NumWorkItems, @@ -340,9 +340,9 @@ class queue { /// parallel_for version with a kernel represented as a lambda + range and /// offset that specify global size and global offset correspondingly. /// - /// @param NumWorkItems is a range that specifies the work space of the kernel - /// @param WorkItemOffset specifies the offset for each work item id - /// @param KernelFunc is the Kernel functor or lambda + /// \param NumWorkItems is a range that specifies the work space of the kernel + /// \param WorkItemOffset specifies the offset for each work item id + /// \param KernelFunc is the Kernel functor or lambda template event parallel_for(range NumWorkItems, id WorkItemOffset, @@ -356,10 +356,10 @@ class queue { /// parallel_for version with a kernel represented as a lambda + range and /// offset that specify global size and global offset correspondingly. /// - /// @param NumWorkItems is a range that specifies the work space of the kernel - /// @param WorkItemOffset specifies the offset for each work item id - /// @param DepEvent is an event that specifies the kernel dependencies - /// @param KernelFunc is the Kernel functor or lambda + /// \param NumWorkItems is a range that specifies the work space of the kernel + /// \param WorkItemOffset specifies the offset for each work item id + /// \param DepEvent is an event that specifies the kernel dependencies + /// \param KernelFunc is the Kernel functor or lambda template event parallel_for(range NumWorkItems, id WorkItemOffset, @@ -374,11 +374,11 @@ class queue { /// parallel_for version with a kernel represented as a lambda + range and /// offset that specify global size and global offset correspondingly. /// - /// @param NumWorkItems is a range that specifies the work space of the kernel - /// @param WorkItemOffset specifies the offset for each work item id - /// @param DepEvents is a vector of events that specifies the kernel + /// \param NumWorkItems is a range that specifies the work space of the kernel + /// \param WorkItemOffset specifies the offset for each work item id + /// \param DepEvents is a vector of events that specifies the kernel /// dependencies - /// @param KernelFunc is the Kernel functor or lambda + /// \param KernelFunc is the Kernel functor or lambda template event parallel_for(range NumWorkItems, id WorkItemOffset, @@ -394,8 +394,9 @@ class queue { /// parallel_for version with a kernel represented as a lambda + nd_range that /// specifies global, local sizes and offset. /// - /// @param ExecutionRange is a range that specifies the work space of the kernel - /// @param KernelFunc is the Kernel functor or lambda + /// \param ExecutionRange is a range that specifies the work space of the + /// kernel + /// \param KernelFunc is the Kernel functor or lambda template event parallel_for(nd_range ExecutionRange, KernelType KernelFunc) { @@ -408,10 +409,10 @@ class queue { /// parallel_for version with a kernel represented as a lambda + nd_range that /// specifies global, local sizes and offset. /// - /// @param ExecutionRange is a range that specifies the work space of the + /// \param ExecutionRange is a range that specifies the work space of the /// kernel - /// @param DepEvent is an event that specifies the kernel dependencies - /// @param KernelFunc is the Kernel functor or lambda + /// \param DepEvent is an event that specifies the kernel dependencies + /// \param KernelFunc is the Kernel functor or lambda template event parallel_for(nd_range ExecutionRange, @@ -426,11 +427,11 @@ class queue { /// parallel_for version with a kernel represented as a lambda + nd_range that /// specifies global, local sizes and offset. /// - /// @param ExecutionRange is a range that specifies the work space of the + /// \param ExecutionRange is a range that specifies the work space of the /// kernel - /// @param DepEvents is a vector of events that specifies the kernel + /// \param DepEvents is a vector of events that specifies the kernel /// dependencies - /// @param KernelFunc is the Kernel functor or lambda + /// \param KernelFunc is the Kernel functor or lambda template event parallel_for(nd_range ExecutionRange, diff --git a/sycl/include/CL/sycl/usm.hpp b/sycl/include/CL/sycl/usm.hpp index e9b1d51d748ca..0a80524704b26 100644 --- a/sycl/include/CL/sycl/usm.hpp +++ b/sycl/include/CL/sycl/usm.hpp @@ -148,15 +148,15 @@ T *aligned_alloc(size_t Alignment, size_t Count, const queue &Q, // Pointer queries /// Query the allocation type from a USM pointer /// -/// @param ptr is the USM pointer to query -/// @param ctxt is the sycl context the ptr was allocated in +/// \param ptr is the USM pointer to query +/// \param ctxt is the sycl context the ptr was allocated in usm::alloc get_pointer_type(const void *ptr, const context &ctxt); /// Queries the device against which the pointer was allocated /// Throws an invalid_object_error if ptr is a host allocation. /// -/// @param ptr is the USM pointer to query -/// @param ctxt is the sycl context the ptr was allocated in +/// \param ptr is the USM pointer to query +/// \param ctxt is the sycl context the ptr was allocated in device get_pointer_device(const void *ptr, const context &ctxt); } // namespace sycl diff --git a/sycl/include/CL/sycl/usm/usm_allocator.hpp b/sycl/include/CL/sycl/usm/usm_allocator.hpp index d598d4ec49a12..0a6e49845cde3 100644 --- a/sycl/include/CL/sycl/usm/usm_allocator.hpp +++ b/sycl/include/CL/sycl/usm/usm_allocator.hpp @@ -50,9 +50,9 @@ class usm_allocator { /// /// Note: AllocKind == alloc::device is not allowed. /// - /// @param Ptr is a pointer to memory that will be used to construct the + /// \param Ptr is a pointer to memory that will be used to construct the /// object. - /// @param Val is a value to initialize the newly constructed object. + /// \param Val is a value to initialize the newly constructed object. template < usm::alloc AllocT = AllocKind, typename std::enable_if::type = 0> @@ -73,7 +73,7 @@ class usm_allocator { /// /// Note:: AllocKind == alloc::device is not allowed /// - /// @param Ptr is a pointer to memory where the object resides. + /// \param Ptr is a pointer to memory where the object resides. template < usm::alloc AllocT = AllocKind, typename std::enable_if::type = 0> @@ -91,8 +91,8 @@ class usm_allocator { /// Note:: AllocKind == alloc::device is not allowed. /// - /// @param Val is a reference to object. - /// @return an address of the object referenced by Val. + /// \param Val is a reference to object. + /// \return an address of the object referenced by Val. template < usm::alloc AllocT = AllocKind, typename std::enable_if::type = 0> @@ -125,7 +125,7 @@ class usm_allocator { /// Allocates memory. /// - /// @param NumberOfElements is a count of elements to allocate memory for. + /// \param NumberOfElements is a count of elements to allocate memory for. pointer allocate(size_t NumberOfElements) { auto Result = reinterpret_cast( @@ -139,8 +139,8 @@ class usm_allocator { /// Deallocates memory. /// - /// @param Ptr is a pointer to memory being deallocated. - /// @param Size is a number of elements previously passed to allocate. + /// \param Ptr is a pointer to memory being deallocated. + /// \param Size is a number of elements previously passed to allocate. void deallocate(pointer Ptr, size_t Size) { if (Ptr) { free(Ptr, MContext); diff --git a/sycl/plugins/cuda/pi_cuda.cpp b/sycl/plugins/cuda/pi_cuda.cpp index df0cb83fe2fdf..56242de042225 100644 --- a/sycl/plugins/cuda/pi_cuda.cpp +++ b/sycl/plugins/cuda/pi_cuda.cpp @@ -1143,16 +1143,16 @@ pi_result cuda_piDeviceGetInfo(pi_device device, pi_device_info param_name, /// With the PI_CONTEXT_PROPERTIES_CUDA_PRIMARY key/id and a value of PI_TRUE /// creates a primary CUDA context and activates it on the CUDA context stack. /// -/// @param[in] properties 0 terminated array of key/id-value combinations. Can +/// \param[in] properties 0 terminated array of key/id-value combinations. Can /// be nullptr. Only accepts property key/id PI_CONTEXT_PROPERTIES_CUDA_PRIMARY /// with a pi_bool value. -/// @param[in] num_devices Number of devices to create the context for. -/// @param[in] devices Devices to create the context for. -/// @param[in] pfn_notify Callback, currently unused. -/// @param[in] user_data User data for callback. -/// @param[out] retcontext Set to created context on success. +/// \param[in] num_devices Number of devices to create the context for. +/// \param[in] devices Devices to create the context for. +/// \param[in] pfn_notify Callback, currently unused. +/// \param[in] user_data User data for callback. +/// \param[out] retcontext Set to created context on success. /// -/// @return PI_SUCCESS on success, otherwise an error return code. +/// \return PI_SUCCESS on success, otherwise an error return code. pi_result cuda_piContextCreate(const pi_context_properties *properties, pi_uint32 num_devices, const pi_device *devices, void (*pfn_notify)(const char *errinfo, diff --git a/sycl/plugins/opencl/pi_opencl.cpp b/sycl/plugins/opencl/pi_opencl.cpp index 97f084207976a..9d1714aa195b4 100755 --- a/sycl/plugins/opencl/pi_opencl.cpp +++ b/sycl/plugins/opencl/pi_opencl.cpp @@ -106,7 +106,7 @@ static pi_result getExtFuncFromContext(pi_context context, T *fptr) { /// Enables indirect access of pointers in kernels. /// Necessary to avoid telling CL about every pointer that might be used. /// -/// @param kernel is the kernel to be launched +/// \param kernel is the kernel to be launched static pi_result USMSetIndirectAccess(pi_kernel kernel) { // We test that each alloc type is supported before we actually try to // set KernelExecInfo. @@ -585,11 +585,11 @@ pi_result OCL(piEnqueueMemBufferMap)( /// Allocates host memory accessible by the device. /// -/// @param result_ptr contains the allocated memory -/// @param context is the pi_context -/// @param pi_usm_mem_properties are optional allocation properties -/// @param size_t is the size of the allocation -/// @param alignment is the desired alignment of the allocation +/// \param result_ptr contains the allocated memory +/// \param context is the pi_context +/// \param pi_usm_mem_properties are optional allocation properties +/// \param size_t is the size of the allocation +/// \param alignment is the desired alignment of the allocation pi_result OCL(piextUSMHostAlloc)(void **result_ptr, pi_context context, pi_usm_mem_properties *properties, size_t size, pi_uint32 alignment) { @@ -615,12 +615,12 @@ pi_result OCL(piextUSMHostAlloc)(void **result_ptr, pi_context context, /// Allocates device memory /// -/// @param result_ptr contains the allocated memory -/// @param context is the pi_context -/// @param device is the device the memory will be allocated on -/// @param pi_usm_mem_properties are optional allocation properties -/// @param size_t is the size of the allocation -/// @param alignment is the desired alignment of the allocation +/// \param result_ptr contains the allocated memory +/// \param context is the pi_context +/// \param device is the device the memory will be allocated on +/// \param pi_usm_mem_properties are optional allocation properties +/// \param size_t is the size of the allocation +/// \param alignment is the desired alignment of the allocation pi_result OCL(piextUSMDeviceAlloc)(void **result_ptr, pi_context context, pi_device device, pi_usm_mem_properties *properties, @@ -648,12 +648,12 @@ pi_result OCL(piextUSMDeviceAlloc)(void **result_ptr, pi_context context, /// Allocates memory accessible on both host and device /// -/// @param result_ptr contains the allocated memory -/// @param context is the pi_context -/// @param device is the device the memory will be allocated on -/// @param pi_usm_mem_properties are optional allocation properties -/// @param size_t is the size of the allocation -/// @param alignment is the desired alignment of the allocation +/// \param result_ptr contains the allocated memory +/// \param context is the pi_context +/// \param device is the device the memory will be allocated on +/// \param pi_usm_mem_properties are optional allocation properties +/// \param size_t is the size of the allocation +/// \param alignment is the desired alignment of the allocation pi_result OCL(piextUSMSharedAlloc)(void **result_ptr, pi_context context, pi_device device, pi_usm_mem_properties *properties, @@ -681,8 +681,8 @@ pi_result OCL(piextUSMSharedAlloc)(void **result_ptr, pi_context context, /// Frees allocated USM memory /// -/// @param context is the pi_context of the allocation -/// @param ptr is the memory to be freed +/// \param context is the pi_context of the allocation +/// \param ptr is the memory to be freed pi_result OCL(piextUSMFree)(pi_context context, void *ptr) { clMemFreeINTEL_fn FuncPtr = nullptr; @@ -700,10 +700,10 @@ pi_result OCL(piextUSMFree)(pi_context context, void *ptr) { /// Sets up pointer arguments for CL kernels. An extra indirection /// is required due to CL argument conventions. /// -/// @param kernel is the kernel to be launched -/// @param arg_index is the index of the kernel argument -/// @param arg_size is the size in bytes of the argument (ignored in CL) -/// @param arg_value is the pointer argument +/// \param kernel is the kernel to be launched +/// \param arg_index is the index of the kernel argument +/// \param arg_size is the size in bytes of the argument (ignored in CL) +/// \param arg_value is the pointer argument pi_result OCL(piextKernelSetArgPointer)(pi_kernel kernel, pi_uint32 arg_index, size_t arg_size, const void *arg_value) { @@ -736,14 +736,14 @@ pi_result OCL(piextKernelSetArgPointer)(pi_kernel kernel, pi_uint32 arg_index, /// USM Memset API /// -/// @param queue is the queue to submit to -/// @param ptr is the ptr to memset -/// @param value is value to set. It is interpreted as an 8-bit value and the upper -/// 24 bits are ignored -/// @param count is the size in bytes to memset -/// @param num_events_in_waitlist is the number of events to wait on -/// @param events_waitlist is an array of events to wait on -/// @param event is the event that represents this operation +/// \param queue is the queue to submit to +/// \param ptr is the ptr to memset +/// \param value is value to set. It is interpreted as an 8-bit value and the +/// upper 24 bits are ignored +/// \param count is the size in bytes to memset +/// \param num_events_in_waitlist is the number of events to wait on +/// \param events_waitlist is an array of events to wait on +/// \param event is the event that represents this operation pi_result OCL(piextUSMEnqueueMemset)(pi_queue queue, void *ptr, pi_int32 value, size_t count, pi_uint32 num_events_in_waitlist, @@ -776,14 +776,14 @@ pi_result OCL(piextUSMEnqueueMemset)(pi_queue queue, void *ptr, pi_int32 value, /// USM Memcpy API /// -/// @param queue is the queue to submit to -/// @param blocking is whether this operation should block the host -/// @param src_ptr is the data to be copied -/// @param dst_ptr is the location the data will be copied -/// @param size is number of bytes to copy -/// @param num_events_in_waitlist is the number of events to wait on -/// @param events_waitlist is an array of events to wait on -/// @param event is the event that represents this operation +/// \param queue is the queue to submit to +/// \param blocking is whether this operation should block the host +/// \param src_ptr is the data to be copied +/// \param dst_ptr is the location the data will be copied +/// \param size is number of bytes to copy +/// \param num_events_in_waitlist is the number of events to wait on +/// \param events_waitlist is an array of events to wait on +/// \param event is the event that represents this operation pi_result OCL(piextUSMEnqueueMemcpy)(pi_queue queue, pi_bool blocking, void *dst_ptr, const void *src_ptr, pi_int32 size, @@ -817,13 +817,13 @@ pi_result OCL(piextUSMEnqueueMemcpy)(pi_queue queue, pi_bool blocking, /// Hint to migrate memory to the device /// -/// @param queue is the queue to submit to -/// @param ptr points to the memory to migrate -/// @param size is the number of bytes to migrate -/// @param flags is a bitfield used to specify memory migration options -/// @param num_events_in_waitlist is the number of events to wait on -/// @param events_waitlist is an array of events to wait on -/// @param event is the event that represents this operation +/// \param queue is the queue to submit to +/// \param ptr points to the memory to migrate +/// \param size is the number of bytes to migrate +/// \param flags is a bitfield used to specify memory migration options +/// \param num_events_in_waitlist is the number of events to wait on +/// \param events_waitlist is an array of events to wait on +/// \param event is the event that represents this operation pi_result OCL(piextUSMEnqueuePrefetch)(pi_queue queue, const void *ptr, size_t size, pi_usm_migration_flags flags, @@ -863,11 +863,11 @@ pi_result OCL(piextUSMEnqueuePrefetch)(pi_queue queue, const void *ptr, /// USM Memadvise API /// -/// @param queue is the queue to submit to -/// @param ptr is the data to be advised -/// @param length is the size in bytes of the meory to advise -/// @param advice is device specific advice -/// @param event is the event that represents this operation +/// \param queue is the queue to submit to +/// \param ptr is the data to be advised +/// \param length is the size in bytes of the meory to advise +/// \param advice is device specific advice +/// \param event is the event that represents this operation // USM memadvise API to govern behavior of automatic migration mechanisms pi_result OCL(piextUSMEnqueueMemAdvise)(pi_queue queue, const void *ptr, size_t length, int advice, @@ -915,12 +915,12 @@ pi_result OCL(piextUSMEnqueueMemAdvise)(pi_queue queue, const void *ptr, /// allocation is in bytes. Result is a size_t. /// PI_MEM_ALLOC_DEVICE returns the pi_device this was allocated against /// -/// @param context is the pi_context -/// @param ptr is the pointer to query -/// @param param_name is the type of query to perform -/// @param param_value_size is the size of the result in bytes -/// @param param_value is the result -/// @param param_value_ret is how many bytes were written +/// \param context is the pi_context +/// \param ptr is the pointer to query +/// \param param_name is the type of query to perform +/// \param param_value_size is the size of the result in bytes +/// \param param_value is the result +/// \param param_value_ret is how many bytes were written pi_result OCL(piextUSMGetMemAllocInfo)(pi_context context, const void *ptr, pi_mem_info param_name, size_t param_value_size, @@ -943,11 +943,11 @@ pi_result OCL(piextUSMGetMemAllocInfo)(pi_context context, const void *ptr, /// API to set attributes controlling kernel execution /// -/// @param kernel is the pi kernel to execute -/// @param param_name is a pi_kernel_exec_info value that specifies the info +/// \param kernel is the pi kernel to execute +/// \param param_name is a pi_kernel_exec_info value that specifies the info /// passed to the kernel -/// @param param_value_size is the size of the value in bytes -/// @param param_value is a pointer to the value to set for the kernel +/// \param param_value_size is the size of the value in bytes +/// \param param_value is a pointer to the value to set for the kernel /// /// If param_name is PI_USM_INDIRECT_ACCESS, the value will be a ptr to /// the pi_bool value PI_TRUE diff --git a/sycl/source/detail/context_impl.hpp b/sycl/source/detail/context_impl.hpp index 5bc6f2e2c4bd3..7390444051b06 100644 --- a/sycl/source/detail/context_impl.hpp +++ b/sycl/source/detail/context_impl.hpp @@ -35,9 +35,9 @@ class context_impl { /// The constructed context_impl will use the AsyncHandler parameter to /// handle exceptions. /// - /// @param Device is an instance of SYCL device. - /// @param AsyncHandler is an instance of async_handler. - /// @param useCUDAPrimaryContext is a bool determining whether to use the + /// \param Device is an instance of SYCL device. + /// \param AsyncHandler is an instance of async_handler. + /// \param useCUDAPrimaryContext is a bool determining whether to use the /// primary context in the CUDA backend. context_impl(const device &Device, async_handler AsyncHandler, bool UseCUDAPrimaryContext); @@ -50,8 +50,8 @@ class context_impl { /// The constructed context_impl will use the AsyncHandler parameter to /// handle exceptions. /// - /// @param DeviceList is a list of SYCL device instances. - /// @param AsyncHandler is an instance of async_handler. + /// \param DeviceList is a list of SYCL device instances. + /// \param AsyncHandler is an instance of async_handler. context_impl(const vector_class Devices, async_handler AsyncHandler, bool UseCUDAPrimaryContext); @@ -60,9 +60,9 @@ class context_impl { /// The constructed context_impl will use the AsyncHandler parameter to /// handle exceptions. /// - /// @param PiContext is an instance of a valid plug-in context handle. - /// @param AsyncHandler is an instance of async_handler. - /// @param &Plugin is the reference to the underlying Plugin that this + /// \param PiContext is an instance of a valid plug-in context handle. + /// \param AsyncHandler is an instance of async_handler. + /// \param &Plugin is the reference to the underlying Plugin that this /// context is associated with. context_impl(RT::PiContext PiContext, async_handler AsyncHandler, const plugin &Plugin); @@ -71,23 +71,23 @@ class context_impl { /// Gets OpenCL interoperability context handle. /// - /// @return an instance of OpenCL cl_context. + /// \return an instance of OpenCL cl_context. cl_context get() const; /// Checks if this context is a host context. /// - /// @return true if this context is a host context. + /// \return true if this context is a host context. bool is_host() const; /// Gets asynchronous exception handler. /// - /// @return an instance of SYCL async_handler. + /// \return an instance of SYCL async_handler. const async_handler &get_async_handler() const; - /// @return the Plugin associated with the platform of this context. + /// \return the Plugin associated with the platform of this context. const plugin &getPlugin() const { return MPlatform->getPlugin(); } - /// @return the PlatformImpl associated with this context. + /// \return the PlatformImpl associated with this context. PlatformImplPtr getPlatformImpl() const { return MPlatform; } /// Queries this context for information. @@ -104,7 +104,7 @@ class context_impl { /// be safely passed to the underlying native runtime API. Warning. Returned /// reference will be invalid if context_impl was destroyed. /// - /// @return an instance of raw plug-in context handle. + /// \return an instance of raw plug-in context handle. RT::PiContext &getHandleRef(); /// Gets the underlying context object (if any) without reference count @@ -114,7 +114,7 @@ class context_impl { /// be safely passed to the underlying native runtime API. Warning. Returned /// reference will be invalid if context_impl was destroyed. /// - /// @return an instance of raw plug-in context handle. + /// \return an instance of raw plug-in context handle. const RT::PiContext &getHandleRef() const; /// Unlike `get_info', this function returns a @@ -132,7 +132,7 @@ class context_impl { /// See `doc/extensions/C-CXX-StandardLibrary/DeviceLibExtensions.rst' for /// more details. /// - /// @returns a map with device library programs. + /// \returns a map with device library programs. std::map &getCachedLibPrograms() { return MCachedLibPrograms; } diff --git a/sycl/source/detail/device_impl.hpp b/sycl/source/detail/device_impl.hpp index 9769d66771978..26bc59587b31a 100644 --- a/sycl/source/detail/device_impl.hpp +++ b/sycl/source/detail/device_impl.hpp @@ -45,7 +45,7 @@ class device_impl { /// Get instance of OpenCL device /// - /// @return a valid cl_device_id instance in accordance with the + /// \return a valid cl_device_id instance in accordance with the /// requirements described in 4.3.1. cl_device_id get() const; @@ -53,7 +53,7 @@ class device_impl { /// /// For host device an exception is thrown /// - /// @return non-constant reference to PI device + /// \return non-constant reference to PI device RT::PiDevice &getHandleRef() { if (MIsHostDevice) throw invalid_object_error("This instance of device is a host instance", @@ -66,7 +66,7 @@ class device_impl { /// /// For host device an exception is thrown /// - /// @return constant reference to PI device + /// \return constant reference to PI device const RT::PiDevice &getHandleRef() const { if (MIsHostDevice) throw invalid_object_error("This instance of device is a host instance", @@ -77,22 +77,22 @@ class device_impl { /// Check if SYCL device is a host device /// - /// @return true if SYCL device is a host device + /// \return true if SYCL device is a host device bool is_host() const { return MIsHostDevice; } /// Check if device is a CPU device /// - /// @return true if SYCL device is a CPU device + /// \return true if SYCL device is a CPU device bool is_cpu() const { return (!is_host() && (MType == PI_DEVICE_TYPE_CPU)); } /// Check if device is a GPU device /// - /// @return true if SYCL device is a GPU device + /// \return true if SYCL device is a GPU device bool is_gpu() const { return (!is_host() && (MType == PI_DEVICE_TYPE_GPU)); } /// Check if device is an accelerator device /// - /// @return true if SYCL device is an accelerator device + /// \return true if SYCL device is an accelerator device bool is_accelerator() const { return (!is_host() && (MType == PI_DEVICE_TYPE_ACC)); } @@ -106,16 +106,16 @@ class device_impl { /// The value returned must be equal to that returned /// by get_info(). /// - /// @return The associated SYCL platform. + /// \return The associated SYCL platform. platform get_platform() const; - /// @return the associated plugin with this device. + /// \return the associated plugin with this device. const plugin &getPlugin() const { return MPlatform->getPlugin(); } /// Check SYCL extension support by device /// - /// @param ExtensionName is a name of queried extension. - /// @return true if SYCL device supports the extension. + /// \param ExtensionName is a name of queried extension. + /// \return true if SYCL device supports the extension. bool has_extension(const string_class &ExtensionName) const; vector_class @@ -128,9 +128,9 @@ class device_impl { /// info::partition_property::partition_equally a feature_not_supported /// exception must be thrown. /// - /// @param ComputeUnits is a desired count of compute units in each sub + /// \param ComputeUnits is a desired count of compute units in each sub /// device. - /// @return A vector class of sub devices partitioned equally from this + /// \return A vector class of sub devices partitioned equally from this /// SYCL device based on the ComputeUnits parameter. vector_class create_sub_devices(size_t ComputeUnits) const; @@ -140,8 +140,8 @@ class device_impl { /// info::partition_property::partition_by_counts a feature_not_supported /// exception must be thrown. /// - /// @param Counts is a vector_class of desired compute units in sub devices. - /// @return a vector_class of sub devices partitioned from this SYCL device + /// \param Counts is a vector_class of desired compute units in sub devices. + /// \return a vector_class of sub devices partitioned from this SYCL device /// by count sizes based on the Counts parameter. vector_class create_sub_devices(const vector_class &Counts) const; @@ -153,18 +153,18 @@ class device_impl { /// device does not support info::affinity_domain provided a /// feature_not_supported exception must be thrown. /// - /// @param AffinityDomain is one of the values described in Table 4.20 of + /// \param AffinityDomain is one of the values described in Table 4.20 of /// SYCL Spec - /// @return a vector class of sub devices partitioned from this SYCL device + /// \return a vector class of sub devices partitioned from this SYCL device /// by affinity domain based on the AffinityDomain parameter vector_class create_sub_devices(info::partition_affinity_domain AffinityDomain) const; /// Check if desired partition property supported by device /// - /// @param Prop is one of info::partition_property::(partition_equally, + /// \param Prop is one of info::partition_property::(partition_equally, /// partition_by_counts, partition_by_affinity_domain) - /// @return true if Prop is supported by device. + /// \return true if Prop is supported by device. bool is_partition_supported(info::partition_property Prop) const; /// Queries this SYCL device for information requested by the template @@ -174,7 +174,7 @@ class device_impl { /// with the info parameters in Table 4.20 of SYCL Spec to facilitate /// returning the type associated with the param parameter. /// - /// @return device info of type described in Table 4.20. + /// \return device info of type described in Table 4.20. template typename info::param_traits::return_type get_info() const { @@ -189,9 +189,9 @@ class device_impl { /// Check if affinity partitioning by specified domain is supported by /// device /// - /// @param AffinityDomain is one of the values described in Table 4.20 of + /// \param AffinityDomain is one of the values described in Table 4.20 of /// SYCL Spec - /// @return true if AffinityDomain is supported by device. + /// \return true if AffinityDomain is supported by device. bool is_affinity_supported(info::partition_affinity_domain AffinityDomain) const; diff --git a/sycl/source/detail/event_impl.hpp b/sycl/source/detail/event_impl.hpp index 2593ad762dfb8..cbe0c1f55aa66 100644 --- a/sycl/source/detail/event_impl.hpp +++ b/sycl/source/detail/event_impl.hpp @@ -38,8 +38,8 @@ class event_impl { /// The SyclContext must match the plug-in context associated with the /// ClEvent. /// - /// @param Event is a valid instance of plug-in event. - /// @param SyclContext is an instance of SYCL context. + /// \param Event is a valid instance of plug-in event. + /// \param SyclContext is an instance of SYCL context. event_impl(RT::PiEvent Event, const context &SyclContext); event_impl(QueueImplPtr Queue); @@ -48,19 +48,19 @@ class event_impl { /// All devices that do not support OpenCL interoperability are treated as /// host device to avoid attempts to call method get on such events. // - /// @return true if this event is a SYCL host event. + /// \return true if this event is a SYCL host event. bool is_host() const; /// Returns a valid OpenCL event interoperability handle. /// - /// @return a valid instance of OpenCL cl_event. + /// \return a valid instance of OpenCL cl_event. cl_event get() const; /// Waits for the event. /// /// Self is needed in order to pass shared_ptr to Scheduler. /// - /// @param Self is a pointer to this event. + /// \param Self is a pointer to this event. void wait(std::shared_ptr Self) const; /// Waits for the event. @@ -70,7 +70,7 @@ class event_impl { /// asynchronous error handler with those errors. Self is needed in order to /// pass shared_ptr to Scheduler. /// - /// @param Self is a pointer to this event. + /// \param Self is a pointer to this event. void wait_and_throw(std::shared_ptr Self); /// Queries this event for profiling information. @@ -83,14 +83,14 @@ class event_impl { /// property::queue::enable_profiling property, an invalid_object_error SYCL /// exception is thrown. /// - /// @return depends on template parameter. + /// \return depends on template parameter. template typename info::param_traits::return_type get_profiling_info() const; /// Queries this SYCL event for information. /// - /// @return depends on the information being requested. + /// \return depends on the information being requested. template typename info::param_traits::return_type get_info() const; @@ -105,20 +105,20 @@ class event_impl { /// Returns raw interoperability event handle. Returned reference will be] /// invalid if event_impl was destroyed. /// - /// @return a reference to an instance of plug-in event handle. + /// \return a reference to an instance of plug-in event handle. RT::PiEvent &getHandleRef(); /// Returns raw interoperability event handle. Returned reference will be] /// invalid if event_impl was destroyed. /// - /// @return a const reference to an instance of plug-in event handle. + /// \return a const reference to an instance of plug-in event handle. const RT::PiEvent &getHandleRef() const; /// Returns context that is associated with this event. /// - /// @return a shared pointer to a valid context_impl. + /// \return a shared pointer to a valid context_impl. const ContextImplPtr &getContextImpl(); - // @return the Plugin associated with the context of this event. + // \return the Plugin associated with the context of this event. // Should be called when this is not a Host Event. const plugin &getPlugin() const; @@ -127,22 +127,22 @@ class event_impl { /// Provided PiContext inside ContextImplPtr must be associated /// with the PiEvent object stored in this class /// - /// @param Context is a shared pointer to an instance of valid context_impl. + /// \param Context is a shared pointer to an instance of valid context_impl. void setContextImpl(const ContextImplPtr &Context); /// Returns command that is associated with the event. /// - /// @return a generic pointer to Command object instance. + /// \return a generic pointer to Command object instance. void *getCommand() { return MCommand; } /// Associates this event with the command. /// - /// @param Command is a generic pointer to Command object instance. + /// \param Command is a generic pointer to Command object instance. void setCommand(void *Command) { MCommand = Command; } /// Returns host profiling information. /// - /// @return a pointer to HostProfilingInfo instance. + /// \return a pointer to HostProfilingInfo instance. HostProfilingInfo *getHostProfilingInfo() { return MHostProfilingInfo.get(); } private: diff --git a/sycl/source/detail/kernel_impl.hpp b/sycl/source/detail/kernel_impl.hpp index d026b052aa089..3894103c8ca41 100644 --- a/sycl/source/detail/kernel_impl.hpp +++ b/sycl/source/detail/kernel_impl.hpp @@ -37,8 +37,8 @@ class kernel_impl { /// kernel as being created from source and creates a new program_impl /// instance. /// - /// @param Kernel is a valid PiKernel instance - /// @param SyclContext is a valid SYCL context + /// \param Kernel is a valid PiKernel instance + /// \param SyclContext is a valid SYCL context kernel_impl(RT::PiKernel Kernel, ContextImplPtr Context); /// Constructs a SYCL kernel instance from a SYCL program and a PiKernel @@ -48,18 +48,18 @@ class kernel_impl { /// context of the SYCL program, an invalid_parameter_error exception is /// thrown. /// - /// @param Kernel is a valid PiKernel instance - /// @param SyclContext is a valid SYCL context - /// @param ProgramImpl is a valid instance of program_impl - /// @param IsCreatedFromSource is a flag that indicates whether program + /// \param Kernel is a valid PiKernel instance + /// \param SyclContext is a valid SYCL context + /// \param ProgramImpl is a valid instance of program_impl + /// \param IsCreatedFromSource is a flag that indicates whether program /// is created from source code kernel_impl(RT::PiKernel Kernel, ContextImplPtr ContextImpl, ProgramImplPtr ProgramImpl, bool IsCreatedFromSource); /// Constructs a SYCL kernel for host device /// - /// @param SyclContext is a valid SYCL context - /// @param ProgramImpl is a valid instance of program_impl + /// \param SyclContext is a valid SYCL context + /// \param ProgramImpl is a valid instance of program_impl kernel_impl(ContextImplPtr Context, ProgramImplPtr ProgramImpl); ~kernel_impl(); @@ -70,7 +70,7 @@ class kernel_impl { /// cl_kernel will be returned. If this kernel is a host kernel, /// an invalid_object_error exception will be thrown. /// - /// @return a valid cl_kernel instance + /// \return a valid cl_kernel instance cl_kernel get() const { if (is_host()) throw invalid_object_error("This instance of kernel is a host instance", @@ -81,7 +81,7 @@ class kernel_impl { /// Check if the associated SYCL context is a SYCL host context. /// - /// @return true if this SYCL kernel is a host kernel. + /// \return true if this SYCL kernel is a host kernel. bool is_host() const { return MContext->is_host(); } const plugin &getPlugin() const { return MContext->getPlugin(); } @@ -89,7 +89,7 @@ class kernel_impl { /// Query information from the kernel object using the info::kernel_info /// descriptor. /// - /// @return depends on information being queried. + /// \return depends on information being queried. template typename info::param_traits::return_type get_info() const; @@ -97,8 +97,8 @@ class kernel_impl { /// Query work-group information from a kernel using the /// info::kernel_work_group descriptor for a specific device. /// - /// @param Device is a valid SYCL device. - /// @return depends on information being queried. + /// \param Device is a valid SYCL device. + /// \return depends on information being queried. template typename info::param_traits::return_type get_work_group_info(const device &Device) const; @@ -106,7 +106,7 @@ class kernel_impl { /// Query sub-group information from a kernel using the /// info::kernel_sub_group descriptor for a specific device. /// - /// @param Device is a valid SYCL device + /// \param Device is a valid SYCL device template typename info::param_traits::return_type get_sub_group_info(const device &Device) const; @@ -114,9 +114,9 @@ class kernel_impl { /// Query sub-group information from a kernel using the /// info::kernel_sub_group descriptor for a specific device and value. /// - /// @param Device is a valid SYCL device. - /// @param Value depends on information being queried. - /// @return depends on information being queried. + /// \param Device is a valid SYCL device. + /// \param Value depends on information being queried. + /// \return depends on information being queried. template typename info::param_traits::return_type get_sub_group_info( @@ -126,18 +126,18 @@ class kernel_impl { /// Get a reference to a raw kernel object. /// - /// @return a reference to a valid PiKernel instance with raw kernel object. + /// \return a reference to a valid PiKernel instance with raw kernel object. RT::PiKernel &getHandleRef() { return MKernel; } /// Get a constant reference to a raw kernel object. /// - /// @return a constant reference to a valid PiKernel instance with raw + /// \return a constant reference to a valid PiKernel instance with raw /// kernel object. const RT::PiKernel &getHandleRef() const { return MKernel; } /// Check if kernel was created from a program that had been created from /// source. /// - /// @return true if kernel was created from source. + /// \return true if kernel was created from source. bool isCreatedFromSource() const; private: diff --git a/sycl/source/detail/platform_impl.hpp b/sycl/source/detail/platform_impl.hpp index d47cf2ecb0abf..eaf86893117d1 100644 --- a/sycl/source/detail/platform_impl.hpp +++ b/sycl/source/detail/platform_impl.hpp @@ -34,7 +34,7 @@ class platform_impl { /// Constructs platform_impl from a plug-in interoperability platform /// handle. /// - /// @param Platform is a raw plug-in platform handle. + /// \param Platform is a raw plug-in platform handle. explicit platform_impl(RT::PiPlatform APlatform, const plugin &APlugin) : MPlatform(APlatform), MPlugin(std::make_shared(APlugin)) {} @@ -46,8 +46,8 @@ class platform_impl { /// Checks if this platform supports extension. /// - /// @param ExtensionName is a string containing extension name. - /// @return true if platform supports specified extension. + /// \param ExtensionName is a string containing extension name. + /// \return true if platform supports specified extension. bool has_extension(const string_class &ExtensionName) const; /// Returns all SYCL devices associated with this platform. @@ -57,8 +57,8 @@ class platform_impl { /// contains only a single SYCL host device. If there are no devices that /// match given device type, resulting vector is empty. /// - /// @param DeviceType is a SYCL device type. - /// @return a vector of SYCL devices. + /// \param DeviceType is a SYCL device type. + /// \return a vector of SYCL devices. vector_class get_devices(info::device_type DeviceType = info::device_type::all) const; @@ -69,7 +69,7 @@ class platform_impl { typename info::param_traits::return_type get_info() const; - /// @return true if this SYCL platform is a host platform. + /// \return true if this SYCL platform is a host platform. bool is_host() const { return MHostPlatform; }; bool is_cuda() const { @@ -79,7 +79,7 @@ class platform_impl { return PlatformName == CUDA_PLATFORM_STRING; } - /// @return an instance of OpenCL cl_platform_id. + /// \return an instance of OpenCL cl_platform_id. cl_platform_id get() const { if (is_host()) throw invalid_object_error("This instance of platform is a host instance", @@ -94,7 +94,7 @@ class platform_impl { /// responsibility to make sure that platform stays alive while raw handle /// is in use. /// - /// @return a raw plug-in platform handle. + /// \return a raw plug-in platform handle. const RT::PiPlatform &getHandleRef() const { if (is_host()) throw invalid_object_error("This instance of platform is a host instance", @@ -109,10 +109,10 @@ class platform_impl { /// platform instance. There are means to override this behavior for testing /// purposes. See environment variables guide for up-to-date instructions. /// - /// @return a vector of all available SYCL platforms. + /// \return a vector of all available SYCL platforms. static vector_class get_platforms(); - // @return the Plugin associated with this platform. + // \return the Plugin associated with this platform. const plugin &getPlugin() const { assert(!MHostPlatform && "Plugin is not available for Host."); return *MPlugin; diff --git a/sycl/source/detail/program_impl.hpp b/sycl/source/detail/program_impl.hpp index 2727a8e44d500..7a41db61cf7c1 100644 --- a/sycl/source/detail/program_impl.hpp +++ b/sycl/source/detail/program_impl.hpp @@ -41,7 +41,7 @@ class program_impl { /// associated with the provided context and the devices that are associated /// with the context. /// - /// @param Context is a pointer to SYCL context impl. + /// \param Context is a pointer to SYCL context impl. explicit program_impl(ContextImplPtr Context); /// Constructs an instance of SYCL program for the provided DeviceList. @@ -50,8 +50,8 @@ class program_impl { /// associated with the provided context and the devices in the provided /// DeviceList. /// - /// @param Context is a pointer to SYCL context impl. - /// @param DeviceList is a list of SYCL devices. + /// \param Context is a pointer to SYCL context impl. + /// \param DeviceList is a list of SYCL devices. program_impl(ContextImplPtr Context, vector_class DeviceList); /// Constructs an instance of SYCL program by linking together each SYCL @@ -66,8 +66,8 @@ class program_impl { /// programs won't be allowed due to only compiled state of each and every /// program in the list and thus unknown state of caching resolution. /// - /// @param ProgramList is a list of program_impl instances. - /// @param LinkOptions is a string containing valid OpenCL link options. + /// \param ProgramList is a list of program_impl instances. + /// \param LinkOptions is a string containing valid OpenCL link options. program_impl(vector_class> ProgramList, string_class LinkOptions = ""); @@ -82,16 +82,16 @@ class program_impl { /// The instance of plugin interface program will be retained on /// construction. /// - /// @param Context is a pointer to SYCL context impl. - /// @param Program is an instance of plugin interface interoperability + /// \param Context is a pointer to SYCL context impl. + /// \param Program is an instance of plugin interface interoperability /// program. program_impl(ContextImplPtr Context, RT::PiProgram Program); /// Constructs a program instance from plugin interface interoperability /// kernel. /// - /// @param Context is a pointer to SYCL context impl. - /// @param Kernel is a raw PI kernel handle. + /// \param Context is a pointer to SYCL context impl. + /// \param Kernel is a raw PI kernel handle. program_impl(ContextImplPtr Context, RT::PiKernel Kernel); ~program_impl(); @@ -102,17 +102,17 @@ class program_impl { /// If the program is created for a SYCL host device, an /// invalid_object_error exception is thrown. /// - /// @return a valid OpenCL cl_program instance. + /// \return a valid OpenCL cl_program instance. cl_program get() const; - /// @return a reference to a raw PI program handle. PI program is not + /// \return a reference to a raw PI program handle. PI program is not /// retained before return. RT::PiProgram &getHandleRef() { return MProgram; } - /// @return a constant reference to a raw PI program handle. PI program is + /// \return a constant reference to a raw PI program handle. PI program is /// not retained before return. const RT::PiProgram &getHandleRef() const { return MProgram; } - /// @return true if this SYCL program is a host program. + /// \return true if this SYCL program is a host program. bool is_host() const { return MContext->is_host(); } /// Compiles the SYCL kernel function into the encapsulated raw program. @@ -126,7 +126,7 @@ class program_impl { /// query info::device::is_compiler_available, a feature_not_supported /// exception is thrown. /// - /// @param CompileOptions is a string of valid OpenCL compile options. + /// \param CompileOptions is a string of valid OpenCL compile options. void compile_with_kernel_name(string_class KernelName, string_class CompileOptions, OSModuleHandle Module); @@ -142,8 +142,8 @@ class program_impl { /// information query info::device::is_compiler_available, a /// feature_not_supported SYCL exception is thrown. /// - /// @param KernelSource is a string containing OpenCL C kernel source code. - /// @param CompileOptions is a string containing OpenCL compile options. + /// \param KernelSource is a string containing OpenCL C kernel source code. + /// \param CompileOptions is a string containing OpenCL compile options. void compile_with_source(string_class KernelSource, string_class CompileOptions = ""); @@ -159,8 +159,8 @@ class program_impl { /// info::device::is_linker_available, a feature_not_supported SYCL /// exception is thrown. /// - /// @param KernelName is a string containing SYCL kernel name. - /// @param BuildOptions is a string containing OpenCL compile options. + /// \param KernelName is a string containing SYCL kernel name. + /// \param BuildOptions is a string containing OpenCL compile options. void build_with_kernel_name(string_class KernelName, string_class BuildOptions, OSModuleHandle M); @@ -175,8 +175,8 @@ class program_impl { /// info::device::is_linker_available, a feature_not_supported SYCL /// exception is thrown. /// - /// @param KernelSource is a string containing OpenCL C kernel source code. - /// @param BuildOptions is a string containing OpenCL build options. + /// \param KernelSource is a string containing OpenCL C kernel source code. + /// \param BuildOptions is a string containing OpenCL build options. void build_with_source(string_class KernelSource, string_class BuildOptions = ""); @@ -190,7 +190,7 @@ class program_impl { /// information query info::device::is_linker_available, a /// feature_not_supported exception is thrown. /// - /// @param LinkOptions is a string containing OpenCL link options. + /// \param LinkOptions is a string containing OpenCL link options. void link(string_class LinkOptions = ""); /// Checks if kernel is available for this program. @@ -198,7 +198,7 @@ class program_impl { /// The SYCL kernel is defined by kernel name. If the program state is /// program_state::none an invalid_object_error SYCL exception is thrown. /// - /// @return true if the SYCL kernel is available. + /// \return true if the SYCL kernel is available. bool has_kernel(string_class KernelName, bool IsCreatedFromSource) const; /// Returns a SYCL kernel for the SYCL kernel function defined by kernel @@ -207,7 +207,7 @@ class program_impl { /// If program is in the program_state::none state or if the SYCL kernel /// function is not available, an invalid_object_error exception is thrown. /// - /// @return a valid instance of SYCL kernel. + /// \return a valid instance of SYCL kernel. kernel get_kernel(string_class KernelName, shared_ptr_class PtrToSelf, bool IsCreatedFromSource) const; @@ -225,24 +225,24 @@ class program_impl { /// program_state::linked states, an invalid_object_error SYCL exception /// is thrown. /// - /// @return a vector of vectors representing the compiled binaries for each + /// \return a vector of vectors representing the compiled binaries for each /// associated SYCL device. vector_class> get_binaries() const; - /// @return the SYCL context that this program was constructed with. + /// \return the SYCL context that this program was constructed with. context get_context() const { if (is_host()) return context(); return createSyclObjFromImpl(MContext); } - // @return the Plugin associated withh the context of this program. + // \return the Plugin associated withh the context of this program. const plugin &getPlugin() const { assert(!is_host() && "Plugin is not available for Host."); return MContext->getPlugin(); } - /// @return a vector of devices that are associated with this program. + /// \return a vector of devices that are associated with this program. vector_class get_devices() const { return MDevices; } /// Returns compile options that were provided when the encapsulated program @@ -254,7 +254,7 @@ class program_impl { /// cl_program was explicitly compiled, in which case the compile options /// used in the explicit compile are returned. /// - /// @return a string of valid OpenCL compile options. + /// \return a string of valid OpenCL compile options. string_class get_compile_options() const { return MCompileOptions; } /// Returns compile options that were provided to the most recent invocation @@ -270,7 +270,7 @@ class program_impl { /// links a vector of programs, then the link options passed to this /// constructor are returned. /// - /// @return a string of valid OpenCL compile options. + /// \return a string of valid OpenCL compile options. string_class get_link_options() const { return MLinkOptions; } /// Returns the compile, link, or build options, from whichever of those @@ -280,10 +280,10 @@ class program_impl { /// program, or if the program includes the host device in its device list, /// then an empty string is returned. /// - /// @return a string of valid OpenCL build options. + /// \return a string of valid OpenCL build options. string_class get_build_options() const { return MBuildOptions; } - /// @return the current state of this SYCL program. + /// \return the current state of this SYCL program. program_state get_state() const { return MState; } private: @@ -292,7 +292,7 @@ class program_impl { /// If there's at least one device that does not support this feature, /// a feature_not_supported exception is thrown. /// - /// @param Devices is a vector of SYCL devices. + /// \param Devices is a vector of SYCL devices. template void check_device_feature_support(const vector_class &Devices) { for (const auto &Device : Devices) { @@ -306,61 +306,61 @@ class program_impl { /// Creates a plugin interface kernel using its name. /// - /// @param Module is an OS handle to user code module. - /// @param KernelName is a name of kernel to be created. + /// \param Module is an OS handle to user code module. + /// \param KernelName is a name of kernel to be created. void create_pi_program_with_kernel_name(OSModuleHandle Module, const string_class &KernelName); /// Creates an OpenCL program from OpenCL C source code. /// - /// @param Source is a string containing OpenCL C source code. + /// \param Source is a string containing OpenCL C source code. void create_cl_program_with_source(const string_class &Source); /// Compiles underlying plugin interface program. /// - /// @param Options is a string containing OpenCL compile options. + /// \param Options is a string containing OpenCL compile options. void compile(const string_class &Options); /// Builds underlying plugin interface program. /// - /// @param Options is a string containing OpenCL build options. + /// \param Options is a string containing OpenCL build options. void build(const string_class &Options); - /// @return a vector of devices managed by the plugin. + /// \return a vector of devices managed by the plugin. vector_class get_pi_devices() const; - /// @return true if caching is allowed for this program. + /// \return true if caching is allowed for this program. bool is_cacheable() const { return MProgramAndKernelCachingAllowed; } - /// @param Options is a string containing OpenCL C build options. - /// @return true if caching is allowed for this program and build options. + /// \param Options is a string containing OpenCL C build options. + /// \return true if caching is allowed for this program and build options. static bool is_cacheable_with_options(const string_class &Options) { return Options.empty(); } - /// @param KernelName is a string containing OpenCL kernel name. - /// @return true if underlying OpenCL program has kernel with specific name. + /// \param KernelName is a string containing OpenCL kernel name. + /// \return true if underlying OpenCL program has kernel with specific name. bool has_cl_kernel(const string_class &KernelName) const; - /// @param KernelName is a string containing PI kernel name. - /// @return an instance of PI kernel with specific name. If kernel is + /// \param KernelName is a string containing PI kernel name. + /// \return an instance of PI kernel with specific name. If kernel is /// unavailable, an invalid_object_error exception is thrown. RT::PiKernel get_pi_kernel(const string_class &KernelName) const; - /// @return a vector of sorted in ascending order SYCL devices. + /// \return a vector of sorted in ascending order SYCL devices. vector_class sort_devices_by_cl_device_id(vector_class Devices); /// Throws an invalid_object_exception if state of this program is in the /// specified state. /// - /// @param State is a program state to match against. + /// \param State is a program state to match against. void throw_if_state_is(program_state State) const; /// Throws an invalid_object_exception if state of this program is not in /// the specified state. /// - /// @param State is a program state to match against. + /// \param State is a program state to match against. void throw_if_state_is_not(program_state State) const; RT::PiProgram MProgram = nullptr; diff --git a/sycl/source/detail/queue_impl.hpp b/sycl/source/detail/queue_impl.hpp index 701c1f6941694..71db65898cd5b 100644 --- a/sycl/source/detail/queue_impl.hpp +++ b/sycl/source/detail/queue_impl.hpp @@ -39,12 +39,12 @@ class queue_impl { /// Constructs a SYCL queue from a device using an async_handler and /// property_list provided. /// - /// @param Device is a SYCL device that is used to dispatch tasks submitted + /// \param Device is a SYCL device that is used to dispatch tasks submitted /// to the queue. - /// @param AsyncHandler is a SYCL asynchronous exception handler. - /// @param Order specifies whether the queue being constructed as in-order + /// \param AsyncHandler is a SYCL asynchronous exception handler. + /// \param Order specifies whether the queue being constructed as in-order /// or out-of-order. - /// @param PropList is a list of properties to use for queue construction. + /// \param PropList is a list of properties to use for queue construction. queue_impl(DeviceImplPtr Device, async_handler AsyncHandler, QueueOrder Order, const property_list &PropList) : queue_impl(Device, @@ -55,14 +55,14 @@ class queue_impl { /// Constructs a SYCL queue with an async_handler and property_list provided /// form a device and a context. /// - /// @param Device is a SYCL device that is used to dispatch tasks submitted + /// \param Device is a SYCL device that is used to dispatch tasks submitted /// to the queue. - /// @param Context is a SYCL context to associate with the queue being + /// \param Context is a SYCL context to associate with the queue being /// constructed. - /// @param AsyncHandler is a SYCL asynchronous exception handler. - /// @param Order specifies whether the queue being constructed as in-order + /// \param AsyncHandler is a SYCL asynchronous exception handler. + /// \param Order specifies whether the queue being constructed as in-order /// or out-of-order. - /// @param PropList is a list of properties to use for queue construction. + /// \param PropList is a list of properties to use for queue construction. queue_impl(DeviceImplPtr Device, ContextImplPtr Context, async_handler AsyncHandler, QueueOrder Order, const property_list &PropList) @@ -81,10 +81,10 @@ class queue_impl { /// Constructs a SYCL queue from plugin interoperability handle. /// - /// @param PiQueue is a raw PI queue handle. - /// @param Context is a SYCL context to associate with the queue being + /// \param PiQueue is a raw PI queue handle. + /// \param Context is a SYCL context to associate with the queue being /// constructed. - /// @param AsyncHandler is a SYCL asynchronous exception handler. + /// \param AsyncHandler is a SYCL asynchronous exception handler. queue_impl(RT::PiQueue PiQueue, ContextImplPtr Context, const async_handler &AsyncHandler) : MContext(Context), MAsyncHandler(AsyncHandler), MHostQueue(false), @@ -111,7 +111,7 @@ class queue_impl { } } - /// @return an OpenCL interoperability queue handle. + /// \return an OpenCL interoperability queue handle. cl_command_queue get() { if (MOpenCLInterop) { getPlugin().call(MCommandQueue); @@ -122,7 +122,7 @@ class queue_impl { PI_INVALID_QUEUE); } - /// @return an associated SYCL context. + /// \return an associated SYCL context. context get_context() const { return createSyclObjFromImpl(MContext); } @@ -131,10 +131,10 @@ class queue_impl { ContextImplPtr getContextImplPtr() const { return MContext; } - /// @return an associated SYCL device. + /// \return an associated SYCL device. device get_device() const { return createSyclObjFromImpl(MDevice); } - /// @return true if this queue is a SYCL host queue. + /// \return true if this queue is a SYCL host queue. bool is_host() const { return MHostQueue; } /// Queries SYCL queue for information. @@ -149,9 +149,9 @@ class queue_impl { /// On a kernel error, this command group function object is then scheduled /// for execution on a secondary queue. /// - /// @param CGF is a function object containing command group. - /// @param Self is a shared_ptr to this queue. - /// @return a SYCL event object, which corresponds to the queue the command + /// \param CGF is a function object containing command group. + /// \param Self is a shared_ptr to this queue. + /// \return a SYCL event object, which corresponds to the queue the command /// group is being enqueued on. event submit(const function_class &CGF, shared_ptr_class Self, @@ -170,9 +170,9 @@ class queue_impl { /// Submits a command group function object to the queue, in order to be /// scheduled for execution on the device. /// - /// @param CGF is a function object containing command group. - /// @param Self is a shared_ptr to this queue. - /// @return a SYCL event object for the submitted command group. + /// \param CGF is a function object containing command group. + /// \param Self is a shared_ptr to this queue. + /// \return a SYCL event object for the submitted command group. event submit(const function_class &CGF, shared_ptr_class Self) { return submit_impl(CGF, std::move(Self)); @@ -189,7 +189,7 @@ class queue_impl { MEvents.clear(); } - /// @return list of asynchronous exceptions occurred during execution. + /// \return list of asynchronous exceptions occurred during execution. exception_list getExceptionList() const { return MExceptions; } void wait_and_throw() { @@ -223,7 +223,7 @@ class queue_impl { /// Creates PI queue. /// - /// @param Order specifies whether the queue being constructed as in-order + /// \param Order specifies whether the queue being constructed as in-order /// or out-of-order. RT::PiQueue createQueue(QueueOrder Order) { RT::PiQueueProperties CreationFlags = 0; @@ -254,7 +254,7 @@ class queue_impl { return Queue; } - /// @return a raw PI handle for a free queue. The returned handle is not + /// \return a raw PI handle for a free queue. The returned handle is not /// retained. It is caller responsibility to make sure queue is still alive. RT::PiQueue &getExclusiveQueueHandleRef() { std::lock_guard Guard(MMutex); @@ -276,7 +276,7 @@ class queue_impl { return MQueues[FreeQueueNum]; } - /// @return a raw PI queue handle. The returned handle is not retained. It + /// \return a raw PI queue handle. The returned handle is not retained. It /// is caller responsibility to make sure queue is still alive. RT::PiQueue &getHandleRef() { if (MSupportOOO) { @@ -297,13 +297,13 @@ class queue_impl { return getExclusiveQueueHandleRef(); } - /// @return true if the queue was constructed with property specified by + /// \return true if the queue was constructed with property specified by /// PropertyT. template bool has_property() const { return MPropList.has_property(); } - /// @return a copy of the property of type PropertyT that the queue was + /// \return a copy of the property of type PropertyT that the queue was /// constructed with. If the queue was not constructed with the PropertyT /// property, an invalid_object_error SYCL exception. template propertyT get_property() const { @@ -312,33 +312,33 @@ class queue_impl { /// Fills the memory pointed by a USM pointer with the value specified. /// - /// @param Impl is a shared_ptr to this queue. - /// @param Ptr is a USM pointer to the memory to fill. - /// @param Value is a value to be set. Value is cast as an unsigned char. - /// @param Count is a number of bytes to fill. - /// @return an event representing fill operation. + /// \param Impl is a shared_ptr to this queue. + /// \param Ptr is a USM pointer to the memory to fill. + /// \param Value is a value to be set. Value is cast as an unsigned char. + /// \param Count is a number of bytes to fill. + /// \return an event representing fill operation. event memset(shared_ptr_class Impl, void *Ptr, int Value, size_t Count); /// Copies data from one memory region to another, both pointed by /// USM pointers. /// - /// @param Impl is a shared_ptr to this queue. - /// @param Dest is a USM pointer to the destination memory. - /// @param Src is a USM pointer to the source memory. - /// @param Count is a number of bytes to copy. + /// \param Impl is a shared_ptr to this queue. + /// \param Dest is a USM pointer to the destination memory. + /// \param Src is a USM pointer to the source memory. + /// \param Count is a number of bytes to copy. event memcpy(shared_ptr_class Impl, void *Dest, const void *Src, size_t Count); /// Provides additional information to the underlying runtime about how /// different allocations are used. /// - /// @param Ptr is a USM pointer to the allocation. - /// @param Length is a number of bytes in the allocation. - /// @param Advice is a device-defined advice for the specified allocation. + /// \param Ptr is a USM pointer to the allocation. + /// \param Length is a number of bytes in the allocation. + /// \param Advice is a device-defined advice for the specified allocation. event mem_advise(const void *Ptr, size_t Length, int Advice); /// Puts exception to the list of asynchronous ecxeptions. /// - /// @param ExceptionPtr is a pointer to exception to be put. + /// \param ExceptionPtr is a pointer to exception to be put. void reportAsyncException(std::exception_ptr ExceptionPtr) { std::lock_guard Guard(MMutex); MExceptions.PushBack(ExceptionPtr); @@ -347,9 +347,9 @@ class queue_impl { private: /// Performs command group submission to the queue. /// - /// @param CGF is a function object containing command group. - /// @param Self is a pointer to this queue. - /// @return a SYCL event representing submitted command group. + /// \param CGF is a function object containing command group. + /// \param Self is a pointer to this queue. + /// \return a SYCL event representing submitted command group. event submit_impl(const function_class &CGF, shared_ptr_class Self) { handler Handler(std::move(Self), MHostQueue); @@ -361,7 +361,7 @@ class queue_impl { /// Stores an event that should be associated with the queue /// - /// @param Event is the event to be stored + /// \param Event is the event to be stored void addEvent(event Event); /// Protects all the fields that can be changed by class' methods. diff --git a/sycl/source/detail/usm/usm_impl.cpp b/sycl/source/detail/usm/usm_impl.cpp index b81529e553cfa..ad120734db683 100644 --- a/sycl/source/detail/usm/usm_impl.cpp +++ b/sycl/source/detail/usm/usm_impl.cpp @@ -238,8 +238,8 @@ void *aligned_alloc(size_t Alignment, size_t Size, const queue &Q, alloc Kind) { /// Query the allocation type from a USM pointer /// Returns alloc::host for all pointers in a host context. /// -/// @param ptr is the USM pointer to query -/// @param ctxt is the sycl context the ptr was allocated in +/// \param ptr is the USM pointer to query +/// \param ctxt is the sycl context the ptr was allocated in alloc get_pointer_type(const void *Ptr, const context &Ctxt) { if (!Ptr) return alloc::unknown; @@ -288,8 +288,8 @@ alloc get_pointer_type(const void *Ptr, const context &Ctxt) { /// Queries the device against which the pointer was allocated /// -/// @param ptr is the USM pointer to query -/// @param ctxt is the sycl context the ptr was allocated in +/// \param ptr is the USM pointer to query +/// \param ctxt is the sycl context the ptr was allocated in device get_pointer_device(const void *Ptr, const context &Ctxt) { // Check if ptr is a valid USM pointer if (get_pointer_type(Ptr, Ctxt) == alloc::unknown) From 11e9667a3fc7b196b284ebfbd2bda04e803ae027 Mon Sep 17 00:00:00 2001 From: Alexey Bader Date: Sat, 7 Mar 2020 11:24:52 +0300 Subject: [PATCH 2/3] [SYCL][NFC] Fix doxygen warnings The warnings are about parameter name mismatch and undocumented parameters. Signed-off-by: Alexey Bader --- sycl/include/CL/sycl/device.hpp | 57 ++++++++++------- sycl/include/CL/sycl/handler.hpp | 94 ++++++++++++++-------------- sycl/include/CL/sycl/program.hpp | 4 +- sycl/source/detail/context_impl.hpp | 8 ++- sycl/source/detail/kernel_impl.hpp | 6 +- sycl/source/detail/platform_impl.hpp | 3 +- sycl/source/detail/program_impl.hpp | 3 + sycl/source/detail/queue_impl.hpp | 1 + 8 files changed, 96 insertions(+), 80 deletions(-) diff --git a/sycl/include/CL/sycl/device.hpp b/sycl/include/CL/sycl/device.hpp index ac9d0e1da222b..4168d38a20bec 100644 --- a/sycl/include/CL/sycl/device.hpp +++ b/sycl/include/CL/sycl/device.hpp @@ -36,7 +36,7 @@ class device { /// Constructs a SYCL device instance using the device selected /// by the DeviceSelector provided. /// - /// \param deviceSelector SYCL device selector to be used (see 4.6.1.1). + /// \param DeviceSelector SYCL device selector to be used (see 4.6.1.1). explicit device(const device_selector &DeviceSelector); bool operator==(const device &rhs) const { return impl == rhs.impl; } @@ -53,7 +53,8 @@ class device { /// Get instance of device /// - /// \return a valid cl_device_id instance in accordance with the requirements described in 4.3.1. + /// \return a valid cl_device_id instance in accordance with the requirements + /// described in 4.3.1. cl_device_id get() const; /// Check if device is a host device @@ -82,7 +83,8 @@ class device { /// must encapsulate the OpenCL cl_plaform_id associated with the /// underlying OpenCL cl_device_id of this SYCL device. If this SYCL device /// is a host device then the SYCL platform must be a host platform. - /// The value returned must be equal to that returned by get_info(). + /// The value returned must be equal to that returned by + /// get_info(). /// /// \return The associated SYCL platform. platform get_platform() const; @@ -90,44 +92,52 @@ class device { /// Partition device into sub devices /// /// Available only when prop is info::partition_property::partition_equally. - /// If this SYCL device does not support info::partition_property::partition_equally - /// a feature_not_supported exception must be thrown. + /// If this SYCL device does not support + /// info::partition_property::partition_equally a feature_not_supported + /// exception must be thrown. /// - /// \param ComputeUnits is a desired count of compute units in each sub device. - /// \return A vector class of sub devices partitioned from this SYCL device equally based on the ComputeUnits parameter. + /// \param ComputeUnits is a desired count of compute units in each sub + /// device. \return A vector class of sub devices partitioned from this SYCL + /// device equally based on the ComputeUnits parameter. template vector_class create_sub_devices(size_t ComputeUnits) const; /// Partition device into sub devices /// /// Available only when prop is info::partition_property::partition_by_counts. - /// If this SYCL device does not support info::partition_property::partition_by_counts - /// a feature_not_supported exception must be thrown. + /// If this SYCL device does not support + /// info::partition_property::partition_by_counts a feature_not_supported + /// exception must be thrown. /// /// \param Counts is a vector_class of desired compute units in sub devices. - /// \return a vector_class of sub devices partitioned from this SYCL device by count sizes based on the Counts parameter. + /// \return a vector_class of sub devices partitioned from this SYCL device by + /// count sizes based on the Counts parameter. template vector_class create_sub_devices(const vector_class &Counts) const; /// Partition device into sub devices /// - /// Available only when prop is info::partition_property::partition_by_affinity_domain. - /// If this SYCL device does not support info::partition_property::partition_by_affinity_domain - /// or the SYCL device does not support info::affinity_domain provided - /// a feature_not_supported exception must be thrown. + /// Available only when prop is + /// info::partition_property::partition_by_affinity_domain. If this SYCL + /// device does not support + /// info::partition_property::partition_by_affinity_domain or the SYCL device + /// does not support info::affinity_domain provided a feature_not_supported + /// exception must be thrown. /// - /// \param AffinityDomain is one of the values described in Table 4.20 of SYCL Spec - /// \return a vector class of sub devices partitioned from this SYCL device by affinity domain based on the AffinityDomain parameter + /// \param AffinityDomain is one of the values described in Table 4.20 of SYCL + /// Spec \return a vector class of sub devices partitioned from this SYCL + /// device by affinity domain based on the AffinityDomain parameter template vector_class create_sub_devices(info::partition_affinity_domain AffinityDomain) const; - /// Queries this SYCL device for information requested by the template parameter param + /// Queries this SYCL device for information requested by the template + /// parameter param /// - /// Specializations of info::param_traits must be defined in accordance with the info - /// parameters in Table 4.20 of SYCL Spec to facilitate returning the type - /// associated with the param parameter. + /// Specializations of info::param_traits must be defined in accordance with + /// the info parameters in Table 4.20 of SYCL Spec to facilitate returning the + /// type associated with the param parameter. /// /// \return device info of type described in Table 4.20. template @@ -136,7 +146,7 @@ class device { /// Check SYCL extension support by device /// - /// @extension_name is a name of queried extension. + /// \param extension_name is a name of queried extension. /// \return true if SYCL device supports the extension. bool has_extension(const string_class &extension_name) const; @@ -145,8 +155,9 @@ class device { /// The returned vector_class must contain a single SYCL device /// that is a host device, permitted by the deviceType parameter /// - /// @deviceType is one of the values described in A.3 of SYCL Spec - /// \return a vector_class containing all SYCL devices available in the system of the device type specified + /// \param deviceType is one of the values described in A.3 of SYCL Spec + /// \return a vector_class containing all SYCL devices available in the system + /// of the device type specified static vector_class get_devices(info::device_type deviceType = info::device_type::all); diff --git a/sycl/include/CL/sycl/handler.hpp b/sycl/include/CL/sycl/handler.hpp index ba5c15c29ee9e..1678db2dbd80c 100644 --- a/sycl/include/CL/sycl/handler.hpp +++ b/sycl/include/CL/sycl/handler.hpp @@ -122,10 +122,10 @@ device getDeviceFromHandler(handler &); /// CGH.setArg(1, N); // Registers value given as an argument to the /// // kernel. /// // The following registers KernelFunctor to be a kernel that will be -/// // executed in case of queue is bound to the host device, SyclKernel - for +/// // executed in case of queue is bound to the host device, Kernel - for /// // an OpenCL device. This function clearly indicates that command group /// // represents kernel execution. -/// CGH.parallel_for(KernelFunctor, SyclKernel); +/// CGH.parallel_for(KernelFunctor, Kernel); /// }); /// \endcode /// @@ -184,7 +184,7 @@ class handler { // Now if they are equal we extract argumets from lambda/functor for the // kernel. Else it is necessary use set_atg(s) for resolve the order and // values of arguments for the kernel. - assert(MSyclKernel && "MSyclKernel is not initialized"); + assert(MKernel && "MKernel is not initialized"); const string_class LambdaName = detail::KernelInfo::getName(); const string_class KernelName = getKernelName(); return LambdaName == KernelName; @@ -293,13 +293,13 @@ class handler { sizeof(sampler), ArgIndex); } - void verifySyclKernelInvoc(const kernel &SyclKernel) { + void verifyKernelInvoc(const kernel &Kernel) { if (is_host()) { throw invalid_object_error( "This kernel invocation method cannot be used on the host", PI_INVALID_DEVICE); } - if (SyclKernel.is_host()) { + if (Kernel.is_host()) { throw invalid_object_error("Invalid kernel type, OpenCL expected", PI_INVALID_KERNEL); } @@ -483,7 +483,7 @@ class handler { /// Registers event dependencies on this command group. /// - /// \param Event is a vector of valid SYCL events to wait on. + /// \param Events is a vector of valid SYCL events to wait on. void depends_on(vector_class Events) { for (event &Event : Events) { MEvents.push_back(std::move(detail::getSyclObjImpl(Event))); @@ -686,12 +686,12 @@ class handler { /// Executes exactly once. The kernel invocation method has no functors and /// cannot be called on host. /// - /// \param SyclKernel is a SYCL kernel object. - void single_task(kernel SyclKernel) { + /// \param Kernel is a SYCL kernel object. + void single_task(kernel Kernel) { throwIfActionIsCreated(); - verifySyclKernelInvoc(SyclKernel); + verifyKernelInvoc(Kernel); MNDRDesc.set(range<1>{1}); - MSyclKernel = detail::getSyclObjImpl(std::move(SyclKernel)); + MKernel = detail::getSyclObjImpl(std::move(Kernel)); MCGType = detail::CG::KERNEL; extractArgsAndReqs(); } @@ -702,13 +702,12 @@ class handler { /// invocation method has no functors and cannot be called on host. /// /// \param NumWorkItems is a range defining indexing space. - /// \param WorkItemOffset is an offset to be applied to each work item index. - /// \param KernelFunc is a SYCL kernel function. + /// \param Kenrel is a SYCL kernel function. template - void parallel_for(range NumWorkItems, kernel SyclKernel) { + void parallel_for(range NumWorkItems, kernel Kenrel) { throwIfActionIsCreated(); - verifySyclKernelInvoc(SyclKernel); - MSyclKernel = detail::getSyclObjImpl(std::move(SyclKernel)); + verifyKernelInvoc(Kenrel); + MKernel = detail::getSyclObjImpl(std::move(Kenrel)); MNDRDesc.set(std::move(NumWorkItems)); MCGType = detail::CG::KERNEL; extractArgsAndReqs(); @@ -721,13 +720,13 @@ class handler { /// /// \param NumWorkItems is a range defining indexing space. /// \param WorkItemOffset is an offset to be applied to each work item index. - /// \param KernelFunc is a SYCL kernel function. + /// \param Kernel is a SYCL kernel function. template void parallel_for(range NumWorkItems, id WorkItemOffset, - kernel SyclKernel) { + kernel Kernel) { throwIfActionIsCreated(); - verifySyclKernelInvoc(SyclKernel); - MSyclKernel = detail::getSyclObjImpl(std::move(SyclKernel)); + verifyKernelInvoc(Kernel); + MKernel = detail::getSyclObjImpl(std::move(Kernel)); MNDRDesc.set(std::move(NumWorkItems), std::move(WorkItemOffset)); MCGType = detail::CG::KERNEL; extractArgsAndReqs(); @@ -738,14 +737,13 @@ class handler { /// /// The SYCL kernel function is defined as SYCL kernel object. /// - /// \param ExecutionRange is a ND-range defining global and local sizes as + /// \param NDRange is a ND-range defining global and local sizes as /// well as offset. - /// \param KernelFunc is a SYCL kernel function. - template - void parallel_for(nd_range NDRange, kernel SyclKernel) { + /// \param Kernel is a SYCL kernel function. + template void parallel_for(nd_range NDRange, kernel Kernel) { throwIfActionIsCreated(); - verifySyclKernelInvoc(SyclKernel); - MSyclKernel = detail::getSyclObjImpl(std::move(SyclKernel)); + verifyKernelInvoc(Kernel); + MKernel = detail::getSyclObjImpl(std::move(Kernel)); MNDRDesc.set(std::move(NDRange)); MCGType = detail::CG::KERNEL; extractArgsAndReqs(); @@ -753,12 +751,12 @@ class handler { /// Defines and invokes a SYCL kernel function. /// - /// \param SyclKernel is a SYCL kernel that is executed on a SYCL device + /// \param Kernel is a SYCL kernel that is executed on a SYCL device /// (except for the host device). /// \param KernelFunc is a lambda that is used if device, queue is bound to, /// is a host device. template - void single_task(kernel SyclKernel, KernelType KernelFunc) { + void single_task(kernel Kernel, KernelType KernelFunc) { throwIfActionIsCreated(); using NameT = typename detail::get_kernel_name_t::name; @@ -766,7 +764,7 @@ class handler { kernel_single_task(KernelFunc); #else MNDRDesc.set(range<1>{1}); - MSyclKernel = detail::getSyclObjImpl(std::move(SyclKernel)); + MKernel = detail::getSyclObjImpl(std::move(Kernel)); MCGType = detail::CG::KERNEL; if (!MIsHost && !lambdaAndKernelHaveEqualName()) extractArgsAndReqs(); @@ -786,14 +784,14 @@ class handler { /// Defines and invokes a SYCL kernel function for the specified range. /// - /// \param SyclKernel is a SYCL kernel that is executed on a SYCL device + /// \param Kernel is a SYCL kernel that is executed on a SYCL device /// (except for the host device). /// \param NumWorkItems is a range defining indexing space. /// \param KernelFunc is a lambda that is used if device, queue is bound to, /// is a host device. template - void parallel_for(kernel SyclKernel, range NumWorkItems, + void parallel_for(kernel Kernel, range NumWorkItems, KernelType KernelFunc) { throwIfActionIsCreated(); using NameT = @@ -802,7 +800,7 @@ class handler { kernel_parallel_for(KernelFunc); #else MNDRDesc.set(std::move(NumWorkItems)); - MSyclKernel = detail::getSyclObjImpl(std::move(SyclKernel)); + MKernel = detail::getSyclObjImpl(std::move(Kernel)); MCGType = detail::CG::KERNEL; if (!MIsHost && !lambdaAndKernelHaveEqualName()) extractArgsAndReqs(); @@ -814,7 +812,7 @@ class handler { /// Defines and invokes a SYCL kernel function for the specified range and /// offsets. /// - /// \param SyclKernel is a SYCL kernel that is executed on a SYCL device + /// \param Kernel is a SYCL kernel that is executed on a SYCL device /// (except for the host device). /// \param NumWorkItems is a range defining indexing space. /// \param WorkItemOffset is an offset to be applied to each work item index. @@ -822,7 +820,7 @@ class handler { /// is a host device. template - void parallel_for(kernel SyclKernel, range NumWorkItems, + void parallel_for(kernel Kernel, range NumWorkItems, id WorkItemOffset, KernelType KernelFunc) { throwIfActionIsCreated(); using NameT = @@ -831,7 +829,7 @@ class handler { kernel_parallel_for(KernelFunc); #else MNDRDesc.set(std::move(NumWorkItems), std::move(WorkItemOffset)); - MSyclKernel = detail::getSyclObjImpl(std::move(SyclKernel)); + MKernel = detail::getSyclObjImpl(std::move(Kernel)); MCGType = detail::CG::KERNEL; if (!MIsHost && !lambdaAndKernelHaveEqualName()) extractArgsAndReqs(); @@ -843,15 +841,15 @@ class handler { /// Defines and invokes a SYCL kernel function for the specified range and /// offsets. /// - /// \param SyclKernel is a SYCL kernel that is executed on a SYCL device + /// \param Kernel is a SYCL kernel that is executed on a SYCL device /// (except for the host device). - /// \param NumWorkItems is a range defining indexing space. - /// \param WorkItemOffset is an offset to be applied to each work item index. + /// \param NDRange is a ND-range defining global and local sizes as + /// well as offset. /// \param KernelFunc is a lambda that is used if device, queue is bound to, /// is a host device. template - void parallel_for(kernel SyclKernel, nd_range NDRange, + void parallel_for(kernel Kernel, nd_range NDRange, KernelType KernelFunc) { throwIfActionIsCreated(); using NameT = @@ -860,7 +858,7 @@ class handler { kernel_parallel_for(KernelFunc); #else MNDRDesc.set(std::move(NDRange)); - MSyclKernel = detail::getSyclObjImpl(std::move(SyclKernel)); + MKernel = detail::getSyclObjImpl(std::move(Kernel)); MCGType = detail::CG::KERNEL; if (!MIsHost && !lambdaAndKernelHaveEqualName()) extractArgsAndReqs(); @@ -872,19 +870,19 @@ class handler { /// Hierarchical kernel invocation method of a kernel. /// /// This version of \c parallel_for_work_group takes two parameters - /// representing the same kernel. The first one - \c syclKernel - is a + /// representing the same kernel. The first one - \c Kernel - is a /// compiled form of the second one - \c kernelFunc, which is the source form /// of the kernel. The same source kernel can be compiled multiple times /// yielding multiple kernel class objects accessible via the \c program class /// interface. /// - /// \param SyclKernel is a compiled SYCL kernel. + /// \param Kernel is a compiled SYCL kernel. /// \param NumWorkGroups is a range describing the number of work-groups in /// each dimension. /// \param KernelFunc is a lambda representing kernel. template - void parallel_for_work_group(kernel SyclKernel, range NumWorkGroups, + void parallel_for_work_group(kernel Kernel, range NumWorkGroups, KernelType KernelFunc) { throwIfActionIsCreated(); using NameT = @@ -893,7 +891,7 @@ class handler { kernel_parallel_for_work_group(KernelFunc); #else MNDRDesc.setNumWorkGroups(NumWorkGroups); - MSyclKernel = detail::getSyclObjImpl(std::move(SyclKernel)); + MKernel = detail::getSyclObjImpl(std::move(Kernel)); StoreLambda(std::move(KernelFunc)); MCGType = detail::CG::KERNEL; #endif // __SYCL_DEVICE_ONLY__ @@ -902,13 +900,13 @@ class handler { /// Hierarchical kernel invocation method of a kernel. /// /// This version of \c parallel_for_work_group takes two parameters - /// representing the same kernel. The first one - \c syclKernel - is a + /// representing the same kernel. The first one - \c Kernel - is a /// compiled form of the second one - \c kernelFunc, which is the source form /// of the kernel. The same source kernel can be compiled multiple times /// yielding multiple kernel class objects accessible via the \c program class /// interface. /// - /// \param SyclKernel is a compiled SYCL kernel. + /// \param Kernel is a compiled SYCL kernel. /// \param NumWorkGroups is a range describing the number of work-groups in /// each dimension. /// \param WorkGroupSize is a range describing the size of work-groups in @@ -916,7 +914,7 @@ class handler { /// \param KernelFunc is a lambda representing kernel. template - void parallel_for_work_group(kernel SyclKernel, range NumWorkGroups, + void parallel_for_work_group(kernel Kernel, range NumWorkGroups, range WorkGroupSize, KernelType KernelFunc) { throwIfActionIsCreated(); @@ -926,7 +924,7 @@ class handler { kernel_parallel_for_work_group(KernelFunc); #else MNDRDesc.set(nd_range(NumWorkGroups * WorkGroupSize, WorkGroupSize)); - MSyclKernel = detail::getSyclObjImpl(std::move(SyclKernel)); + MKernel = detail::getSyclObjImpl(std::move(Kernel)); StoreLambda(std::move(KernelFunc)); MCGType = detail::CG::KERNEL; #endif // __SYCL_DEVICE_ONLY__ @@ -1266,7 +1264,7 @@ class handler { detail::NDRDescT MNDRDesc; string_class MKernelName; /// Storage for a sycl::kernel object. - shared_ptr_class MSyclKernel; + shared_ptr_class MKernel; /// Type of the command group, e.g. kernel, fill. detail::CG::CGTYPE MCGType = detail::CG::NONE; /// Pointer to the source host memory or accessor(depending on command type). diff --git a/sycl/include/CL/sycl/program.hpp b/sycl/include/CL/sycl/program.hpp index bc0d51c3ed0fb..491ba1fdcc933 100644 --- a/sycl/include/CL/sycl/program.hpp +++ b/sycl/include/CL/sycl/program.hpp @@ -48,7 +48,7 @@ class program { /// /// \param Context is an instance of SYCL context. /// \param DeviceList is a list of SYCL devices. - program(const context &context, vector_class DeviceList); + program(const context &Context, vector_class DeviceList); /// Constructs an instance of SYCL program by linking together each SYCL /// program instance in ProgramList. @@ -207,7 +207,7 @@ class program { /// \param KernelName is a string containing kernel name. /// \return true if the SYCL kernel is available and the program is not a /// SYCL host program. - bool has_kernel(string_class kernelName) const; + bool has_kernel(string_class KernelName) const; /// Returns a SYCL kernel for the SYCL kernel function defined by KernelType. /// diff --git a/sycl/source/detail/context_impl.hpp b/sycl/source/detail/context_impl.hpp index 7390444051b06..99b74b3e252ac 100644 --- a/sycl/source/detail/context_impl.hpp +++ b/sycl/source/detail/context_impl.hpp @@ -37,7 +37,7 @@ class context_impl { /// /// \param Device is an instance of SYCL device. /// \param AsyncHandler is an instance of async_handler. - /// \param useCUDAPrimaryContext is a bool determining whether to use the + /// \param UseCUDAPrimaryContext is a bool determining whether to use the /// primary context in the CUDA backend. context_impl(const device &Device, async_handler AsyncHandler, bool UseCUDAPrimaryContext); @@ -52,7 +52,9 @@ class context_impl { /// /// \param DeviceList is a list of SYCL device instances. /// \param AsyncHandler is an instance of async_handler. - context_impl(const vector_class Devices, + /// \param UseCUDAPrimaryContext is a bool determining whether to use the + /// primary context in the CUDA backend. + context_impl(const vector_class DeviceList, async_handler AsyncHandler, bool UseCUDAPrimaryContext); /// Construct a context_impl using plug-in interoperability handle. @@ -62,7 +64,7 @@ class context_impl { /// /// \param PiContext is an instance of a valid plug-in context handle. /// \param AsyncHandler is an instance of async_handler. - /// \param &Plugin is the reference to the underlying Plugin that this + /// \param Plugin is the reference to the underlying Plugin that this /// context is associated with. context_impl(RT::PiContext PiContext, async_handler AsyncHandler, const plugin &Plugin); diff --git a/sycl/source/detail/kernel_impl.hpp b/sycl/source/detail/kernel_impl.hpp index 3894103c8ca41..bab3d4749508d 100644 --- a/sycl/source/detail/kernel_impl.hpp +++ b/sycl/source/detail/kernel_impl.hpp @@ -38,7 +38,7 @@ class kernel_impl { /// instance. /// /// \param Kernel is a valid PiKernel instance - /// \param SyclContext is a valid SYCL context + /// \param Context is a valid SYCL context kernel_impl(RT::PiKernel Kernel, ContextImplPtr Context); /// Constructs a SYCL kernel instance from a SYCL program and a PiKernel @@ -49,7 +49,7 @@ class kernel_impl { /// thrown. /// /// \param Kernel is a valid PiKernel instance - /// \param SyclContext is a valid SYCL context + /// \param ContextImpl is a valid SYCL context /// \param ProgramImpl is a valid instance of program_impl /// \param IsCreatedFromSource is a flag that indicates whether program /// is created from source code @@ -58,7 +58,7 @@ class kernel_impl { /// Constructs a SYCL kernel for host device /// - /// \param SyclContext is a valid SYCL context + /// \param Context is a valid SYCL context /// \param ProgramImpl is a valid instance of program_impl kernel_impl(ContextImplPtr Context, ProgramImplPtr ProgramImpl); diff --git a/sycl/source/detail/platform_impl.hpp b/sycl/source/detail/platform_impl.hpp index eaf86893117d1..837f681a9952d 100644 --- a/sycl/source/detail/platform_impl.hpp +++ b/sycl/source/detail/platform_impl.hpp @@ -34,7 +34,8 @@ class platform_impl { /// Constructs platform_impl from a plug-in interoperability platform /// handle. /// - /// \param Platform is a raw plug-in platform handle. + /// \param APlatform is a raw plug-in platform handle. + /// \param APlugin is a plug-in handle. explicit platform_impl(RT::PiPlatform APlatform, const plugin &APlugin) : MPlatform(APlatform), MPlugin(std::make_shared(APlugin)) {} diff --git a/sycl/source/detail/program_impl.hpp b/sycl/source/detail/program_impl.hpp index 7a41db61cf7c1..f185b471df0a2 100644 --- a/sycl/source/detail/program_impl.hpp +++ b/sycl/source/detail/program_impl.hpp @@ -126,7 +126,9 @@ class program_impl { /// query info::device::is_compiler_available, a feature_not_supported /// exception is thrown. /// + /// \param KernelName is a string containing SYCL kernel name. /// \param CompileOptions is a string of valid OpenCL compile options. + /// \param Module is an OS handle to user code module. void compile_with_kernel_name(string_class KernelName, string_class CompileOptions, OSModuleHandle Module); @@ -161,6 +163,7 @@ class program_impl { /// /// \param KernelName is a string containing SYCL kernel name. /// \param BuildOptions is a string containing OpenCL compile options. + /// \param M is an OS handle to user code module. void build_with_kernel_name(string_class KernelName, string_class BuildOptions, OSModuleHandle M); diff --git a/sycl/source/detail/queue_impl.hpp b/sycl/source/detail/queue_impl.hpp index 71db65898cd5b..250d74afc2811 100644 --- a/sycl/source/detail/queue_impl.hpp +++ b/sycl/source/detail/queue_impl.hpp @@ -151,6 +151,7 @@ class queue_impl { /// /// \param CGF is a function object containing command group. /// \param Self is a shared_ptr to this queue. + /// \param SecondQueue is a shared_ptr to the secondary queue. /// \return a SYCL event object, which corresponds to the queue the command /// group is being enqueued on. event submit(const function_class &CGF, From 684e2ef0f99a7675c9d60ee4d28b7f6c0b2f7f06 Mon Sep 17 00:00:00 2001 From: Alexey Bader Date: Sat, 7 Mar 2020 12:00:53 +0300 Subject: [PATCH 3/3] [SYCL] Fix build after handler class member renaming Signed-off-by: Alexey Bader --- sycl/source/handler.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sycl/source/handler.cpp b/sycl/source/handler.cpp index 9d49f0c3e8efa..828c344b97d7b 100644 --- a/sycl/source/handler.cpp +++ b/sycl/source/handler.cpp @@ -26,7 +26,7 @@ event handler::finalize() { case detail::CG::KERNEL: case detail::CG::RUN_ON_HOST_INTEL: { CommandGroup.reset(new detail::CGExecKernel( - std::move(MNDRDesc), std::move(MHostKernel), std::move(MSyclKernel), + std::move(MNDRDesc), std::move(MHostKernel), std::move(MKernel), std::move(MArgsStorage), std::move(MAccStorage), std::move(MSharedPtrStorage), std::move(MRequirements), std::move(MEvents), std::move(MArgs), std::move(MKernelName), @@ -191,7 +191,7 @@ void handler::processArg(void *Ptr, const detail::kernel_param_kind_t &Kind, } void handler::extractArgsAndReqs() { - assert(MSyclKernel && "MSyclKernel is not initialized"); + assert(MKernel && "MKernel is not initialized"); std::vector UnPreparedArgs = std::move(MArgs); MArgs.clear(); @@ -201,7 +201,7 @@ void handler::extractArgsAndReqs() { return (first.MIndex < second.MIndex); }); - const bool IsKernelCreatedFromSource = MSyclKernel->isCreatedFromSource(); + const bool IsKernelCreatedFromSource = MKernel->isCreatedFromSource(); size_t IndexShift = 0; for (size_t I = 0; I < UnPreparedArgs.size(); ++I) { @@ -248,7 +248,7 @@ void handler::extractArgsAndReqsFromLambda( // As this is impossible in header, there's a function that calls necessary // method inside the library and returns the result. string_class handler::getKernelName() { - return MSyclKernel->get_info(); + return MKernel->get_info(); } } // namespace sycl } // __SYCL_INLINE_NAMESPACE(cl)