diff options
| author | android-build-team Robot <android-build-team-robot@google.com> | 2017-10-11 17:31:27 +0000 |
|---|---|---|
| committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-10-11 17:31:27 +0000 |
| commit | 0e963cb267849f610256925ea739ef255aa6d6e0 (patch) | |
| tree | 4231e4fcf17df9923f91087d2ea10ec614041f95 | |
| parent | a320bfc7fdbbea0a1e939b5833eeb5e36a696384 (diff) | |
| parent | 9fd500490010bf10238840bcb2b3e9e6dced5207 (diff) | |
| download | android_hardware_interfaces-0e963cb267849f610256925ea739ef255aa6d6e0.tar.gz android_hardware_interfaces-0e963cb267849f610256925ea739ef255aa6d6e0.tar.bz2 android_hardware_interfaces-0e963cb267849f610256925ea739ef255aa6d6e0.zip | |
Snap for 4386615 from 9fd500490010bf10238840bcb2b3e9e6dced5207 to oc-m2-release
Change-Id: Ia13fe46afa88f92985c98912ffc1f311942ef98c
| -rw-r--r-- | neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp b/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp index 735528b95..d740b5f53 100644 --- a/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp +++ b/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp @@ -46,11 +46,11 @@ using ::generated_tests::Int32Operands; using ::generated_tests::Quant8Operands; using ::generated_tests::compare; -template <typename ty> +template <typename T> void copy_back_(MixedTyped* dst, const std::vector<RequestArgument>& ra, char* src) { MixedTyped& test = *dst; - for_each(test, [&ra, src](int index, std::vector<ty>& m) { - ASSERT_EQ(m.size(), ra[index].location.length / sizeof(ty)); + for_each<T>(test, [&ra, src](int index, std::vector<T>& m) { + ASSERT_EQ(m.size(), ra[index].location.length / sizeof(T)); char* begin = src + ra[index].location.offset; memcpy(m.data(), begin, ra[index].location.length); }); @@ -213,10 +213,8 @@ void Execute(const sp<IDevice>& device, std::function<Model(void)> create_model, copy_back(&test, outputs_info, outputPtr); outputMemory->commit(); // Filter out don't cares - MixedTyped filtered_golden; - MixedTyped filtered_test; - filter(golden, &filtered_golden, is_ignored); - filter(test, &filtered_test, is_ignored); + MixedTyped filtered_golden = filter(golden, is_ignored); + MixedTyped filtered_test = filter(test, is_ignored); // We want "close-enough" results for float compare(filtered_golden, filtered_test); |
