NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Methods | Public Members | Static Public Members | List of all members
nvbio::StringPrefetcher< vector_view< T * >, lmem_cache_tag< CACHE_SIZE > > Struct Template Reference

Detailed description

template< typename T, uint32 CACHE_SIZE>
struct nvbio::StringPrefetcher< vector_view< T * >, lmem_cache_tag< CACHE_SIZE > >

A class to prefetch a plain string using a local-memory cache

Template Parameters
Tthe string symbol type
CACHE_SIZEthe local-memory cache size, in words

Definition at line 316 of file prefetcher.h.

#include <prefetcher.h>

Public Types

typedef vector_view< T * > input_string_type
 
typedef vector_view< const T * > string_type
 

Public Methods

NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE string_type 
load (const input_string_type &string)
 
NVBIO_FORCEINLINE
NVBIO_HOST_DEVICE string_type 
load (const input_string_type &string, const uint2 range)
 

Public Members

cache [CACHE_ITEMS]
 

Static Public Members

static const uint32 CACHE_BYTES = CACHE_SIZE * sizeof(uint32)
 
static const uint32 CACHE_ITEMS = CACHE_BYTES / sizeof(T)
 

Member Typedef Documentation

template<typename T , uint32 CACHE_SIZE>
typedef vector_view<T*> nvbio::StringPrefetcher< vector_view< T * >, lmem_cache_tag< CACHE_SIZE > >::input_string_type

Definition at line 323 of file prefetcher.h.

template<typename T , uint32 CACHE_SIZE>
typedef vector_view<const T*> nvbio::StringPrefetcher< vector_view< T * >, lmem_cache_tag< CACHE_SIZE > >::string_type

Definition at line 324 of file prefetcher.h.

Member Function Documentation

template<typename T , uint32 CACHE_SIZE>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE string_type nvbio::StringPrefetcher< vector_view< T * >, lmem_cache_tag< CACHE_SIZE > >::load ( const input_string_type string)
inline

given a string, prefetch all its content and return a new string object wrapping the cached version

Parameters
stringinput string

Definition at line 332 of file prefetcher.h.

template<typename T , uint32 CACHE_SIZE>
NVBIO_FORCEINLINE NVBIO_HOST_DEVICE string_type nvbio::StringPrefetcher< vector_view< T * >, lmem_cache_tag< CACHE_SIZE > >::load ( const input_string_type string,
const uint2  range 
)
inline

given a string, prefetch the contents of a substring and return a new string object wrapping the cached version

Parameters
stringinput string
rangerange of the substring to load

Definition at line 353 of file prefetcher.h.

Member Data Documentation

template<typename T , uint32 CACHE_SIZE>
T nvbio::StringPrefetcher< vector_view< T * >, lmem_cache_tag< CACHE_SIZE > >::cache[CACHE_ITEMS]

Definition at line 367 of file prefetcher.h.

template<typename T , uint32 CACHE_SIZE>
const uint32 nvbio::StringPrefetcher< vector_view< T * >, lmem_cache_tag< CACHE_SIZE > >::CACHE_BYTES = CACHE_SIZE * sizeof(uint32)
static

Definition at line 320 of file prefetcher.h.

template<typename T , uint32 CACHE_SIZE>
const uint32 nvbio::StringPrefetcher< vector_view< T * >, lmem_cache_tag< CACHE_SIZE > >::CACHE_ITEMS = CACHE_BYTES / sizeof(T)
static

Definition at line 321 of file prefetcher.h.


The documentation for this struct was generated from the following file: