[][src]Struct ocl_core::types::structs::ContextProperties

pub struct ContextProperties { /* fields omitted */ }

Context properties list.

[MINIMALLY TESTED]

TODO: Check for duplicate property assignments.

Methods

impl ContextProperties[src]

pub fn new() -> ContextProperties[src]

Returns an empty new list of context properties

pub fn platform<P: Into<PlatformId>>(self, platform: P) -> ContextProperties[src]

Specifies a platform (builder-style).

pub fn interop_user_sync(self, sync: bool) -> ContextProperties[src]

Specifies whether the user is responsible for synchronization between OpenCL and other APIs (builder-style).

pub fn gl_context(self, gl_ctx: *mut c_void) -> ContextProperties[src]

Specifies an OpenGL context handle (builder-style).

pub fn glx_display(self, glx_disp: *mut c_void) -> ContextProperties[src]

Specifies a Display pointer for the GLX context (builder-style).

pub fn wgl_hdc(self, wgl_hdc: *mut c_void) -> ContextProperties[src]

Specifies a Display pointer for the WGL HDC (builder-style).

pub fn cgl_sharegroup(self, gl_sharegroup: *mut c_void) -> ContextProperties[src]

Specifies an OpenGL context CGL share group to associate the OpenCL context with (builder-style).

pub fn egl_display(self, egl_disp: *mut c_void) -> ContextProperties[src]

Specifies a pointer for the EGL display (builder-style).

pub fn property_value(self, prop: ContextPropertyValue) -> ContextProperties[src]

Pushes a ContextPropertyValue onto this list of properties (builder-style).

pub fn set_platform<P: Into<PlatformId>>(&mut self, platform: P)[src]

Specifies a platform.

pub fn set_interop_user_sync(&mut self, sync: bool)[src]

Specifies whether the user is responsible for synchronization between OpenCL and other APIs.

pub fn set_gl_context(&mut self, gl_ctx: *mut c_void)[src]

Specifies an OpenGL context handle.

pub fn set_glx_display(&mut self, glx_disp: *mut c_void)[src]

Specifies a Display pointer for the GLX context.

pub fn set_wgl_hdc(&mut self, wgl_hdc: *mut c_void)[src]

Specifies a Display pointer for the WGL HDC.

pub fn set_cgl_sharegroup(&mut self, gl_sharegroup: *mut c_void)[src]

Specifies an OpenGL context CGL share group to associate the OpenCL context with.

pub fn set_egl_display(&mut self, egl_disp: *mut c_void)[src]

Specifies a pointer for the EGL display.

pub fn set_property_value(&mut self, prop: ContextPropertyValue)[src]

Pushes a ContextPropertyValue onto this list of properties.

pub fn get_platform(&self) -> Option<PlatformId>[src]

Returns a platform id or none.

pub fn contains_gl_context_or_sharegroup(&self) -> bool[src]

Returns true if this set of context properties specifies any OpenGL context or sharegroup to associate with.

pub fn to_raw(&self) -> Vec<isize>[src]

Converts this list into a packed-word representation as specified here.

pub unsafe fn extract_property_from_raw(
    property: ContextProperty,
    raw_context_properties: &[isize]
) -> Option<ContextPropertyValue>
[src]

Returns a single context property value.

pub unsafe fn from_raw(
    raw_context_properties: &[isize]
) -> OclCoreResult<ContextProperties>
[src]

Converts raw stuff into other stuff.

Trait Implementations

impl From<ContextProperties> for Vec<isize>[src]

impl Clone for ContextProperties[src]

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

Performs copy-assignment from source. Read more

impl Debug for ContextProperties[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]