#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <grass/raster3d.h>
#include "raster3d_intern.h"
#include "cachehash.h"
Go to the source code of this file.
|
void | Rast3d_cache_reset (RASTER3D_cache *c) |
|
void | Rast3d_cache_dispose (RASTER3D_cache *c) |
|
void * | Rast3d_cache_new (int nofElts, int sizeOfElts, int nofNames, int(*eltRemoveFun)(int, const void *, void *), void *eltRemoveFunData, int(*eltLoadFun)(int, void *, void *), void *eltLoadFunData) |
|
void | Rast3d_cache_set_remove_fun (RASTER3D_cache *c, int(*eltRemoveFun)(int, const void *, void *), void *eltRemoveFunData) |
|
void | Rast3d_cache_set_load_fun (RASTER3D_cache *c, int(*eltLoadFun)(int, void *, void *), void *eltLoadFunData) |
|
void * | Rast3d_cache_new_read (int nofElts, int sizeOfElts, int nofNames, read_fn *eltLoadFun, void *eltLoadFunData) |
|
int | Rast3d_cache_lock (RASTER3D_cache *c, int name) |
|
void | Rast3d_cache_lock_intern (RASTER3D_cache *c, int index) |
|
int | Rast3d_cache_unlock (RASTER3D_cache *c, int name) |
|
int | Rast3d_cache_unlock_all (RASTER3D_cache *c) |
|
int | Rast3d_cache_lock_all (RASTER3D_cache *c) |
|
void | Rast3d_cache_autolock_on (RASTER3D_cache *c) |
|
void | Rast3d_cache_autolock_off (RASTER3D_cache *c) |
|
void | Rast3d_cache_set_min_unlock (RASTER3D_cache *c, int nofMinUnLocked) |
|
int | Rast3d_cache_remove_elt (RASTER3D_cache *c, int name) |
|
int | Rast3d_cache_flush (RASTER3D_cache *c, int name) |
|
int | Rast3d_cache_remove_all (RASTER3D_cache *c) |
|
int | Rast3d_cache_flush_all (RASTER3D_cache *c) |
|
void * | Rast3d_cache_elt_ptr (RASTER3D_cache *c, int name) |
|
int | Rast3d_cache_load (RASTER3D_cache *c, int name) |
|
int | Rast3d_cache_get_elt (RASTER3D_cache *c, int name, void *dst) |
|
int | Rast3d_cache_put_elt (RASTER3D_cache *c, int name, const void *src) |
|
int | MAIN (void) |
|
◆ ARE_MIN_UNLOCKED
#define ARE_MIN_UNLOCKED (c->nofUnlocked <= c->minUnlocked) |
◆ DEACTIVATE_ELT
#define DEACTIVATE_ELT |
( |
|
elt | ) |
((IS_LOCKED_ELT(elt) ? (c->nofUnlocked)++ : (0)), c->locks[elt] = 2) |
◆ IS_ACTIVE_ELT
#define IS_ACTIVE_ELT |
( |
|
elt | ) |
(c->locks[elt] != 2) |
◆ IS_IN_QUEUE_ELT
◆ IS_LOCKED_ELT
#define IS_LOCKED_ELT |
( |
|
elt | ) |
(c->locks[elt] == 1) |
◆ IS_NOT_ACTIVE_ELT
#define IS_NOT_ACTIVE_ELT |
( |
|
elt | ) |
(c->locks[elt] == 2) |
◆ IS_NOT_IN_QUEUE_ELT
◆ IS_UNLOCKED_ELT
#define IS_UNLOCKED_ELT |
( |
|
elt | ) |
(c->locks[elt] == 0) |
◆ LOCK_ELT
#define LOCK_ELT |
( |
|
elt | ) |
((IS_LOCKED_ELT(elt) ? (0) : (c->nofUnlocked)--), (c->locks[elt] = 1)) |
◆ ONE_UNLOCKED_ELT_ONLY
#define ONE_UNLOCKED_ELT_ONLY (c->first == c->last) |
◆ UNLOCK_ELT
#define UNLOCK_ELT |
( |
|
elt | ) |
((IS_LOCKED_ELT(elt) ? (c->nofUnlocked)++ : (0)), (c->locks[elt] = 0)) |
◆ MAIN()
◆ Rast3d_cache_autolock_off()
◆ Rast3d_cache_autolock_on()
◆ Rast3d_cache_dispose()
◆ Rast3d_cache_elt_ptr()
◆ Rast3d_cache_flush()
◆ Rast3d_cache_flush_all()
◆ Rast3d_cache_get_elt()
◆ Rast3d_cache_load()
◆ Rast3d_cache_lock()
◆ Rast3d_cache_lock_all()
◆ Rast3d_cache_lock_intern()
◆ Rast3d_cache_new()
void* Rast3d_cache_new |
( |
int |
nofElts, |
|
|
int |
sizeOfElts, |
|
|
int |
nofNames, |
|
|
int(*)(int, const void *, void *) |
eltRemoveFun, |
|
|
void * |
eltRemoveFunData, |
|
|
int(*)(int, void *, void *) |
eltLoadFun, |
|
|
void * |
eltLoadFunData |
|
) |
| |
◆ Rast3d_cache_new_read()
void* Rast3d_cache_new_read |
( |
int |
nofElts, |
|
|
int |
sizeOfElts, |
|
|
int |
nofNames, |
|
|
read_fn * |
eltLoadFun, |
|
|
void * |
eltLoadFunData |
|
) |
| |
◆ Rast3d_cache_put_elt()
int Rast3d_cache_put_elt |
( |
RASTER3D_cache * |
c, |
|
|
int |
name, |
|
|
const void * |
src |
|
) |
| |
◆ Rast3d_cache_remove_all()
◆ Rast3d_cache_remove_elt()
◆ Rast3d_cache_reset()
◆ Rast3d_cache_set_load_fun()
void Rast3d_cache_set_load_fun |
( |
RASTER3D_cache * |
c, |
|
|
int(*)(int, void *, void *) |
eltLoadFun, |
|
|
void * |
eltLoadFunData |
|
) |
| |
◆ Rast3d_cache_set_min_unlock()
void Rast3d_cache_set_min_unlock |
( |
RASTER3D_cache * |
c, |
|
|
int |
nofMinUnLocked |
|
) |
| |
◆ Rast3d_cache_set_remove_fun()
void Rast3d_cache_set_remove_fun |
( |
RASTER3D_cache * |
c, |
|
|
int(*)(int, const void *, void *) |
eltRemoveFun, |
|
|
void * |
eltRemoveFunData |
|
) |
| |
◆ Rast3d_cache_unlock()
◆ Rast3d_cache_unlock_all()