Expand description
A safe rust FFI binding for the NVIDIA® Tools Extension SDK (NVTX). NVTX API doxygen documentation by NVIDIA® can be found here.
§Examples
use nvtx::{range_pop, range_push};
range_push!("Hello World!");
// <-- Expensive algorithm here
range_pop!();
use nvtx::range;
let range = range!("Hello World!");
// <-- Expensive algorithm here
drop(range);
use nvtx::{mark};
mark!("Operation A");
// <-- Expensive algorithm here
mark!("Operation B");
// <-- Expensive algorithm here
use std::thread;
use nvtx::{name_thread};
name_thread!("Thread 1");
let handler = thread::spawn(|| {
name_thread!("Thread 2");
});
handler.join().unwrap();
Macros§
- mark
- Marks an instantaneous event in the application.
- name_
thread - Annotate an OS thread with a name.
- range
- Starts a range, returning a guard that will end the range when it is dropped.
- range_
end - Ends a range that can occur on a different thread than the start.
- range_
pop - Ends a nested thread range.
- range_
push - Starts a nested thread range.
- range_
start - Starts a range that can occur on a different thread than the end.
Structs§
- Range
Guard - A guard object representing an open NVTX range. Construct it using the
range!
macro. When it goes out of scope it will callrange_end!
.