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 | Protected Member Functions | Friends | List of all members
faiss::gpu::DeviceMemory Class Referenceabstract

Manages temporary memory allocations on a GPU device. More...

`#include <DeviceMemory.h>`

Inheritance diagram for faiss::gpu::DeviceMemory:

## Public Member Functions
virtual int | getDevice () const =0
| Returns the device we are managing memory for.
virtual DeviceMemoryReservation | getMemory (cudaStream_t stream, size_t size)=0
virtual size_t | getSizeAvailable () const =0
| Returns the current size available without calling cudaMalloc.
virtual std::string | toString () const =0
| Returns a string containing our current memory manager state.
virtual size_t | getHighWaterCudaMalloc () const =0

## Protected Member Functions
virtual void | returnAllocation (DeviceMemoryReservation &m)=0

## Friends
class | DeviceMemoryReservation

## Detailed Description

Manages temporary memory allocations on a GPU device.

Definition at line 47 of file DeviceMemory.h.

## Member Function Documentation

virtual size_t faiss::gpu::DeviceMemory::getHighWaterCudaMalloc | ( |  | ) | const
| pure virtual

Returns the high-water mark of cudaMalloc allocations for our device

Implemented in faiss::gpu::StackDeviceMemory.

virtual DeviceMemoryReservation faiss::gpu::DeviceMemory::getMemory | ( | cudaStream_t | stream,
|  | size_t | size
| ) |  |
| pure virtual

Obtains a temporary memory allocation for our device, whose usage is ordered with respect to the given stream.

Implemented in faiss::gpu::StackDeviceMemory.

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

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