Deprecate nGraph v0 ops and builders (#1856)
[platform/upstream/dldt.git] / ngraph / core / src / op / any.cpp
1 //*****************************************************************************
2 // Copyright 2017-2020 Intel Corporation
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //*****************************************************************************
16
17 #include "ngraph/op/any.hpp"
18 #include "ngraph/graph_util.hpp"
19
20 NGRAPH_SUPPRESS_DEPRECATED_START
21
22 using namespace std;
23 using namespace ngraph;
24
25 constexpr NodeTypeInfo op::Any::type_info;
26
27 op::Any::Any(const Output<Node>& arg, const AxisSet& reduction_axes)
28     : LogicalReduction(arg, reduction_axes)
29 {
30     constructor_validate_and_infer_types();
31 }
32
33 op::Any::Any(const Output<Node>& arg, const Output<Node>& reduction_axes)
34     : LogicalReduction(arg, reduction_axes)
35 {
36     constructor_validate_and_infer_types();
37 }
38
39 shared_ptr<Node> op::Any::clone_with_new_inputs(const OutputVector& new_args) const
40 {
41     check_new_args_count(this, new_args);
42     return make_shared<Any>(new_args.at(0), new_args.at(1));
43 }
44
45 shared_ptr<Node> op::Any::get_default_value() const
46 {
47     return ngraph::make_constant_from_string("0", get_element_type(), get_shape());
48 }