14 #include <shogun/lib/config.h> 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"; }
CCache(int64_t cache_size, int64_t obj_size, int64_t num_entries)
void unlock_entry(int64_t number)
T * set_entry(int64_t number)
bool is_cached(int64_t number)
Class SGObject is the base class of all shogun objects.
virtual const char * get_name() const
T * lock_entry(int64_t number)
all of classes and functions are contained in the shogun namespace
#define SG_UNSTABLE(func,...)