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
7e319f95
Commit
7e319f95
authored
Jan 06, 2020
by
Robert Kimball
Committed by
Scott Cyphers
Jan 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move functions from header to source file (#4075)
Co-authored-by:
Scott Cyphers
<
diyessi@users.noreply.github.com
>
parent
a0ca764f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
105 additions
and
105 deletions
+105
-105
node.cpp
src/ngraph/node.cpp
+105
-0
node.hpp
src/ngraph/node.hpp
+0
-105
No files found.
src/ngraph/node.cpp
View file @
7e319f95
...
...
@@ -944,3 +944,108 @@ bool Node::is_dynamic() const
}
return
false
;
}
Input
<
Node
>
Node
::
input
(
size_t
input_index
)
{
if
(
input_index
>=
m_inputs
.
size
())
{
throw
out_of_range
(
"node input index is out of range"
);
}
return
Input
<
Node
>
(
this
,
input_index
);
}
Output
<
Node
>
Node
::
input_value
(
size_t
input_index
)
const
{
return
input
(
input_index
).
get_source_output
();
}
Input
<
const
Node
>
Node
::
input
(
size_t
input_index
)
const
{
if
(
input_index
>=
m_inputs
.
size
())
{
throw
out_of_range
(
"node input index is out of range"
);
}
return
Input
<
const
Node
>
(
this
,
input_index
);
}
Output
<
Node
>
Node
::
output
(
size_t
output_index
)
{
if
(
output_index
>=
m_outputs
.
size
())
{
throw
out_of_range
(
"node output index is out of range"
);
}
return
Output
<
Node
>
(
this
,
output_index
);
}
Output
<
const
Node
>
Node
::
output
(
size_t
output_index
)
const
{
if
(
output_index
>=
m_outputs
.
size
())
{
throw
out_of_range
(
"node output index is out of range"
);
}
return
Output
<
const
Node
>
(
this
,
output_index
);
}
vector
<
Input
<
Node
>>
Node
::
inputs
()
{
vector
<
Input
<
Node
>>
result
;
for
(
size_t
i
=
0
;
i
<
get_input_size
();
i
++
)
{
result
.
emplace_back
(
this
,
i
);
}
return
result
;
}
vector
<
Output
<
Node
>>
Node
::
input_values
()
const
{
vector
<
Output
<
Node
>>
result
;
for
(
size_t
i
=
0
;
i
<
get_input_size
();
i
++
)
{
result
.
emplace_back
(
input
(
i
).
get_source_output
());
}
return
result
;
}
vector
<
Input
<
const
Node
>>
Node
::
inputs
()
const
{
vector
<
Input
<
const
Node
>>
result
;
for
(
size_t
i
=
0
;
i
<
get_input_size
();
i
++
)
{
result
.
emplace_back
(
this
,
i
);
}
return
result
;
}
vector
<
Output
<
Node
>>
Node
::
outputs
()
{
vector
<
Output
<
Node
>>
result
;
for
(
size_t
i
=
0
;
i
<
get_output_size
();
i
++
)
{
result
.
emplace_back
(
shared_from_this
(),
i
);
}
return
result
;
}
vector
<
Output
<
const
Node
>>
Node
::
outputs
()
const
{
vector
<
Output
<
const
Node
>>
result
;
for
(
size_t
i
=
0
;
i
<
get_output_size
();
i
++
)
{
result
.
emplace_back
(
shared_from_this
(),
i
);
}
return
result
;
}
src/ngraph/node.hpp
View file @
7e319f95
...
...
@@ -887,51 +887,6 @@ namespace ngraph
size_t
m_index
{
0
};
};
inline
Input
<
Node
>
Node
::
input
(
size_t
input_index
)
{
if
(
input_index
>=
m_inputs
.
size
())
{
throw
std
::
out_of_range
(
"node input index is out of range"
);
}
return
Input
<
Node
>
(
this
,
input_index
);
}
inline
Output
<
Node
>
Node
::
input_value
(
size_t
input_index
)
const
{
return
input
(
input_index
).
get_source_output
();
}
inline
Input
<
const
Node
>
Node
::
input
(
size_t
input_index
)
const
{
if
(
input_index
>=
m_inputs
.
size
())
{
throw
std
::
out_of_range
(
"node input index is out of range"
);
}
return
Input
<
const
Node
>
(
this
,
input_index
);
}
inline
Output
<
Node
>
Node
::
output
(
size_t
output_index
)
{
if
(
output_index
>=
m_outputs
.
size
())
{
throw
std
::
out_of_range
(
"node output index is out of range"
);
}
return
Output
<
Node
>
(
this
,
output_index
);
}
inline
Output
<
const
Node
>
Node
::
output
(
size_t
output_index
)
const
{
if
(
output_index
>=
m_outputs
.
size
())
{
throw
std
::
out_of_range
(
"node output index is out of range"
);
}
return
Output
<
const
Node
>
(
this
,
output_index
);
}
inline
Output
<
Node
>
Input
<
Node
>::
get_source_output
()
const
{
auto
&
output_descriptor
=
m_node
->
m_inputs
.
at
(
m_index
).
get_output
();
...
...
@@ -980,66 +935,6 @@ namespace ngraph
&
(
target_input
.
get_node
()
->
m_inputs
.
at
(
target_input
.
get_index
())));
}
inline
std
::
vector
<
Input
<
Node
>>
Node
::
inputs
()
{
std
::
vector
<
Input
<
Node
>>
result
;
for
(
size_t
i
=
0
;
i
<
get_input_size
();
i
++
)
{
result
.
emplace_back
(
this
,
i
);
}
return
result
;
}
inline
std
::
vector
<
Output
<
Node
>>
Node
::
input_values
()
const
{
std
::
vector
<
Output
<
Node
>>
result
;
for
(
size_t
i
=
0
;
i
<
get_input_size
();
i
++
)
{
result
.
emplace_back
(
input
(
i
).
get_source_output
());
}
return
result
;
}
inline
std
::
vector
<
Input
<
const
Node
>>
Node
::
inputs
()
const
{
std
::
vector
<
Input
<
const
Node
>>
result
;
for
(
size_t
i
=
0
;
i
<
get_input_size
();
i
++
)
{
result
.
emplace_back
(
this
,
i
);
}
return
result
;
}
inline
std
::
vector
<
Output
<
Node
>>
Node
::
outputs
()
{
std
::
vector
<
Output
<
Node
>>
result
;
for
(
size_t
i
=
0
;
i
<
get_output_size
();
i
++
)
{
result
.
emplace_back
(
shared_from_this
(),
i
);
}
return
result
;
}
inline
std
::
vector
<
Output
<
const
Node
>>
Node
::
outputs
()
const
{
std
::
vector
<
Output
<
const
Node
>>
result
;
for
(
size_t
i
=
0
;
i
<
get_output_size
();
i
++
)
{
result
.
emplace_back
(
shared_from_this
(),
i
);
}
return
result
;
}
class
NodeValidationFailure
:
public
CheckFailure
{
public
:
...
...
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