pub struct Program(/* private fields */);
Expand description
A program from which kernels can be created from.
To use with multiple devices, create manually with ::from_parts()
.
§Destruction
Handled automatically. Feel free to store, clone, and share among threads as you please.
Implementations§
source§impl Program
impl Program
sourcepub fn builder<'b>() -> ProgramBuilder<'b>
pub fn builder<'b>() -> ProgramBuilder<'b>
Returns a new ProgramBuilder
.
sourcepub fn with_source(
context: &ContextCore,
src_strings: &[CString],
devices: Option<&[Device]>,
cmplr_opts: &CString
) -> OclResult<Program>
pub fn with_source( context: &ContextCore, src_strings: &[CString], devices: Option<&[Device]>, cmplr_opts: &CString ) -> OclResult<Program>
Returns a new program built from pre-created build components and device list.
Prefer ::builder
to create a new Program
.
sourcepub fn with_binary(
context: &ContextCore,
devices: &[Device],
binaries: &[&[u8]],
cmplr_opts: &CString
) -> OclResult<Program>
pub fn with_binary( context: &ContextCore, devices: &[Device], binaries: &[&[u8]], cmplr_opts: &CString ) -> OclResult<Program>
Returns a new program built from pre-created build components and device list.
Prefer ::builder
to create a new Program
.
sourcepub fn as_core(&self) -> &ProgramCore
pub fn as_core(&self) -> &ProgramCore
Returns a reference to the core pointer wrapper, usable by functions in
the core
module.
sourcepub fn info(&self, info_kind: ProgramInfo) -> OclCoreResult<ProgramInfoResult>
pub fn info(&self, info_kind: ProgramInfo) -> OclCoreResult<ProgramInfoResult>
Returns info about this program.
sourcepub fn build_info(
&self,
device: Device,
info_kind: ProgramBuildInfo
) -> OclCoreResult<ProgramBuildInfoResult>
pub fn build_info( &self, device: Device, info_kind: ProgramBuildInfo ) -> OclCoreResult<ProgramBuildInfoResult>
Returns info about this program’s build.
- TODO: Check that device is valid.
Methods from Deref<Target = ProgramCore>§
Trait Implementations§
source§impl DerefMut for Program
impl DerefMut for Program
source§fn deref_mut(&mut self) -> &mut ProgramCore
fn deref_mut(&mut self) -> &mut ProgramCore
Mutably dereferences the value.
Auto Trait Implementations§
impl Freeze for Program
impl RefUnwindSafe for Program
impl Send for Program
impl Sync for Program
impl Unpin for Program
impl UnwindSafe for Program
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more