summaryrefslogtreecommitdiff
path: root/neuralnetworks/aidl/vts/functional/Utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'neuralnetworks/aidl/vts/functional/Utils.cpp')
-rw-r--r--neuralnetworks/aidl/vts/functional/Utils.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/neuralnetworks/aidl/vts/functional/Utils.cpp b/neuralnetworks/aidl/vts/functional/Utils.cpp
index 325a436f79..efd5bca517 100644
--- a/neuralnetworks/aidl/vts/functional/Utils.cpp
+++ b/neuralnetworks/aidl/vts/functional/Utils.cpp
@@ -177,6 +177,17 @@ std::string gtestCompliantName(std::string name) {
return os << toString(errorStatus);
}
+std::string toString(MemoryType type) {
+ switch (type) {
+ case MemoryType::ASHMEM:
+ return "ASHMEM";
+ case MemoryType::BLOB_AHWB:
+ return "BLOB_AHWB";
+ case MemoryType::DEVICE:
+ return "DEVICE";
+ }
+}
+
Request ExecutionContext::createRequest(const TestModel& testModel, MemoryType memoryType) {
CHECK(memoryType == MemoryType::ASHMEM || memoryType == MemoryType::BLOB_AHWB);