and.hpp
1 // Copyright (C) 2018-2021 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 #pragma once
6 
7 #include <memory>
8 
9 #include "ngraph/op/util/binary_elementwise_logical.hpp"
10 
11 namespace ngraph
12 {
13  namespace op
14  {
15  namespace v1
16  {
17  /// \brief Elementwise logical-and operation.
18  ///
19  class NGRAPH_API LogicalAnd : public util::BinaryElementwiseLogical
20  {
21  public:
22  NGRAPH_RTTI_DECLARATION;
23  /// \brief Constructs a logical-and operation.
24  LogicalAnd() = default;
25 
26  /// \brief Constructs a logical-and operation.
27  ///
28  /// \param arg0 Output that produces the first input tensor.<br>
29  /// `[d0, ...]`
30  /// \param arg1 Output that produces the second input tensor.<br>
31  /// `[d0, ...]`
32  /// \param auto_broadcast Auto broadcast specification
33  ///
34  /// Output `[d0, ...]`
35  ///
36  LogicalAnd(const Output<Node>& arg0,
37  const Output<Node>& arg1,
38  const AutoBroadcastSpec& auto_broadcast =
39  AutoBroadcastSpec(AutoBroadcastType::NUMPY));
40 
41  std::shared_ptr<Node>
42  clone_with_new_inputs(const OutputVector& new_args) const override;
43  bool visit_attributes(AttributeVisitor& visitor) override;
44  bool evaluate(const HostTensorVector& outputs,
45  const HostTensorVector& inputs) const override;
46  bool has_evaluate() const override;
47  };
48  } // namespace v1
49  } // namespace op
50 } // 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
Abstract base class for elementwise binary logical operations, i.e., operations where the same scalar...
Definition: binary_elementwise_logical.hpp:42
Elementwise logical-and operation.
Definition: and.hpp:20
LogicalAnd(const Output< Node > &arg0, const Output< Node > &arg1, const AutoBroadcastSpec &auto_broadcast=AutoBroadcastSpec(AutoBroadcastType::NUMPY))
Constructs a logical-and operation.
bool evaluate(const HostTensorVector &outputs, const HostTensorVector &inputs) const override
Evaluates the op on input_values putting results in output_values.
LogicalAnd()=default
Constructs a logical-and operation.
bool has_evaluate() const override
Allows to get information about availability of evaluate method for the current operation.
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:16
Implicit broadcast specification.
Definition: attr_types.hpp:311