ArmNN
 22.02
RefReshapeWorkload.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include "RefReshapeWorkload.hpp"
7 #include "RefWorkloadUtils.hpp"
8 #include "Profiling.hpp"
9 
10 #include <cstring>
11 
12 namespace armnn
13 {
14 
16 {
18 }
19 
21 {
22  Execute(workingMemDescriptor.m_Inputs, workingMemDescriptor.m_Outputs);
23 }
24 
25 void RefReshapeWorkload::Execute(std::vector<ITensorHandle*> inputs, std::vector<ITensorHandle*> outputs) const
26 {
27  ARMNN_SCOPED_PROFILING_EVENT(Compute::CpuRef, "RefReshapeWorkload_Execute");
28 
29  void* output = outputs[0]->Map();
30  const void* input = inputs[0]->Map();
31  unsigned int numBytes = GetTensorInfo(inputs[0]).GetNumBytes();
32  memcpy(output, input, numBytes);
33 }
34 
35 } //namespace armnn
CPU Execution: Reference C++ kernels.
unsigned int GetNumBytes() const
Definition: Tensor.cpp:429
void Execute() const override
Copyright (c) 2021 ARM Limited and Contributors.
#define ARMNN_SCOPED_PROFILING_EVENT(backendId, name)
Definition: Profiling.hpp:220
std::vector< ITensorHandle * > m_Outputs
std::vector< ITensorHandle * > m_Inputs
const TensorInfo & GetTensorInfo(const ITensorHandle *tensorHandle)
float32 helpers
void ExecuteAsync(WorkingMemDescriptor &workingMemDescriptor) override