测试不同数据

This commit is contained in:
zzh 2023-08-11 00:36:14 +08:00
parent 5a41d5e207
commit ede75a66fa
4 changed files with 24 additions and 5 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
*.[oa] *.[oa]
sw_perf sw_perf
sw_perf_discrete
test test
test64 test64
.*.swp .*.swp

11
.vscode/launch.json vendored
View File

@ -14,6 +14,17 @@
"all" "all"
], ],
"cwd": "${workspaceFolder}", // "cwd": "${workspaceFolder}", //
},
{
"name": "sw-perf-discrete",
"preLaunchTask": "Build",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/sw_perf_discrete",
"args": [
"all"
],
"cwd": "${workspaceFolder}", //
} }
] ]
} }

View File

@ -4,6 +4,7 @@ CFLAGS= -Wall -Wno-unused-function -O2 -mavx2
DFLAGS= -DSHOW_PERF DFLAGS= -DSHOW_PERF
OBJS= ksw_normal.o ksw_avx2.o ksw_cuda.o ksw_avx2_u8.o OBJS= ksw_normal.o ksw_avx2.o ksw_cuda.o ksw_avx2_u8.o
PROG= sw_perf PROG= sw_perf
PROG2= sw_perf_discrete
INCLUDES= INCLUDES=
LIBS= LIBS=
SUBDIRS= . SUBDIRS= .
@ -17,13 +18,16 @@ endif
.c.o: .c.o:
$(CC) -c $(CFLAGS) $(DFLAGS) $(INCLUDES) $(CPPFLAGS) $< -o $@ $(CC) -c $(CFLAGS) $(DFLAGS) $(INCLUDES) $(CPPFLAGS) $< -o $@
all:$(PROG) all:$(PROG) $(PROG2)
sw_perf:$(OBJS) main.o sw_perf:$(OBJS) main.o
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) main.o -o $@ -L. $(LIBS) $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) main.o -o $@ -L. $(LIBS)
$(PROG2):$(OBJS) discrete_mem_main.o
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) main.o -o $@ -L. $(LIBS)
clean: clean:
rm -f *.o a.out $(PROG) *~ *.a rm -f *.o a.out $(PROG) $(PROG2) *~ *.a
depend: depend:
( LC_ALL=C ; export LC_ALL; makedepend -Y -- $(CFLAGS) $(DFLAGS) $(CPPFLAGS) -- *.c ) ( LC_ALL=C ; export LC_ALL; makedepend -Y -- $(CFLAGS) $(DFLAGS) $(CPPFLAGS) -- *.c )

9
main.c
View File

@ -85,12 +85,15 @@ int main(int argc, char *argv[])
// const char *qf_path = "/public/home/zzh/data/sw/q_s.fa"; // const char *qf_path = "/public/home/zzh/data/sw/q_s.fa";
// const char *tf_path = "/public/home/zzh/data/sw/t_s.fa"; // const char *tf_path = "/public/home/zzh/data/sw/t_s.fa";
// const char *if_path = "/public/home/zzh/data/sw/i_s.txt"; // const char *if_path = "/public/home/zzh/data/sw/i_s.txt";
const char *qf_path = "/public/home/zzh/data/sw/q_m.fa";
const char *tf_path = "/public/home/zzh/data/sw/t_m.fa";
const char *if_path = "/public/home/zzh/data/sw/i_m.txt";
// const char *qf_path = "/public/home/zzh/data/sw/q_m.fa"; // const char *qf_path = "/public/home/zzh/data/sw/q_m.fa";
// const char *tf_path = "/public/home/zzh/data/sw/t_m.fa"; // const char *tf_path = "/public/home/zzh/data/sw/t_m.fa";
// const char *if_path = "/public/home/zzh/data/sw/i_m.txt"; // const char *if_path = "/public/home/zzh/data/sw/i_m.txt";
// const char *qf_path = "/public/home/zzh/data/sw/q_l.fa";
// const char *tf_path = "/public/home/zzh/data/sw/t_l.fa";
// const char *if_path = "/public/home/zzh/data/sw/i_l.txt";
const char *qf_path = "/public/home/zzh/data/sw/query.fa";
const char *tf_path = "/public/home/zzh/data/sw/target.fa";
const char *if_path = "/public/home/zzh/data/sw/info.txt";
query_f = fopen(qf_path, "r"); query_f = fopen(qf_path, "r");
target_f = fopen(tf_path, "r"); target_f = fopen(tf_path, "r");
info_f = fopen(if_path, "r"); info_f = fopen(if_path, "r");