diff options
Diffstat (limited to 'src/solvers/gpu/manager.rs')
-rw-r--r-- | src/solvers/gpu/manager.rs | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/solvers/gpu/manager.rs b/src/solvers/gpu/manager.rs index b3d88b8..e210af2 100644 --- a/src/solvers/gpu/manager.rs +++ b/src/solvers/gpu/manager.rs @@ -51,8 +51,16 @@ impl OclManager { let src = include_str!("check.cl"); let (output_sender, output_handle) = super::output::Output::launch_sevice(permutations, permutations_mask); - let (host_sender, host_handle) = - super::host::Host::launch_sevice(permutations_mask, n, h, w, wg_size as usize, src); + let (host_sender, host_handle) = super::host::Host::launch_sevice( + permutations_mask, + n, + h, + w, + wg_size as usize, + src, + output_sender.clone(), + ) + .unwrap(); let (sender, receiver) = channel(); @@ -85,11 +93,15 @@ impl OclManager { loop { match self.receiver.recv().expect("Channel to GPU Manager broke") { Message::CheckRequest(request) => { - if let Some(buffer) = self.buffers[request.queue as usize].read(request) { + let queue = request.queue; + println!("{}", queue); + if let Some(buffer) = self.buffers[queue as usize].read(request) { self.host_sender - .send(Message::HostMessage((self.job_id, buffer.0.into()))); + .send(Message::HostMessage((self.job_id, queue, buffer.0.into()))) + .unwrap(); self.output_sender - .send(Message::OutputMessage((self.job_id, buffer.1.into()))); + .send(Message::OutputMessage((self.job_id, buffer.1.into()))) + .unwrap(); self.job_id += 1; } } |