ArmNN
 24.02
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 }

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 }

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 }

References ITensorHandle::CopyInFrom().

Referenced by AllocateAndCopyDataToITensorHandle().

armnn::ITensorHandle::CopyInFrom
virtual void CopyInFrom(const void *memory)=0
CopyDataToITensorHandle
void CopyDataToITensorHandle(armnn::ITensorHandle *tensorHandle, const void *memory)
Definition: TensorCopyUtils.cpp:10
armnn::ITensorHandle::CopyOutTo
virtual void CopyOutTo(void *memory) const =0
Testing support to be able to verify and set tensor data content.
armnn::ITensorHandle::Allocate
virtual void Allocate()=0
Indicate to the memory manager that this resource is no longer active.