pub struct CounterHeap(/* private fields */);Expand description
A heap for GPU performance counters.
C++ equivalent: MTL4::CounterHeap
CounterHeap provides storage for GPU performance counters and timestamps.
Implementations§
Source§impl CounterHeap
impl CounterHeap
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Create a CounterHeap from a raw pointer.
Sourcepub fn set_label(&self, label: &str)
pub fn set_label(&self, label: &str)
Set the label.
C++ equivalent: void setLabel(const NS::String*)
Sourcepub fn heap_type(&self) -> CounterHeapType
pub fn heap_type(&self) -> CounterHeapType
Get the counter heap type.
C++ equivalent: CounterHeapType type() const
Sourcepub fn count(&self) -> UInteger
pub fn count(&self) -> UInteger
Get the counter count.
C++ equivalent: NS::UInteger count() const
Sourcepub fn invalidate_counter_range(&self, location: UInteger, length: UInteger)
pub fn invalidate_counter_range(&self, location: UInteger, length: UInteger)
Invalidate a range of counters.
C++ equivalent: void invalidateCounterRange(NS::Range)
Sourcepub fn resolve_counter_range_raw(
&self,
location: UInteger,
length: UInteger,
) -> *mut c_void
pub fn resolve_counter_range_raw( &self, location: UInteger, length: UInteger, ) -> *mut c_void
Resolve a range of counters and return the data.
C++ equivalent: NS::Data* resolveCounterRange(NS::Range)
Returns the raw data pointer. Caller is responsible for interpreting the data based on the counter heap type.
Trait Implementations§
Source§impl Clone for CounterHeap
impl Clone for CounterHeap
Source§impl Debug for CounterHeap
impl Debug for CounterHeap
Source§impl Drop for CounterHeap
impl Drop for CounterHeap
Source§impl Referencing for CounterHeap
impl Referencing for CounterHeap
Source§fn as_mut_ptr(&self) -> *mut c_void
fn as_mut_ptr(&self) -> *mut c_void
Get the raw mutable pointer to the Objective-C object.
Source§fn retain(&self) -> Selfwhere
Self: Clone,
fn retain(&self) -> Selfwhere
Self: Clone,
Retain the object, incrementing its reference count. Read more
Source§fn autorelease(&self) -> Selfwhere
Self: Clone,
fn autorelease(&self) -> Selfwhere
Self: Clone,
Autorelease the object. Read more
Source§fn retain_count(&self) -> usize
fn retain_count(&self) -> usize
Get the retain count of the object. Read more
impl Send for CounterHeap
impl Sync for CounterHeap
Auto Trait Implementations§
impl Freeze for CounterHeap
impl RefUnwindSafe for CounterHeap
impl Unpin for CounterHeap
impl UnwindSafe for CounterHeap
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