Struct blaze_rs::core::RawProgram
source · #[repr(transparent)]pub struct RawProgram(_);Expand description
OpenCL program
Implementations§
source§impl RawProgram
impl RawProgram
pub fn from_source( source: impl AsRef<str>, options: Option<&str> ) -> Result<(Self, Box<[RawKernel]>)>
pub fn from_binary(source: &[u8]) -> Result<(Self, Box<[RawKernel]>)>
pub fn from_il( source: &[u8], options: Option<&str> ) -> Result<(Self, Box<[RawKernel]>)>
cl2_1 only.pub fn from_source_in<C: Context>( ctx: &C, source: impl AsRef<str>, options: Option<&str> ) -> Result<(Self, Box<[RawKernel]>)>
pub fn from_binary_in<C: Context>( ctx: &C, source: &[u8] ) -> Result<(Self, Box<[RawKernel]>)>
pub fn from_il_in<C: Context>( ctx: &C, source: &[u8], options: Option<&str> ) -> Result<(Self, Box<[RawKernel]>)>
cl2_1 only.pub const fn id(&self) -> cl_kernel
pub const unsafe fn from_id(id: cl_program) -> Option<Self>
pub const unsafe fn from_id_unchecked(id: cl_program) -> Self
pub unsafe fn retain(&self) -> Result<()>
sourcepub fn link<'a>(
input: &[RawProgram],
devices: Option<&[RawDevice]>,
options: impl Into<Option<&'a str>>
) -> Result<Self>
Available on crate feature cl2 only.
pub fn link<'a>( input: &[RawProgram], devices: Option<&[RawDevice]>, options: impl Into<Option<&'a str>> ) -> Result<Self>
cl2 only.Links a set of compiled program objects and libraries for all the devices or a specific device(s) in the OpenCL context and creates an executable.
sourcepub fn link_in<'a>(
ctx: &RawContext,
input: &[RawProgram],
devices: Option<&[RawDevice]>,
options: impl Into<Option<&'a str>>
) -> Result<Self>
Available on crate feature cl2 only.
pub fn link_in<'a>( ctx: &RawContext, input: &[RawProgram], devices: Option<&[RawDevice]>, options: impl Into<Option<&'a str>> ) -> Result<Self>
cl2 only.Links a set of compiled program objects and libraries for all the devices or a specific device(s) in the OpenCL context and creates an executable.
sourcepub fn reference_count(&self) -> Result<u32>
pub fn reference_count(&self) -> Result<u32>
Return the program reference count.
sourcepub fn context(&self) -> Result<RawContext>
pub fn context(&self) -> Result<RawContext>
Return the context specified when the program object is created
sourcepub fn device_count(&self) -> Result<u32>
pub fn device_count(&self) -> Result<u32>
Return the number of devices associated with program.
sourcepub fn devices(&self) -> Result<Vec<RawDevice>>
pub fn devices(&self) -> Result<Vec<RawDevice>>
Return the list of devices associated with the program object. This can be the devices associated with context on which the program object has been created or can be a subset of devices that are specified when a progam object is created using clCreateProgramWithBinary.
sourcepub fn binary_sizes(&self) -> Result<Vec<Option<NonZeroUsize>>>
pub fn binary_sizes(&self) -> Result<Vec<Option<NonZeroUsize>>>
Returns an array that contains the size in bytes of the program binary for each device associated with program. The size of the array is the number of devices associated with program. If a binary is not available for a device(s), a size of zero is returned.
pub fn binaries(&self) -> Result<Vec<Option<Vec<u8>>>>
Trait Implementations§
source§impl Clone for RawProgram
impl Clone for RawProgram
source§impl Debug for RawProgram
impl Debug for RawProgram
source§impl Drop for RawProgram
impl Drop for RawProgram
source§impl Hash for RawProgram
impl Hash for RawProgram
source§impl PartialEq<RawProgram> for RawProgram
impl PartialEq<RawProgram> for RawProgram
source§fn eq(&self, other: &RawProgram) -> bool
fn eq(&self, other: &RawProgram) -> bool
self and other values to be equal, and is used
by ==.