[][src]Struct open_cl_low_level::program::ClProgram

pub struct ClProgram { /* fields omitted */ }

Methods

impl ClProgram[src]

pub unsafe fn create_with_source(
    context: &ClContext,
    src: &str
) -> Output<ClProgram>
[src]

Creates a new ClProgram on the context and device with the given OpenCL source code.

Safety

The provided ClContext and ClDeviceID must be in valid state or else undefined behavior is expected.

pub unsafe fn create_with_binary(
    context: &ClContext,
    device: &ClDeviceID,
    bin: &[u8]
) -> Output<ClProgram>
[src]

Creates a new ClProgram on the context and device with the given executable binary.

Safety

The provided ClContext and ClDeviceID must be in valid state or else undefined behavior is expected.

pub unsafe fn unchecked_new(program: cl_program) -> ClProgram[src]

Returns a new ClProgram, but does not check for null pointer.

Safety

Due to the lack of a null pointer check this function can lead to undefined behavior; dropping the new ClProgram will attempt to release a null pointer cl_program inside OpenCL. KABOOM.

pub unsafe fn new(prog: cl_program) -> Output<ClProgram>[src]

Wraps a raw cl_program pointer into a ClProgram.

Safety

This function should only be used for cl_program pointers that are already retained (like from clCreateProgramWithSource). When a ClProgram drops "release" is called on the cl_program which decrements the cl_program's OpenCL atomic reference count.

pub unsafe fn retain_new(prog: cl_program) -> Output<ClProgram>[src]

Retains and wraps a raw cl_program pointer into a ClProgram.

Safety

This function increments the OpenCL reference count of the given cl_program. This function should only be used on cl_program objects that are obtained from the OpenCL FFI that were not created, but retrieved through the info functions of other OpenCL objects.

pub fn build<D>(&mut self, devices: &[D]) -> Output<()> where
    D: DevicePtr
[src]

pub fn get_log<D: DevicePtr>(&self, device: &D) -> Output<String>[src]

Trait Implementations

impl Clone for ClProgram[src]

impl Debug for ClProgram[src]

impl Drop for ClProgram[src]

impl Eq for ClProgram[src]

impl PartialEq<ClProgram> for ClProgram[src]

impl ProgramPtr for ClProgram[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.