1 //*****************************************************************************
2 // Copyright 2017-2020 Intel Corporation
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
8 // http://www.apache.org/licenses/LICENSE-2.0
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 //*****************************************************************************
19 #include "ngraph/op/op.hpp"
27 /// \brief Elementwise logical negation operation.
28 class NGRAPH_API LogicalNot : public Op
31 NGRAPH_RTTI_DECLARATION;
32 /// \brief Constructs a logical negation operation.
33 LogicalNot() = default;
34 /// \brief Constructs a logical negation operation.
36 /// \param arg Node that produces the input tensor.
37 LogicalNot(const Output<Node>& arg);
39 bool visit_attributes(AttributeVisitor& visitor) override;
40 void validate_and_infer_types() override;
42 virtual std::shared_ptr<Node>
43 clone_with_new_inputs(const OutputVector& new_args) const override;
44 bool evaluate(const HostTensorVector& outputs,
45 const HostTensorVector& inputs) const override;
50 /// \brief Elementwise logical negation operation.
51 class NGRAPH_DEPRECATED(
52 "This operation is deprecated and will be removed soon. "
53 "Use v1::LogicalNot instead of it.") NGRAPH_API Not : public Op
55 NGRAPH_SUPPRESS_DEPRECATED_START
57 static constexpr NodeTypeInfo type_info{"Not", 0};
58 const NodeTypeInfo& get_type_info() const override { return type_info; }
59 /// \brief Constructs a logical negation operation.
61 /// \brief Constructs a logical negation operation.
63 /// \param arg Node that produces the input tensor.
64 Not(const Output<Node>& arg);
66 void validate_and_infer_types() override;
68 virtual std::shared_ptr<Node>
69 clone_with_new_inputs(const OutputVector& new_args) const override;
70 bool evaluate(const HostTensorVector& outputs,
71 const HostTensorVector& inputs) const override;
72 NGRAPH_SUPPRESS_DEPRECATED_END
76 NGRAPH_SUPPRESS_DEPRECATED_START
78 NGRAPH_SUPPRESS_DEPRECATED_END