From 6ede24bea8cc1dc177bb9dd1150b3a914888d194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Csuchapalaver=E2=80=9D?= <“jlivesey@gmail.com”> Date: Fri, 10 Sep 2021 11:45:15 -0400 Subject: [PATCH] organizing branch variations --- README.md | 12 +++++------- src/lib.rs | 11 +++++------ 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index f8aee9d..c8b2458 100644 --- a/README.md +++ b/README.md @@ -10,14 +10,12 @@ or, searching for kmers of length 21 across multiple records: -On branches: +Branches are Variations in Implementation: --main is the same as ParallelBridge +-- main uses rayon's ParallelBridge (https://docs.rs/rayon/1.5.1/rayon/iter/trait.ParallelBridge.html) --ParallelBridge uses rayon's ParallelBridge (https://docs.rs/rayon/1.5.1/rayon/iter/trait.ParallelBridge.html) +-- collect_the_iterator uses rayon's parallel iterator by collecting the rust-bio fasta Reader into a vector --collect_the_iterator is able to use rayon by 'collecting' the rust-bio fasta Reader into a vector of Records +-- std_threads uses Rust's standard library thread to process in parallel --std_threads uses Rust's standard library thread to achieve multithreadedness - --single-thread has no multithreaded processing +-- single-thread has no parallel processing diff --git a/src/lib.rs b/src/lib.rs index 8456816..6cf1339 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,16 +6,15 @@ use std::{ path::Path, str }; - extern crate bio; use bio::{alignment::sparse::hash_kmers, alphabets::dna::revcomp, - io::fasta}; - + io::fasta +}; extern crate rayon; -use rayon::iter::ParallelBridge; -use rayon::prelude::ParallelIterator; - +use rayon::{iter::ParallelBridge, + prelude::ParallelIterator +}; pub struct Config { pub kmer_len: String, pub filepath: String,