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::BlockSelect< K, V, Dir, Comp, NumWarpQ, NumThreadQ, ThreadsPerBlock > Struct Template Reference

## Public Member Functions
__device__ | BlockSelect (K initKVal, V initVVal, K *smemK, V *smemV, 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 ()

## Public Attributes
const K | initK
const V | initV
int | numVals
K | warpKTop
K | threadK [NumThreadQ]
V | threadV [NumThreadQ]
K * | sharedK
V * | sharedV
K * | warpK
V * | warpV
int | kMinus1

## Static Public Attributes
static constexpr int | kNumWarps = ThreadsPerBlock / kWarpSize
static constexpr int | kTotalWarpSortSize = NumWarpQ

## Detailed Description

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

Definition at line 83 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::BlockSelect< 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 214 of file Select.cuh.

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

__device__ void faiss::gpu::BlockSelect< 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 177 of file Select.cuh.

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

- /tmp/faiss/gpu/utils/Select.cuh