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
235c8ea0
Commit
235c8ea0
authored
7 years ago
by
Scott Cyphers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ::ptr
parent
8b44c451
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
60 additions
and
74 deletions
+60
-74
function.hpp
src/ngraph/function.hpp
+6
-6
node.cpp
src/ngraph/node.cpp
+1
-1
node.hpp
src/ngraph/node.hpp
+2
-6
op.hpp
src/ngraph/op.hpp
+0
-0
broadcast.hpp
src/ngraph/ops/broadcast.hpp
+2
-2
concatenate.hpp
src/ngraph/ops/concatenate.hpp
+1
-1
convert.hpp
src/ngraph/ops/convert.hpp
+2
-2
dot.hpp
src/ngraph/ops/dot.hpp
+2
-2
parameter.hpp
src/ngraph/ops/parameter.hpp
+2
-2
tuple.hpp
src/ngraph/ops/tuple.hpp
+1
-1
type.hpp
src/ngraph/type.hpp
+13
-23
broadcast.cpp
src/ops/broadcast.cpp
+1
-1
concatenate.cpp
src/ops/concatenate.cpp
+1
-1
convert.cpp
src/ops/convert.cpp
+1
-1
dot.cpp
src/ops/dot.cpp
+1
-1
function.cpp
src/ops/function.cpp
+3
-3
op.cpp
src/ops/op.cpp
+15
-15
parameter.cpp
src/ops/parameter.cpp
+2
-2
tuple.cpp
src/ops/tuple.cpp
+1
-1
type.cpp
src/types/type.cpp
+2
-2
topological_sort.cpp
test/topological_sort.cpp
+1
-1
No files found.
src/ngraph/function.hpp
View file @
235c8ea0
...
...
@@ -25,14 +25,14 @@ namespace ngraph
class
Function
{
public
:
Function
(
const
Node
::
ptr
&
result
,
Function
(
const
std
::
shared_ptr
<
Node
>
&
result
,
const
std
::
vector
<
std
::
shared_ptr
<
Parameter
>>&
parameters
);
Node
::
ptr
result
()
{
return
m_result
;
}
Parameter
::
ptr
parameter
(
size_t
i
)
{
return
m_parameters
[
i
];
}
std
::
shared_ptr
<
Node
>
result
()
{
return
m_result
;
}
std
::
shared_ptr
<
Parameter
>
parameter
(
size_t
i
)
{
return
m_parameters
[
i
];
}
std
::
string
name
()
const
{
return
m_name
;
}
protected
:
Node
::
ptr
m_result
;
std
::
shared_ptr
<
Node
>
m_result
;
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
Parameter
>>
m_parameters
;
std
::
string
m_name
;
};
...
...
@@ -40,10 +40,10 @@ namespace ngraph
namespace
op
{
std
::
shared_ptr
<
Function
>
function
(
const
Node
::
ptr
&
result
,
function
(
const
std
::
shared_ptr
<
Node
>
&
result
,
const
std
::
initializer_list
<
std
::
shared_ptr
<
Parameter
>>&
parameters
);
std
::
shared_ptr
<
Function
>
function
(
const
Node
::
ptr
&
result
,
function
(
const
std
::
shared_ptr
<
Node
>
&
result
,
const
std
::
vector
<
std
::
shared_ptr
<
Parameter
>>&
parameters
);
}
}
This diff is collapsed.
Click to expand it.
src/ngraph/node.cpp
View file @
235c8ea0
...
...
@@ -17,7 +17,7 @@
size_t
ngraph
::
Node
::
m_next_instance_id
=
0
;
ngraph
::
Node
::
Node
(
const
std
::
vector
<
Node
::
ptr
>&
arguments
,
ValueType
::
ptr
type
)
ngraph
::
Node
::
Node
(
const
std
::
vector
<
std
::
shared_ptr
<
Node
>>&
arguments
,
std
::
shared_ptr
<
ValueType
>
type
)
:
TypedValueMixin
(
type
)
,
m_arguments
(
arguments
)
,
m_instance_id
(
m_next_instance_id
++
)
...
...
This diff is collapsed.
Click to expand it.
src/ngraph/node.hpp
View file @
235c8ea0
...
...
@@ -32,11 +32,9 @@ namespace ngraph
/// view or a (possibly empty) tuple of values.
class
Node
:
public
TypedValueMixin
{
public
:
using
ptr
=
std
::
shared_ptr
<
Node
>
;
protected
:
Node
(
const
Nodes
&
arguments
,
ValueType
::
ptr
type
=
nullptr
);
Node
(
const
Nodes
&
arguments
,
std
::
shared_ptr
<
ValueType
>
type
=
nullptr
);
virtual
~
Node
()
{}
public
:
...
...
@@ -58,7 +56,7 @@ namespace ngraph
/// Return true if this has the same implementing class as node. This
/// will be used by the pattern matcher when comparing a pattern
/// graph against the graph.
bool
is_same_op_type
(
const
Node
::
ptr
&
node
)
const
bool
is_same_op_type
(
const
std
::
shared_ptr
<
Node
>
&
node
)
const
{
return
typeid
(
*
this
)
==
typeid
(
*
node
.
get
());
}
...
...
@@ -76,6 +74,4 @@ namespace ngraph
size_t
m_instance_id
;
static
size_t
m_next_instance_id
;
};
using
node_ptr
=
std
::
shared_ptr
<
Node
>
;
}
This diff is collapsed.
Click to expand it.
src/ngraph/op.hpp
View file @
235c8ea0
This diff is collapsed.
Click to expand it.
src/ngraph/ops/broadcast.hpp
View file @
235c8ea0
...
...
@@ -25,7 +25,7 @@ namespace ngraph
/// @param broadcast_axes The axis positions (0-based) in the result that are being broadcast.
/// the remaining axes in shape must be the same as the shape of arg.
///
BroadcastOp
(
const
Node
::
ptr
&
arg
,
const
Shape
&
shape
,
const
AxisSet
&
broadcast_axes
)
BroadcastOp
(
const
std
::
shared_ptr
<
Node
>
&
arg
,
const
Shape
&
shape
,
const
AxisSet
&
broadcast_axes
)
:
BuiltinOp
({
arg
})
,
m_shape
(
shape
)
,
m_broadcast_axes
(
broadcast_axes
)
...
...
@@ -42,7 +42,7 @@ namespace ngraph
namespace
op
{
Node
::
ptr
broadcast
(
const
Node
::
ptr
&
tensor
,
std
::
shared_ptr
<
Node
>
broadcast
(
const
std
::
shared_ptr
<
Node
>
&
tensor
,
const
Shape
&
shape
,
AxisSet
&&
broadcast_axes
);
}
...
...
This diff is collapsed.
Click to expand it.
src/ngraph/ops/concatenate.hpp
View file @
235c8ea0
...
...
@@ -18,7 +18,7 @@ namespace ngraph
{
namespace
op
{
Node
::
ptr
concatenate
(
const
Nodes
&
args
);
std
::
shared_ptr
<
Node
>
concatenate
(
const
Nodes
&
args
);
}
class
ConcatOp
:
public
BuiltinOp
...
...
This diff is collapsed.
Click to expand it.
src/ngraph/ops/convert.hpp
View file @
235c8ea0
...
...
@@ -20,7 +20,7 @@ namespace ngraph
class
ConvertOp
:
public
BuiltinOp
{
public
:
ConvertOp
(
const
Node
::
ptr
&
arg
,
const
ngraph
::
element
::
Type
&
element_type
)
ConvertOp
(
const
std
::
shared_ptr
<
Node
>
&
arg
,
const
ngraph
::
element
::
Type
&
element_type
)
:
BuiltinOp
({
arg
})
,
m_element_type
(
element_type
)
{
...
...
@@ -35,6 +35,6 @@ namespace ngraph
namespace
op
{
std
::
shared_ptr
<
ngraph
::
ConvertOp
>
convert
(
const
Node
::
ptr
&
arg
,
const
ngraph
::
element
::
Type
&
element_type
);
std
::
shared_ptr
<
ngraph
::
ConvertOp
>
convert
(
const
std
::
shared_ptr
<
Node
>
&
arg
,
const
ngraph
::
element
::
Type
&
element_type
);
}
}
This diff is collapsed.
Click to expand it.
src/ngraph/ops/dot.hpp
View file @
235c8ea0
...
...
@@ -20,7 +20,7 @@ namespace ngraph
{
public
:
/// TODO: Semantics of arg0 and arg1 axes wrt reduction.
DotOp
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
)
DotOp
(
const
std
::
shared_ptr
<
Node
>&
arg0
,
const
std
::
shared_ptr
<
Node
>
&
arg1
)
:
BuiltinOp
({
arg0
,
arg1
})
{
}
...
...
@@ -31,6 +31,6 @@ namespace ngraph
namespace
op
{
Node
::
ptr
dot
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
);
std
::
shared_ptr
<
Node
>
dot
(
const
std
::
shared_ptr
<
Node
>&
arg0
,
const
std
::
shared_ptr
<
Node
>
&
arg1
);
}
}
This diff is collapsed.
Click to expand it.
src/ngraph/ops/parameter.hpp
View file @
235c8ea0
...
...
@@ -36,7 +36,7 @@ namespace ngraph
void
assign_function
(
Function
*
function
,
size_t
index
);
public
:
Parameter
(
const
ValueType
::
ptr
&
value_type
);
Parameter
(
const
std
::
shared_ptr
<
ValueType
>
&
value_type
);
Parameter
(
const
ngraph
::
element
::
Type
element_type
,
const
Shape
&
shape
);
std
::
string
description
()
const
override
{
return
"Parameter"
;
}
...
...
@@ -51,7 +51,7 @@ namespace ngraph
namespace
op
{
/// Factory for frameworks
std
::
shared_ptr
<
ngraph
::
Parameter
>
parameter
(
const
ValueType
::
ptr
&
value_type
=
nullptr
);
std
::
shared_ptr
<
ngraph
::
Parameter
>
parameter
(
const
std
::
shared_ptr
<
ValueType
>
&
value_type
=
nullptr
);
/// Convenience factory for tests
std
::
shared_ptr
<
ngraph
::
Parameter
>
parameter
(
const
element
::
Type
element_type
,
const
Shape
&
shape
);
...
...
This diff is collapsed.
Click to expand it.
src/ngraph/ops/tuple.hpp
View file @
235c8ea0
...
...
@@ -18,7 +18,7 @@ namespace ngraph
{
namespace
op
{
Node
::
ptr
tuple
(
const
Nodes
&
args
);
std
::
shared_ptr
<
Node
>
tuple
(
const
Nodes
&
args
);
}
class
TupleOp
:
public
BuiltinOp
...
...
This diff is collapsed.
Click to expand it.
src/ngraph/type.hpp
View file @
235c8ea0
...
...
@@ -31,23 +31,15 @@ namespace ngraph
class
ValueType
{
public
:
/**
** Preferred handle
**/
using
ptr
=
std
::
shared_ptr
<
ValueType
>
;
virtual
~
ValueType
()
{}
virtual
bool
operator
==
(
const
ValueType
::
ptr
&
that
)
const
=
0
;
bool
operator
!=
(
const
ValueType
::
ptr
&
that
)
const
{
return
!
(
*
this
==
that
);
}
virtual
bool
operator
==
(
const
std
::
shared_ptr
<
ValueType
>
&
that
)
const
=
0
;
bool
operator
!=
(
const
std
::
shared_ptr
<
ValueType
>
&
that
)
const
{
return
!
(
*
this
==
that
);
}
};
/// Describes a tensor view; an element type and a shape.
class
TensorViewType
:
public
ValueType
{
public
:
// Preferred handle
using
ptr
=
std
::
shared_ptr
<
TensorViewType
>
;
/// /param element_type The type of the tensor elements.
/// /param shape The shape of the tensor.
TensorViewType
(
const
element
::
Type
&
element_type
,
const
Shape
&
shape
)
...
...
@@ -59,7 +51,7 @@ namespace ngraph
const
element
::
Type
&
get_element_type
()
const
{
return
m_element_type
;
}
const
Shape
&
get_shape
()
const
{
return
m_shape
;
}
virtual
bool
operator
==
(
const
ValueType
::
ptr
&
that
)
const
override
;
virtual
bool
operator
==
(
const
std
::
shared_ptr
<
ValueType
>
&
that
)
const
override
;
protected
:
const
element
::
Type
&
m_element_type
;
...
...
@@ -70,24 +62,22 @@ namespace ngraph
class
TupleType
:
public
ValueType
{
public
:
using
ptr
=
std
::
shared_ptr
<
ValueType
>
;
/// Construct empty tuple and add value types later.
TupleType
()
{}
/// @param element_types A vector of types for the tuple elements
TupleType
(
const
std
::
vector
<
ValueType
::
ptr
>&
element_types
)
TupleType
(
const
std
::
vector
<
std
::
shared_ptr
<
ValueType
>
>&
element_types
)
:
m_element_types
(
element_types
)
{
}
const
std
::
vector
<
ValueType
::
ptr
>
get_element_types
()
const
{
return
m_element_types
;
}
std
::
vector
<
ValueType
::
ptr
>
set_element_types
()
{
return
m_element_types
;
}
const
std
::
vector
<
std
::
shared_ptr
<
ValueType
>
>
get_element_types
()
const
{
return
m_element_types
;
}
std
::
vector
<
std
::
shared_ptr
<
ValueType
>
>
set_element_types
()
{
return
m_element_types
;
}
virtual
bool
operator
==
(
const
ValueType
::
ptr
&
that
)
const
override
;
virtual
bool
operator
==
(
const
std
::
shared_ptr
<
ValueType
>
&
that
)
const
override
;
protected
:
std
::
vector
<
ValueType
::
ptr
>
m_element_types
;
std
::
vector
<
std
::
shared_ptr
<
ValueType
>
>
m_element_types
;
};
/**
...
...
@@ -96,7 +86,7 @@ namespace ngraph
class
TypedValueMixin
{
public
:
TypedValueMixin
(
const
ValueType
::
ptr
&
value_type
=
nullptr
)
TypedValueMixin
(
const
std
::
shared_ptr
<
ValueType
>
&
value_type
=
nullptr
)
:
m_value_type
(
value_type
)
{
}
...
...
@@ -105,7 +95,7 @@ namespace ngraph
** Set the type
** /param type The new type
**/
void
set_value_type
(
const
ValueType
::
ptr
&
value_type
)
{
m_value_type
=
value_type
;
}
void
set_value_type
(
const
std
::
shared_ptr
<
ValueType
>
&
value_type
)
{
m_value_type
=
value_type
;
}
/**
** Set the type to be a tensor view type
** /param element_type The type of the tensor elements
...
...
@@ -119,12 +109,12 @@ namespace ngraph
/**
** The type associated with this value.
**/
ValueType
::
ptr
get_value_type
()
{
return
m_value_type
;
}
std
::
shared_ptr
<
ValueType
>
get_value_type
()
{
return
m_value_type
;
}
/**
** The type associated with this value.
**/
const
ValueType
::
ptr
get_value_type
()
const
{
return
m_value_type
;
}
const
std
::
shared_ptr
<
ValueType
>
get_value_type
()
const
{
return
m_value_type
;
}
protected
:
ValueType
::
ptr
m_value_type
;
std
::
shared_ptr
<
ValueType
>
m_value_type
;
};
}
This diff is collapsed.
Click to expand it.
src/ops/broadcast.cpp
View file @
235c8ea0
...
...
@@ -21,7 +21,7 @@ using namespace ngraph;
/// @param shape The shape of the result
/// @param broadcast_axes The axis positions (0-based) in the result that are being broadcast.
/// the remaining axes in shape must be the same as the shape of arg.
Node
::
ptr
ngraph
::
op
::
broadcast
(
const
Node
::
ptr
&
tensor
,
std
::
shared_ptr
<
Node
>
ngraph
::
op
::
broadcast
(
const
std
::
shared_ptr
<
Node
>
&
tensor
,
const
Shape
&
shape
,
AxisSet
&&
broadcast_axes
)
{
...
...
This diff is collapsed.
Click to expand it.
src/ops/concatenate.cpp
View file @
235c8ea0
...
...
@@ -24,7 +24,7 @@ void ConcatOp::propagate_types()
throw
ngraph_error
(
"NIY"
);
}
Node
::
ptr
op
::
concatenate
(
const
std
::
vector
<
Node
::
ptr
>&
args
)
std
::
shared_ptr
<
Node
>
op
::
concatenate
(
const
std
::
vector
<
std
::
shared_ptr
<
Node
>
>&
args
)
{
return
make_shared
<
ConcatOp
>
(
args
);
}
This diff is collapsed.
Click to expand it.
src/ops/convert.cpp
View file @
235c8ea0
...
...
@@ -24,7 +24,7 @@ void ConvertOp::propagate_types()
throw
ngraph_error
(
"NIY"
);
}
shared_ptr
<
ConvertOp
>
op
::
convert
(
const
Node
::
ptr
&
arg
,
const
element
::
Type
&
element_type
)
shared_ptr
<
ConvertOp
>
op
::
convert
(
const
std
::
shared_ptr
<
Node
>
&
arg
,
const
element
::
Type
&
element_type
)
{
return
make_shared
<
ConvertOp
>
(
arg
,
element_type
);
}
This diff is collapsed.
Click to expand it.
src/ops/dot.cpp
View file @
235c8ea0
...
...
@@ -20,7 +20,7 @@ using namespace std;
using
namespace
ngraph
;
/// TODO: Semantics of arg0 and arg1 axes wrt reduction.
Node
::
ptr
ngraph
::
op
::
dot
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
)
std
::
shared_ptr
<
Node
>
ngraph
::
op
::
dot
(
const
std
::
shared_ptr
<
Node
>&
arg0
,
const
std
::
shared_ptr
<
Node
>
&
arg1
)
{
return
make_shared
<
DotOp
>
(
arg0
,
arg1
);
}
...
...
This diff is collapsed.
Click to expand it.
src/ops/function.cpp
View file @
235c8ea0
...
...
@@ -17,7 +17,7 @@
using
namespace
std
;
using
namespace
ngraph
;
Function
::
Function
(
const
Node
::
ptr
&
result
,
Function
::
Function
(
const
std
::
shared_ptr
<
Node
>
&
result
,
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
Parameter
>>&
parameters
)
:
m_result
(
result
)
,
m_parameters
(
parameters
)
...
...
@@ -30,13 +30,13 @@ Function::Function(const Node::ptr& result
}
}
shared_ptr
<
Function
>
ngraph
::
op
::
function
(
const
Node
::
ptr
&
result
,
shared_ptr
<
Function
>
ngraph
::
op
::
function
(
const
std
::
shared_ptr
<
Node
>
&
result
,
const
initializer_list
<
shared_ptr
<
Parameter
>>&
parameters
)
{
return
make_shared
<
Function
>
(
result
,
parameters
);
}
shared_ptr
<
Function
>
ngraph
::
op
::
function
(
const
Node
::
ptr
&
result
,
shared_ptr
<
Function
>
ngraph
::
op
::
function
(
const
std
::
shared_ptr
<
Node
>
&
result
,
const
vector
<
shared_ptr
<
Parameter
>>&
parameters
)
{
return
make_shared
<
Function
>
(
result
,
parameters
);
...
...
This diff is collapsed.
Click to expand it.
src/ops/op.cpp
View file @
235c8ea0
...
...
@@ -27,17 +27,17 @@ std::string ngraph::Op::get_node_id() const
return
ss
.
str
();
}
Node
::
ptr
ngraph
::
op
::
abs
(
const
Node
::
ptr
&
arg
)
std
::
shared_ptr
<
Node
>
ngraph
::
op
::
abs
(
const
std
::
shared_ptr
<
Node
>
&
arg
)
{
return
make_shared
<
AbsOp
>
(
arg
);
}
Node
::
ptr
ngraph
::
op
::
add
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
)
std
::
shared_ptr
<
Node
>
ngraph
::
op
::
add
(
const
std
::
shared_ptr
<
Node
>&
arg0
,
const
std
::
shared_ptr
<
Node
>
&
arg1
)
{
return
make_shared
<
AddOp
>
(
arg0
,
arg1
);
}
Node
::
ptr
ngraph
::
op
::
ceiling
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
)
std
::
shared_ptr
<
Node
>
ngraph
::
op
::
ceiling
(
const
std
::
shared_ptr
<
Node
>&
arg0
,
const
std
::
shared_ptr
<
Node
>
&
arg1
)
{
return
make_shared
<
CeilingOp
>
(
arg0
,
arg1
);
}
...
...
@@ -45,61 +45,61 @@ Node::ptr ngraph::op::ceiling(const Node::ptr& arg0, const Node::ptr& arg1)
// 'convert',
// 'convolution',
Node
::
ptr
ngraph
::
op
::
divide
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
)
std
::
shared_ptr
<
Node
>
ngraph
::
op
::
divide
(
const
std
::
shared_ptr
<
Node
>&
arg0
,
const
std
::
shared_ptr
<
Node
>
&
arg1
)
{
return
make_shared
<
DivideOp
>
(
arg0
,
arg1
);
}
Node
::
ptr
ngraph
::
op
::
exp
(
const
Node
::
ptr
&
arg0
)
std
::
shared_ptr
<
Node
>
ngraph
::
op
::
exp
(
const
std
::
shared_ptr
<
Node
>
&
arg0
)
{
return
make_shared
<
ExpOp
>
(
arg0
);
}
Node
::
ptr
ngraph
::
op
::
floor
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
)
std
::
shared_ptr
<
Node
>
ngraph
::
op
::
floor
(
const
std
::
shared_ptr
<
Node
>&
arg0
,
const
std
::
shared_ptr
<
Node
>
&
arg1
)
{
return
make_shared
<
FloorOp
>
(
arg0
,
arg1
);
}
Node
::
ptr
ngraph
::
op
::
log
(
const
Node
::
ptr
&
arg0
)
std
::
shared_ptr
<
Node
>
ngraph
::
op
::
log
(
const
std
::
shared_ptr
<
Node
>
&
arg0
)
{
return
make_shared
<
LogOp
>
(
arg0
);
}
Node
::
ptr
ngraph
::
op
::
maximum
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
)
std
::
shared_ptr
<
Node
>
ngraph
::
op
::
maximum
(
const
std
::
shared_ptr
<
Node
>&
arg0
,
const
std
::
shared_ptr
<
Node
>
&
arg1
)
{
return
make_shared
<
MaximumOp
>
(
arg0
,
arg1
);
}
Node
::
ptr
ngraph
::
op
::
minimum
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
)
std
::
shared_ptr
<
Node
>
ngraph
::
op
::
minimum
(
const
std
::
shared_ptr
<
Node
>&
arg0
,
const
std
::
shared_ptr
<
Node
>
&
arg1
)
{
return
make_shared
<
MinimumOp
>
(
arg0
,
arg1
);
}
Node
::
ptr
ngraph
::
op
::
multiply
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
)
std
::
shared_ptr
<
Node
>
ngraph
::
op
::
multiply
(
const
std
::
shared_ptr
<
Node
>&
arg0
,
const
std
::
shared_ptr
<
Node
>
&
arg1
)
{
return
make_shared
<
MultiplyOp
>
(
arg0
,
arg1
);
}
Node
::
ptr
ngraph
::
op
::
negative
(
const
Node
::
ptr
&
arg0
)
std
::
shared_ptr
<
Node
>
ngraph
::
op
::
negative
(
const
std
::
shared_ptr
<
Node
>
&
arg0
)
{
return
make_shared
<
NegativeOp
>
(
arg0
);
}
// 'pad',
Node
::
ptr
ngraph
::
op
::
power
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
)
std
::
shared_ptr
<
Node
>
ngraph
::
op
::
power
(
const
std
::
shared_ptr
<
Node
>&
arg0
,
const
std
::
shared_ptr
<
Node
>
&
arg1
)
{
return
make_shared
<
PowerOp
>
(
arg0
,
arg1
);
}
//'reduce',
Node
::
ptr
ngraph
::
op
::
remainder
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
)
std
::
shared_ptr
<
Node
>
ngraph
::
op
::
remainder
(
const
std
::
shared_ptr
<
Node
>&
arg0
,
const
std
::
shared_ptr
<
Node
>
&
arg1
)
{
return
make_shared
<
RemainderOp
>
(
arg0
,
arg1
);
}
Node
::
ptr
ngraph
::
op
::
reshape
(
const
Node
::
ptr
&
arg0
,
const
Shape
&
shape
)
std
::
shared_ptr
<
Node
>
ngraph
::
op
::
reshape
(
const
std
::
shared_ptr
<
Node
>
&
arg0
,
const
Shape
&
shape
)
{
return
make_shared
<
ReshapeOp
>
(
arg0
,
shape
);
}
...
...
@@ -109,7 +109,7 @@ Node::ptr ngraph::op::reshape(const Node::ptr& arg0, const Shape& shape)
// 'select',
//'slice',
Node
::
ptr
ngraph
::
op
::
subtract
(
const
Node
::
ptr
&
arg0
,
const
Node
::
ptr
&
arg1
)
std
::
shared_ptr
<
Node
>
ngraph
::
op
::
subtract
(
const
std
::
shared_ptr
<
Node
>&
arg0
,
const
std
::
shared_ptr
<
Node
>
&
arg1
)
{
return
make_shared
<
SubtractOp
>
(
arg0
,
arg1
);
}
...
...
This diff is collapsed.
Click to expand it.
src/ops/parameter.cpp
View file @
235c8ea0
...
...
@@ -19,7 +19,7 @@
using
namespace
std
;
using
namespace
ngraph
;
Parameter
::
Parameter
(
const
ValueType
::
ptr
&
value_type
)
Parameter
::
Parameter
(
const
std
::
shared_ptr
<
ValueType
>
&
value_type
)
:
Node
({},
value_type
)
,
m_function
(
nullptr
)
,
m_index
(
0
)
...
...
@@ -45,7 +45,7 @@ void Parameter::propagate_types()
{
}
shared_ptr
<
Parameter
>
ngraph
::
op
::
parameter
(
const
ValueType
::
ptr
&
value_type
)
shared_ptr
<
Parameter
>
ngraph
::
op
::
parameter
(
const
std
::
shared_ptr
<
ValueType
>
&
value_type
)
{
return
make_shared
<
Parameter
>
(
value_type
);
}
...
...
This diff is collapsed.
Click to expand it.
src/ops/tuple.cpp
View file @
235c8ea0
...
...
@@ -24,7 +24,7 @@ void TupleOp::propagate_types()
throw
ngraph_error
(
"NIY"
);
}
Node
::
ptr
op
::
tuple
(
const
std
::
vector
<
Node
::
ptr
>&
args
)
std
::
shared_ptr
<
Node
>
op
::
tuple
(
const
std
::
vector
<
std
::
shared_ptr
<
Node
>
>&
args
)
{
return
make_shared
<
TupleOp
>
(
args
);
}
This diff is collapsed.
Click to expand it.
src/types/type.cpp
View file @
235c8ea0
...
...
@@ -19,7 +19,7 @@
using
namespace
std
;
using
namespace
ngraph
;
bool
TensorViewType
::
operator
==
(
const
ValueType
::
ptr
&
that
)
const
bool
TensorViewType
::
operator
==
(
const
std
::
shared_ptr
<
ValueType
>
&
that
)
const
{
auto
that_tvt
=
dynamic_pointer_cast
<
TensorViewType
>
(
that
);
if
(
nullptr
==
that_tvt
)
...
...
@@ -37,7 +37,7 @@ bool TensorViewType::operator==(const ValueType::ptr& that) const
return
true
;
}
bool
TupleType
::
operator
==
(
const
ValueType
::
ptr
&
that
)
const
bool
TupleType
::
operator
==
(
const
std
::
shared_ptr
<
ValueType
>
&
that
)
const
{
auto
that_tvt
=
dynamic_pointer_cast
<
TupleType
>
(
that
);
if
(
nullptr
==
that_tvt
)
...
...
This diff is collapsed.
Click to expand it.
test/topological_sort.cpp
View file @
235c8ea0
...
...
@@ -36,7 +36,7 @@ TEST(top_sort, basic)
ASSERT_NE
(
nullptr
,
t0
);
auto
t1
=
op
::
add
(
arg0
,
arg1
);
ASSERT_NE
(
nullptr
,
t1
);
Node
::
ptr
r0
=
op
::
add
(
t0
,
t1
);
auto
r0
=
op
::
add
(
t0
,
t1
);
ASSERT_NE
(
nullptr
,
r0
);
auto
f0
=
op
::
function
(
r0
,
{
arg0
,
arg1
});
...
...
This diff is collapsed.
Click to expand it.
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