Commit Graph

64 Commits (50f99b6890029bb5e553dd5f2b6a4c559a2f45df)

Author SHA1 Message Date
John Marshall 50f99b6890 On other platforms, emulate SSE2 SIMD calls using scalar code 2022-06-26 19:38:20 +01:00
John Marshall b64ccddda7 On ARM, rewrite SSE2 SIMD calls using Neon intrinsics
Many Intel intrinsics have a corresponding Neon equivalent.
Other cases are more interesting:

* Neon's vmaxvq directly selects the maximum entry in a vector,
  so can be used to implement both the __max_16/__max_8 macros
  and the _mm_movemask_epi8 early loop exit. Introduce additional
  helper macros alongside __max_16/__max_8 so that the early loop
  exit can similarly be implemented differently on the two platforms.

* Full-width shifts can be done via vextq. This is defined close to
  the ksw_u8()/ksw_i16() functions (rather than in neon_sse.h) as it
  implicitly uses one of their local variables.

* ksw_i16() uses saturating *signed* 16-bit operations apart from
  _mm_subs_epu16; presumably the data is effectively still signed but
  we wish to keep it non-negative. The ARM intrinsics are more careful
  about type checking, so this requires an extra U16() helper macro.
2022-06-20 20:43:17 +01:00
John Marshall be36d981cd Use $CPPFLAGS and $LDFLAGS if they are set
The bwa makefile doesn't set these two itself, but the environment
or make command line might set any of CC/CPPFLAGS/CFLAGS/LDFLAGS/LIBS.
Use $(CPPFLAGS) when compiling and $(LDFLAGS) when linking so they can
be used to customise the build. Remove $(DFLAGS) from link commands as
these preprocessor options are irrelevant for linking.
2022-03-07 10:59:42 +00:00
Heng Li 9a828344ec moved indexing to libbwa 2016-02-13 18:48:46 -05:00
Heng Li feeb41f42d updated dependencies 2016-01-26 13:54:47 -05:00
Heng Li be2020c4af ropebwt2 for bwt construction 2016-01-26 13:46:08 -05:00
Heng Li 163f949a33 added maxk: max unique k-mer at each position 2015-02-08 16:49:25 -05:00
Heng Li d0a796b644 moved bwashm.o to AOBJS 2014-10-17 16:23:35 -04:00
Heng Li 57436ab405 added -lrt on Linux 2014-10-15 23:23:01 -04:00
Heng Li 6a0952948d shared memory 2014-10-15 14:44:08 -04:00
Heng Li 230cd16712 updated dependency 2014-09-16 10:17:30 -04:00
Heng Li be74dbc00c Release bwa-0.7.9-r783 2014-05-19 09:09:11 -04:00
Heng Li e4752b321b Release bwa-0.7.9-r782 2014-05-19 09:08:07 -04:00
Heng Li 061c63f36a r766: removed useless code 2014-05-13 13:09:29 -04:00
Heng Li 0168f39eeb r765: fixed a declaration error
Reported by Andreas Tile from Debian
2014-05-13 12:54:23 -04:00
Heng Li 39a6cd5bb0 r762: cleanup for the new release; unfinished
It will take to make the documentation ready.
2014-05-11 15:15:44 -04:00
Heng Li 44754cd615 r731: separate layouter 2014-04-28 10:39:29 -04:00
Heng Li 6d4a6debdc r716: changed -x pbread 2014-04-14 16:04:29 -04:00
Heng Li 1209f161c9 code backup 2014-04-14 12:24:45 -04:00
Heng Li 8220008564 an attempt to layout tool 2014-04-09 16:11:52 -04:00
Heng Li f12dfae772 dev-465: a new output format for read overlap
Also moved a few functions to bwamem_extra.c. File bwamem.c is becoming far too
long.
2014-04-08 16:29:36 -04:00
Heng Li 8ede4ffbfa Fixed clang compiling warnings 2014-03-16 15:18:22 -04:00
Heng Li 19d33faa30 use kthread for multi-threading
Bwa-mem should have better performance with many CPU cores.
2013-11-02 12:13:11 -04:00
Heng Li 9735d7a31a conform to the latest (unpublished) SAM spec
for chimeric alignments
2013-05-22 19:45:16 -04:00
Heng Li 9a6abe51b6 r391: better method to resolve xref alignment
The old method does not work when the alignment bridges three chr. This may
actually happen often. The new method does not work all the time, either, but
should be better than the old one. It is also simpler, arguably.
2013-05-22 18:57:51 -04:00
Rob Davies 5c43a1fdc9 Removed more dependencies on utils.h
bamlite.c now includes some wrappers for gzopen/gzread/gzclose that print
messages when errors occur.  They do not attempt to quit the program but
pass on the return code.  bwaseqio.c now checks the return codes from
bam_open, bam_close and bam_read1.

Code in bwt_gen.c now checks for IO errors itself instead of using the
wrappers.  A benefit of this is it can now say which file had a problem.

Removed call to err_fatal_simple in is_bwt and unnecessary inclusion of
malloc_wrap.h in ksw.h.
2013-05-03 11:38:48 +01:00
Rob Davies 96e445d9e4 Reduce dependency on utils.h - new malloc wrapping scheme.
Remove xmalloc, xcalloc, xrealloc and xstrdup from utils.h and revert calls
to the normal malloc, calloc, realloc, strdup.  Add new files malloc_wrap.[ch]
with the wrapper functions.  malloc_wrap.h #defines malloc etc. to the
wrapper, but only if USE_MALLOC_WRAPPERS has been defined.

Put #include "malloc_wrap.h" in any file that uses *alloc or strdup.  This
is also in a #ifdef USE_MALLOC_WRAPPERS ... #endif block to make using the
wrappers optional.  Add -DUSE_MALLOC_WRAPPERS into the makefile so they
should normally get added.

This is an improvement on the previous method as we now don't need to
worry about stray function calls that were not changed to the wrapped version
and the code will still work even if the wrapping is disabled.

Other possible methods of doing this are using malloc_hook (glibc-specific),
adding -include malloc_wrap.h to the gcc command-line (somewhat
gcc-specific) or making our own malloc function and using dlopen (scary).
This way is probably the most portable.
2013-05-02 15:12:01 +01:00
Rob Davies b3d0a13b32 Merge branch 'master' into master_fixes. Merged up to release bwa-0.7.4-r385. 2013-04-23 17:31:34 +01:00
Heng Li 2f6897c72b r384: don't compile bwamem-lite by default 2013-04-23 11:27:30 -04:00
Rob Davies 9228e48efd Merge branch 'master' into master_fixes
Conflicts:
	Makefile
2013-03-11 13:50:49 +00:00
Heng Li 017be45407 r342: bugfix in bwasw - AS is off by one
but I do not understand why the old code does not have the same problem.
2013-03-08 12:06:45 -05:00
Rob Davies aabd990e8f Merge branch 'master' into master_fixes
Conflicts:
	Makefile
	bwape.c
	bwase.c
	bwtsw2_aux.c
	stdaln.c
2013-03-08 16:46:45 +00:00
Heng Li 042e1f4442 r334: added pemerge to bwa 2013-03-06 21:55:02 -05:00
Jon Sorenson 25366c7220 Fixing problem with linking to libm on some Ubuntu systems (I see this on machine running 11.04, kernel 3.0.0-14-virtual). Changing order of -lm on the command line seems to do the trick and should be tolerated in other environments. 2013-03-05 20:48:16 +00:00
Heng Li 98f8966750 r329: ditch stdaln.{c,h}; no changes to bwa-mem
stdaln.{c,h} was written ten years ago. Its local and SW extension code are
actually buggy (though that rarely happens and usually does not affect the
results too much). ksw.{c,h} is more concise, potentially faster, less buggy,
and richer in features.
2013-03-05 12:00:24 -05:00
Rob Davies 8a078cc16d Merge branch 'master' into master_fixes
Conflicts:
	bntseq.c
	bwamem.c
2013-03-05 10:21:07 +00:00
Heng Li 35fb7f9fdf r315: move kopen.o out of libbwa.a 2013-03-01 11:47:51 -05:00
Rob Davies 6beab5f765 Merge branch 'master' into master_fixes
Merge changes to commit c5434ac (0.7.0 release)

Conflicts:
	Makefile
	bwamem.c
2013-03-01 10:22:49 +00:00
Rob Davies 3d33ab063e Merge branch 'master' into master_fixes
Merged to master version b621d3a

Conflicts:
	Makefile
	bntseq.c
	bwa.c
	bwase.c
	bwaseqio.c
	bwtaln.c
	bwtindex.c
	bwtio.c
	bwtmisc.c
	bwtsw2_aux.c
	cs2nt.c
	fastmap.c
	khash.h
	kseq.h
	ksw.c
	kvec.h
	simple_dp.c
	utils.c
	utils.h
2013-03-01 09:37:46 +00:00
Heng Li df7c3f0000 r308: added a new API to convert region to CIGAR
and an example program demonstrating how to do single-end alignment in <50
lines of C code.
2013-02-27 22:28:29 -05:00
Heng Li 64d92d26df more documentation in ksw.h 2013-02-27 21:40:46 -05:00
Heng Li 570e082b38 change CC back to gcc 2013-02-24 23:45:40 -05:00
Heng Li 6e7903e9f3 added kopen support 2013-02-23 17:09:23 -05:00
Heng Li e613195e17 moved some common code to bwa.{c,h} 2013-02-23 15:30:46 -05:00
Heng Li 6230f86799 merged bwtmisc.c to bwtindex.c
bwtmisc.c implements routines related to indexing
2013-02-22 17:23:34 -05:00
Heng Li f122fad562 minor code clean up
bwtio.c is merged to bwt.c
2013-02-22 17:09:40 -05:00
Heng Li df1ff2b36e better and proper way to infer orinentation 2013-02-14 12:59:32 -05:00
Heng Li 2fc469d0c9 code backup 2013-02-12 12:09:36 -05:00
Heng Li 95d18449b3 merge bseq.{h,c} to utils.{h,c}
I do not like many small files.
2013-02-12 10:36:15 -05:00
Heng Li 6ad5a3c086 removed color-space support
which has been broken since 0.6.x
2013-02-12 10:21:17 -05:00