ArmNN
 25.11
Loading...
Searching...
No Matches
TensorCopyUtils.cpp File Reference
#include <armnn/backends/ITensorHandle.hpp>
#include <armnnTestUtils/TensorCopyUtils.hpp>
#include <Half.hpp>
Include dependency graph for TensorCopyUtils.cpp:

Go to the source code of this file.

Functions

void CopyDataToITensorHandle (armnn::ITensorHandle *tensorHandle, const void *memory)
void CopyDataFromITensorHandle (void *memory, const armnn::ITensorHandle *tensorHandle)
void AllocateAndCopyDataToITensorHandle (armnn::ITensorHandle *tensorHandle, const void *memory)

Function Documentation

◆ AllocateAndCopyDataToITensorHandle()

void AllocateAndCopyDataToITensorHandle ( armnn::ITensorHandle * tensorHandle,
const void * memory )

Definition at line 20 of file TensorCopyUtils.cpp.

21{
22 tensorHandle->Allocate();
23 CopyDataToITensorHandle(tensorHandle, memory);
24}
void CopyDataToITensorHandle(armnn::ITensorHandle *tensorHandle, const void *memory)
virtual void Allocate()=0
Indicate to the memory manager that this resource is no longer active.

References ITensorHandle::Allocate(), and CopyDataToITensorHandle().

◆ CopyDataFromITensorHandle()

void CopyDataFromITensorHandle ( void * memory,
const armnn::ITensorHandle * tensorHandle )

Definition at line 15 of file TensorCopyUtils.cpp.

16{
17 tensorHandle->CopyOutTo(memory);
18}
virtual void CopyOutTo(void *memory) const =0
Testing support to be able to verify and set tensor data content.

References ITensorHandle::CopyOutTo().

◆ CopyDataToITensorHandle()

void CopyDataToITensorHandle ( armnn::ITensorHandle * tensorHandle,
const void * memory )

Definition at line 10 of file TensorCopyUtils.cpp.

11{
12 tensorHandle->CopyInFrom(memory);
13}
virtual void CopyInFrom(const void *memory)=0

References ITensorHandle::CopyInFrom().

Referenced by AllocateAndCopyDataToITensorHandle().