NCBI C++ ToolKit
Macros | Functions
index_ungapped.c File Reference

Definitions of functions needed to implement diagonal hash to support ungapped extensions for indexed version of megablast. More...

#include "index_ungapped.h"
+ Include dependency graph for index_ungapped.c:

Go to the source code of this file.

Go to the SVN repository for this file.

Macros

#define FP_ENTRY_SIZE   (1024*1024)
 

Functions

static ir_fp_entryir_fp_entry_destroy (ir_fp_entry *e)
 Free memory block destructor. More...
 
static ir_fp_entryir_fp_entry_create (void)
 Free memory block constructor. More...
 
ir_diag_hashir_hash_create (void)
 Hash table constructor. More...
 
ir_diag_hashir_hash_destroy (ir_diag_hash *hash)
 Hash table destructor. More...
 
ir_hash_entryir_locate (ir_diag_hash *hash, Uint4 diag, Uint4 key)
 Find a hash table entry for the given diagonal. More...
 

Detailed Description

Definitions of functions needed to implement diagonal hash to support ungapped extensions for indexed version of megablast.

Definition in file index_ungapped.c.

Macro Definition Documentation

◆ FP_ENTRY_SIZE

#define FP_ENTRY_SIZE   (1024*1024)

Definition at line 37 of file index_ungapped.c.

Function Documentation

◆ ir_fp_entry_create()

static ir_fp_entry* ir_fp_entry_create ( void  )
static

Free memory block constructor.

Returns
Pointer to a newly allocated free memory block.

Definition at line 60 of file index_ungapped.c.

References calloc(), entries, FP_ENTRY_SIZE, i, ir_fp_entry_destroy(), and result.

Referenced by ir_locate().

◆ ir_fp_entry_destroy()

static ir_fp_entry* ir_fp_entry_destroy ( ir_fp_entry e)
static

Free memory block destructor.

Parameters
ePointer to the block being destroyed.
Returns
NULL.

Definition at line 45 of file index_ungapped.c.

References ir_fp_entry_::entries, and free().

Referenced by ir_fp_entry_create(), and ir_hash_destroy().

◆ ir_hash_create()

ir_diag_hash* ir_hash_create ( void  )

Hash table constructor.

Returns
A pointer to a fresh copy of a diagonal hash table, or NULL.

Definition at line 82 of file index_ungapped.c.

References calloc(), entries, ir_hash_destroy(), IR_HASH_SIZE, and result.

Referenced by MB_IndexedWordFinder(), and ShortRead_IndexedWordFinder().

◆ ir_hash_destroy()

ir_diag_hash* ir_hash_destroy ( ir_diag_hash hash)

Hash table destructor.

Parameters
hashPointer to the hash table instance to destroy.
Returns
NULL.

Definition at line 99 of file index_ungapped.c.

References free(), ir_fp_entry_destroy(), and ir_fp_entry_::next.

Referenced by ir_hash_create(), MB_IndexedWordFinder(), and ShortRead_IndexedWordFinder().

◆ ir_locate()

ir_hash_entry* ir_locate ( ir_diag_hash hash,
Uint4  diag,
Uint4  key 
)

Find a hash table entry for the given diagonal.

Parameters
hashPointer to hash table instance.
diagDiagonal identifier.
keyHash table key corresponding to the diagonal.
Returns
Pointer to ir_hash_entry representing the diagonal.

Definition at line 119 of file index_ungapped.c.

References ir_diag_data_::diag, ir_hash_entry_::diag_data, fp, ir_fp_entry_create(), ncbi::grid::netcache::search::fields::key, ir_hash_entry_::next, and tmp.

Modified on Tue Jul 16 13:17:57 2024 by modify_doxy.py rev. 669887