blob: 4c58251c6680b313fcb1a81af229a3764cdef190 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
use crate::solver::{wall_stats, Solver, IteratorSolver};
use crate::structs::StoneWall;
pub struct GpuSolver {
n: u32, h: u32, w: u32,
permutations: Vec<Vec<u32>>,
masks: Vec<u64>,
}
impl GpuSolver {
fn solve_to_vec(&mut self) -> Vec<StoneWall> {
vec![]
}
}
impl Solver for GpuSolver {
fn new(n: u32) -> Self {
let (h, w) = wall_stats(n);
Self {
n, h, w,
permutations: vec![],
masks: vec![]
}
}
fn n(&self) -> u32 {
self.n
}
fn h(&self) -> u32 {
self.h
}
fn w(&self) -> u32 {
self.w
}
}
impl IteratorSolver for GpuSolver {
type IntoIter = std::vec::IntoIter<StoneWall>;
fn solve(mut self) -> Self::IntoIter {
self.solve_to_vec().into_iter()
}
}
|