# Struct ocl::Program [−] [src]

    pub struct Program(_);

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.

## Methods

### `impl Program`
[src]

#### `pub fn builder<'b>() -> ProgramBuilder<'b>`
[src]

Returns a new `ProgramBuilder`.

#### `pub fn with_source(
context: &ContextCore,
src_strings: &[CString],
devices: Option<&[Device]>,
cmplr_opts: &CString
) -> OclResult<Program>`
[src]

Returns a new program built from pre-created build components and device list.

Prefer `::builder` to create a new `Program`.

#### `pub fn with_binary(
context: &ContextCore,
devices: &[Device],
binaries: &[&[u8]],
cmplr_opts: &CString
) -> OclResult<Program>`
[src]

Returns a new program built from pre-created build components and device list.

Prefer `::builder` to create a new `Program`.

#### `pub fn as_core(&self) -> &ProgramCore`
[src]

Returns a reference to the core pointer wrapper, usable by functions in the `core` module.

#### `pub fn info(&self, info_kind: ProgramInfo) -> OclCoreResult<ProgramInfoResult>`
[src]

Returns info about this program.

#### `pub fn build_info(
&self,
device: Device,
info_kind: ProgramBuildInfo
) -> OclCoreResult<ProgramBuildInfoResult>`
[src]

Returns info about this program's build.

- TODO: Check that device is valid.

## Methods from Deref<Target = ProgramCore>

#### `pub fn as_ptr(&self) -> *mut c_void`
[src]

Returns a pointer, do not store it.

#### `pub fn devices(&self) -> Result<Vec<DeviceId>, Error>`
[src]

Returns the devices associated with this program.

## Trait Implementations

### `impl Clone for Program`
[src]

#### `fn clone(&self) -> Program`
[src]

Returns a copy of the value. Read more

#### `fn clone_from(&mut self, source: &Self)`
1.0.0
[src]

Performs copy-assignment from `source`. Read more

### `impl Debug for Program`
[src]

#### `fn fmt(&self, __arg_0: &mut Formatter) -> Result`
[src]

Formats the value using the given formatter. Read more

### `impl From<ProgramCore> for Program`
[src]

#### `fn from(core: ProgramCore) -> Program`
[src]

Performs the conversion.

### `impl Display for Program`
[src]

#### `fn fmt(&self, f: &mut Formatter) -> Result`
[src]

Formats the value using the given formatter. Read more

### `impl Deref for Program`
[src]

#### `type Target = ProgramCore`

The resulting type after dereferencing.

#### `fn deref(&self) -> &ProgramCore`
[src]

Dereferences the value.

### `impl DerefMut for Program`
[src]

#### `fn deref_mut(&mut self) -> &mut ProgramCore`
[src]

Mutably dereferences the value.

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)