Skip to content

Latest commit

 

History

History
15 lines (15 loc) · 488 Bytes

11.并发情况.md

File metadata and controls

15 lines (15 loc) · 488 Bytes

ivfpq 并发情况

cpu

底层数据vector等均未加锁,因此不是线程安全

vector 等只读操作 因此可以多线程操作,单faiss底层使用 openml加速 业务层使用多线程反而拖慢faiss

gpu

底层数据数组等均未加锁,因此不是线程安全

  /// Our default stream that work is ordered on, one per each device
  std::unordered_map<int, cudaStream_t> defaultStreams_;

StandardGpuResources 不是线程安全