mirror of
https://github.com/metabarcoding/obitools4.git
synced 2026-11-09 09:24:41 +00:00
Introduces k-mer distance structures and SIMD implementation for LCS simulation. Adds support for concurrent, read-only k-mer partners, implements data preparation for SIMD alignment, and adds comprehensive testing and benchmarking capabilities.
22 lines
539 B
Go
22 lines
539 B
Go
//go:build !goexperiment.simd
|
|
|
|
package obikmer
|
|
|
|
func kmerLCSBatch(query uint64, partners []uint64, k int, out []KmerLCSResult) {
|
|
kmerLCSBatchScalar(query, partners, k, out)
|
|
}
|
|
|
|
// kmerLCSPrepared has nothing to precompute without SIMD.
|
|
type kmerLCSPrepared struct {
|
|
k int
|
|
partners []uint64
|
|
}
|
|
|
|
func prepareKmerLCS(partners []uint64, k int) kmerLCSPrepared {
|
|
return kmerLCSPrepared{k: k, partners: partners}
|
|
}
|
|
|
|
func (p *kmerLCSPrepared) align(query uint64, out []KmerLCSResult) {
|
|
kmerLCSBatchScalar(query, p.partners, p.k, out)
|
|
}
|