Grappa  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CacheWO< T, Allocator, Acquirer, Releaser > Class Template Reference

Write-only cache object. More...

#include <Cache.hpp>

Public Member Functions

 CacheWO (GlobalAddress< T > address, size_t count, T *buffer=NULL)
 Create a cache object. More...
 
 ~CacheWO ()
 
void start_acquire ()
 send acquire message More...
 
void block_until_acquired ()
 block until acquire is completed More...
 
void start_release ()
 block until release is completed More...
 
void block_until_released ()
 block until release is completed More...
 
void reset (GlobalAddress< T > address, size_t count)
 reassign cache to point at a different block May only take a valid address. More...
 
GlobalAddress< T > address ()
 
 operator T * ()
 Dereference cache. More...
 
 operator void * ()
 Dereference cache. More...
 

Protected Attributes

GlobalAddress< T > address_
 
size_t count_
 
Allocator< T > storage_
 
T * pointer_
 
Acquirer< T > acquirer_
 
Releaser< T > releaser_
 

Detailed Description

template<typename T, template< typename TT > class Allocator, template< typename TT > class Acquirer, template< typename TT > class Releaser>
class CacheWO< T, Allocator, Acquirer, Releaser >

Write-only cache object.

This is parameterize so it can implement coherent or incoherent write-only caches. This is used to do bulk writes into arrays.

Definition at line 301 of file Cache.hpp.

Constructor & Destructor Documentation

template<typename T , template< typename TT > class Allocator, template< typename TT > class Acquirer, template< typename TT > class Releaser>
CacheWO< T, Allocator, Acquirer, Releaser >::CacheWO ( GlobalAddress< T >  address,
size_t  count,
T *  buffer = NULL 
)
inlineexplicit

Create a cache object.

Call with a global address, a number of elements to fetch, and optionally a local buffer to store the cached copy.

Definition at line 314 of file Cache.hpp.

template<typename T , template< typename TT > class Allocator, template< typename TT > class Acquirer, template< typename TT > class Releaser>
CacheWO< T, Allocator, Acquirer, Releaser >::~CacheWO ( )
inline

Definition at line 325 of file Cache.hpp.

Member Function Documentation

template<typename T , template< typename TT > class Allocator, template< typename TT > class Acquirer, template< typename TT > class Releaser>
GlobalAddress< T > CacheWO< T, Allocator, Acquirer, Releaser >::address ( )
inline

Definition at line 362 of file Cache.hpp.

template<typename T , template< typename TT > class Allocator, template< typename TT > class Acquirer, template< typename TT > class Releaser>
void CacheWO< T, Allocator, Acquirer, Releaser >::block_until_acquired ( )
inline

block until acquire is completed

Definition at line 335 of file Cache.hpp.

template<typename T , template< typename TT > class Allocator, template< typename TT > class Acquirer, template< typename TT > class Releaser>
void CacheWO< T, Allocator, Acquirer, Releaser >::block_until_released ( )
inline

block until release is completed

Definition at line 346 of file Cache.hpp.

template<typename T , template< typename TT > class Allocator, template< typename TT > class Acquirer, template< typename TT > class Releaser>
CacheWO< T, Allocator, Acquirer, Releaser >::operator T * ( )
inline

Dereference cache.

Definition at line 365 of file Cache.hpp.

template<typename T , template< typename TT > class Allocator, template< typename TT > class Acquirer, template< typename TT > class Releaser>
CacheWO< T, Allocator, Acquirer, Releaser >::operator void * ( )
inline

Dereference cache.

Definition at line 372 of file Cache.hpp.

template<typename T , template< typename TT > class Allocator, template< typename TT > class Acquirer, template< typename TT > class Releaser>
void CacheWO< T, Allocator, Acquirer, Releaser >::reset ( GlobalAddress< T >  address,
size_t  count 
)
inline

reassign cache to point at a different block May only take a valid address.

Definition at line 353 of file Cache.hpp.

template<typename T , template< typename TT > class Allocator, template< typename TT > class Acquirer, template< typename TT > class Releaser>
void CacheWO< T, Allocator, Acquirer, Releaser >::start_acquire ( )
inline

send acquire message

Definition at line 330 of file Cache.hpp.

template<typename T , template< typename TT > class Allocator, template< typename TT > class Acquirer, template< typename TT > class Releaser>
void CacheWO< T, Allocator, Acquirer, Releaser >::start_release ( )
inline

block until release is completed

Definition at line 340 of file Cache.hpp.

Member Data Documentation

template<typename T , template< typename TT > class Allocator, template< typename TT > class Acquirer, template< typename TT > class Releaser>
Acquirer< T > CacheWO< T, Allocator, Acquirer, Releaser >::acquirer_
protected

Definition at line 307 of file Cache.hpp.

template<typename T , template< typename TT > class Allocator, template< typename TT > class Acquirer, template< typename TT > class Releaser>
GlobalAddress< T > CacheWO< T, Allocator, Acquirer, Releaser >::address_
protected

Definition at line 303 of file Cache.hpp.

template<typename T , template< typename TT > class Allocator, template< typename TT > class Acquirer, template< typename TT > class Releaser>
size_t CacheWO< T, Allocator, Acquirer, Releaser >::count_
protected

Definition at line 304 of file Cache.hpp.

template<typename T , template< typename TT > class Allocator, template< typename TT > class Acquirer, template< typename TT > class Releaser>
T* CacheWO< T, Allocator, Acquirer, Releaser >::pointer_
protected

Definition at line 306 of file Cache.hpp.

template<typename T , template< typename TT > class Allocator, template< typename TT > class Acquirer, template< typename TT > class Releaser>
Releaser< T > CacheWO< T, Allocator, Acquirer, Releaser >::releaser_
protected

Definition at line 308 of file Cache.hpp.

template<typename T , template< typename TT > class Allocator, template< typename TT > class Acquirer, template< typename TT > class Releaser>
Allocator< T > CacheWO< T, Allocator, Acquirer, Releaser >::storage_
protected

Definition at line 305 of file Cache.hpp.


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