and.hpp
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 #pragma once
18 
19 #include <memory>
20 
21 #include "ngraph/op/util/binary_elementwise_logical.hpp"
22 
23 namespace ngraph
24 {
25  namespace op
26  {
27  namespace v1
28  {
29  /// \brief Elementwise logical-and operation.
30  ///
31  class NGRAPH_API LogicalAnd : public util::BinaryElementwiseLogical
32  {
33  public:
34  NGRAPH_RTTI_DECLARATION;
35  /// \brief Constructs a logical-and operation.
36  LogicalAnd() = default;
37 
38  /// \brief Constructs a logical-and operation.
39  ///
40  /// \param arg0 Output that produces the first input tensor.<br>
41  /// `[d0, ...]`
42  /// \param arg1 Output that produces the second input tensor.<br>
43  /// `[d0, ...]`
44  /// \param auto_broadcast Auto broadcast specification
45  ///
46  /// Output `[d0, ...]`
47  ///
48  LogicalAnd(const Output<Node>& arg0,
49  const Output<Node>& arg1,
50  const AutoBroadcastSpec& auto_broadcast =
51  AutoBroadcastSpec(AutoBroadcastType::NUMPY));
52 
53  std::shared_ptr<Node>
54  clone_with_new_inputs(const OutputVector& new_args) const override;
55  bool visit_attributes(AttributeVisitor& visitor) override;
56  bool evaluate(const HostTensorVector& outputs,
57  const HostTensorVector& inputs) const override;
58  };
59  } // namespace v1
60  }
61 }
ngraph::op::v1::LogicalAnd::LogicalAnd
LogicalAnd()=default
Constructs a logical-and operation.
ngraph::op::v1::LogicalAnd::LogicalAnd
LogicalAnd(const Output< Node > &arg0, const Output< Node > &arg1, const AutoBroadcastSpec &auto_broadcast=AutoBroadcastSpec(AutoBroadcastType::NUMPY))
Constructs a logical-and operation.
ngraph::op::AutoBroadcastSpec
Implicit broadcast specification.
Definition: attr_types.hpp:321
ngraph::op::util::BinaryElementwiseLogical
Abstract base class for elementwise binary logical operations, i.e., operations where the same scalar...
Definition: binary_elementwise_logical.hpp:54
ngraph::op::v1::LogicalAnd
Elementwise logical-and operation.
Definition: and.hpp:32
ngraph
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:28
ngraph::AttributeVisitor
Visits the attributes of a node, primarily for serialization-like tasks.
Definition: attribute_visitor.hpp:70