Struct faiss::gpu::AllocRequestΒΆ

struct AllocRequest : public faiss::gpu::AllocInfo

Information on what/where an allocation is, along with how big it should be.

Public Functions

inline AllocRequest()
inline AllocRequest(const AllocInfo &info, size_t sz)
inline AllocRequest(AllocType at, int dev, MemorySpace sp, cudaStream_t st, size_t sz)
std::string toString() const

Returns a string representation of this request.

Public Members

size_t size

The size in bytes of the allocation.

AllocType type

The internal category of the allocation.

int device

The device on which the allocation is happening.

MemorySpace space

The memory space of the allocation.

cudaStream_t stream

The stream on which new work on the memory will be ordered (e.g., if a piece of memory cached and to be returned for this call was last used on stream 3 and a new memory request is for stream 4, the memory manager will synchronize stream 4 to wait for the completion of stream 3 via events or other stream synchronization.

The memory manager guarantees that the returned memory is free to use without data races on this stream specified.