Struct opencl3::memory::Sampler

source ·
pub struct Sampler { /* private fields */ }
Expand description

An OpenCL sampler.
Has methods to return information from calls to clGetSamplerInfo with the appropriate parameters.
Implements the Drop trait to call release_sampler when the object is dropped.

Implementations§

source§

impl Sampler

source

pub fn new(sampler: cl_sampler) -> Sampler

source

pub fn create( context: &Context, normalize_coords: cl_bool, addressing_mode: cl_addressing_mode, filter_mode: cl_filter_mode ) -> Result<Sampler>

👎Deprecated since 0.1.0: From CL_VERSION_2_0 use create_sampler_with_properties
source

pub fn create_with_properties( context: &Context, properties: *const cl_sampler_properties ) -> Result<Sampler>

source

pub fn get(&self) -> cl_sampler

source

pub fn reference_count(&self) -> Result<cl_uint>

source

pub fn context(&self) -> Result<cl_context>

source

pub fn normalized_coords(&self) -> Result<bool>

source

pub fn addressing_mode(&self) -> Result<cl_addressing_mode>

source

pub fn filter_mode(&self) -> Result<cl_filter_mode>

source

pub fn sampler_properties(&self) -> Result<Vec<intptr_t>>

source

pub fn get_data(&self, param_name: cl_sampler_info) -> Result<Vec<u8>>

Get data about an OpenCL sampler object. Calls clGetDeviceInfo to get the desired data about the sampler object.

Trait Implementations§

source§

impl Debug for Sampler

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for Sampler

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl From<Sampler> for cl_sampler

source§

fn from(value: Sampler) -> Self

Converts to this type from the input type.
source§

impl Send for Sampler

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.