ARB
Classes | Macros | Typedefs | Functions
PT_tools.h File Reference
#include <static_assert.h>
#include <arb_assert.h>
#include <byteswap.h>
Include dependency graph for PT_tools.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  BitMask< B >
 
struct  BitsBelowBit< B >
 
struct  BitsBelowBit< 32 >
 
struct  BitsBelowBit< 31 >
 
struct  BitRange< HB, LB >
 

Macros

#define pt_assert(bed)   arb_assert(bed)
 

Typedefs

typedef void * PT_PNTR
 
typedef unsigned char uint_8
 
typedef unsigned short uint_16
 
typedef unsigned int uint_32
 
typedef unsigned long uint_64
 
typedef uint_32 uint_big
 

Functions

uint_8 PT_read_char (const void *fromMem)
 
uint_16 PT_read_short (const void *fromMem)
 
uint_32 PT_read_int (const void *fromMem)
 
uint_big PT_read_big (const void *fromMem)
 
void PT_write_char (void *toMem, uint_8 i)
 
void PT_write_short (void *toMem, uint_16 i)
 
void PT_write_int (void *toMem, uint_32 i)
 
void PT_write_big (void *toMem, uint_big i)
 
template<int R>
void write_nat_with_reserved_bits (char *&toMem, uint_32 nat, uint_8 reserved_bits)
 
template<int R>
uint_32 read_nat_with_reserved_bits (const char *&fromMem, uint_8 &reserved_bits)
 
template<int R>
void write_int_with_reserved_bits (char *&toMem, int32_t i, uint_8 reserved_bits)
 
template<int R>
int32_t read_int_with_reserved_bits (const char *&fromMem, uint_8 &reserved_bits)
 
uint_32 PT_read_compact_nat (const char *&fromMem)
 
void PT_write_compact_nat (char *&toMem, uint_32 nat)
 
 STATIC_ASSERT (sizeof(void *)==sizeof(uint_big))
 
void * PT_read_void_pointer (const void *fromMem)
 
void PT_write_pointer (void *toMem, const void *thePtr)
 
template<typename POINTED >
POINTED * PT_read_pointer (const void *fromMem)
 
void fflush_all ()
 

Macro Definition Documentation

#define pt_assert (   bed)    arb_assert(bed)

Definition at line 22 of file PT_tools.h.

Referenced by MatchRequest::accept_N_mismatches(), ChainEntryBuffer::add(), MatchRequest::add_hits_for_children(), all_sons_saved(), PT_statistic::analyse(), Oligo::at(), base_probability(), MatchingOligo::bind_against(), build_pos_tree(), MatchingOligo::calc_centigrade_pos(), OutgroupMatcher::calculate_outgroup_matches(), cat_internal(), ChainIteratorStage1::ChainIteratorStage1(), ChainIteratorStage2::ChainIteratorStage2(), Splits::check(), probe_struct_global::cleanup(), Memory::clear(), MatchRequest::collect_hits_for(), MemBlock::contains(), PrefixIterator::copy(), count_gaps_and_dots(), Mismatches::count_versus(), PT_compressed::createFrom(), MatchingOligo::dangling(), MatchingOligo::dangling_char(), DataLoc::DataLoc(), MatchingOligo::domainPossible(), PT_statistic::dump(), dump_POS_TREE_special(), probe_struct_global::enter_stage(), enter_stage_1_build_tree(), Partition::estimate_max_probes_for_any_pass(), Partition::estimate_probes_for_pass(), PrefixProbabilities::find_index_near_leftsum(), findLeftmostProbe(), findNextProbe(), gene_rel_2_abs(), MismatchWeights::get(), Memory::get(), probe_input_data::get_abspos(), probe_input_data::get_acc(), get_bond_val(), probe_input_data::get_checksum(), get_complement(), get_DB_state(), get_design_hinfo(), get_design_info(), POS_TREE1::get_father(), get_formatter(), probe_input_data::get_geneabspos(), get_list_part(), MaxBond::get_max_bond(), AbsLoc::get_pid(), probe_input_data::get_shortname(), hitgroup_idx2char(), FamilyStat::hits(), MarkedPrefixes::isMarked(), PrefixProbabilities::left_of(), MarkedPrefixes::mark(), PT_Traversal::mark_matching(), MaxBond::MaxBond(), PrefixProbabilities::of(), PrefixProbabilities::of_range(), ptnd_chain_count_mishits::operator()(), PrefixIterator::operator++(), Partition::Partition(), MarkedPrefixes::predecide(), PrefixProbabilities::PrefixProbabilities(), probe_input_data::preload_rel2abs(), probe_compress_sequence(), probe_match(), ProbeIterator::ProbeIterator(), PT_add_to_chain(), PT_chain_has_valid_entries(), PT_change_leaf_to_node(), PT_change_link_in_father(), PT_create_leaf(), PT_exit_psg(), PT_find_exProb(), PT_init_cache_sizes(), PT_init_psg(), PT_leaf_to_chain(), PT_prepare_data(), PT_read_son< POS_TREE2 >(), PT_start_design(), PTD_put_byte(), PTD_put_int(), PTD_put_short(), PTD_read_leafs_from_disk(), PTD_save_upper_tree(), PTD_set_object_to_saved_status(), PTD_write_chain_to_disk(), PTD_write_leafs_to_disk(), PTD_write_node_to_disk(), PTD_write_tip_to_disk(), ptpd_read_names(), Memory::put(), put_compact_nat(), run_command(), save_lower_subtree(), POS_TREE1::set_father(), ChainIteratorStage1::_U::_S::set_loc(), AbsLoc::set_name(), CentigradePos::set_pos_for(), DataLoc::set_position(), POS_TREE1::set_type(), PT_statistic::show_for_index(), CentigradePos::summarize_centigrade_hits(), TraversalHitLimit::TraversalHitLimit(), probe_struct_global::TREE_ROOT1(), probe_struct_global::TREE_ROOT2(), virt_name(), and write_nat_with_reserved_bits().

Typedef Documentation

typedef void* PT_PNTR

Definition at line 24 of file PT_tools.h.

typedef unsigned char uint_8

Definition at line 26 of file PT_tools.h.

typedef unsigned short uint_16

Definition at line 27 of file PT_tools.h.

typedef unsigned int uint_32

Definition at line 28 of file PT_tools.h.

typedef unsigned long uint_64

Definition at line 29 of file PT_tools.h.

typedef uint_32 uint_big

Definition at line 34 of file PT_tools.h.

Function Documentation

uint_8 PT_read_char ( const void *  fromMem)
inline
uint_16 PT_read_short ( const void *  fromMem)
inline
uint_32 PT_read_int ( const void *  fromMem)
inline
uint_big PT_read_big ( const void *  fromMem)
inline

Definition at line 78 of file PT_tools.h.

References PT_read_int().

Referenced by PT_read_void_pointer(), PTD_read_leafs_from_disk(), and PTD_write_leafs_to_disk().

void PT_write_char ( void *  toMem,
uint_8  i 
)
inline

Definition at line 81 of file PT_tools.h.

Referenced by PTD_put_byte(), and write_nat_with_reserved_bits().

void PT_write_short ( void *  toMem,
uint_16  i 
)
inline

Definition at line 82 of file PT_tools.h.

Referenced by PT_create_leaf(), PTD_put_short(), and write_nat_with_reserved_bits().

void PT_write_int ( void *  toMem,
uint_32  i 
)
inline
void PT_write_big ( void *  toMem,
uint_big  i 
)
inline

Definition at line 88 of file PT_tools.h.

References PT_write_int().

Referenced by PT_write_pointer(), and PTD_set_object_to_saved_status().

template<int R>
void write_nat_with_reserved_bits ( char *&  toMem,
uint_32  nat,
uint_8  reserved_bits 
)
inline
template<int R>
uint_32 read_nat_with_reserved_bits ( const char *&  fromMem,
uint_8 reserved_bits 
)
inline

Definition at line 147 of file PT_tools.h.

References PT_read_char(), PT_read_int(), PT_read_short(), and BitMask< B >::value.

template<int R>
void write_int_with_reserved_bits ( char *&  toMem,
int32_t  i,
uint_8  reserved_bits 
)
inline

Definition at line 184 of file PT_tools.h.

template<int R>
int32_t read_int_with_reserved_bits ( const char *&  fromMem,
uint_8 reserved_bits 
)
inline

Definition at line 188 of file PT_tools.h.

uint_32 PT_read_compact_nat ( const char *&  fromMem)
inline
void PT_write_compact_nat ( char *&  toMem,
uint_32  nat 
)
inline

Definition at line 197 of file PT_tools.h.

Referenced by ChainEntryBuffer::add(), PT_WRITE_CHAIN_ENTRY(), and put_compact_nat().

STATIC_ASSERT ( sizeof(void *)  = =sizeof(uint_big))
void* PT_read_void_pointer ( const void *  fromMem)
inline

Definition at line 205 of file PT_tools.h.

References PT_read_big().

Referenced by PT_read_pointer().

void PT_write_pointer ( void *  toMem,
const void *  thePtr 
)
inline

Definition at line 206 of file PT_tools.h.

References PT_write_big().

Referenced by PT_change_link_in_father(), PT_create_leaf(), and Memory::put().

template<typename POINTED >
POINTED* PT_read_pointer ( const void *  fromMem)
inline

Definition at line 209 of file PT_tools.h.

References PT_read_void_pointer().

void fflush_all ( )
inline