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
3b4584f7
Commit
3b4584f7
authored
Sep 26, 2018
by
Adam Procter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More cleanup; make 'undetermined' the default val for rank, length
parent
d9004a3f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
length.hpp
src/ngraph/length.hpp
+1
-1
rank.cpp
src/ngraph/rank.cpp
+3
-3
rank.hpp
src/ngraph/rank.hpp
+5
-5
No files found.
src/ngraph/length.hpp
View file @
3b4584f7
...
...
@@ -39,7 +39,7 @@ namespace ngraph
}
Length
()
:
m_length
(
0
)
,
m_is_determined
(
tru
e
)
,
m_is_determined
(
fals
e
)
{
}
bool
is_determined
()
const
{
return
m_is_determined
;
}
...
...
src/ngraph/rank.cpp
View file @
3b4584f7
...
...
@@ -18,7 +18,7 @@
std
::
ostream
&
ngraph
::
operator
<<
(
std
::
ostream
&
str
,
const
Rank
&
rank
)
{
if
(
rank
.
is_
fix
ed
())
if
(
rank
.
is_
determin
ed
())
{
return
(
str
<<
size_t
(
rank
));
}
...
...
@@ -30,10 +30,10 @@ std::ostream& ngraph::operator<<(std::ostream& str, const Rank& rank)
bool
ngraph
::
operator
==
(
const
Rank
&
r1
,
const
Rank
&
r2
)
{
return
(
r1
.
is_
fixed
()
&&
r2
.
is_fix
ed
()
&&
size_t
(
r1
)
==
size_t
(
r2
));
return
(
r1
.
is_
determined
()
&&
r2
.
is_determin
ed
()
&&
size_t
(
r1
)
==
size_t
(
r2
));
}
bool
ngraph
::
operator
!=
(
const
Rank
&
r1
,
const
Rank
&
r2
)
{
return
(
r1
.
is_
fixed
()
&&
r2
.
is_fix
ed
()
&&
size_t
(
r1
)
!=
size_t
(
r2
));
return
(
r1
.
is_
determined
()
&&
r2
.
is_determin
ed
()
&&
size_t
(
r1
)
!=
size_t
(
r2
));
}
src/ngraph/rank.hpp
View file @
3b4584f7
...
...
@@ -29,24 +29,24 @@ namespace ngraph
public
:
Rank
(
size_t
rank
)
:
m_rank
(
rank
)
,
m_
fix
ed
(
true
)
,
m_
is_determin
ed
(
true
)
{
}
Rank
(
const
Undetermined
&
)
:
m_rank
(
0
)
,
m_
fix
ed
(
false
)
,
m_
is_determin
ed
(
false
)
{
}
Rank
()
:
m_rank
(
0
)
,
m_
fixed
(
tru
e
)
,
m_
is_determined
(
fals
e
)
{
}
bool
is_
fixed
()
const
{
return
m_fix
ed
;
}
bool
is_
determined
()
const
{
return
m_is_determin
ed
;
}
explicit
operator
size_t
()
const
{
return
m_rank
;
}
private
:
size_t
m_rank
;
bool
m_
fix
ed
;
bool
m_
is_determin
ed
;
};
std
::
ostream
&
operator
<<
(
std
::
ostream
&
str
,
const
Rank
&
rank
);
...
...
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