aboutsummaryrefslogtreecommitdiff
path: root/delegate/classic/src
diff options
context:
space:
mode:
authorJohn Mcloughlin <john.mcloughlin@arm.com>2023-03-24 12:07:25 +0000
committerFrancis Murtagh <francis.murtagh@arm.com>2023-04-12 18:28:23 +0100
commitc5ee0d7460f1e0ec7e2b0639e3e8962934c4df09 (patch)
tree931f1403589c34fd2de6b94d95e9e172a92424fe /delegate/classic/src
parentca5c82af9269e7fd7ed17c7df9780a75fdaa733e (diff)
downloadarmnn-c5ee0d7460f1e0ec7e2b0639e3e8962934c4df09.tar.gz
IVGCVSW-7197 Implement Pimpl Idiom for OptimizerOptions
Signed-off-by: John Mcloughlin <john.mcloughlin@arm.com> Change-Id: Id4bdc31e3e6f18ccaef232c29a2d2825c915b21c
Diffstat (limited to 'delegate/classic/src')
-rw-r--r--delegate/classic/src/armnn_delegate.cpp6
-rw-r--r--delegate/classic/src/test/ArmnnClassicDelegateTest.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/delegate/classic/src/armnn_delegate.cpp b/delegate/classic/src/armnn_delegate.cpp
index 4ddfc1a35f..b494a36769 100644
--- a/delegate/classic/src/armnn_delegate.cpp
+++ b/delegate/classic/src/armnn_delegate.cpp
@@ -335,7 +335,7 @@ ArmnnSubgraph* ArmnnSubgraph::Create(TfLiteContext* tfLiteContext,
DelegateData delegateData(delegate->m_Options.GetBackends());
// Build ArmNN Network
- armnn::NetworkOptions networkOptions = delegate->m_Options.GetOptimizerOptions().m_ModelOptions;
+ armnn::NetworkOptions networkOptions = delegate->m_Options.GetOptimizerOptions().GetModelOptions();
armnn::NetworkId networkId;
delegateData.m_Network = armnn::INetwork::Create(networkOptions);
@@ -424,11 +424,11 @@ ArmnnSubgraph* ArmnnSubgraph::Create(TfLiteContext* tfLiteContext,
armnn::MemorySource inputSource = armnn::MemorySource::Undefined;
armnn::MemorySource outputSource = armnn::MemorySource::Undefined;
// There's a bit of an assumption here that the delegate will only support Malloc memory source.
- if (delegate->m_Options.GetOptimizerOptions().m_ImportEnabled)
+ if (delegate->m_Options.GetOptimizerOptions().GetImportEnabled())
{
inputSource = armnn::MemorySource::Malloc;
}
- if (delegate->m_Options.GetOptimizerOptions().m_ExportEnabled)
+ if (delegate->m_Options.GetOptimizerOptions().GetExportEnabled())
{
outputSource = armnn::MemorySource::Malloc;
}
diff --git a/delegate/classic/src/test/ArmnnClassicDelegateTest.cpp b/delegate/classic/src/test/ArmnnClassicDelegateTest.cpp
index 26acfe91f1..409b769273 100644
--- a/delegate/classic/src/test/ArmnnClassicDelegateTest.cpp
+++ b/delegate/classic/src/test/ArmnnClassicDelegateTest.cpp
@@ -76,7 +76,7 @@ TEST_CASE ("ArmnnDelegateOptimizerOptionsRegistered")
// Create the Armnn Delegate
std::vector<armnn::BackendId> backends = { armnn::Compute::CpuRef };
- armnn::OptimizerOptions optimizerOptions(true, true, false, true);
+ armnn::OptimizerOptionsOpaque optimizerOptions(true, true, false, true);
armnnDelegate::DelegateOptions delegateOptions(backends, optimizerOptions);
std::unique_ptr<TfLiteDelegate, decltype(&armnnDelegate::TfLiteArmnnDelegateDelete)>