floor.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/util/unary_elementwise_arithmetic.hpp"
8 
9 namespace ngraph
10 {
11  namespace op
12  {
13  namespace v0
14  {
15  /// \brief Elementwise floor operation.
16  class NGRAPH_API Floor : public util::UnaryElementwiseArithmetic
17  {
18  public:
19  NGRAPH_RTTI_DECLARATION;
20  /// \brief Constructs a floor operation.
21  Floor() = default;
22  /// \brief Constructs a floor operation.
23  ///
24  /// \param arg Node that produces the input tensor.
25  Floor(const Output<Node>& arg);
26 
27  bool visit_attributes(AttributeVisitor& visitor) override;
28  virtual std::shared_ptr<Node>
29  clone_with_new_inputs(const OutputVector& new_args) const override;
30  bool evaluate(const HostTensorVector& outputs,
31  const HostTensorVector& inputs) const override;
32  bool has_evaluate() const override;
33  };
34  } // namespace v0
35  using v0::Floor;
36  } // namespace op
37 } // 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 unary arithmetic operations, i.e., operations where the same scal...
Definition: unary_elementwise_arithmetic.hpp:37
Elementwise floor operation.
Definition: floor.hpp:17
Floor()=default
Constructs a floor operation.
Floor(const Output< Node > &arg)
Constructs a floor operation.
bool has_evaluate() const override
Allows to get information about availability of evaluate method for the current operation.
bool evaluate(const HostTensorVector &outputs, const HostTensorVector &inputs) const override
Evaluates the op on input_values putting results in output_values.
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:16