Blender V2.61 - r43446
Classes | Namespaces | Defines | Typedefs | Functions

Cache.hpp File Reference

#include <map>

Go to the source code of this file.

Classes

struct  iTaSC::Timestamp
class  iTaSC::Cache
struct  iTaSC::CacheEntry
struct  iTaSC::CacheChannel
struct  iTaSC::CacheBlock
struct  iTaSC::CacheItem
struct  iTaSC::CacheBufferHeader
struct  iTaSC::CacheBuffer

Namespaces

namespace  iTaSC

Defines

#define CACHE_LOOKUP_TABLE_SIZE   128
#define CACHE_DEFAULT_BUFFER_SIZE   32768
#define CACHE_CHANNEL_EXTEND_SIZE   10
#define CACHE_MAX_ITEM_SIZE   0x3FFF0
#define CACHE_ITEM_GAPB(item)   (unsigned int)(((size_t)item+sizeof(CacheItem))&(sizeof(void*)-1))
#define CACHE_ITEM_DATA_POINTER(item)   (void*)((unsigned char*)item+sizeof(CacheItem)+CACHE_ITEM_GAPB(item))
#define CACHE_ITEM_SIZEW(item, length)   (unsigned int)((sizeof(CacheItem)+CACHE_ITEM_GAPB(item)+(((length)+3)&~0x3))>>2)
#define CACHE_NEXT_ITEM(item)   ((item)+(item)->m_sizeW)
#define CACHE_BLOCK_ITEM_ADDR(chan, buf, block)   (&(buf)->m_firstItem+(((unsigned int)(block)<<chan->m_positionToBlockShiftW)+(buf)->lookup[block].m_offsetW))
#define CACHE_ITEM_ADDR(buf, pos)   (&(buf)->m_firstItem+(pos))
#define CACHE_ITEM_POSITIONW(buf, item)   (unsigned int)(item-&buf->m_firstItem)
#define CACHE_HEADER
#define CACHE_BUFFER_HEADER_SIZE   (sizeof(struct CacheBufferHeader))

Typedefs

typedef unsigned int iTaSC::CacheTS

Functions

void iTaSC::setCacheTimestamp (Timestamp &timestamp)

Define Documentation

#define CACHE_BLOCK_ITEM_ADDR (   chan,
  buf,
  block 
)    (&(buf)->m_firstItem+(((unsigned int)(block)<<chan->m_positionToBlockShiftW)+(buf)->lookup[block].m_offsetW))
#define CACHE_BUFFER_HEADER_SIZE   (sizeof(struct CacheBufferHeader))

Definition at line 217 of file Cache.hpp.

Referenced by iTaSC::CacheChannel::allocBuffer().

#define CACHE_CHANNEL_EXTEND_SIZE   10

Definition at line 17 of file Cache.hpp.

Referenced by iTaSC::Cache::addChannel().

#define CACHE_DEFAULT_BUFFER_SIZE   32768

Definition at line 16 of file Cache.hpp.

Referenced by iTaSC::Cache::addChannel().

#define CACHE_HEADER
Value:
struct CacheBuffer *m_next;     \
    unsigned int m_firstTimestamp;  \
    unsigned int m_lastTimestamp;       \
                                    \
    unsigned int m_lastItemPositionW;   \
    unsigned int m_firstFreePositionW;\
    struct CacheBlock lookup[CACHE_LOOKUP_TABLE_SIZE]

Definition at line 205 of file Cache.hpp.

#define CACHE_ITEM_ADDR (   buf,
  pos 
)    (&(buf)->m_firstItem+(pos))

Definition at line 29 of file Cache.hpp.

Referenced by iTaSC::Cache::addCacheItem(), and iTaSC::CacheChannel::findItemEarlier().

#define CACHE_ITEM_DATA_POINTER (   item)    (void*)((unsigned char*)item+sizeof(CacheItem)+CACHE_ITEM_GAPB(item))
#define CACHE_ITEM_GAPB (   item)    (unsigned int)(((size_t)item+sizeof(CacheItem))&(sizeof(void*)-1))

Definition at line 21 of file Cache.hpp.

#define CACHE_ITEM_POSITIONW (   buf,
  item 
)    (unsigned int)(item-&buf->m_firstItem)

Definition at line 30 of file Cache.hpp.

Referenced by iTaSC::Cache::addCacheItem(), and iTaSC::Cache::clearCacheFrom().

#define CACHE_ITEM_SIZEW (   item,
  length 
)    (unsigned int)((sizeof(CacheItem)+CACHE_ITEM_GAPB(item)+(((length)+3)&~0x3))>>2)
#define CACHE_LOOKUP_TABLE_SIZE   128

Definition at line 15 of file Cache.hpp.

Referenced by iTaSC::Cache::addChannel().

#define CACHE_MAX_ITEM_SIZE   0x3FFF0

Definition at line 18 of file Cache.hpp.

#define CACHE_NEXT_ITEM (   item)    ((item)+(item)->m_sizeW)