33 template<
class T>
class CCache :
public CSGObject
72 CCache(int64_t cache_size, int64_t obj_size, int64_t num_entries)
75 if (cache_size==0 || obj_size==0 || num_entries==0)
77 SG_INFO(
"doing without cache.\n")
103 for (i=0; i<num_entries; i++)
176 bool found_free_line=
false;
185 found_free_line=
true;
194 found_free_line=
true;
206 found_free_line=
true;
217 found_free_line=
true;
250 virtual const char*
get_name()
const {
return "Cache"; }
T * set_entry(int64_t number)
virtual const char * get_name() const
Class SGObject is the base class of all shogun objects.
T * lock_entry(int64_t number)
CCache(int64_t cache_size, int64_t obj_size, int64_t num_entries)
all of classes and functions are contained in the shogun namespace
bool is_cached(int64_t number)
#define SG_UNSTABLE(func,...)
void unlock_entry(int64_t number)