Documentation
Install OpenVINO™
core
include
ngraph
op
util
index_reduction.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
#include <string>
21
#include <type_traits>
22
#include <utility>
23
24
#include "ngraph/op/op.hpp"
25
26
namespace
ngraph
27
{
28
namespace
op
29
{
30
namespace
util
31
{
32
class
NGRAPH_API
IndexReduction
:
public
Op
33
{
34
protected
:
35
IndexReduction
();
36
37
IndexReduction
(
const
Output<Node>& arg,
38
uint64_t axis,
39
const
element::Type
& index_element_type);
40
41
public
:
42
uint64_t get_reduction_axis()
const
;
43
void
set_reduction_axis(uint64_t value);
44
element::Type
get_index_element_type()
const
;
45
void
set_index_element_type(
const
element::Type
& index_element_type);
46
void
validate_and_infer_types
()
override
;
47
bool
visit_attributes(
AttributeVisitor
& visitor)
override
;
48
49
protected
:
50
uint64_t m_axis{0};
51
element::Type
m_index_element_type;
52
};
53
}
54
}
55
}
ngraph::op::util::IndexReduction
Definition:
index_reduction.hpp:33
ngraph::element::Type
Definition:
element_type.hpp:61
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
ngraph::op::util::IndexReduction::validate_and_infer_types
void validate_and_infer_types() override
Verifies that attributes and inputs are consistent and computes output shapes and element types....
ngraph::op::Op
Root of all actual ops.
Definition:
op.hpp:29