not.hpp
1 // Copyright (C) 2018-2021 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 #pragma once
6 
7 #include "ngraph/op/op.hpp"
8 
9 namespace ngraph
10 {
11  namespace op
12  {
13  namespace v1
14  {
15  /// \brief Elementwise logical negation operation.
16  class NGRAPH_API LogicalNot : public Op
17  {
18  public:
19  NGRAPH_RTTI_DECLARATION;
20  /// \brief Constructs a logical negation operation.
21  LogicalNot() = default;
22  /// \brief Constructs a logical negation operation.
23  ///
24  /// \param arg Node that produces the input tensor.
25  LogicalNot(const Output<Node>& arg);
26 
27  bool visit_attributes(AttributeVisitor& visitor) override;
28  void validate_and_infer_types() override;
29 
30  virtual std::shared_ptr<Node>
31  clone_with_new_inputs(const OutputVector& new_args) const override;
32  bool evaluate(const HostTensorVector& outputs,
33  const HostTensorVector& inputs) const override;
34  bool has_evaluate() const override;
35  };
36  } // namespace v1
37  } // namespace op
38 } // namespace ngraph
Visits the attributes of a node, primarily for serialization-like tasks.
Definition: attribute_visitor.hpp:59
A handle for one of a node's outputs.
Definition: node_output.hpp:33
Root of all actual ops.
Definition: op.hpp:17
Elementwise logical negation operation.
Definition: not.hpp:17
bool evaluate(const HostTensorVector &outputs, const HostTensorVector &inputs) const override
Evaluates the op on input_values putting results in output_values.
void validate_and_infer_types() override
Verifies that attributes and inputs are consistent and computes output shapes and element types....
LogicalNot()=default
Constructs a logical negation operation.
bool has_evaluate() const override
Allows to get information about availability of evaluate method for the current operation.
LogicalNot(const Output< Node > &arg)
Constructs a logical negation operation.
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:16