All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Packed Streams

This module implements interfaces to hold binary packed streams expressed using compile-time specified alphabet sizes. The idea is that a packed stream is an open-ended sequence of symbols encoded with a fixed number of bits on an underlying stream of words. The words themselves can be of different types, ranging from uint32 to uint4, to support different kind of memory access patterns.

At a Glance

The main classes are:


// pack 16 DNA symbols using a 2-bit alphabet into a single word
uint32 word;
PackedStream<uint32,uint8,2u,false> packed_string( &word );
const uint32 string_len = 16;
const char string[] = "ACGTTGCAACGTTGCA";
for (uint32 i = 0; i < string_len; ++i)
packed_string[i] = char_to_dna( string[i] );
// and count the occurrences of T
const uint32 occ = util::count_occurrences( packed_string, string_len, char_to_dna('T') );

Technical Details

A detailed description of all the classes and functions in this module can be found in the Packed Streams module documentation.