# Struct ocl_core::types::abs::Context [−] [src]

    #[repr(C)]
    pub struct Context(_);

cl_context

## Methods

### `impl Context`
[src]

#### `pub unsafe fn from_raw_create_ptr(ptr: cl_context) -> Context`
[src]

Only call this when passing the original newly created pointer directly from `clCreate...`. Do not use this to clone or copy.

#### `pub unsafe fn from_raw_copied_ptr(ptr: cl_context) -> Context`
[src]

Only call this when passing a copied pointer such as from an `clGet*****Info` function.

#### `pub fn as_ptr(&self) -> cl_context`
[src]

Returns a pointer, do not store it.

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

Returns the devices associated with this context.

#### `pub fn platform(&self) -> OclCoreResult<Option<PlatformId>>`
[src]

Returns the platform associated with this context, if any.

Errors upon the usual OpenCL errors.

Returns `None` if the context properties do not specify a platform.

## Trait Implementations

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

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

Formats the value using the given formatter. Read more

### `impl Sync for Context`
[src]

### `impl Send for Context`
[src]

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

#### `fn clone(&self) -> Context`
[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 Drop for Context`
[src]

#### `fn drop(&mut self)`
[src]

Panics in the event of an error of type `Error::Status` except when the status code is `CL_INVALID_CONTEXT` (which is ignored).

This is done because certain platforms error with `CL_INVALID_CONTEXT` for unknown reasons and as far as we know can be safely ignored.

### `impl PartialEq<Context> for Context`
[src]

#### `fn eq(&self, other: &Context) -> bool`
[src]

This method tests for `self` and `other` values to be equal, and is used by `==`. Read more

#### `fn ne(&self, other: &Rhs) -> bool`
1.0.0
[src]

This method tests for `!=`.

### `impl<'a> ClContextPtr for &'a Context`
[src]

#### `fn as_ptr(&self) -> cl_context`
[src]

### `impl ClVersions for Context`
[src]

#### `fn device_versions(&self) -> OclCoreResult<Vec<OpenclVersion>>`
[src]

#### `fn platform_version(&self) -> OclCoreResult<OpenclVersion>`
[src]

#### `fn verify_device_versions(
&self,
required_version: [u16; 2]
) -> OclCoreResult<()>`
[src]

#### `fn verify_platform_version(
&self,
required_version: [u16; 2]
) -> OclCoreResult<()>`
[src]

### `impl<'a> ClVersions for &'a Context`
[src]

#### `fn device_versions(&self) -> OclCoreResult<Vec<OpenclVersion>>`
[src]

#### `fn platform_version(&self) -> OclCoreResult<OpenclVersion>`
[src]

#### `fn verify_device_versions(
&self,
required_version: [u16; 2]
) -> OclCoreResult<()>`
[src]

#### `fn verify_platform_version(
&self,
required_version: [u16; 2]
) -> OclCoreResult<()>`
[src]

# 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`)