1 // Copyright (C) 2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
12 #include <ie_layers.h>
13 #include <ie_memcpy.h>
14 #include "ie_const_infer_impl.hpp"
16 namespace InferenceEngine {
17 namespace ShapeInfer {
20 *@brief Implementation of Const inference for Tile layer
22 class ReshapeConstInfer : public ConstInferImpl {
24 explicit ReshapeConstInfer(const std::string& type) : ConstInferImpl(type) {}
26 void inferImpl(const std::vector<Blob::CPtr>& inData,
27 const std::map<std::string, std::string>& params,
28 const std::map<std::string, Blob::Ptr>& blobs,
29 std::vector<Blob::Ptr>& outData) override {
30 auto inBlob = *inData.begin();
31 const auto* inBuffer = inBlob->cbuffer().as<uint8_t*>();
32 auto outBlob = *outData.begin();
33 auto* outBuffer = outBlob->buffer().as<uint8_t*>();
34 ie_memcpy(outBuffer, outBlob->byteSize(), inBuffer, inBlob->byteSize());
38 } // namespace ShapeInfer
39 } // namespace InferenceEngine