Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
1b026daa
Commit
1b026daa
authored
Aug 28, 2017
by
Scott Cyphers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Op -- use typeid.
parent
5f8bf07e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
36 deletions
+2
-36
function.hpp
src/ngraph/function.hpp
+2
-2
op.hpp
src/ngraph/op.hpp
+0
-0
op.cpp
src/ops/op.cpp
+0
-34
No files found.
src/ngraph/function.hpp
View file @
1b026daa
...
...
@@ -61,7 +61,7 @@ namespace ngraph
/**
** A user-defined function.
**/
class
Function
:
public
Op
class
Function
{
public
:
Function
(
size_t
n_parameters
);
...
...
@@ -70,7 +70,7 @@ namespace ngraph
Parameter
::
ptr
parameter
(
size_t
i
)
{
return
m_parameters
[
i
];
}
std
::
string
name
()
const
override
{
return
m_name
;
}
std
::
string
name
()
const
{
return
m_name
;
}
protected
:
std
::
vector
<
Parameter
::
ptr
>
m_parameters
;
...
...
src/ngraph/op.hpp
View file @
1b026daa
This diff is collapsed.
Click to expand it.
src/ops/op.cpp
View file @
1b026daa
...
...
@@ -19,22 +19,16 @@
using
namespace
ngraph
;
using
namespace
std
;
BuiltinOp
AbsCall
::
s_op
=
BuiltinOp
(
"abs"
);
Node
::
ptr
ngraph
::
op
::
abs
(
const
Node
::
ptr
&
arg
)
{
return
make_shared
<
AbsCall
>
(
arg
);
}
BuiltinOp
AddCall
::
s_op
=
BuiltinOp
(
"add"
);
Node
::
ptr
ngraph
::
op
::
add
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
)
{
return
make_shared
<
AddCall
>
(
arg0
,
arg1
);
}
BuiltinOp
BroadcastCall
::
s_op
=
BuiltinOp
(
"broadcast"
);
/**
** /param arg The tensor view to be broadcast.
** /param shape The shape of the result
...
...
@@ -74,8 +68,6 @@ void BroadcastCall::propagate_types()
m_type
=
make_shared
<
TensorViewType
>
(
arg_tensor_view_type
->
element_type
(),
m_shape
);
}
BuiltinOp
CeilingCall
::
s_op
=
BuiltinOp
(
"ceiling"
);
Node
::
ptr
ngraph
::
op
::
ceiling
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
)
{
return
make_shared
<
CeilingCall
>
(
arg0
,
arg1
);
...
...
@@ -86,15 +78,11 @@ Node::ptr ngraph::op::ceiling(const Node::ptr& arg0, const Node::ptr& arg1)
// 'convert',
// 'convolution',
BuiltinOp
DivideCall
::
s_op
=
BuiltinOp
(
"divide"
);
Node
::
ptr
ngraph
::
op
::
divide
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
)
{
return
make_shared
<
DivideCall
>
(
arg0
,
arg1
);
}
BuiltinOp
DotCall
::
s_op
=
BuiltinOp
(
"dot"
);
/// TODO: Semantics of arg0 and arg1 axes wrt reduction.
Node
::
ptr
ngraph
::
op
::
dot
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
)
{
...
...
@@ -139,50 +127,36 @@ void DotCall::propagate_types()
m_type
=
make_shared
<
TensorViewType
>
(
arg0_tensor_type
->
element_type
(),
result_shape
);
}
BuiltinOp
ExponentialCall
::
s_op
=
BuiltinOp
(
"exponential"
);
Node
::
ptr
ngraph
::
op
::
exponential
(
const
Node
::
ptr
&
arg0
)
{
return
make_shared
<
ExponentialCall
>
(
arg0
);
}
BuiltinOp
FloorCall
::
s_op
=
BuiltinOp
(
"floor"
);
Node
::
ptr
ngraph
::
op
::
floor
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
)
{
return
make_shared
<
FloorCall
>
(
arg0
,
arg1
);
}
BuiltinOp
LogCall
::
s_op
=
BuiltinOp
(
"log"
);
Node
::
ptr
ngraph
::
op
::
log
(
const
Node
::
ptr
&
arg0
)
{
return
make_shared
<
LogCall
>
(
arg0
);
}
BuiltinOp
MaximumCall
::
s_op
=
BuiltinOp
(
"maximum"
);
Node
::
ptr
ngraph
::
op
::
maximum
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
)
{
return
make_shared
<
MaximumCall
>
(
arg0
,
arg1
);
}
BuiltinOp
MinimumCall
::
s_op
=
BuiltinOp
(
"minimum"
);
Node
::
ptr
ngraph
::
op
::
minimum
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
)
{
return
make_shared
<
MinimumCall
>
(
arg0
,
arg1
);
}
BuiltinOp
MultiplyCall
::
s_op
=
BuiltinOp
(
"multiply"
);
Node
::
ptr
ngraph
::
op
::
multiply
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
)
{
return
make_shared
<
MultiplyCall
>
(
arg0
,
arg1
);
}
BuiltinOp
NegateCall
::
s_op
=
BuiltinOp
(
"negate"
);
Node
::
ptr
ngraph
::
op
::
negate
(
const
Node
::
ptr
&
arg0
)
{
return
make_shared
<
NegateCall
>
(
arg0
);
...
...
@@ -191,8 +165,6 @@ Node::ptr ngraph::op::negate(const Node::ptr& arg0)
// 'pad',
// 'parameter',
BuiltinOp
PowerCall
::
s_op
=
BuiltinOp
(
"power"
);
Node
::
ptr
ngraph
::
op
::
power
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
)
{
return
make_shared
<
PowerCall
>
(
arg0
,
arg1
);
...
...
@@ -200,15 +172,11 @@ Node::ptr ngraph::op::power(const Node::ptr& arg0, const Node::ptr& arg1)
//'reduce',
BuiltinOp
RemainderCall
::
s_op
=
BuiltinOp
(
"remainder"
);
Node
::
ptr
ngraph
::
op
::
remainder
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
)
{
return
make_shared
<
RemainderCall
>
(
arg0
,
arg1
);
}
BuiltinOp
ReshapeCall
::
s_op
=
BuiltinOp
(
"reshape"
);
Node
::
ptr
ngraph
::
op
::
reshape
(
const
Node
::
ptr
&
arg0
,
const
Shape
&
shape
)
{
return
make_shared
<
ReshapeCall
>
(
arg0
,
shape
);
...
...
@@ -219,8 +187,6 @@ Node::ptr ngraph::op::reshape(const Node::ptr& arg0, const Shape& shape)
// 'select',
//'slice',
BuiltinOp
SubtractCall
::
s_op
=
BuiltinOp
(
"subtract"
);
Node
::
ptr
ngraph
::
op
::
subtract
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
)
{
return
make_shared
<
SubtractCall
>
(
arg0
,
arg1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment