ArmNN
 25.11
Loading...
Searching...
No Matches
TensorCopyUtils.cpp
Go to the documentation of this file.
1//
2// Copyright © 2017,2022 Arm Ltd and Contributors. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
7#include <armnnTestUtils/TensorCopyUtils.hpp>
8#include <Half.hpp>
9
10void CopyDataToITensorHandle(armnn::ITensorHandle* tensorHandle, const void* memory)
11{
12 tensorHandle->CopyInFrom(memory);
13}
14
15void CopyDataFromITensorHandle(void* memory, const armnn::ITensorHandle* tensorHandle)
16{
17 tensorHandle->CopyOutTo(memory);
18}
19
20void AllocateAndCopyDataToITensorHandle(armnn::ITensorHandle* tensorHandle, const void* memory)
21{
22 tensorHandle->Allocate();
23 CopyDataToITensorHandle(tensorHandle, memory);
24}
void CopyDataFromITensorHandle(void *memory, const armnn::ITensorHandle *tensorHandle)
void CopyDataToITensorHandle(armnn::ITensorHandle *tensorHandle, const void *memory)
void AllocateAndCopyDataToITensorHandle(armnn::ITensorHandle *tensorHandle, const void *memory)
virtual void CopyOutTo(void *memory) const =0
Testing support to be able to verify and set tensor data content.
virtual void Allocate()=0
Indicate to the memory manager that this resource is no longer active.
virtual void CopyInFrom(const void *memory)=0