20.11
RefWorkloadFactoryHelper.hpp
Go to the documentation of this file.
1
//
2
// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
3
// SPDX-License-Identifier: MIT
4
//
5
6
#pragma once
7
8
#include <
backendsCommon/test/WorkloadFactoryHelper.hpp
>
9
10
#include <
reference/RefBackend.hpp
>
11
#include <
reference/RefWorkloadFactory.hpp
>
12
#include "
reference/RefTensorHandleFactory.hpp
"
13
14
namespace
15
{
16
17
template
<>
18
struct
WorkloadFactoryHelper<
armnn
::RefWorkloadFactory>
19
{
20
static
armnn::IBackendInternal::IMemoryManagerSharedPtr
GetMemoryManager()
21
{
22
armnn::RefBackend
backend;
23
return
backend.
CreateMemoryManager
();
24
}
25
26
static
armnn::RefWorkloadFactory
GetFactory(
27
const
armnn::IBackendInternal::IMemoryManagerSharedPtr
& memoryManager =
nullptr
)
28
{
29
IgnoreUnused
(memoryManager);
30
return
armnn::RefWorkloadFactory
();
31
}
32
33
static
armnn::RefTensorHandleFactory
GetTensorHandleFactory(
34
const
armnn::IBackendInternal::IMemoryManagerSharedPtr
& memoryManager =
nullptr
)
35
{
36
37
return
armnn::RefTensorHandleFactory
(std::static_pointer_cast<armnn::RefMemoryManager>(memoryManager));
38
}
39
};
40
41
using
RefWorkloadFactoryHelper = WorkloadFactoryHelper<armnn::RefWorkloadFactory>;
42
43
}
// anonymous namespace
RefWorkloadFactory.hpp
armnn::RefBackend::CreateMemoryManager
IBackendInternal::IMemoryManagerUniquePtr CreateMemoryManager() const override
Definition:
RefBackend.cpp:56
armnn
Copyright (c) 2020 ARM Limited.
Definition:
00_introduction.dox:25
armnn::IgnoreUnused
void IgnoreUnused(Ts &&...)
Definition:
IgnoreUnused.hpp:14
armnn::IBackendInternal::IMemoryManagerSharedPtr
std::shared_ptr< IMemoryManager > IMemoryManagerSharedPtr
Definition:
IBackendInternal.hpp:92
RefBackend.hpp
armnn::RefBackend
Definition:
RefBackend.hpp:12
armnn::RefWorkloadFactory
Definition:
RefWorkloadFactory.hpp:30
WorkloadFactoryHelper.hpp
armnn::RefTensorHandleFactory
Definition:
RefTensorHandleFactory.hpp:17
RefTensorHandleFactory.hpp
src
backends
reference
test
RefWorkloadFactoryHelper.hpp
Generated on Wed Nov 25 2020 09:59:14 for ArmNN by
1.8.13