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 | Public Attributes | Static Public Attributes | List of all members
faiss::gpu::WarpSelect< K, V, Dir, Comp, NumWarpQ, NumThreadQ, ThreadsPerBlock > Struct Template Reference

## Public Member Functions
__device__ | WarpSelect (K initKVal, V initVVal, int k)
__device__ void | addThreadQ (K k, V v)
__device__ void | checkThreadQ ()
__device__ void | mergeWarpQ ()
__device__ void | add (K k, V v)
__device__ void | reduce ()
__device__ void | writeOut (K *outK, V *outV, int k)
| Dump final k selected values for this warp out.

## Public Attributes
const K | initK
const V | initV
int | numVals
K | warpKTop
K | threadK [NumThreadQ]
V | threadV [NumThreadQ]
K | warpK [kNumWarpQRegisters]
V | warpV [kNumWarpQRegisters]
int | kLane

## Static Public Attributes
static constexpr int | kNumWarpQRegisters = NumWarpQ / kWarpSize

## Detailed Description

### template<typename K, typename V, bool Dir, typename Comp, int NumWarpQ, int NumThreadQ, int ThreadsPerBlock>
struct faiss::gpu::WarpSelect< K, V, Dir, Comp, NumWarpQ, NumThreadQ, ThreadsPerBlock >

Definition at line 364 of file Select.cuh.

## Member Function Documentation

template<typename K , typename V , bool Dir, typename Comp , int NumWarpQ, int NumThreadQ, int ThreadsPerBlock>

__device__ void faiss::gpu::WarpSelect< K, V, Dir, Comp, NumWarpQ, NumThreadQ, ThreadsPerBlock >::add | ( | K | k,
|  | V | v
| ) |  |
| inline

WARNING: all threads in a warp must participate in this. Otherwise, you must call the constituent parts separately.

Definition at line 448 of file Select.cuh.

template<typename K , typename V , bool Dir, typename Comp , int NumWarpQ, int NumThreadQ, int ThreadsPerBlock>

__device__ void faiss::gpu::WarpSelect< K, V, Dir, Comp, NumWarpQ, NumThreadQ, ThreadsPerBlock >::mergeWarpQ | ( |  | ) |
| inline

This function handles sorting and merging together the per-thread queues with the warp-wide queue, creating a sorted list across both

Definition at line 434 of file Select.cuh.

The documentation for this struct was generated from the following file:

- /data/users/matthijs/github_faiss/faiss/gpu/utils/Select.cuh