aboutsummaryrefslogtreecommitdiff
path: root/src/armnnTestUtils/TensorCopyUtils.cpp
blob: 14c6d5cc61378003df2cb3779b4e9ab2f1f744bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//
// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//

#include <armnnTestUtils/TensorCopyUtils.hpp>
#include <Half.hpp>

void CopyDataToITensorHandle(armnn::ITensorHandle* tensorHandle, const void* memory)
{
    tensorHandle->CopyInFrom(memory);
}

void CopyDataFromITensorHandle(void* memory, const armnn::ITensorHandle* tensorHandle)
{
    tensorHandle->CopyOutTo(memory);
}

void AllocateAndCopyDataToITensorHandle(armnn::ITensorHandle* tensorHandle, const void* memory)
{
    tensorHandle->Allocate();
    CopyDataToITensorHandle(tensorHandle, memory);
}