#include <vil_block_cache.h>
Public Member Functions | |
vil_block_cache (const unsigned block_capacity) | |
~vil_block_cache () | |
bool | add_block (const unsigned &block_index_i, const unsigned &block_index_j, vil_image_view_base_sptr const &blk) |
add a block to the buffer. | |
bool | get_block (const unsigned &block_index_i, const unsigned &block_index_j, vil_image_view_base_sptr &blk) const |
retrieve a block from the buffer. | |
unsigned | block_size () const |
block capacity. | |
Private Member Functions | |
bool | remove_block () |
remove the lowest priority block. | |
Private Attributes | |
vcl_vector< bcell * > | blocks_ |
block index member. | |
unsigned | nblocks_ |
capacity in blocks. |
Definition at line 58 of file vil_block_cache.h.
vil_block_cache::vil_block_cache | ( | const unsigned | block_capacity | ) | [inline] |
Definition at line 61 of file vil_block_cache.h.
vil_block_cache::~vil_block_cache | ( | ) |
Definition at line 9 of file vil_block_cache.cxx.
bool vil_block_cache::add_block | ( | const unsigned & | block_index_i, |
const unsigned & | block_index_j, | ||
vil_image_view_base_sptr const & | blk | ||
) |
add a block to the buffer.
Definition at line 20 of file vil_block_cache.cxx.
unsigned vil_block_cache::block_size | ( | ) | const [inline] |
block capacity.
Definition at line 73 of file vil_block_cache.h.
bool vil_block_cache::get_block | ( | const unsigned & | block_index_i, |
const unsigned & | block_index_j, | ||
vil_image_view_base_sptr & | blk | ||
) | const |
retrieve a block from the buffer.
Definition at line 35 of file vil_block_cache.cxx.
bool vil_block_cache::remove_block | ( | ) | [private] |
remove the lowest priority block.
remove the oldest priority block.
Definition at line 55 of file vil_block_cache.cxx.
vcl_vector<bcell*> vil_block_cache::blocks_ [private] |
block index member.
Definition at line 76 of file vil_block_cache.h.
unsigned vil_block_cache::nblocks_ [private] |
capacity in blocks.
Definition at line 78 of file vil_block_cache.h.