[−][src]Struct open_cl_low_level::program::ClProgram
Methods
impl ClProgram
[src]
pub unsafe fn create_with_source(
context: &ClContext,
src: &str
) -> Output<ClProgram>
[src]
context: &ClContext,
src: &str
) -> Output<ClProgram>
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]
context: &ClContext,
device: &ClDeviceID,
bin: &[u8]
) -> Output<ClProgram>
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]
D: DevicePtr,
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]
unsafe fn program_ptr(&self) -> cl_program
[src]
fn reference_count(&self) -> Output<u32>
[src]
fn num_devices(&self) -> Output<usize>
[src]
fn source(&self) -> Output<String>
[src]
fn binary_sizes(&self) -> Output<Vec<usize>>
[src]
fn binaries(&self) -> Output<Vec<u8>>
[src]
fn num_kernels(&self) -> Output<usize>
[src]
fn kernel_names(&self) -> Output<Vec<String>>
[src]
fn devices(&self) -> Output<Vec<ClDeviceID>>
[src]
fn context(&self) -> Output<ClContext>
[src]
Auto Trait Implementations
impl RefUnwindSafe for ClProgram
impl !Send for ClProgram
impl !Sync for ClProgram
impl Unpin for ClProgram
impl UnwindSafe for ClProgram
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,