Skip to content

Commit

Permalink
Remove parallel code
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperFluffy committed Jan 22, 2018
1 parent b901773 commit 1770f86
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 131 deletions.
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ ndarray = "0.11"
version = "0.1.5"
default-features = false

[dependencies.ndarray-parallel]
version = "0.7"
optional = true
# [dependencies.ndarray-parallel]
# version = "0.7"
# optional = true

[dev-dependencies]
lazy_static = "1.0"
Expand All @@ -22,7 +22,7 @@ rand = "0.4"
[dev-dependencies.openblas-src]
version = "0.5.6"

[features]
parallel = ["ndarray-parallel"]
# [features]
# parallel = ["ndarray-parallel"]

test = ["parallel"]
# test = ["parallel"]
32 changes: 0 additions & 32 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
extern crate cblas;
extern crate ndarray;

#[cfg(feature="parallel")]
extern crate ndarray_parallel;

#[cfg(test)]
#[macro_use]
extern crate lazy_static;
Expand All @@ -17,42 +14,13 @@ extern crate openblas_src;
#[cfg(test)]
extern crate rand;

#[cfg(feature="parallel")]
mod parallel;

mod cgs;
mod cgs2;
mod mgs;

#[cfg(test)]
pub(crate) mod utils;

#[cfg(feature="parallel")]
pub use parallel::ParallelModifiedGramSchmidt;

pub use cgs::ClassicalGramSchmidt;
pub use cgs2::ReorthogonalizedGramSchmidt;
pub use mgs::ModifiedGramSchmidt;

// #[cfg(test)]
// mod tests {
// #[cfg(feature="parallel")]
// #[test]
// fn sequential_equals_parallel() {

// use ndarray_rand::RandomExt;
// use rand;
// use super::ParallelModifiedGramSchmidt;


// let size = 256;
// let dist = rand::distributions::Normal::new(0.0, 1.0);
// let matrix = Array2::random([size,size], dist);

// let (orth_seq, norm_seq) = ModifiedGramSchmidt::compute(&matrix);
// let (orth_par, norm_par) = ParallelModifiedGramSchmidt::compute(&matrix);

// assert!(orth_seq.all_close(&orth_par, 1e-16));
// assert!(norm_seq.all_close(&norm_par, 1e-16));
// }
// }
93 changes: 0 additions & 93 deletions src/parallel.rs

This file was deleted.

0 comments on commit 1770f86

Please sign in to comment.