curfil  ..
 All Classes Functions Variables Typedefs Friends Groups Pages
Public Member Functions | Protected Member Functions | List of all members
curfil::TreeCache Class Reference

A simple LRU cache of trees on GPU. More...

#include <random_tree_image_gpu.h>

Inheritance diagram for curfil::TreeCache:
curfil::DeviceCache

Public Member Functions

void copyTree (size_t cacheSize, const TreeNodes *tree)
 Resize the cache and transfer the given tree to the GPU.
void copyTrees (size_t cacheSize, const std::set< const TreeNodes * > &trees)
 Resize the cache and transfer the given trees to the GPU.
- Public Member Functions inherited from curfil::DeviceCache
std::map< const void *, size_t > & getIdMap ()
bool containsElement (const void *element) const
size_t getElementPos (const void *element) const
void clear ()
 Clear the entire cache.
size_t getTotalTransferTimeMircoseconds () const

Protected Member Functions

virtual void transferElement (size_t elementPos, const void *element, cudaStream_t stream)
 transfer the element's value at the passed position to GPU
virtual std::string getElementName (const void *element) const
virtual std::string getElementsName () const
virtual void bind ()
 bind texture to array
virtual void unbind ()
 unbind the texture
virtual void freeArray ()
 clear texture data and free the array
virtual void allocArray ()
 allocate a CUDA array
- Protected Member Functions inherited from curfil::DeviceCache
bool isBound () const
void setBound (bool bound)
 set the texture bound property
void updateCacheSize (size_t cacheSize)
 set the cache size to the passed size
size_t getCacheSize () const
void copyElements (size_t cacheSize, const std::set< const void * > &elements)
 resize the cache and transfer the elements to GPU

Detailed Description

A simple LRU cache of trees on GPU.

Definition at line 285 of file random_tree_image_gpu.h.

Member Function Documentation

virtual std::string curfil::TreeCache::getElementName ( const void *  element) const
protectedvirtual
Returns
the passed element's name

Implements curfil::DeviceCache.

virtual std::string curfil::TreeCache::getElementsName ( ) const
protectedvirtual
Returns
all elements names

Implements curfil::DeviceCache.


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