
#include <stdlib.h>
#define SQUARE unsigned
#define SQ_CONTENT unsigned char

int tb_probe_soft /* GAVIOTA */
(unsigned int, SQUARE, unsigned, const SQUARE *, const SQUARE *,
 const SQ_CONTENT *, const SQ_CONTENT *, unsigned *, unsigned *);

int tb_probe_hard /* GAVIOTA */
(unsigned int, SQUARE, unsigned, const SQUARE *, const SQUARE *,
 const SQ_CONTENT *, const SQ_CONTENT *, unsigned *, unsigned *);

int tb_probe /* GAVIOTA */ /* glue */
(unsigned int, SQUARE, unsigned, const SQUARE *, const SQUARE *,
 const SQ_CONTENT *, const SQ_CONTENT *, unsigned *, unsigned *, unsigned);

int tb_probe_WDL_soft /* GAVIOTA */
(unsigned int, SQUARE, unsigned, const SQUARE *, const SQUARE *,
 const SQ_CONTENT *, const SQ_CONTENT *, unsigned *);

int tb_probe_WDL_hard /* GAVIOTA */
(unsigned int, SQUARE, unsigned, const SQUARE *, const SQUARE *,
 const SQ_CONTENT *, const SQ_CONTENT *, unsigned *);

char * tb_init (int, int, const char **);
char * tb_restart (int, int, const char **);
void tb_done (void);
int tb_is_initialized (void);
int tb_availability (void);

int tbcache_init (size_t, int);
int tbcache_restart (size_t, int);
void tbcache_done (void);
int tbcache_is_on (void);
void tbcache_flush (void);

void tbstats_reset (void);
struct TB_STATS
{
  long unsigned int wdl_easy_hits  [2];
  long unsigned int wdl_hard_prob  [2];
  long unsigned int wdl_soft_prob  [2];
  size_t wdl_cachesize;
  double wdl_occupancy;
  long unsigned int dtm_easy_hits  [2];
  long unsigned int dtm_hard_prob  [2];
  long unsigned int dtm_soft_prob  [2];
  size_t dtm_cachesize;
  double dtm_occupancy;
  long unsigned int  total_hits    [2];
  long unsigned int memory_hits    [2];
  long unsigned int  drive_hits    [2];
  long unsigned int  drive_miss    [2];
  long unsigned int  bytes_read    [2];
  long unsigned int files_opened;
  double memory_efficiency;
};
void tbstats_get (struct TB_STATS *);

const char ** tbpaths_init (void);
const char ** tbpaths_add (const char **, const char *);
const char ** tbpaths_done (const char **);
const char * tbpaths_getmain (void);
