Module blaze_rs::core

source ·
Expand description

Raw types

In Blaze, the raw types are used to represent an underlying OpenCL objects plainly. They offer no extra functionality and have the following signature.

#[repr(transparent)]
pub struct RawType (NonNull<c_void>);

Raw types implement Drop and, since they’re reference counted by OpenCL itself, they also implement Clone.

Currently, this are the existing raw types:

NameOpenCL typeOpenCL Version
RawPlatformcl_platform_idAll
RawDevicecl_device_idAll
RawContextcl_contextAll
RawCommandQueuecl_command_queueAll
RawProgramcl_programAll
RawKernelcl_kernelAll
RawEventcl_eventAll
RawMemObjectcl_memAll
RawBuffercl_memAll
RawPipecl_mem2.0 or higher

Note that since raw types are transparent wrappers of NonNull<c_void>, RawType and Option<RawType> have the same size, alongside other optimizations of NonNull performed by the compiler.

Re-exports

Modules

Structs

Enums

Type Definitions