stream_ordered_timing.hpp
1 
5 #pragma once
6 
7 #include <memory>
8 #include <optional>
9 #include <string>
10 
11 #include <rapidsmpf/statistics.hpp>
12 
13 namespace rapidsmpf {
14 
33  public:
44  rmm::cuda_stream_view stream, std::shared_ptr<Statistics> statistics
45  );
46 
70  std::string const& name,
71  std::optional<std::string> stream_delay_name = std::nullopt
72  );
73 
88  static void cancel_inflight_timings(Statistics const* statistics);
89 
90  private:
91  std::uintptr_t uid_{0};
92  rmm::cuda_stream_view stream_;
93  std::shared_ptr<Statistics> statistics_;
94 };
95 
96 } // namespace rapidsmpf
Tracks statistics across rapidsmpf operations.
Definition: statistics.hpp:62
Stream-ordered wall-clock timer that records its result into Statistics.
void stop_and_record(std::string const &name, std::optional< std::string > stream_delay_name=std::nullopt)
Marks the stop position in the stream and schedules recording of the duration.
static void cancel_inflight_timings(Statistics const *statistics)
Cancel all in-flight timings associated with a Statistics object.
StreamOrderedTiming(rmm::cuda_stream_view stream, std::shared_ptr< Statistics > statistics)
Constructs a StreamOrderedTiming and marks the start position in the stream.
RAPIDS Multi-Processor interfaces.
Definition: backend.hpp:13