FloatImg4PythonBinding/experiment/tcache.c

50 lines
1.0 KiB
C
Raw Normal View History

2021-10-18 05:23:35 +11:00
/*
* tests du systeme de cache
*/
#include <stdio.h>
2023-07-20 21:03:43 +11:00
#include <sys/time.h>
2021-10-18 05:23:35 +11:00
2023-07-20 21:03:43 +11:00
#include "../floatimg.h"
2021-10-18 05:23:35 +11:00
#include "cachengn.h"
2023-07-20 21:03:43 +11:00
int verbosity;
2021-11-27 09:10:29 +11:00
#define IMGW 320
#define IMGH 240
2023-07-20 21:03:43 +11:00
#define SIZE 5 // number of slots
2021-11-27 09:10:29 +11:00
#define NBRI 1000
2021-10-18 05:23:35 +11:00
/* ------------------------------------------------------------ */
int main(int argc, char *argv[])
{
2021-11-27 09:10:29 +11:00
int foo;
2023-07-20 21:03:43 +11:00
FloatImg *picz;
char *fname = "quux.fimg";
2021-10-18 05:23:35 +11:00
2023-07-20 21:03:43 +11:00
fprintf(stderr, "\nTest of the cache engin - %s %s\n",
__DATE__, __TIME__);
2021-11-27 09:10:29 +11:00
cachengn_print_version(1);
foo = init_empty_cache(IMGW, IMGH, SIZE, NBRI);
2023-07-20 21:03:43 +11:00
fprintf(stderr, " init_empty_cache --> %d\n", foo);
foo = liste_le_cache((unsigned int)'U');
fprintf(stderr, " liste le cache --> %d\n", foo);
picz = give_me_thiz_picz(fname, 0);
if (NULL == picz) {
fprintf(stderr, " error 'givemeapicz' on '%s'\n", fname);
}
picz = give_me_thiz_picz(fname, 0);
if (NULL == picz) {
fprintf(stderr, " error 'givemeapicz' on '%s'\n", fname);
}
2021-10-18 05:23:35 +11:00
return 0;
}
/* ------------------------------------------------------------ */