Blender V2.61 - r43446
|
#include <Cache.hpp>
Public Member Functions | |
Cache () | |
~Cache () | |
int | addChannel (const void *device, const char *name, unsigned int maxItemSize) |
int | deleteChannel (const void *device, int channel) |
int | deleteDevice (const void *device) |
void | clearCacheFrom (const void *device, CacheTS timestamp) |
void * | addCacheItem (const void *device, int channel, CacheTS timestamp, void *data, unsigned int length) |
double * | addCacheVectorIfDifferent (const void *device, int channel, CacheTS timestamp, double *data, unsigned int length, double threshold) |
const void * | getPreviousCacheItem (const void *device, int channel, CacheTS *timestamp) |
const void * | getCurrentCacheItem (const void *device, int channel, CacheTS timestamp) |
Cache::~Cache | ( | ) |
Definition at line 195 of file Cache.cpp.
References deleteDevice().
void * Cache::addCacheItem | ( | const void * | device, |
int | channel, | ||
CacheTS | timestamp, | ||
void * | data, | ||
unsigned int | length | ||
) |
Definition at line 405 of file Cache.cpp.
References iTaSC::CacheChannel::allocBuffer(), assert, CACHE_BLOCK_ITEM_ADDR, CACHE_ITEM_ADDR, CACHE_ITEM_DATA_POINTER, CACHE_ITEM_POSITIONW, CACHE_ITEM_SIZEW, CACHE_NEXT_ITEM, iTaSC::CacheChannel::clear(), iTaSC::CacheChannel::findItemOrLater(), addon::engine::free(), iTaSC::CacheChannel::initItem, iTaSC::CacheChannel::m_bufferSizeW, iTaSC::CacheChannel::m_busy, iTaSC::CacheEntry::m_channelArray, iTaSC::CacheEntry::m_count, iTaSC::CacheChannel::m_firstBuffer, iTaSC::CacheBuffer::m_firstItem, iTaSC::CacheChannel::m_lastBuffer, iTaSC::CacheChannel::m_lastItemPositionW, iTaSC::CacheChannel::m_lastTimestamp, iTaSC::CacheChannel::m_maxItemSizeB, iTaSC::CacheChannel::m_positionToBlockShiftW, iTaSC::CacheChannel::m_positionToOffsetMaskW, iTaSC::CacheItem::m_sizeW, iTaSC::CacheItem::m_timeOffset, next, and NULL.
Referenced by addCacheVectorIfDifferent().
double * Cache::addCacheVectorIfDifferent | ( | const void * | device, |
int | channel, | ||
CacheTS | timestamp, | ||
double * | data, | ||
unsigned int | length, | ||
double | threshold | ||
) |
Definition at line 601 of file Cache.cpp.
References addCacheItem(), CACHE_ITEM_DATA_POINTER, CACHE_ITEM_SIZEW, fabs(), i, and iTaSC::CacheItem::m_sizeW.
int Cache::addChannel | ( | const void * | device, |
const char * | name, | ||
unsigned int | maxItemSize | ||
) |
Definition at line 203 of file Cache.cpp.
References CACHE_CHANNEL_EXTEND_SIZE, CACHE_DEFAULT_BUFFER_SIZE, CACHE_LOOKUP_TABLE_SIZE, deleteChannel(), iTaSC::CacheChannel::initItem, iTaSC::CacheChannel::m_blockSizeW, iTaSC::CacheChannel::m_bufferSizeW, iTaSC::CacheChannel::m_busy, iTaSC::CacheEntry::m_channelArray, iTaSC::CacheEntry::m_count, iTaSC::CacheChannel::m_firstBuffer, iTaSC::CacheChannel::m_lastBuffer, iTaSC::CacheChannel::m_maxItemSizeB, iTaSC::CacheChannel::m_name, iTaSC::CacheChannel::m_positionToBlockShiftW, iTaSC::CacheChannel::m_positionToOffsetMaskW, and NULL.
Referenced by iTaSC::Distance::initCache(), iTaSC::MovingFrame::initCache(), and iTaSC::CopyPose::initCache().
void Cache::clearCacheFrom | ( | const void * | device, |
CacheTS | timestamp | ||
) |
Definition at line 323 of file Cache.cpp.
References assert, CACHE_BLOCK_ITEM_ADDR, CACHE_ITEM_POSITIONW, CACHE_NEXT_ITEM, iTaSC::CacheChannel::clear(), iTaSC::CacheChannel::findItemOrLater(), addon::engine::free(), iTaSC::CacheChannel::m_busy, iTaSC::CacheEntry::m_channelArray, iTaSC::CacheEntry::m_count, iTaSC::CacheChannel::m_firstBuffer, iTaSC::CacheBuffer::m_firstItem, iTaSC::CacheChannel::m_lastBuffer, iTaSC::CacheChannel::m_lastItemPositionW, iTaSC::CacheChannel::m_lastTimestamp, iTaSC::CacheChannel::m_positionToBlockShiftW, iTaSC::CacheChannel::m_positionToOffsetMaskW, iTaSC::CacheItem::m_timeOffset, and NULL.
int Cache::deleteChannel | ( | const void * | device, |
int | channel | ||
) |
Definition at line 291 of file Cache.cpp.
References iTaSC::CacheChannel::clear(), iTaSC::CacheChannel::m_busy, iTaSC::CacheEntry::m_channelArray, and iTaSC::CacheEntry::m_count.
Referenced by addChannel().
int Cache::deleteDevice | ( | const void * | device | ) |
const void * Cache::getCurrentCacheItem | ( | const void * | device, |
int | channel, | ||
CacheTS | timestamp | ||
) |
Definition at line 595 of file Cache.cpp.
References CACHE_ITEM_DATA_POINTER, and NULL.
const void * Cache::getPreviousCacheItem | ( | const void * | device, |
int | channel, | ||
CacheTS * | timestamp | ||
) |
Definition at line 545 of file Cache.cpp.
References CACHE_ITEM_DATA_POINTER, iTaSC::CacheChannel::findItemEarlier(), iTaSC::CacheChannel::m_busy, iTaSC::CacheEntry::m_channelArray, iTaSC::CacheEntry::m_count, iTaSC::CacheItem::m_timeOffset, and NULL.
Referenced by execute_scene().