24.08
NeonRegistryInitializer.cpp
Go to the documentation of this file.
1
//
2
// Copyright © 2017 Arm Ltd. All rights reserved.
3
// SPDX-License-Identifier: MIT
4
//
5
6
#include "
NeonBackend.hpp
"
7
8
#include <
armnn/BackendRegistry.hpp
>
9
#include <
armnn/Utils.hpp
>
10
11
namespace
12
{
13
14
using namespace
armnn
;
15
16
static
BackendRegistry::StaticRegistryInitializer
g_RegisterHelper
17
{
18
BackendRegistryInstance
(),
19
NeonBackend::GetIdStatic
(),
20
[]()
21
{
22
// Check if device supports Neon.
23
if
(
NeonDetected
())
24
{
25
return
IBackendInternalUniquePtr
(
new
NeonBackend
);
26
}
27
28
// If device does not support Neon throw exception so the Backend is not added to supportedBackends
29
ARMNN_LOG
(info) <<
"Neon support not found on device, could not register CpuAcc Backend."
;
30
throw
armnn::BackendUnavailableException
(
31
"Neon support not found on device, could not register CpuAcc Backend.\n"
);
32
}
33
};
34
35
}
// Anonymous namespace
NeonBackend.hpp
BackendRegistry.hpp
ARMNN_LOG
#define ARMNN_LOG(severity)
Definition:
Logging.hpp:212
Utils.hpp
armnn::NeonBackend
Definition:
NeonBackend.hpp:29
armnn::BackendRegistryInstance
BackendRegistry & BackendRegistryInstance()
Definition:
BackendRegistry.cpp:15
armnn::NeonBackend::GetIdStatic
static const BackendId & GetIdStatic()
Definition:
NeonBackend.cpp:46
armnn::BackendRegistry::StaticRegistryInitializer
Definition:
BackendRegistry.hpp:56
armnn::NeonDetected
bool NeonDetected()
Definition:
Utils.cpp:39
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition:
01_00_quick_start.dox:6
armnn::IBackendInternalUniquePtr
std::unique_ptr< IBackendInternal > IBackendInternalUniquePtr
Definition:
BackendRegistry.hpp:32
armnn::BackendUnavailableException
Class for non-fatal exceptions raised while initialising a backend.
Definition:
Exceptions.hpp:68
src
backends
neon
NeonRegistryInitializer.cpp
Generated on Wed Aug 28 2024 14:31:50 for Arm NN by
1.8.17