Crate ocl

Source
Expand description

§ | GitHub

Rust implementation of the OpenCL™ API.

Some versions of this documentation are built from development branches and may differ slightly between what is on crates.io and the master branch. See the repo page for links to both versions.

Please report unclear documentation or places where examples would be appreciated by filing an issue.

§Foundations

For lower level interfaces and to use OpenCL features that have not yet been implemented on the standard (high-level) interface types, see the ocl-core and cl-sys crates.

§Help Wanted

Please request or help complete any functionality you may need by filing an issue or creating a pull request.

Keep an eye out for places where examples would be useful and let us know!

§Feedback appreciated

Suggestions and nitpicks are most welcome. Don’t hesitate to file an issue just to offer constructive criticism.


*“`OpenCL` and the `OpenCL` logo are trademarks of Apple Inc. used by permission by Khronos.”*

Re-exports§

pub extern crate ocl_core;
pub use self::async::FutureMemMap;
pub use self::async::FutureReadGuard;
pub use self::async::FutureWriteGuard;
pub use self::async::MemMap;
pub use self::async::ReadGuard;
pub use self::async::RwVec;
pub use self::async::WriteGuard;
pub use crate::core::ffi;
pub use crate::core::util;
pub use crate::core::CommandQueueProperties;
pub use crate::core::DeviceType;
pub use crate::core::MapFlags;
pub use crate::core::MemFlags;
pub use crate::core::OclPrm;
pub use crate::core::OclScl;
pub use crate::core::OclVec;
pub use crate::error::Error;
pub use crate::error::Result;
pub use ocl_core as core;

Modules§

async
Types related to futures and asynchrony.
builders
Builders and associated settings-related types.
enums
Enumerators for settings and information requests.
error
Standard error type for ocl futures.
flags
Bitflags for various parameter types.
prm
OpenCL scalar and vector primitive types.
traits
Commonly used traits.

Structs§

Buffer
A chunk of memory physically located on a device, such as a GPU.
Context
A context for a particular platform and set of device types.
Device
An individual device identifier (an OpenCL device_id).
Event
An event representing a command or user created event.
EventArray
A list of events for coordinating enqueued commands.
EventList
A list of events for coordinating enqueued commands.
Extensions
Extensions of a platform.
Image
A section of device memory which represents one or many images.
Kernel
A kernel which represents a ‘procedure’.
Platform
A platform identifier.
ProQue
An all-in-one chimera of the Program, Queue, Context and (optionally) SpatialDims types.
Program
A program from which kernels can be created from.
Queue
A command queue which manages all actions taken on kernels, buffers, and images.
Sampler
An image sampler used to process images.

Enums§

BufferCmdError
A buffer command error.
OclCoreError
An enum one of several error types.
SpatialDims
Specifies a size or offset in up to three dimensions.