Implement Banded LCS calculation with scalar and SIMD support

Introduces the BandedLCS function for efficient LCS scoring, supporting both scalar and SIMD implementations. Adds comprehensive unit tests, benchmarking utilities, and error handling for sequence constraints.
This commit is contained in:
Eric Coissac committed 2026-11-03 09:28:46 +11:00
1 parent f3250984a5
commit 75bb635a6c
7 files changed
+763 -7

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
//go:build !goexperiment.simd
package obialign
const haveSIMD = false
// encodeBases and bandedLCSSIMD are never called without GOEXPERIMENT=simd
// (haveSIMD is false); they exist to keep the dispatcher uniform.
func encodeBases(ws *bandedLCSWorkspace, a, b []byte) {}
func bandedLCSSIMD(lA, lB, kmin, kmax int, ws *bandedLCSWorkspace) uint32 {
return 0
}