hop hop hop le système de cache

This commit is contained in:
tth 2021-10-17 20:23:35 +02:00
parent 1b5186f4b3
commit 0e79b3e8fa
5 changed files with 60 additions and 2 deletions

2
.gitignore vendored
View File

@ -86,4 +86,6 @@ experiment/*.pnm
experiment/*.o experiment/*.o
experiment/muxplanes experiment/muxplanes
experiment/movepixels experiment/movepixels
experiment/tcache

View File

@ -5,10 +5,12 @@
COPT = -Wall -fpic -g -DDEBUG_LEVEL=1 -lm COPT = -Wall -fpic -g -DDEBUG_LEVEL=1 -lm
DEPS = ../floatimg.h ../libfloatimg.a Makefile DEPS = ../floatimg.h ../libfloatimg.a Makefile
LIBS = -ltiff -lpnglite -lcfitsio LIBS = ../libfloatimg.a -ltiff -lpnglite -lcfitsio
all: assemblage extracteur muxplanes movepixels all: assemblage extracteur muxplanes movepixels
# ---------------------------------------------------------
assemblage: assemblage.c ${DEPS} assemblage: assemblage.c ${DEPS}
gcc $(COPT) $< ../libfloatimg.a ${LIBS} -o $@ gcc $(COPT) $< ../libfloatimg.a ${LIBS} -o $@
@ -16,7 +18,20 @@ extracteur: extracteur.c ${DEPS}
gcc $(COPT) $< ../libfloatimg.a ${LIBS} -o $@ gcc $(COPT) $< ../libfloatimg.a ${LIBS} -o $@
muxplanes: muxplanes.c ${DEPS} muxplanes: muxplanes.c ${DEPS}
gcc $(COPT) $< ../libfloatimg.a ${LIBS} -o $@ gcc $(COPT) $< ${LIBS} -o $@
movepixels: movepixels.c ${DEPS} movepixels: movepixels.c ${DEPS}
gcc $(COPT) $< ../libfloatimg.a ${LIBS} -o $@ gcc $(COPT) $< ../libfloatimg.a ${LIBS} -o $@
# ---------------------------------------------------------
# CACHE ENGINE
cachengn.o: cachengn.c cachengn.h Makefile
gcc $(COPT) -c $<
tcache.o: tcache.c cachengn.h Makefile
gcc $(COPT) -c $<
tcache: tcache.o cachengn.o Makefile
gcc $(COPT) tcache.o cachengn.o $(LIBS) -o $@

18
experiment/cachengn.c Normal file
View File

@ -0,0 +1,18 @@
/*
* the chache engine - code
*/
#include <stdio.h>
#include "cachengn.h"
/* ------------------------------------------------------------ */
void cachengn_print_version(int k)
{
printf("this is the version ZERO !!!\n");
}
/* ------------------------------------------------------------ */

5
experiment/cachengn.h Normal file
View File

@ -0,0 +1,5 @@
/*
* the chache engine - header
*/
void cachengn_print_version(int k);

18
experiment/tcache.c Normal file
View File

@ -0,0 +1,18 @@
/*
* tests du systeme de cache
*/
#include <stdio.h>
#include "cachengn.h"
/* ------------------------------------------------------------ */
int main(int argc, char *argv[])
{
fprintf(stderr, "Test of the cache engin - %s %s\n", __DATE__, __TIME__);
return 0;
}
/* ------------------------------------------------------------ */