XT-neighbor
Functions | Variables
generate_combination.cu File Reference

A single method which generates all possible deletions of a CDR3 string within a given Levenshtein threshold. More...

#include "codec.cu"

Functions

__device__ void printStack (int *indexStack, int length)
 private method More...
 
__device__ void expand_values (int index, int *output, int start, int end)
 private method More...
 
__device__ void expand_keys (Int3 seq, int distance, Int3 *output, unsigned int *firstKeys, int start, int end)
 private method More...
 
__device__ void expand_keys_static (Int3 seq, int distance, Int3 *output, unsigned int *firstKeys, int start, int end)
 private method More...
 
__global__ void gen_combination (Int3 *seqs, int *combinationOffsets, int distance, Int3 *combinationKeys, int *combinationValues, int carry, unsigned int *firstKeys, int n)
 Generate all combinations of deletion for sequences using expand primitive. More...
 

Variables

const int MAX_DISTANCE = 2
 

Detailed Description

A single method which generates all possible deletions of a CDR3 string within a given Levenshtein threshold.

Function Documentation

◆ expand_keys()

__device__ void expand_keys ( Int3  seq,
int  distance,
Int3 output,
unsigned int *  firstKeys,
int  start,
int  end 
)

private method

◆ expand_keys_static()

__device__ void expand_keys_static ( Int3  seq,
int  distance,
Int3 output,
unsigned int *  firstKeys,
int  start,
int  end 
)

private method

◆ expand_values()

__device__ void expand_values ( int  index,
int *  output,
int  start,
int  end 
)

private method

◆ gen_combination()

__global__ void gen_combination ( Int3 seqs,
int *  combinationOffsets,
int  distance,
Int3 combinationKeys,
int *  combinationValues,
int  carry,
unsigned int *  firstKeys,
int  n 
)

Generate all combinations of deletion for sequences using expand primitive.

For a given index, multiple key value pairs are generated with a combination as key and index as value.

This implementation doesn't use recursive for performance reason.

Parameters
seqssequence to expand
combinationOffsetsprecalculated memory position of the output
distanceLevenshtein distance threshold
combinationKeyskey output
combinationValuesvalue output
carrythe offset of the current chunk
firstKeyspartial key output for histogram
narray length of seqs and combinationOffsets

◆ printStack()

__device__ void printStack ( int *  indexStack,
int  length 
)

private method

Variable Documentation

◆ MAX_DISTANCE

const int MAX_DISTANCE = 2