HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
OP_OpTypeIdFilter.h
Go to the documentation of this file.
1
/*
2
* PROPRIETARY INFORMATION. This software is proprietary to
3
* Side Effects Software Inc., and is not to be reproduced,
4
* transmitted, or disclosed in any way without written permission.
5
*
6
* NAME: OP_OpTypeIdFilter.h, OP Library (C++)
7
*
8
* COMMENTS: This is a filter class which filters nodes by their
9
* operator type ids.
10
*
11
*/
12
13
#ifndef __OP_OpTypeIdFilter_h__
14
#define __OP_OpTypeIdFilter_h__
15
16
#include "
OP_API.h
"
17
18
#include "
OP_Node.h
"
19
20
/// This is a filter class which filters nodes by their
21
/// operator type ids.
22
class
OP_API
OP_OpTypeIdFilter
23
{
24
public
:
25
26
/// Constructor.
27
OP_OpTypeIdFilter
();
28
29
/// Copy constructor.
30
OP_OpTypeIdFilter
(
const
OP_OpTypeIdFilter
&
filter
);
31
32
/// Destructor.
33
virtual
~
OP_OpTypeIdFilter
();
34
35
/// Returns true if the given node is accepted by the filter.
36
/// Returns false otherwise.
37
bool
isAcceptableNode(
OP_Node
*node)
const
;
38
39
/// Returns true if the the filter has the operator type id.
40
/// Returns false otherwise.
41
bool
hasOpTypeId(
OP_OpTypeId
opType)
const
;
42
43
/// Sets whether we should be checking a network's child op type
44
/// when determining if it is accepted by this filter.
45
/// This logic is used in isAcceptableNode().
46
void
setCheckChildOpTypeId
(
bool
doChildCheck)
47
{ myDoChildCheck = doChildCheck; }
48
49
/// Sets the mask for the operator type id.
50
void
setFilterMask(
OP_OpTypeId
opType,
51
bool
doMask=
true
);
52
53
/// Resets the filter by setting each mask to the reset value.
54
void
resetFilter(
bool
resetValue=
true
);
55
56
/// Assignment operator.
57
OP_OpTypeIdFilter
&operator=(
const
OP_OpTypeIdFilter
&str);
58
59
private
:
60
61
/// Operator type id masks.
62
/// If myOpTypeIdMasks[id] is true, then it means that nodes with
63
/// "id" type should be kept, otherwise, they should be filtered out.
64
bool
myOpTypeIdMasks[
NUM_MANAGERS
];
65
66
/// If true, then we also check a network's child op type
67
/// when determining whether a node is accepted by this filter.
68
bool
myDoChildCheck;
69
};
70
71
#endif
OP_API.h
NUM_MANAGERS
Definition:
OP_OpTypeId.h:38
OP_Node.h
OP_Node
Definition:
OP_Node.h:496
OP_OpTypeIdFilter
Definition:
OP_OpTypeIdFilter.h:22
OP_OpTypeId
OP_OpTypeId
Definition:
OP_OpTypeId.h:18
OP_API
#define OP_API
Definition:
OP_API.h:10
OP_OpTypeIdFilter::setCheckChildOpTypeId
void setCheckChildOpTypeId(bool doChildCheck)
Definition:
OP_OpTypeIdFilter.h:46
filter
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition:
glcorearb.h:1297
OP
OP_OpTypeIdFilter.h
Generated on Sun May 12 2024 03:16:18 for HDK by
1.8.6