MCPcopy Create free account
hub / github.com/Rust-GPU/rust-cuda / info

Method info

examples/cuda/cpu/path_tracer/src/cuda/mod.rs:79–88  ·  view source on GitHub ↗
(&self, ui: &Ui)

Source from the content-addressed store, hash-verified

77 }
78
79 pub fn info(&self, ui: &Ui) {
80 let device = Device::get_device(0).expect("Failed to retrieve device");
81 let name = device.name().unwrap();
82 let mem = device.total_memory().unwrap();
83
84 let group = ui.begin_group();
85 ui.text(format!("CUDA Device: {}", name));
86 ui.text(format!("Total VRAM: {}mb", mem / 1_000_000));
87 group.end();
88 }
89
90 /// Update the camera of the renderer and reset any accumulated buffers.
91 pub fn update_camera(&mut self, camera: &Camera) -> CudaResult<()> {

Callers

nothing calls this directly

Calls 3

total_memoryMethod · 0.80
expectMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected