remove loop mapping. refactor
This commit is contained in:
@@ -18,27 +18,21 @@ void register_signal_handlers(void)
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
register_signal_handlers();
|
||||
struct device devices[32];
|
||||
int num_devs = gddr6_detect_compatible_gpus(devices, 32);
|
||||
|
||||
gddr6_init();
|
||||
int num_devs = gddr6_detect_compatible_gpus();
|
||||
|
||||
if (num_devs == 0)
|
||||
{
|
||||
printf("No compatible GPU found.\n");
|
||||
return 1;
|
||||
} else {
|
||||
printf("Found %d compatible GPU(s).\n", num_devs);
|
||||
}
|
||||
|
||||
for (int i = 0; i < num_devs; i++)
|
||||
{
|
||||
struct device *device = &devices[i];
|
||||
printf("Device: %s %s (%s / 0x%04x) pci=%x:%x:%x\n", device->name, device->vram,
|
||||
device->arch, device->dev_id, device->bus, device->dev, device->func);
|
||||
}
|
||||
|
||||
gddr6_initialize();
|
||||
gddr6_monitor_temperatures(devices, num_devs);
|
||||
gddr6_cleanup(0);
|
||||
gddr6_memory_map();
|
||||
gddr6_monitor_temperatures();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user