Trait RetainRelease

Source
pub trait RetainRelease: ClObject {
    // Required methods
    unsafe fn retain(&self);
    unsafe fn release(&mut self);
}

Required Methods§

Source

unsafe fn retain(&self)

Retains (increments the reference count of) the ClObject.

§Safety

Balancing the release and retain reference count of a ClObject must be done with care. Improper usage of release and retain can lead to undefined behavior.

Usage of an invalid ClObject is undefined behavior.

Source

unsafe fn release(&mut self)

Releases (decrements reference count of) the ClObject

§Safety

Balancing the release and retain reference count of a ClObject must be done with care. Improper usage of release and retain can lead to undefined behavior.

Usage of an invalid ClObject is undefined behavior.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl RetainRelease for cl_command_queue

Source§

unsafe fn retain(&self)

This function is used to increase the atomic reference count of the associated OpenCL ARC object. This function should only be used when the OpenCL interface returns a ARC object that is not reference counted by OpenCL (yes, OpenCL let’s you do that…)

§Safety

This function atomically decrements the OpenCL reference count. Mismanagement of an object’s OpenCL ARC can lead to undefined behavior.

Source§

unsafe fn release(&mut self)

This function is used to decrease the OpenCL atomic reference count of the associated OpenCL ARC object.

§Safety

This function atomically decrements the OpenCL reference count. Mismanagement of an object’s OpenCL ARC can lead to undefined behavior.

Source§

impl RetainRelease for cl_context

Source§

unsafe fn retain(&self)

This function is used to increase the atomic reference count of the associated OpenCL ARC object. This function should only be used when the OpenCL interface returns a ARC object that is not reference counted by OpenCL (yes, OpenCL let’s you do that…)

§Safety

This function atomically decrements the OpenCL reference count. Mismanagement of an object’s OpenCL ARC can lead to undefined behavior.

Source§

unsafe fn release(&mut self)

This function is used to decrease the OpenCL atomic reference count of the associated OpenCL ARC object.

§Safety

This function atomically decrements the OpenCL reference count. Mismanagement of an object’s OpenCL ARC can lead to undefined behavior.

Source§

impl RetainRelease for cl_device_id

Source§

unsafe fn retain(&self)

This function is used to increase the atomic reference count of the associated OpenCL ARC object. This function should only be used when the OpenCL interface returns a ARC object that is not reference counted by OpenCL (yes, OpenCL let’s you do that…)

§Safety

This function atomically decrements the OpenCL reference count. Mismanagement of an object’s OpenCL ARC can lead to undefined behavior.

Source§

unsafe fn release(&mut self)

This function is used to decrease the OpenCL atomic reference count of the associated OpenCL ARC object.

§Safety

This function atomically decrements the OpenCL reference count. Mismanagement of an object’s OpenCL ARC can lead to undefined behavior.

Source§

impl RetainRelease for cl_event

Source§

unsafe fn retain(&self)

This function is used to increase the atomic reference count of the associated OpenCL ARC object. This function should only be used when the OpenCL interface returns a ARC object that is not reference counted by OpenCL (yes, OpenCL let’s you do that…)

§Safety

This function atomically decrements the OpenCL reference count. Mismanagement of an object’s OpenCL ARC can lead to undefined behavior.

Source§

unsafe fn release(&mut self)

This function is used to decrease the OpenCL atomic reference count of the associated OpenCL ARC object.

§Safety

This function atomically decrements the OpenCL reference count. Mismanagement of an object’s OpenCL ARC can lead to undefined behavior.

Source§

impl RetainRelease for cl_kernel

Source§

unsafe fn retain(&self)

This function is used to increase the atomic reference count of the associated OpenCL ARC object. This function should only be used when the OpenCL interface returns a ARC object that is not reference counted by OpenCL (yes, OpenCL let’s you do that…)

§Safety

This function atomically decrements the OpenCL reference count. Mismanagement of an object’s OpenCL ARC can lead to undefined behavior.

Source§

unsafe fn release(&mut self)

This function is used to decrease the OpenCL atomic reference count of the associated OpenCL ARC object.

§Safety

This function atomically decrements the OpenCL reference count. Mismanagement of an object’s OpenCL ARC can lead to undefined behavior.

Source§

impl RetainRelease for cl_mem

Source§

unsafe fn retain(&self)

This function is used to increase the atomic reference count of the associated OpenCL ARC object. This function should only be used when the OpenCL interface returns a ARC object that is not reference counted by OpenCL (yes, OpenCL let’s you do that…)

§Safety

This function atomically decrements the OpenCL reference count. Mismanagement of an object’s OpenCL ARC can lead to undefined behavior.

Source§

unsafe fn release(&mut self)

This function is used to decrease the OpenCL atomic reference count of the associated OpenCL ARC object.

§Safety

This function atomically decrements the OpenCL reference count. Mismanagement of an object’s OpenCL ARC can lead to undefined behavior.

Source§

impl RetainRelease for cl_platform_id

Source§

unsafe fn release(&mut self)

Source§

unsafe fn retain(&self)

Source§

impl RetainRelease for cl_program

Source§

unsafe fn retain(&self)

This function is used to increase the atomic reference count of the associated OpenCL ARC object. This function should only be used when the OpenCL interface returns a ARC object that is not reference counted by OpenCL (yes, OpenCL let’s you do that…)

§Safety

This function atomically decrements the OpenCL reference count. Mismanagement of an object’s OpenCL ARC can lead to undefined behavior.

Source§

unsafe fn release(&mut self)

This function is used to decrease the OpenCL atomic reference count of the associated OpenCL ARC object.

§Safety

This function atomically decrements the OpenCL reference count. Mismanagement of an object’s OpenCL ARC can lead to undefined behavior.

Implementors§