1 // Copyright (C) 2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
8 #include "ie_const_infer_impl.hpp"
10 using namespace InferenceEngine;
11 using namespace ShapeInfer;
13 void ConstInferImpl::infer(const std::vector<Blob::CPtr>& inData,
14 const std::map<std::string, std::string>& params,
15 const std::map<std::string, Blob::Ptr>& blobs,
16 std::vector<Blob::Ptr>& outData) {
17 std::string errorPrefix = "Ref infer error for Layer with `" + _type + "` type: ";
18 if (outData.empty()) THROW_IE_EXCEPTION << errorPrefix + "output data is empty";
19 for (auto const& data : outData) {
20 if (data->buffer() == nullptr) THROW_IE_EXCEPTION << errorPrefix + "output data is not allocated";
22 // TODO: check for direct (NCHW, NCH, NC) and FP32
23 inferImpl(inData, params, blobs, outData);