pub struct GpuProfiler {
pub enable_profiling: bool,
pub kernel_times: Vec<(String, f64)>,
pub memory_usage: Vec<(String, usize)>,
pub transfer_times: Vec<(String, f64)>,
}Expand description
GPU performance profiler GpuProfiler
Fields§
§enable_profiling: boolenable_profiling
kernel_times: Vec<(String, f64)>kernel_times
memory_usage: Vec<(String, usize)>memory_usage
transfer_times: Vec<(String, f64)>transfer_times
Implementations§
Source§impl GpuProfiler
impl GpuProfiler
pub fn new() -> Self
pub fn enable(self) -> Self
pub fn record_kernel_time(&mut self, kernel_name: &str, time_ms: f64)
pub fn record_memory_usage(&mut self, operation: &str, bytes: usize)
pub fn record_transfer_time(&mut self, operation: &str, time_ms: f64)
pub fn get_summary(&self) -> String
Trait Implementations§
Source§impl Clone for GpuProfiler
impl Clone for GpuProfiler
Source§fn clone(&self) -> GpuProfiler
fn clone(&self) -> GpuProfiler
Returns a duplicate 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 GpuProfiler
impl Debug for GpuProfiler
Source§impl Default for GpuProfiler
impl Default for GpuProfiler
Source§impl<'de> Deserialize<'de> for GpuProfiler
impl<'de> Deserialize<'de> for GpuProfiler
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GpuProfiler
impl RefUnwindSafe for GpuProfiler
impl Send for GpuProfiler
impl Sync for GpuProfiler
impl Unpin for GpuProfiler
impl UnwindSafe for GpuProfiler
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more