mirror of
https://github.com/lh3/minimap2.git
synced 2026-09-15 21:17:54 +08:00
make multi
This commit is contained in:
16
Makefile
16
Makefile
@@ -45,6 +45,11 @@ PROG= minimap2
|
||||
PROG_EXTRA= sdust minimap2-lite
|
||||
LIBS= -lm -lz -lpthread
|
||||
|
||||
CC=$(CXX)
|
||||
ifeq ($(CC), g++)
|
||||
CC=g++ -std=c++11
|
||||
endif
|
||||
|
||||
ifeq ($(arm_neon),) # if arm_neon is not defined
|
||||
ifeq ($(sse2only),) # if sse2only is not defined
|
||||
OBJS+=ksw2_extz2_sse41.o ksw2_extd2_sse41.o ksw2_exts2_sse41.o ksw2_extz2_sse2.o ksw2_extd2_sse2.o ksw2_exts2_sse2.o ksw2_dispatch.o ksw2_extd2_avx.o
|
||||
@@ -93,6 +98,17 @@ libminimap2.a:$(OBJS)
|
||||
sdust:sdust.c kalloc.o kalloc.h kdq.h kvec.h kseq.h ketopt.h sdust.h
|
||||
$(CC) -D_SDUST_MAIN $(CFLAGS) $< kalloc.o -o $@ -lz
|
||||
|
||||
multi:
|
||||
$(MAKE) clean
|
||||
$(MAKE)
|
||||
mv minimap2 mm2-fast
|
||||
$(MAKE) clean
|
||||
$(MAKE) lhash=1
|
||||
mv minimap2 mm2-fast-lhash
|
||||
$(MAKE) clean
|
||||
$(MAKE) no_opt=1
|
||||
mv minimap2 mm2-fast-no-opt
|
||||
|
||||
# SSE-specific targets on x86/x86_64
|
||||
|
||||
ifeq ($(arm_neon),) # if arm_neon is defined, compile this target with the default setting (i.e. no -msse2)
|
||||
|
||||
3
index.c
3
index.c
@@ -22,7 +22,7 @@
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
extern uint64_t minimizer_lookup_time, alignment_time, dp_time, rmq_time, rmq_t1, rmq_t2, rmq_t3, rmq_t4;
|
||||
#ifdef LISA_HASH
|
||||
#include "lisa_hash.h"
|
||||
extern lisa_hash<uint64_t, uint64_t> *lh;
|
||||
@@ -479,6 +479,7 @@ void mm_idx_stat(const mm_idx_t *mi)
|
||||
}
|
||||
fprintf(stderr, "[M::%s::%.3f*%.2f] distinct minimizers: %d (%.2f%% are singletons); average occurrences: %.3lf; average spacing: %.3lf; total length: %ld\n",
|
||||
__func__, realtime() - mm_realtime0, cputime() / (realtime() - mm_realtime0), n, 100.0*n1/n, (double)sum / n, (double)len / sum, (long)len);
|
||||
fprintf(stderr, "minimizer-lookup: %lld dp: %lld rmq: %lld rmq_t1: %lld rmq_t2: %lld rmq_t3: %lld rmq_t4: %lld alignment: %lld \n", minimizer_lookup_time, dp_time, rmq_time, rmq_t1, rmq_t2, rmq_t3, rmq_t4, alignment_time);
|
||||
}
|
||||
|
||||
int mm_idx_index_name(mm_idx_t *mi)
|
||||
|
||||
12
map.c
12
map.c
@@ -9,9 +9,13 @@
|
||||
#include "mmpriv.h"
|
||||
#include "bseq.h"
|
||||
#include "khash.h"
|
||||
#include <x86intrin.h>
|
||||
|
||||
|
||||
#ifdef MANUAL_PROFILING
|
||||
extern uint64_t minimizer_lookup_time;
|
||||
extern uint64_t rmq_time;
|
||||
#endif
|
||||
|
||||
struct mm_tbuf_s {
|
||||
void *km;
|
||||
int rep_len, frag_gap;
|
||||
@@ -175,6 +179,9 @@ static mm128_t *collect_seed_hits_heap(void *km, const mm_mapopt_t *opt, int max
|
||||
static mm128_t *collect_seed_hits(void *km, const mm_mapopt_t *opt, int max_occ, const mm_idx_t *mi, const char *qname, const mm128_v *mv, int qlen, int64_t *n_a, int *rep_len,
|
||||
int *n_mini_pos, uint64_t **mini_pos)
|
||||
{
|
||||
#ifdef MANUAL_PROFILING
|
||||
uint64_t lookup_start = __rdtsc();
|
||||
#endif
|
||||
int i, n_m;
|
||||
mm_seed_t *m;
|
||||
mm128_t *a;
|
||||
@@ -207,6 +214,9 @@ static mm128_t *collect_seed_hits(void *km, const mm_mapopt_t *opt, int max_occ,
|
||||
}
|
||||
kfree(km, m);
|
||||
radix_sort_128x(a, a + (*n_a));
|
||||
#ifdef MANUAL_PROFILING
|
||||
minimizer_lookup_time += __rdtsc() - lookup_start;
|
||||
#endif
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
12
seed.c
12
seed.c
@@ -13,9 +13,9 @@ extern uint64_t minimizer_lookup_time;
|
||||
|
||||
mm_seed_t *mm_seed_collect_all(void *km, const mm_idx_t *mi, const mm128_v *mv, int32_t *n_m_)
|
||||
{
|
||||
#ifdef MANUAL_PROFILING
|
||||
uint64_t lookup_start = __rdtsc();
|
||||
#endif
|
||||
//#ifdef MANUAL_PROFILING
|
||||
// uint64_t lookup_start = __rdtsc();
|
||||
//#endif
|
||||
|
||||
#ifdef LISA_HASH
|
||||
//-----------------------------------
|
||||
@@ -65,9 +65,9 @@ mm_seed_t *mm_seed_collect_all(void *km, const mm_idx_t *mi, const mm128_v *mv,
|
||||
free(lisa_pos);
|
||||
#endif
|
||||
*n_m_ = k;
|
||||
#ifdef MANUAL_PROFILING
|
||||
minimizer_lookup_time += __rdtsc() - lookup_start;
|
||||
#endif
|
||||
//#ifdef MANUAL_PROFILING
|
||||
// minimizer_lookup_time += __rdtsc() - lookup_start;
|
||||
//#endif
|
||||
return m;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user