1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
8 #include "ie_input_info.hpp"
12 #include <opencv2/gapi/gcompiled.hpp>
13 #include <opencv2/gapi/util/optional.hpp>
14 #include "ie_profiling.hpp"
16 // FIXME: Move this definition back to ie_preprocess_data,
17 // also free ie_preprocess_gapi of these details
19 namespace InferenceEngine {
22 using BlobDesc = std::tuple<Precision, Layout, SizeVector>;
23 using CallDesc = std::tuple<BlobDesc, BlobDesc, ResizeAlgorithm>;
24 template<typename T> using Opt = cv::util::optional<T>;
26 Opt<CallDesc> _lastCall;
27 std::vector<cv::GCompiled> _lastComp;
29 ProfilingTask _perf_graph_building {"Preproc Graph Building"};
30 ProfilingTask _perf_exec_tile {"Preproc Calc Tile"};
31 ProfilingTask _perf_exec_graph {"Preproc Exec Graph"};
32 ProfilingTask _perf_graph_compiling {"Preproc Graph compiling"};
34 enum class Update { REBUILD, RESHAPE, NOTHING };
35 Update needUpdate(const CallDesc &newCall) const;
39 bool preprocessWithGAPI(Blob::Ptr &inBlob, Blob::Ptr &outBlob, const ResizeAlgorithm &algorithm,
40 bool omp_serial, int batch_size = -1);
43 } // namespace InferenceEngine