mirror of
https://github.com/TransparentLC/opencl_vanity_gpg.git
synced 2025-10-20 15:24:08 +00:00
chore: better list devices
This commit is contained in:
parent
329649b9ad
commit
cb5eca7d82
2 changed files with 4 additions and 10 deletions
|
@ -24,7 +24,10 @@ fn main() -> anyhow::Result<()> {
|
||||||
let device_list = utils::DeviceList::new()?;
|
let device_list = utils::DeviceList::new()?;
|
||||||
|
|
||||||
if ARGS.list_device {
|
if ARGS.list_device {
|
||||||
info!("Available OpenCL devices: \n{:?}", device_list);
|
info!("Available OpenCL devices: \n");
|
||||||
|
for (i, device) in device_list.iter().enumerate() {
|
||||||
|
println!("Device #{} - {:?}", i, device);
|
||||||
|
}
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -76,12 +76,3 @@ impl std::ops::Deref for DeviceList {
|
||||||
&self.0
|
&self.0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl std::fmt::Debug for DeviceList {
|
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
|
||||||
for (index, device) in self.0.iter().enumerate() {
|
|
||||||
writeln!(f, "Device #{} - {:?}\n", index, device)?;
|
|
||||||
}
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue