ArmNN
 22.11
TensorCopyUtils.cpp File Reference
#include <armnnTestUtils/TensorCopyUtils.hpp>
#include <Half.hpp>

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 19 of file TensorCopyUtils.cpp.

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

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

◆ CopyDataFromITensorHandle()

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

Definition at line 14 of file TensorCopyUtils.cpp.

References ITensorHandle::CopyOutTo().

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

◆ CopyDataToITensorHandle()

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

Definition at line 9 of file TensorCopyUtils.cpp.

References ITensorHandle::CopyInFrom().

Referenced by AllocateAndCopyDataToITensorHandle().

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