XT-neighbor
Functions | Variables
xtn_overlap_inner.cu File Reference

A collection of patching functions that add repertoire-comparison functionality to xtn_overlap.cu. More...

#include "xtn_inner.cu"

Functions

__global__ void _setGlobalVar (char *allStr, unsigned int *allStrOffset)
 private function More...
 
int deduplicate_full_length (char *allStr, unsigned int *allStrOffsets, SeqInfo *&info, Int3 *&seqOut, int *&infoLenOut, int seqLen, int *buffer)
 deduplicate the sequence on the full length level and generate related data More...
 
int overlap_mode_init (char *allStr, unsigned int *allStrOffsets, Int3 *&seqOut, SeqInfo *&info, int *&infoOffsetOut, std::vector< XTNOutput > &allOutputs, int seqLen, int *buffer)
 deduplicate input and initialize output variable More...
 
void stream_handler4_overlap (Chunk< Int2 > pairInput, std::vector< XTNOutput > &allOutputs, char *allStr, unsigned int *allStrOffsets, SeqInfo *seqInfo, int *seqOffset, int seqLen, int distance, char measure, int *buffer, MemoryContext ctx)
 handle all GPU operations in stream 4 overlap mode. More...
 
XTNOutput mergeOutput (std::vector< XTNOutput > allOutputs, int *buffer)
 merge all outputs by grouping the index keys and summing the frequency values. More...
 

Variables

__device__ char * _allStr = NULL
 private variable More...
 
__device__ unsigned int * _allStrOffset = NULL
 private variable More...
 

Detailed Description

A collection of patching functions that add repertoire-comparison functionality to xtn_overlap.cu.

Function Documentation

◆ _setGlobalVar()

__global__ void _setGlobalVar ( char *  allStr,
unsigned int *  allStrOffset 
)

private function

◆ deduplicate_full_length()

int deduplicate_full_length ( char *  allStr,
unsigned int *  allStrOffsets,
SeqInfo *&  info,
Int3 *&  seqOut,
int *&  infoLenOut,
int  seqLen,
int *  buffer 
)

deduplicate the sequence on the full length level and generate related data

Parameters
allStrcontainer of all sequences
allStrOffsetsstart/end position of each sequence
infoinformation of each input sequence, will be sorted as the side-effect of this operation
seqOutdeduplicated sequence in Int3 form
infoLenOutcount of each duplicated sequence, has the same length as seqOut
seqLennumber of input sequence
bufferinteger buffer
Returns
the length of seqOut

◆ mergeOutput()

XTNOutput mergeOutput ( std::vector< XTNOutput allOutputs,
int *  buffer 
)

merge all outputs by grouping the index keys and summing the frequency values.

Parameters
allOutputscontainer of generated results
bufferinteger buffer
Returns
merged results

◆ overlap_mode_init()

int overlap_mode_init ( char *  allStr,
unsigned int *  allStrOffsets,
Int3 *&  seqOut,
SeqInfo *&  info,
int *&  infoOffsetOut,
std::vector< XTNOutput > &  allOutputs,
int  seqLen,
int *  buffer 
)

deduplicate input and initialize output variable

Parameters
allStrcontainer of all sequences
allStrOffsetsstart/end position of each sequence
seqOutreturn sequence in Int3 form
infoinformation of each input sequence, will be sorted as the side-effect of this operation
infoOffsetOutoffset of each info for each unique sequence
allOutputscontainer of generated result
seqLennumber of input sequence
bufferinteger buffer
Returns
the length of seqOut

◆ stream_handler4_overlap()

void stream_handler4_overlap ( Chunk< Int2 pairInput,
std::vector< XTNOutput > &  allOutputs,
char *  allStr,
unsigned int *  allStrOffsets,
SeqInfo seqInfo,
int *  seqOffset,
int  seqLen,
int  distance,
char  measure,
int *  buffer,
MemoryContext  ctx 
)

handle all GPU operations in stream 4 overlap mode.

Parameters
pairInputnearest neighbor pairs
allOutputscontainer of generated results
allStrcontainer of all sequences
allStrOffsetsstart/end position of each sequence
seqInfoinformation of each sequence
seqOffsetoffset of seqInfo array
seqLennumber of input CDR3 sequences
distancedistance threshold
measuretype of measurement (levenshtein/hamming)
bufferinteger buffer
ctxmemory context

Variable Documentation

◆ _allStr

__device__ char* _allStr = NULL

private variable

◆ _allStrOffset

__device__ unsigned int* _allStrOffset = NULL

private variable