MCPcopy Create free account
hub / github.com/JDAI-CV/DNNLibrary / FORZ

Function FORZ

dnnlibrary/ModelBuilder.cpp:362–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

360 THROW_ON_ERROR(nnapi_->ANeuralNetworks_getDeviceCount(&device_count));
361 std::vector<Device> devices;
362 FORZ(i, device_count) {
363 ANeuralNetworksDevice *nn_device;
364 nnapi_->ANeuralNetworks_getDevice(i, &nn_device);
365 const char *nn_name_ptr;
366 nnapi_->ANeuralNetworksDevice_getName(nn_device, &nn_name_ptr);
367 const std::string device_name(nn_name_ptr);
368 int64_t feature_level;
369 nnapi_->ANeuralNetworksDevice_getFeatureLevel(nn_device,
370 &feature_level);
371 int type;
372 nnapi_->ANeuralNetworksDevice_getType(nn_device, &type);
373 const char *nn_version_ptr;
374 nnapi_->ANeuralNetworksDevice_getVersion(nn_device,
375 &nn_version_ptr);
376 const std::string version(nn_version_ptr);
377 Device device{device_name, feature_level, type, version};
378 devices.push_back(device);
379 }
380 return devices;
381 } else {
382 return dnn::nullopt;

Callers 1

GetQuantInfoFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected