Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
run: cargo build --verbose --package simd-minimizers
- name: Run tests
run: cargo test --verbose --package simd-minimizers
- name: Run tests release
run: cargo test --release --verbose --package simd-minimizers

test-mac:
runs-on: macos-latest
Expand All @@ -27,3 +29,5 @@ jobs:
run: cargo build --verbose --package simd-minimizers
- name: Run tests
run: cargo test --verbose --package simd-minimizers
- name: Run tests release
run: cargo test --release --verbose --package simd-minimizers
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ let minimizer_vals: Vec<u64> = canonical_minimizers(k, w)
.run(packed_seq.as_slice(), &mut minimizer_positions)
.values_u64()
.collect();

// Compute _syncmers_ positions and values instead:
let mut syncmer_positions = Vec::new();
// List of (k+w-1)-mer values.
let syncmer_vals: Vec<u64> = canonical_syncmers(k, w)
.run(packed_seq.as_slice(), &mut syncmer_positions)
.values_u64()
.collect();
```

## Benchmarks
Expand Down
3 changes: 2 additions & 1 deletion src/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pub fn collect_and_dedup_into_scalar(mut it: impl Iterator<Item = u32>, out_vec:
});
out_vec.truncate(idx + 1);
}

pub fn collect_and_dedup_with_index_into_scalar(
it: impl Iterator<Item = u32>,
out_vec: &mut Vec<u32>,
Expand Down Expand Up @@ -111,7 +112,7 @@ pub trait CollectAndDedup: Sized {
/// Works by taking 8 elements from each stream, and then transposing the SIMD-matrix before writing out the results.
///
/// By default (when `SUPER` is false), the deduplicated input values are written in `out_vec`.
/// When `SUPER` is true, the index of the stream in which the input value first appeared, i.e., the start of its super-k-mer, is additionale written in `idx_vec`.
/// When `SUPER` is true, the index in the stream where the input value first appeared, i.e., the start of its super-k-mer, is additionaly written in `idx_vec`.
fn collect_and_dedup_into_impl<const SUPER: bool, const SKIP_MAX: bool>(
self,
out_vec: &mut Vec<u32>,
Expand Down
Loading