19 #include "ngraph/op/op.hpp"
20 #include "ngraph/runtime/host_tensor.hpp"
32 static constexpr NodeTypeInfo type_info{
"Convert", 0};
33 const NodeTypeInfo&
get_type_info()
const override {
return type_info; }
44 virtual std::shared_ptr<Node>
45 clone_with_new_inputs(
const OutputVector& new_args)
const override;
46 const element::Type& get_destination_type()
const {
return m_destination_type; }
47 void set_destination_type(
const element::Type& destination_type)
49 m_destination_type = destination_type;
51 const element::Type& get_convert_element_type()
const {
return m_destination_type; }
52 void set_convert_element_type(
const element::Type& destination_type)
54 m_destination_type = destination_type;
57 bool evaluate(
const HostTensorVector& outputs,
58 const HostTensorVector& inputs)
const override;
Convert(const Output< Node > &arg, const ngraph::element::Type &destination_type)
Constructs a conversion operation.
void validate_and_infer_types() override
Verifies that attributes and inputs are consistent and computes output shapes and element types....
Definition: element_type.hpp:61
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:28
Convert()=default
Constructs a conversion operation.
Visits the attributes of a node, primarily for serialization-like tasks.
Definition: attribute_visitor.hpp:70
const NodeTypeInfo & get_type_info() const override
Definition: convert.hpp:33
Elementwise type conversion operation.
Definition: convert.hpp:30
Root of all actual ops.
Definition: op.hpp:29