-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from JDAI-CV/update
Add GetDevices and misc updates
- Loading branch information
Showing
9 changed files
with
87 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include <chrono> | ||
#include <iostream> | ||
#include <vector> | ||
|
||
#include <common/helper.h> | ||
#include <dnnlibrary/ModelBuilder.h> | ||
|
||
using namespace android::nn::wrapper; | ||
using dnn::ModelBuilder; | ||
|
||
int main() { | ||
ModelBuilder builder; | ||
builder.Prepare(); | ||
const auto devices = builder.GetDevices(); | ||
if (devices.has_value()) { | ||
for (const auto &device : devices.value()) { | ||
PNT(device.name, device.feature_level, device.type, device.version); | ||
} | ||
} else { | ||
std::cout << "Cannot get devices" << std::endl; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include <string> | ||
|
||
namespace dnn { | ||
struct Device { | ||
const std::string name; | ||
const int64_t feature_level; | ||
const int type; | ||
const std::string version; | ||
}; | ||
} // namespace dnn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters