Trait faiss::gpu::GpuResources[][src]

pub trait GpuResources {
    fn inner_ptr(&self) -> *mut FaissGpuResourcesProvider;
fn no_temp_memory(&mut self) -> Result<()>;
fn set_temp_memory(&mut self, size: usize) -> Result<()>;
fn set_pinned_memory(&mut self, size: usize) -> Result<()>; }
Expand description

Common interface for GPU resources used by Faiss.

Required methods

Obtain a raw pointer to the native GPU resources object.

Disable allocation of temporary memory; all temporary memory requests will call cudaMalloc / cudaFree at the point of use

Specify that we wish to use a certain fixed size of memory on all devices as temporary memory

Set amount of pinned memory to allocate, for async GPU <-> CPU transfers

Implementors