Rename Optimize's errMessages to messages
authorRob Hughes <robert.hughes@arm.com>
Tue, 5 Nov 2019 11:27:36 +0000 (11:27 +0000)
committerMatteo Martincigh <matteo.martincigh@arm.com>
Tue, 5 Nov 2019 16:27:44 +0000 (16:27 +0000)
This parameter can contain both errors and warnings, so calling it errMessages is confusing as the user only expects to see errors here.

Ideally this rename should be propagated to the lower layers of the implementation,
but the public header change is the most useful part.

Change-Id: I062564cf38d36f950adfa7c37c090b189e068134

include/armnn/INetwork.hpp
src/armnn/Network.cpp

index 1041492..6efc84f 100644 (file)
@@ -568,7 +568,7 @@ struct OptimizerOptions
 /// @param network INetwork description of the network to be optimized.
 /// @param backendPreferences The choice of the backend ordered by user preferences.
 /// @param deviceSpec DeviceSpec object as queried from the runtime. See IRuntime::GetDeviceSpec()
-/// @param errMessages if there are failures or warnings a string describing same will be added to the vector
+/// @param messages If there are failures or warnings a string describing same will be added to the vector
 /// @param options OptimizerOptions object with optimizer configuration options
 /// @return An IOptimizedNetworkPtr interface to the optimized network, throws an exception derived from
 /// armnn::Exception if process fails.
@@ -577,5 +577,5 @@ IOptimizedNetworkPtr Optimize(const INetwork& network,
                               const std::vector<BackendId>& backendPreferences,
                               const IDeviceSpec& deviceSpec,
                               const OptimizerOptions& options = OptimizerOptions(),
-                              Optional<std::vector<std::string>&> errMessages = EmptyOptional());
+                              Optional<std::vector<std::string>&> messages = EmptyOptional());
 } //namespace armnn
index a708361..f4bfc7a 100644 (file)
@@ -793,7 +793,7 @@ IOptimizedNetworkPtr Optimize(const INetwork& inNetwork,
                               const std::vector<BackendId>& backendPreferences,
                               const IDeviceSpec& deviceSpec,
                               const OptimizerOptions& options,
-                              Optional<std::vector<std::string>&> errMessages)
+                              Optional<std::vector<std::string>&> messages)
 {
     if (backendPreferences.empty())
     {
@@ -837,7 +837,7 @@ IOptimizedNetworkPtr Optimize(const INetwork& inNetwork,
         std::stringstream failureMsg;
         failureMsg << "None of the preferred backends " << backendPreferences
                    << " are supported. Current platform provides " << backendSettings.m_SupportedBackends;
-        ReportError(failureMsg.str(), errMessages);
+        ReportError(failureMsg.str(), messages);
         return IOptimizedNetworkPtr(nullptr, &IOptimizedNetwork::Destroy);
     }
 
@@ -852,7 +852,7 @@ IOptimizedNetworkPtr Optimize(const INetwork& inNetwork,
                                                              backendSettings,
                                                              firstLayer,
                                                              lastLayer,
-                                                             errMessages);
+                                                             messages);
     if (assignBackendsResult.m_Error)
     {
         // Failed to assign a backend to each layer
@@ -866,7 +866,7 @@ IOptimizedNetworkPtr Optimize(const INetwork& inNetwork,
     OptimizationResult backendOptimizationResult = ApplyBackendOptimizations(optNetObjPtr,
                                                                              backendSettings,
                                                                              backends,
-                                                                             errMessages);
+                                                                             messages);
     if (backendOptimizationResult.m_Error)
     {
         // Failed to apply the backend-specific optimizations
@@ -884,7 +884,7 @@ IOptimizedNetworkPtr Optimize(const INetwork& inNetwork,
     OptimizationResult strategyResult = SelectTensorHandleStrategy(optGraph,
                                                                    backends,
                                                                    tensorHandleFactoryRegistry,
-                                                                   errMessages);
+                                                                   messages);
     if (strategyResult.m_Error)
     {
         // Failed to apply the backend-specific optimizations