ArmNN
 24.02
ImportMemGenericWorkload Class Reference

#include <MemImportWorkload.hpp>

Inheritance diagram for ImportMemGenericWorkload:
[legend]
Collaboration diagram for ImportMemGenericWorkload:
[legend]

Public Member Functions

 ImportMemGenericWorkload (const MemImportQueueDescriptor &descriptor, const WorkloadInfo &info)
 
void Execute () const override
 
- Public Member Functions inherited from BaseWorkload< MemImportQueueDescriptor >
 BaseWorkload (const MemImportQueueDescriptor &descriptor, const WorkloadInfo &info)
 
virtual const std::string & GetName () const override
 
void ExecuteAsync (ExecutionData &executionData) override
 
void PostAllocationConfigure () override
 
const MemImportQueueDescriptorGetData () const
 
arm::pipe::ProfilingGuid GetGuid () const final
 
virtual bool SupportsTensorHandleReplacement () const override
 
void ReplaceInputTensorHandle (ITensorHandle *tensorHandle, unsigned int slot) override
 
void ReplaceOutputTensorHandle (ITensorHandle *tensorHandle, unsigned int slot) override
 
- Public Member Functions inherited from IWorkload
virtual ~IWorkload ()
 
virtual arm::pipe::ProfilingGuid GetGuid () const =0
 
virtual bool SupportsTensorHandleReplacement () const =0
 
virtual const std::string & GetName () const =0
 
virtual void RegisterDebugCallback (const DebugCallbackFunction &)
 
virtual armnn::Optional< armnn::MemoryRequirementsGetMemoryRequirements ()
 

Additional Inherited Members

- Protected Attributes inherited from BaseWorkload< MemImportQueueDescriptor >
MemImportQueueDescriptor m_Data
 
const arm::pipe::ProfilingGuid m_Guid
 
const std::string m_Name
 

Detailed Description

Definition at line 17 of file MemImportWorkload.hpp.

Constructor & Destructor Documentation

◆ ImportMemGenericWorkload()

ImportMemGenericWorkload ( const MemImportQueueDescriptor descriptor,
const WorkloadInfo info 
)

Definition at line 16 of file MemImportWorkload.cpp.

18  : BaseWorkload<MemImportQueueDescriptor>(descriptor, info)
19 {
20  m_TensorHandlePairs = std::make_pair(descriptor.m_Inputs[0], descriptor.m_Outputs[0]);
21 }

References armnn::info, QueueDescriptor::m_Inputs, and QueueDescriptor::m_Outputs.

Member Function Documentation

◆ Execute()

void Execute ( ) const
overridevirtual

Implements IWorkload.

Definition at line 23 of file MemImportWorkload.cpp.

24 {
25  ARMNN_SCOPED_PROFILING_EVENT(Compute::Undefined, "ImportMemGeneric_Execute");
26 
27  m_TensorHandlePairs.second->Import(const_cast<void*>(m_TensorHandlePairs.first->Map(true)), MemorySource::Malloc);
28  m_TensorHandlePairs.first->Unmap();
29 }

References ARMNN_SCOPED_PROFILING_EVENT, armnn::Malloc, and armnn::Undefined.


The documentation for this class was generated from the following files:
armnn::MemorySource::Malloc
@ Malloc
armnn::Compute::Undefined
@ Undefined
ARMNN_SCOPED_PROFILING_EVENT
#define ARMNN_SCOPED_PROFILING_EVENT(backendId, name)
Definition: Profiling.hpp:220