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

Detailed Description

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.

Modules

 PackedStringLoaders
 

Classes

struct  nvbio::PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >
 
struct  nvbio::ForwardPackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >
 
struct  nvbio::stream_traits< T >
 
struct  nvbio::stream_traits< T * >
 
struct  nvbio::stream_traits< const T * >
 
struct  nvbio::PackedStreamRef< Stream >
 
struct  nvbio::to_const< PackedStreamRef< Stream > >
 
struct  nvbio::PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >
 
struct  nvbio::stream_traits< PackedStream< InputStream, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > >
 
struct  nvbio::iterator_traits< PackedStream< InputStream, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > >
 
struct  nvbio::stream_traits< ForwardPackedStream< InputStream, SymbolType, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > >
 
struct  nvbio::uint4_as_uint32_iterator< IteratorType >
 

Functions

template<typename SystemTag , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
PackedVector< SystemTag,
SYMBOL_SIZE_T, BIG_ENDIAN_T,
IndexType >::plain_view_type 
nvbio::plain_view (PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &vec)
 
template<typename SystemTag , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
PackedVector< SystemTag,
SYMBOL_SIZE_T, BIG_ENDIAN_T,
IndexType >
::const_plain_view_type 
nvbio::plain_view (const PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &vec)
 
template<uint32 BLOCKDIM, uint32 BITS, bool BIG_ENDIAN, typename InStreamIterator , typename OutStreamIterator >
NVBIO_HOST_DEVICE void nvbio::transpose_packed_streams (const uint32 stride, const uint32 N, const uint32 in_offset, const InStreamIterator in_stream, OutStreamIterator out_stream)
 
template<typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE bool 
operator< (const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it1, const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it2)
 
template<typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE bool 
operator> (const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it1, const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it2)
 
template<typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE bool 
operator== (const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it1, const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it2)
 
template<typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE bool 
operator!= (const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it1, const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it2)
 
template<typename InputIterator , typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
NVBIO_HOST_DEVICE void assign (const IndexType input_len, const InputIterator input_string, PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > packed_string)
 
template<typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE bool 
operator< (const ForwardPackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it1, const ForwardPackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it2)
 
template<typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE bool 
operator> (const ForwardPackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it1, const ForwardPackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it2)
 
template<typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE bool 
operator== (const ForwardPackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it1, const ForwardPackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it2)
 
template<typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE bool 
operator!= (const ForwardPackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it1, const ForwardPackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &it2)
 

Function Documentation

template<typename InputIterator , typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
NVBIO_HOST_DEVICE void assign ( const IndexType  input_len,
const InputIterator  input_string,
PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType >  packed_string 
)
related

assign a sequence to a packed stream

Definition at line 1408 of file packedstream_inl.h.

template<typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE bool operator!= ( const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &  it1,
const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &  it2 
)
related

inequality test

Definition at line 775 of file packedstream_inl.h.

template<typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE bool operator!= ( const ForwardPackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &  it1,
const ForwardPackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &  it2 
)
related

inequality test

Definition at line 1092 of file packedstream_inl.h.

template<typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE bool operator< ( const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &  it1,
const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &  it2 
)
related

less than

Definition at line 745 of file packedstream_inl.h.

template<typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE bool operator< ( const ForwardPackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &  it1,
const ForwardPackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &  it2 
)
related

less than

Definition at line 1062 of file packedstream_inl.h.

template<typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE bool operator== ( const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &  it1,
const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &  it2 
)
related

equality test

Definition at line 765 of file packedstream_inl.h.

template<typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE bool operator== ( const ForwardPackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &  it1,
const ForwardPackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &  it2 
)
related

equality test

Definition at line 1082 of file packedstream_inl.h.

template<typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE bool operator> ( const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &  it1,
const PackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &  it2 
)
related

greater than

Definition at line 755 of file packedstream_inl.h.

template<typename InputStream , typename Symbol , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE bool operator> ( const ForwardPackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &  it1,
const ForwardPackedStream< InputStream, Symbol, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &  it2 
)
related

greater than

Definition at line 1072 of file packedstream_inl.h.

template<typename SystemTag , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
PackedVector<SystemTag,SYMBOL_SIZE_T,BIG_ENDIAN_T,IndexType>::plain_view_type nvbio::plain_view ( PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &  vec)
inline

return a plain view of a PackedVector object

Definition at line 162 of file packed_vector.h.

template<typename SystemTag , uint32 SYMBOL_SIZE_T, bool BIG_ENDIAN_T, typename IndexType >
PackedVector<SystemTag,SYMBOL_SIZE_T,BIG_ENDIAN_T,IndexType>::const_plain_view_type nvbio::plain_view ( const PackedVector< SystemTag, SYMBOL_SIZE_T, BIG_ENDIAN_T, IndexType > &  vec)
inline

return a plain view of a const PackedVector object

Definition at line 173 of file packed_vector.h.

template<uint32 BLOCKDIM, uint32 BITS, bool BIG_ENDIAN, typename InStreamIterator , typename OutStreamIterator >
NVBIO_HOST_DEVICE void nvbio::transpose_packed_streams ( const uint32  stride,
const uint32  N,
const uint32  in_offset,
const InStreamIterator  in_stream,
OutStreamIterator  out_stream 
)

A utility function to transpose a set of packed input streams: the symbols of the i-th input stream is supposed to be stored contiguously in the range [offset(i), offset + N(i)] the words of i-th output stream will be stored in strided fashion at out_stream[tid, tid + (N(i)+symbols_per_word-1/symbols_per_word) * stride]

Parameters
strideoutput stride
Nlength of this thread's string in the input stream
in_offsetoffset of this thread's string in the input stream
in_streaminput stream
out_streamoutput stream (usually of the form ptr + thread_id)

Definition at line 1433 of file packedstream_inl.h.