Struct blaze_rs::context::ContextProperties
source · #[non_exhaustive]pub struct ContextProperties {
pub platform: Option<RawPlatform>,
pub interop_user_sync: bool,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.platform: Option<RawPlatform>Specifies the platform to use.
interop_user_sync: boolAvailable on crate feature
cl1_2 only.Specifies whether the user is responsible for synchronization between OpenCL and other APIs. Please refer to the specific sections in the OpenCL Extension Specification that describe sharing with other APIs for restrictions on using this flag. If not specified, a default of false is assumed.
Implementations§
source§impl ContextProperties
impl ContextProperties
pub fn new( platform: impl Into<Option<RawPlatform>>, interop_user_sync: bool ) -> Self
pub const fn const_new( platform: Option<RawPlatform>, interop_user_sync: bool ) -> Self
pub fn to_bits(&self) -> Option<[cl_context_properties; 5]>
pub fn from_bits(bits: &[cl_context_properties]) -> Self
Trait Implementations§
source§impl Clone for ContextProperties
impl Clone for ContextProperties
source§fn clone(&self) -> ContextProperties
fn clone(&self) -> ContextProperties
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ContextProperties
impl Debug for ContextProperties
source§impl Default for ContextProperties
impl Default for ContextProperties
source§impl From<Option<RawPlatform>> for ContextProperties
impl From<Option<RawPlatform>> for ContextProperties
source§fn from(platform: Option<RawPlatform>) -> Self
fn from(platform: Option<RawPlatform>) -> Self
Converts to this type from the input type.
source§impl From<RawPlatform> for ContextProperties
impl From<RawPlatform> for ContextProperties
source§fn from(v: RawPlatform) -> Self
fn from(v: RawPlatform) -> Self
Converts to this type from the input type.
source§impl Hash for ContextProperties
impl Hash for ContextProperties
source§impl PartialEq<ContextProperties> for ContextProperties
impl PartialEq<ContextProperties> for ContextProperties
source§fn eq(&self, other: &ContextProperties) -> bool
fn eq(&self, other: &ContextProperties) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for ContextProperties
impl StructuralEq for ContextProperties
impl StructuralPartialEq for ContextProperties
Auto Trait Implementations§
impl RefUnwindSafe for ContextProperties
impl Send for ContextProperties
impl Sync for ContextProperties
impl Unpin for ContextProperties
impl UnwindSafe for ContextProperties
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