device info

This commit is contained in:
2025-07-29 16:41:22 +02:00
parent 087fd1e9b3
commit 9e33d5a1d2
9 changed files with 243 additions and 6 deletions

View File

@@ -25,6 +25,8 @@ nn_computer *nn_newComputer(nn_universe *universe, nn_address address, nn_archit
nn_dealloc(alloc, c, sizeof(nn_computer));
return NULL;
}
// TODO: handle OOM
c->deviceInfo = nn_newDeviceInfoList(&universe->ctx, 16);
c->timeOffset = nn_getTime(universe);
c->supportedArchCount = 0;
c->argc = 0;
@@ -646,3 +648,7 @@ const char *nn_resource_nextMethodInfo(nn_computer *computer, nn_size_t id, cons
}
return NULL;
}
nn_deviceInfoList_t *nn_getComputerDeviceInfoList(nn_computer *computer) {
return computer->deviceInfo;
}