24.08
NeonBackendModelContext.hpp
Go to the documentation of this file.
1
//
2
// Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
3
// SPDX-License-Identifier: MIT
4
//
5
#pragma once
6
7
#include <
armnn/backends/IBackendContext.hpp
>
8
9
namespace
armnn
10
{
11
12
/// The NeonBackendModelContext is used to pass in Neon specific backend ModelOptions. The supported backend
13
/// ModelOptions are:
14
/// - "FastMathEnabled"\n
15
/// Using the fast_math flag can lead to performance improvements in fp32 and fp16 layers but may result in\n
16
/// results with reduced or different precision. The fast_math flag will not have any effect on int8 performance.
17
/// - "NumberOfThreads"\n
18
/// Specify the number of threads used by the CpuAcc backend.
19
class
NeonBackendModelContext
:
public
IBackendModelContext
20
{
21
public
:
22
NeonBackendModelContext
(
const
ModelOptions
& modelOptions);
23
24
bool
IsFastMathEnabled
()
const
;
25
26
unsigned
int
GetNumberOfThreads
()
const
;
27
28
private
:
29
bool
m_IsFastMathEnabled;
30
unsigned
int
m_NumberOfThreads;
31
};
32
33
}
// namespace armnn
armnn::IBackendModelContext
Definition:
IBackendContext.hpp:36
armnn::NeonBackendModelContext::IsFastMathEnabled
bool IsFastMathEnabled() const
Definition:
NeonBackendModelContext.cpp:53
armnn::NeonBackendModelContext
The NeonBackendModelContext is used to pass in Neon specific backend ModelOptions.
Definition:
NeonBackendModelContext.hpp:19
IBackendContext.hpp
armnn::NeonBackendModelContext::NeonBackendModelContext
NeonBackendModelContext(const ModelOptions &modelOptions)
Definition:
NeonBackendModelContext.cpp:34
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition:
01_00_quick_start.dox:6
armnn::ModelOptions
std::vector< BackendOptions > ModelOptions
Definition:
BackendOptions.hpp:18
armnn::NeonBackendModelContext::GetNumberOfThreads
unsigned int GetNumberOfThreads() const
Definition:
NeonBackendModelContext.cpp:58
src
backends
neon
NeonBackendModelContext.hpp
Generated on Wed Aug 28 2024 14:31:50 for Arm NN by
1.8.17