diff --git a/.gitignore b/.gitignore index 9f84111..3090a33 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.[oa] sw_perf +sw_perf_discrete test test64 .*.swp diff --git a/.vscode/launch.json b/.vscode/launch.json index 5e68af2..6b50b59 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -14,6 +14,17 @@ "all" ], "cwd": "${workspaceFolder}", // 当前工作路径:当前文件所在的工作空间 + }, + { + "name": "sw-perf-discrete", + "preLaunchTask": "Build", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceRoot}/sw_perf_discrete", + "args": [ + "all" + ], + "cwd": "${workspaceFolder}", // 当前工作路径:当前文件所在的工作空间 } ] } \ No newline at end of file diff --git a/Makefile b/Makefile index 37c830b..5044fac 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ CFLAGS= -Wall -Wno-unused-function -O2 -mavx2 DFLAGS= -DSHOW_PERF OBJS= ksw_normal.o ksw_avx2.o ksw_cuda.o ksw_avx2_u8.o PROG= sw_perf +PROG2= sw_perf_discrete INCLUDES= LIBS= SUBDIRS= . @@ -17,13 +18,16 @@ endif .c.o: $(CC) -c $(CFLAGS) $(DFLAGS) $(INCLUDES) $(CPPFLAGS) $< -o $@ -all:$(PROG) +all:$(PROG) $(PROG2) sw_perf:$(OBJS) main.o $(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: - rm -f *.o a.out $(PROG) *~ *.a + rm -f *.o a.out $(PROG) $(PROG2) *~ *.a depend: ( LC_ALL=C ; export LC_ALL; makedepend -Y -- $(CFLAGS) $(DFLAGS) $(CPPFLAGS) -- *.c ) diff --git a/main.c b/main.c index 51ac5e2..5e28fd9 100644 --- a/main.c +++ b/main.c @@ -85,12 +85,15 @@ int main(int argc, char *argv[]) // 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 *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 *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_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"); target_f = fopen(tf_path, "r"); info_f = fopen(if_path, "r");