diff --git a/Cargo.toml b/Cargo.toml index 680b9ac..a2f3ad7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -80,6 +80,6 @@ path = "examples/clinfo.rs" enum_glob_use = "deny" missing_errors_doc = "allow" module_name_repetitions = "allow" -nursery = "deny" -pedantic = "deny" +nursery = { level = "deny", priority = -1 } +pedantic = { level = "deny", priority = -1 } unwrap_used = "deny" diff --git a/src/command_queue.rs b/src/command_queue.rs index 0d2e156..06ca79f 100644 --- a/src/command_queue.rs +++ b/src/command_queue.rs @@ -57,14 +57,15 @@ use libc::{c_void, intptr_t, size_t}; use std::mem; use std::ptr; -/// Create an `OpenCL` host or device command-queue on a specific device. +/// Create an `OpenCL` host or device command-queue on a specific device. +/// /// Calls `clCreateCommandQueue` to create an `OpenCL` context. /// Deprecated in `CL_VERSION_2_0` by `create_command_queue_with_properties`. /// /// * `context` - a valid `OpenCL` context. /// * `device` - a device or sub-device associated with context. /// * `properties` - a list of properties for the command-queue, see -/// [cl_command_queue_properties](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#legacy-queue-properties-table). +/// [cl_command_queue_properties](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#legacy-queue-properties-table). /// /// returns a Result containing the new `OpenCL` command-queue /// or the error code from the `OpenCL` C API function. @@ -99,14 +100,15 @@ pub unsafe fn create_command_queue( } } -/// Create an `OpenCL` host or device command-queue on a specific device. +/// Create an `OpenCL` host or device command-queue on a specific device. +/// /// Calls clCreateCommandQueueWithProperties to create an `OpenCL` context. /// `CL_VERSION_2_0` onwards. /// /// * `context` - a valid `OpenCL` context. /// * `device` - a device or sub-device associated with context. /// * `properties` - a null terminated list of properties for the command-queue, see -/// [cl_queue_properties](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#queue-properties-table). +/// [cl_queue_properties](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#queue-properties-table). /// /// returns a Result containing the new `OpenCL` command-queue /// or the error code from the `OpenCL` C API function. @@ -188,7 +190,7 @@ pub fn get_command_queue_data( /// /// * `command_queue` - the `OpenCL` command-queue. /// * `param_name` - the type of command-queue information being queried, see: -/// [Command Queue Parameter](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#command-queue-param-table). +/// [Command Queue Parameter](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#command-queue-param-table). /// /// returns a Result containing the desired information in an `InfoType` enum /// or the error code from the `OpenCL` C API function. diff --git a/src/context.rs b/src/context.rs index ea03865..1b758b5 100644 --- a/src/context.rs +++ b/src/context.rs @@ -42,7 +42,7 @@ use std::ptr; /// /// * `devices` - a slice of unique devices for an `OpenCL` platform. /// * `properties` - a null terminated list of `cl_context_properties`, see -/// [Context Properties](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#context-properties-table). +/// [Context Properties](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#context-properties-table). /// * `pfn_notify` - an optional callback function that can be registered by the application. /// * `user_data` - passed as the `user_data` argument when `pfn_notify` is called. /// @@ -78,9 +78,9 @@ pub fn create_context( /// Calls `clCreateContextFromType` to create an `OpenCL` context. /// /// * `device_type` - the type of `OpenCL` device, see: -/// [Device Types](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#device-types-table). +/// [Device Types](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#device-types-table). /// * `properties` - a null terminated list of `cl_context_properties`, see: -/// [Context Properties](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#context-properties-table). +/// [Context Properties](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#context-properties-table). /// * `pfn_notify` - an optional callback function that can be registered by the application. /// * `user_data` - passed as the `user_data` argument when `pfn_notify` is called. /// @@ -161,7 +161,7 @@ pub fn get_context_data( /// /// * `context` - the `cl_context` of the `OpenCL` context. /// * `param_name` - the type of platform information being queried, see: -/// [Context Attributes](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#context-info-table). +/// [Context Attributes](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#context-info-table). /// /// returns a Result containing the desired information in an `InfoType` enum /// or the error code from the `OpenCL` C API function. diff --git a/src/d3d10.rs b/src/d3d10.rs index 6a2dbb7..8824938 100644 --- a/src/d3d10.rs +++ b/src/d3d10.rs @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! FFI bindings for `cl_d3d10.h` +//! FFI bindings for `cl_d3d10.h` +//! //! `cl_d3d10.h` contains `OpenCL` extensions that provide interoperability with `Direct3D` 10. //! `OpenCL` extensions are documented in the [OpenCL-Registry](https://github.com/KhronosGroup/OpenCL-Registry) diff --git a/src/d3d11.rs b/src/d3d11.rs index 4805185..9cdeef6 100644 --- a/src/d3d11.rs +++ b/src/d3d11.rs @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! FFI bindings for `cl_d3d11.h` +//! FFI bindings for `cl_d3d11.h` +//! //! `cl_d3d11.h` contains `OpenCL` extensions that provide interoperability with `Direct3D` 11. //! `OpenCL` extensions are documented in the [OpenCL-Registry](https://github.com/KhronosGroup/OpenCL-Registry) diff --git a/src/device.rs b/src/device.rs index fc72bdc..92a3c31 100644 --- a/src/device.rs +++ b/src/device.rs @@ -142,7 +142,7 @@ use std::ptr; /// ``` /// * `platform` - the `cl_platform_id` of the `OpenCL` platform. /// * `device_type` - the type of device, see -/// [Device Types](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#device-types-table). +/// [Device Types](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#device-types-table). /// /// returns a Result containing a vector of available device ids /// or the error code from the `OpenCL` C API function. @@ -232,7 +232,7 @@ pub fn get_device_data( /// ``` /// * `device` - the `cl_device_id` of the `OpenCL` device. /// * `param_name` - the type of device information being queried, see -/// [Device Queries](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#device-queries-table). +/// [Device Queries](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#device-queries-table). /// /// returns a Result containing the desired information in an `InfoType` enum /// or the error code from the `OpenCL` C API function. @@ -586,7 +586,7 @@ fn count_sub_devices( /// /// * `in_device` - the `cl_device_id` of the `OpenCL` device to partition. /// * `properties` - the slice of `cl_device_partition_property`, see -/// [Subdevice Partition](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#subdevice-partition-table). +/// [Subdevice Partition](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#subdevice-partition-table). /// /// returns a Result containing a vector of available sub-device ids /// or the error code from the `OpenCL` C API function. @@ -671,7 +671,7 @@ pub unsafe fn release_device(device: cl_device_id) -> Result<(), cl_int> { /// * `context` - the `OpenCL` context used to create `command_queue`. /// * `device` - a valid `OpenCL` device associated with context. /// * `command_queue` - a command queue object which replaces the default -/// device command queue. +/// device command queue. /// /// returns an empty Result or the error code from the `OpenCL` C API function. #[cfg(feature = "CL_VERSION_2_1")] @@ -733,6 +733,7 @@ pub fn get_host_timer(device: cl_device_id) -> Result { // #endif /// Device Vendor Ids. +/// /// The `PCie` IDs of some `OpenCL` device vendors as returned by `get_device_info`, /// i.e.: `clGetDeviceInfo` - `CL_DEVICE_VENDOR_ID` /// They were obtained from the `PCIe` ID Repository: diff --git a/src/dx9_media_sharing.rs b/src/dx9_media_sharing.rs index da209e2..c9992ce 100644 --- a/src/dx9_media_sharing.rs +++ b/src/dx9_media_sharing.rs @@ -13,6 +13,7 @@ // limitations under the License. //! FFI bindings for `cl_dx9_media_sharing.h` +//! //! `cl_ecl_dx9_media_sharing.h` contains `OpenCL` extensions that provide interoperability with `Direct3D` 9. //! `OpenCL` extensions are documented in the [OpenCL-Registry](https://github.com/KhronosGroup/OpenCL-Registry) diff --git a/src/egl.rs b/src/egl.rs index ecdc7cc..513f69a 100644 --- a/src/egl.rs +++ b/src/egl.rs @@ -33,7 +33,7 @@ use std::ptr; /// * `image` - should be of type `EGLImageKHR`, cast into the type `CLeglImageKHR`. /// * `flags` - usage information about the memory object being created. /// * `properties` - a null terminated list of property names and their -/// corresponding values. +/// corresponding values. /// /// returns a Result containing the new `OpenCL` image object /// or the error code from the `OpenCL` C API function. diff --git a/src/event.rs b/src/event.rs index 6056c23..92350dc 100644 --- a/src/event.rs +++ b/src/event.rs @@ -84,7 +84,7 @@ pub fn get_event_data(event: cl_event, param_name: cl_event_info) -> Result Result<(cl_GLuint, cl_GLuint), cl_i } /// Get data about an OpenGL texture object. +/// /// Calls clGetGLTextureInfo to get the desired data about the texture object. pub fn get_gl_texture_data( memobj: cl_mem, @@ -167,11 +171,12 @@ pub fn get_gl_texture_data( } /// Get information about the GL texture object associated with a memory object. +/// /// Calls clGetGLTextureInfo to get the desired information. /// /// * `memobj` - the `OpenCL` memory object. /// * `param_name` - the type of memory object information being queried, see: -/// [Texture Info](https://www.khronos.org/registry/OpenCL//sdk/2.2/docs/man/html/clGetGLTextureInfo.html). +/// [Texture Info](https://www.khronos.org/registry/OpenCL//sdk/2.2/docs/man/html/clGetGLTextureInfo.html). /// /// returns a Result containing the desired information in an `InfoType` enum /// or the error code from the `OpenCL` C API function. @@ -265,14 +270,15 @@ pub unsafe fn enqueue_release_gl_objects( } /// Create an `OpenCL` 2D image object from an `OpenGL` 2D texture object, -/// or a single face of an OpenGL cubemap texture object. +/// or a single face of an OpenGL cubemap texture object. +/// /// Calls clCreateFromGLTexture2D to create an `OpenCL` memory object. /// Deprecated in `CL_VERSION_1_2`, use `create_from_gl_texture`. /// /// * `context` - a valid `OpenCL` context created from an OpenGL context. /// * `flags` - a bit-field used to specify allocation and usage information -/// about the image memory object being created, see: -/// [Memory Flags](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#memory-flags-table). +/// about the image memory object being created, see: +/// [Memory Flags](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#memory-flags-table). /// * `texture_target` - used to define the image type of texture. /// * `miplevel ` - used to define the mipmap level. /// * `texture ` - the name of a GL 2D, cubemap or rectangle texture object. @@ -317,13 +323,14 @@ pub unsafe fn create_from_gl_texture_2d( } /// Create an `OpenCL` 3D image object from an OpenGL 3D texture object. +/// /// Calls `clCreateFromGLTexture3D` to create an `OpenCL` memory object. /// Deprecated in `CL_VERSION_1_2`, use `create_from_gl_texture`. /// /// * `context` - a valid `OpenCL` context created from an OpenGL context. /// * `flags` - a bit-field used to specify allocation and usage information -/// about the image memory object being created, see: -/// [Memory Flags](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#memory-flags-table). +/// about the image memory object being created, see: +/// [Memory Flags](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#memory-flags-table). /// * `texture_target` - used to define the image type of texture. /// * `miplevel ` - used to define the mipmap level. /// * `texture ` - the name of a GL 2D, cubemap or rectangle texture object. @@ -372,7 +379,7 @@ pub unsafe fn create_from_gl_texture_3d( /// /// * `properties` - the `OpenCL` context properties. /// * `param_name` - the type of memory object information being queried, see: -/// [Context Info](https://www.khronos.org/registry/OpenCL//sdk/2.2/docs/man/html/clGetGLContextInfoKHR.html). +/// [Context Info](https://www.khronos.org/registry/OpenCL//sdk/2.2/docs/man/html/clGetGLContextInfoKHR.html). /// /// returns a Result containing the desired information in an `InfoType` enum /// or the error code from the `OpenCL` C API function. diff --git a/src/kernel.rs b/src/kernel.rs index b4d99cc..ff40b8c 100644 --- a/src/kernel.rs +++ b/src/kernel.rs @@ -239,7 +239,7 @@ pub unsafe fn set_kernel_arg_svm_pointer( /// /// * `kernel` - the `OpenCL` kernel. /// * `param_name` - the information to be passed to kernel, see: -/// [Kernel Execution Properties](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#kernel-exec-info-table). +/// [Kernel Execution Properties](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#kernel-exec-info-table). /// * `param_ptr` - pointer to the data for the `param_name`. /// /// returns an empty Result or the error code from the `OpenCL` C API function. @@ -277,7 +277,7 @@ pub fn get_kernel_data(kernel: cl_kernel, param_name: cl_kernel_info) -> Result< /// /// * `kernel` - the `OpenCL` kernel. /// * `param_name` - the type of kernel information being queried, see: -/// [Kernel Object Queries](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#kernel-info-table). +/// [Kernel Object Queries](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#kernel-info-table). /// /// returns a Result containing the desired information in an `InfoType` enum /// or the error code from the `OpenCL` C API function. @@ -318,7 +318,7 @@ pub fn get_kernel_arg_data( /// * `kernel` - the `OpenCL` kernel. /// * `arg_index` - the kernel argument index. /// * `param_name` - the type of kernel information being queried, see: -/// [Kernel Argument Queries](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#kernel-argument-info-table). +/// [Kernel Argument Queries](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#kernel-argument-info-table). /// /// returns a Result containing the desired information in an `InfoType` enum /// or the error code from the `OpenCL` C API function. @@ -368,7 +368,7 @@ pub fn get_kernel_work_group_data( /// * `kernel` - the `OpenCL` kernel. /// * `device` - a specific device in the list of devices associated with kernel. /// * `param_name` - the type of kernel information being queried, see: -/// [Kernel Object Device Queries](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#kernel-workgroup-info-table). +/// [Kernel Object Device Queries](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#kernel-workgroup-info-table). /// /// returns a Result containing the desired information in an `InfoType` enum /// or the error code from the `OpenCL` C API function. @@ -427,10 +427,10 @@ pub fn get_kernel_work_group_info( /// * `kernel` - the `OpenCL` kernel. /// * `device` - a specific device in the list of devices associated with kernel. /// * `param_name` - the type of kernel information being queried, see: -/// [Kernel Object Subgroup Queries](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#kernel-subgroup-info-table). +/// [Kernel Object Subgroup Queries](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#kernel-subgroup-info-table). /// * `input_value_size` - the size in bytes of memory pointed to by `input_value`. /// * `input_value` - pointer to memory where the appropriate parameterization -/// of the query is passed from. +/// of the query is passed from. /// /// returns a Result containing the desired information in an `InfoType` enum /// or the error code from the `OpenCL` C API function. diff --git a/src/lib.rs b/src/lib.rs index be4065e..64f12a8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -57,12 +57,12 @@ //! in those sections with their associated types and constants. The exceptions are: //! //! * [`error_codes`] - contains the `OpenCL` API error codes from cl.h and a function -//! (`error_text`) to convert an error code to it's enum name from cl.h. +//! (`error_text`) to convert an error code to it's enum name from cl.h. //! * [`info_type`] - contains a Rust enum (`InfoType`) to hold the `OpenCL` types -//! that can be returned from `OpenCL` "Info" functions, e.g. clGetPlatformInfo, -//! clGetDeviceInfo, clGetProgramInfo, etc. +//! that can be returned from `OpenCL` "Info" functions, e.g. clGetPlatformInfo, +//! clGetDeviceInfo, clGetProgramInfo, etc. //! * [`macros`] - contains Rust macros to call the `OpenCL` "Info" functions and -//! return the appropriate `InfoType` in a Rust Result. +//! return the appropriate `InfoType` in a Rust Result. //! //! It is vital to call the correct `InfoType` method type when decoding the //! result of "Info" functions, since the methods will panic if called with the diff --git a/src/memory.rs b/src/memory.rs index 17f6be4..a0d9e24 100644 --- a/src/memory.rs +++ b/src/memory.rs @@ -66,11 +66,11 @@ use std::ptr; /// /// * `context` - a valid `OpenCL` context. /// * `flags` - a bit-field used to specify allocation and usage information -/// about the image memory object being created, see: -/// [Memory Flags](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#memory-flags-table). +/// about the image memory object being created, see: +/// [Memory Flags](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#memory-flags-table). /// * `size` - the size in bytes of the buffer memory object to be allocated. /// * `host_ptr` - a pointer to the buffer data that may already be allocated -/// by the application. +/// by the application. /// /// returns a Result containing the new `OpenCL` buffer object /// or the error code from the `OpenCL` C API function. @@ -99,11 +99,11 @@ pub unsafe fn create_buffer( /// /// * `buffer` - a valid `OpenCL` buffer. /// * `flags` - a bit-field used to specify allocation and usage information -/// about the sub-buffer memory object being created, see: -/// [Memory Flags](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#memory-flags-table). +/// about the sub-buffer memory object being created, see: +/// [Memory Flags](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#memory-flags-table). /// * `buffer_create_type`,`buffer_create_info` - describe the type of -/// buffer object to be created, see: -/// [SubBuffer Attributes](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#subbuffer-create-info-table). +/// buffer object to be created, see: +/// [SubBuffer Attributes](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#subbuffer-create-info-table). /// /// returns a Result containing the new `OpenCL` buffer object /// or the error code from the `OpenCL` C API function. @@ -138,14 +138,14 @@ pub unsafe fn create_sub_buffer( /// /// * `context` - a valid `OpenCL` context. /// * `flags` - a bit-field used to specify allocation and usage information -/// about the image memory object being created, see: -/// [Memory Flags](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#memory-flags-table). +/// about the image memory object being created, see: +/// [Memory Flags](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#memory-flags-table). /// * `image_format` - a pointer to a structure that describes format properties -/// of the image to be allocated. +/// of the image to be allocated. /// * `image_desc` - a pointer to a structure that describes type and dimensions -/// of the image to be allocated. +/// of the image to be allocated. /// * `host_ptr` - a pointer to the image data that may already be allocated -/// by the application. +/// by the application. /// /// returns a Result containing the new `OpenCL` image object /// or the error code from the `OpenCL` C API function. @@ -184,8 +184,8 @@ pub unsafe fn create_image( /// /// * `context` - a valid `OpenCL` context. /// * `flags` - a bit-field used to specify allocation and usage information -/// about the image memory object being created, see: -/// [Memory Flags](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#memory-flags-table). +/// about the image memory object being created, see: +/// [Memory Flags](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#memory-flags-table). /// * `pipe_packet_size` - the size in bytes of a pipe packet. /// * `pipe_max_packets` -the maximum number of packets the pipe can hold. /// * `properties` - currently must be NULL. @@ -228,11 +228,11 @@ pub unsafe fn create_pipe( /// * `context` - a valid `OpenCL` context. /// * `properties` - an optional null terminated list of properties. /// * `flags` - a bit-field used to specify allocation and usage information -/// about the image memory object being created, see: -/// [Memory Flags](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#memory-flags-table). +/// about the image memory object being created, see: +/// [Memory Flags](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#memory-flags-table). /// * `size` - the size in bytes of the buffer memory object to be allocated. /// * `host_ptr` - a pointer to the buffer data that may already be allocated -/// by the application. +/// by the application. /// /// returns a Result containing the new `OpenCL` buffer object /// or the error code from the `OpenCL` C API function. @@ -266,14 +266,14 @@ pub unsafe fn create_buffer_with_properties( /// * `context` - a valid `OpenCL` context. /// * `properties` - an optional null terminated list of properties. /// * `flags` - a bit-field used to specify allocation and usage information -/// about the image memory object being created, see: -/// [Memory Flags](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#memory-flags-table). +/// about the image memory object being created, see: +/// [Memory Flags](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#memory-flags-table). /// * `image_format` - a pointer to a structure that describes format properties -/// of the image to be allocated. +/// of the image to be allocated. /// * `image_desc` - a pointer to a structure that describes type and dimensions -/// of the image to be allocated. +/// of the image to be allocated. /// * `host_ptr` - a pointer to the image data that may already be allocated -/// by the application. +/// by the application. /// /// returns a Result containing the new `OpenCL` image object /// or the error code from the `OpenCL` C API function. @@ -365,13 +365,14 @@ fn count_supported_image_formats( } /// Get the list of image formats supported by an `OpenCL` implementation for a -/// specified context, image type, and allocation information. +/// specified context, image type, and allocation information. +/// /// Calls `clGetSupportedImageFormats` to get the desired information about the program. /// /// * `context` - a valid `OpenCL` context on which the image object(s) will be created. /// * `flags` - a bit-field used to specify allocation and usage information -/// about the image memory object being created, see: -/// [Memory Flags](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#memory-flags-table). +/// about the image memory object being created, see: +/// [Memory Flags](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#memory-flags-table). /// * `image_type` - describes the image type. /// /// returns a Result containing the desired information in an `InfoType` enum @@ -416,7 +417,7 @@ pub fn get_mem_object_data(memobj: cl_mem, param_name: cl_mem_info) -> Result Result Result, /// /// * `pipe` - the `OpenCL` pipe object. /// * `param_name` - the type of pipe object information being queried, see: -/// [Pipe Object Queries](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#pipe-info-table). +/// [Pipe Object Queries](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#pipe-info-table). /// /// returns a Result containing the desired information in an `InfoType` enum /// or the error code from the `OpenCL` C API function. @@ -583,10 +584,10 @@ pub unsafe fn set_mem_object_destructor_callback( /// /// * `context` - a valid `OpenCL` context. /// * `flags` - a bit-field used to specify allocation and usage information, see: -/// [SVM Memory Flags](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#svm-flags-table). +/// [SVM Memory Flags](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#svm-flags-table). /// * `size` - the size in bytes of the SVM buffer to be allocated. /// * `alignment` - the minimum alignment in bytes that is required for the -/// newly created buffers memory region. +/// newly created buffers memory region. /// /// returns Result containing the address of the SVM buffer /// or the error code: `CL_INVALID_VALUE` if the address is NULL. diff --git a/src/platform.rs b/src/platform.rs index 7b8a735..ddcabe3 100644 --- a/src/platform.rs +++ b/src/platform.rs @@ -110,7 +110,7 @@ pub fn get_platform_data( /// ``` /// * `platform` - the `cl_platform_id` of the `OpenCL` platform. /// * `param_name` - the type of platform information being queried, see -/// [Platform Queries](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#platform-queries-table). +/// [Platform Queries](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#platform-queries-table). /// /// returns a Result containing the desired information in an `InfoType` enum /// or the error code from the `OpenCL` C API function. diff --git a/src/program.rs b/src/program.rs index e5c74de..a86fd3e 100644 --- a/src/program.rs +++ b/src/program.rs @@ -129,7 +129,8 @@ pub unsafe fn create_program_with_binary( } /// Create an `OpenCL` program object for a context and loads the information -/// related to the built-in kernels into that object. +/// related to the built-in kernels into that object. +/// /// Calls `clCreateProgramWithBuiltInKernels` to create an `OpenCL` program object. /// /// * `context` - a valid `OpenCL` context. @@ -280,7 +281,7 @@ pub fn build_program( /// * `options` - the compilation options in a null-terminated string. /// * `input_headers` - a slice of programs that describe headers in the `input_headers`. /// * `header_include_names` - an array that has a one to one correspondence with -/// `input_headers`. +/// `input_headers`. /// * `pfn_notify` - an optional function pointer to a notification routine. /// * `user_data` - passed as an argument when `pfn_notify` is called, or `ptr::null_mut()`. /// @@ -393,7 +394,7 @@ pub unsafe fn link_program( /// * `spec_id` - the specialization constant whose value will be set. /// * `spec_size` - size in bytes of the data pointed to by `spec_value`. /// * `spec_value` - pointer to the memory location that contains the value -/// of the specialization constant. +/// of the specialization constant. /// /// returns an empty Result or the error code from the `OpenCL` C API function. /// @@ -455,7 +456,7 @@ pub fn get_program_data( /// /// * `program` - the `OpenCL` program. /// * `param_name` - the type of program information being queried, see: -/// [Program Object Queries](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#program-info-table). +/// [Program Object Queries](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#program-info-table). /// /// returns a Result containing the desired information in an `InfoType` enum /// or the error code from the `OpenCL` C API function. @@ -559,7 +560,7 @@ pub fn get_program_build_data( /// * `program` - the `OpenCL` program. /// * `device` - -the device for which build information is being queried. /// * `param_name` - the type of program build information being queried, see: -/// [Program Build Queries](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#program-build-info-table). +/// [Program Build Queries](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#program-build-info-table). /// /// returns a Result containing the desired information in an `InfoType` enum /// or the error code from the `OpenCL` C API function. diff --git a/src/sampler.rs b/src/sampler.rs index 08cf925..a9d7cde 100644 --- a/src/sampler.rs +++ b/src/sampler.rs @@ -91,7 +91,7 @@ pub fn create_sampler( /// /// * `context` - a valid `OpenCL` context. /// * `sampler_properties` - an optional null terminated list of properties, see: -/// [Sampler Properties](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#sampler-properties-table). +/// [Sampler Properties](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#sampler-properties-table). /// /// returns a Result containing the new `OpenCL` `sampler` object /// or the error code from the `OpenCL` C API function. @@ -168,7 +168,7 @@ pub fn get_sampler_data( /// /// * `sampler` - the `OpenCL` sampler object. /// * `param_name` - the type of sampler information being queried, see: -/// [Sampler Object Queries](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#sampler-info-table). +/// [Sampler Object Queries](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#sampler-info-table). /// /// returns a Result containing the desired information in an `InfoType` enum /// or the error code from the `OpenCL` C API function.