//pub mod incremental_block; pub mod intuitive; #[cfg(feature = "gpu")] pub mod opencl; pub mod gpusolver; lazy_static! { pub static ref PERMUTATIONS: (Vec>, Vec) = { let n = crate::N; let mut heap = (1..=n).collect::>(); let heap = permutohedron::Heap::new(&mut heap); let n_f = permutohedron::factorial(n as usize); let mut permutations = Vec::with_capacity(n_f); let mut masks: Vec = vec![0; n_f]; println!("Generating permutations"); for (j, data) in heap.enumerate() { let mut sum = 0; permutations.push(data.clone()); for stone in data.iter().take(n as usize - 1) { sum += stone; masks[j] |= 1 << sum; } } (permutations, masks) }; }