Faiss

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | List of all members
faiss::gpu::KernelTimer Class Reference

Utility class for timing execution of a kernel. More...

`#include <Timer.h>`

## Public Member Functions
| KernelTimer (cudaStream_t stream=0)
| ~KernelTimer ()
| Destructor releases event resources.
float | elapsedMilliseconds ()

## Detailed Description

Utility class for timing execution of a kernel.

Definition at line 19 of file Timer.h.

## Constructor & Destructor Documentation

faiss::gpu::KernelTimer::KernelTimer | ( | cudaStream_t | stream = `0` | ) |

Constructor starts the timer and adds an event into the current device stream

Definition at line 17 of file Timer.cpp.

## Member Function Documentation

float faiss::gpu::KernelTimer::elapsedMilliseconds | ( |  | ) |

Adds a stop event then synchronizes on the stop event to get the actual GPU-side kernel timings for any kernels launched in the current stream. Returns the number of milliseconds elapsed. Can only be called once.

Definition at line 34 of file Timer.cpp.

The documentation for this class was generated from the following files:

- /data/users/matthijs/github_faiss/faiss/gpu/utils/Timer.h
- /data/users/matthijs/github_faiss/faiss/gpu/utils/Timer.cpp