Blame cache.h

Packit Service 6c8a3b
/* Copyright (C) 1996 Bjoern Beutel. */
Packit Service 6c8a3b
Packit Service 6c8a3b
/* Description. =============================================================*/
Packit Service 6c8a3b
Packit Service 6c8a3b
/* Manages the storage of analysis results for faster access. */
Packit Service 6c8a3b
Packit Service 6c8a3b
/* Variables. ===============================================================*/
Packit Service 6c8a3b
Packit Service 6c8a3b
extern int_t cache_accesses; /* Number of calls of "word_in_cache". */
Packit Service 6c8a3b
extern int_t cache_hits; /* Number of successful calls of "word_in_cache". */
Packit Service 6c8a3b
Packit Service 6c8a3b
/* Functions. ===============================================================*/
Packit Service 6c8a3b
Packit Service 6c8a3b
extern bool_t word_in_cache( string_t surf_start, 
Packit Service 6c8a3b
                             string_t surf_end );
Packit Service 6c8a3b
/* Return whether the word form SURF_START..SURF_END is in the cache. */
Packit Service 6c8a3b
Packit Service 6c8a3b
extern value_t next_result_in_cache( void );
Packit Service 6c8a3b
/* Return the next result feature structure for a word form.
Packit Service 6c8a3b
 * Use this function after calling "word_in_cache". */
Packit Service 6c8a3b
Packit Service 6c8a3b
extern void enter_in_cache( string_t surf_start,
Packit Service 6c8a3b
                            string_t surf_end,
Packit Service 6c8a3b
                            int_t feat_count,
Packit Service 6c8a3b
                            value_t feat_vector[] );
Packit Service 6c8a3b
/* Enter the word form SURF_START..SURF_END in the cache 
Packit Service 6c8a3b
 * with FEAT_COUNT feature structures FEAT_VECTOR[]. */
Packit Service 6c8a3b
Packit Service 6c8a3b
extern void clear_cache( void );
Packit Service 6c8a3b
/* Delete all cache entries. */
Packit Service 6c8a3b
Packit Service 6c8a3b
extern void set_cache_size( int_t size );
Packit Service 6c8a3b
/* Set maximum number of cache entries to SIZE. */
Packit Service 6c8a3b
Packit Service 6c8a3b
extern int_t get_cache_size( void );
Packit Service 6c8a3b
/* Get actual number of cache entries. */
Packit Service 6c8a3b
Packit Service 6c8a3b
extern int_t get_cache_maximum( void );
Packit Service 6c8a3b
/* Get maximum number of cache entries. */
Packit Service 6c8a3b
Packit Service 6c8a3b
/* End of file. =============================================================*/