Extract broadcasting to a separate util function So that it can be used in other operations. Add new tests file for utility functions, a target to build it and a test for the newly created broadcasting function. Test: NeuralNetworkTest_static Test: NeuralNetworkTest_utils Change-Id: I5d4b84d078668d2d879bb032132641a36549f3dd Merged-In: I5d4b84d078668d2d879bb032132641a36549f3dd (cherry picked from commit f4cc13ed33f189c236e4565bcff72e755ccd12a0)
diff --git a/common/Android.bp b/common/Android.bp index 2e353f3..f5c76e1 100644 --- a/common/Android.bp +++ b/common/Android.bp
@@ -161,3 +161,33 @@ "tensorflow_headers", ], } + +cc_test { + name: "NeuralNetworksTest_utils", + shared_libs: [ + "libhidlmemory", + "libneuralnetworks", + "[email protected]", + "[email protected]", + "[email protected]", + "[email protected]", + "[email protected]", + ], + static_libs: [ + "libbase", + "libgmock", + "liblog", + "libneuralnetworks_common", + ], + cflags: [ + "-Wno-extern-c-compat", + "-Wno-unused-variable", + ], + srcs: [ + "UtilsTest.cpp", + ], + local_include_dirs: [ "include" ], + header_libs: [ + "tensorflow_headers", + ], +}