Functions | |
std::pair< std::chrono::microseconds, std::chrono::microseconds > | memcpyBenchmark (std::size_t nBytes) |
Measure the time taken to perform memory copy operations between host and device memory. | |
std::pair< std::chrono::microseconds, std::chrono::microseconds > RooFit::Detail::CudaHelpers::memcpyBenchmark | ( | std::size_t | nBytes | ) |
Measure the time taken to perform memory copy operations between host and device memory.
nBytes | The number of bytes to be copied between host and device memory. |
This function measures the time taken to copy data between host and device memory using the CUDA API. It performs a series of copy operations and calculates the average time for both directions. The input parameter nBytes
specifies the size of the data to be copied in bytes. The function returns a pair of durations, where the first duration represents the average time taken for host-to-device copies and the second duration represents the average time taken for device-to-host copies.
Example usage:
Definition at line 37 of file CudaHelpers.cxx.