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
2d05276d
Commit
2d05276d
authored
Oct 09, 2017
by
Robert Kimball
Committed by
GitHub
Oct 09, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #185 from NervanaSystems/bob/warnings
Bob/warnings
parents
ba8d13da
085fd3fb
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
37 deletions
+27
-37
clang_4_0_flags.cmake
cmake/clang_4_0_flags.cmake
+1
-20
node.hpp
src/ngraph/node.hpp
+2
-1
element_type.cpp
src/ngraph/types/element_type.cpp
+1
-1
util.cpp
src/ngraph/util.cpp
+4
-2
uuid.hpp
src/ngraph/uuid.hpp
+18
-12
main.cpp
test/main.cpp
+1
-1
No files found.
cmake/clang_4_0_flags.cmake
View file @
2d05276d
...
...
@@ -16,35 +16,16 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=inconsistent-missing-override")
# whitelist errors here
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Weverything"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-c++98-compat"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-c++98-compat-pedantic"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-weak-vtables"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-global-constructors"
)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-switch-enum")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-zero-variadic-macro-arguments")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-undef")
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-exit-time-destructors"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-missing-prototypes"
)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-disabled-macro-expansion")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pedantic")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-documentation")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-covered-switch-default")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-warning-option")
# # should remove these
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-old-style-cast"
)
#
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-old-style-cast")
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-float-conversion"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-sign-conversion"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-padded"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-potentially-evaluated-expression"
)
# Triggers false alarms on typeid
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-sign-compare"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-unused-parameter"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-weak-vtables"
)
# Not ready for this yet
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-conversion")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-float-equal")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-duplicate-enum") # from numpy
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-used-but-marked-unused") # from sox
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++11-compat-deprecated-writable-strings")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-double-promotion"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-undefined-func-template"
)
src/ngraph/node.hpp
View file @
2d05276d
...
...
@@ -71,7 +71,8 @@ namespace ngraph
/// graph against the graph.
bool
is_same_op_type
(
const
std
::
shared_ptr
<
Node
>&
node
)
const
{
return
typeid
(
*
this
)
==
typeid
(
*
node
.
get
());
Node
*
n
=
node
.
get
();
return
typeid
(
*
this
)
==
typeid
(
*
n
);
}
std
::
shared_ptr
<
const
ValueType
>
get_value_type
()
{
return
m_value_type
;
}
...
...
src/ngraph/types/element_type.cpp
View file @
2d05276d
...
...
@@ -46,7 +46,7 @@ bool ngraph::element::Type::operator==(const element::Type& other) const
size_t
ngraph
::
element
::
Type
::
size
()
const
{
return
std
::
ceil
(
(
float
)
m_bitwidth
/
8.0
);
return
std
::
ceil
(
static_cast
<
float
>
(
m_bitwidth
)
/
8.0
f
);
}
std
::
ostream
&
ngraph
::
element
::
operator
<<
(
std
::
ostream
&
out
,
const
ngraph
::
element
::
Type
&
obj
)
...
...
src/ngraph/util.cpp
View file @
2d05276d
...
...
@@ -39,7 +39,8 @@ void ngraph::dump(ostream& out, const void* _data, size_t _size)
{
if
(
index
+
i
<
len
)
{
out
<<
" "
<<
std
::
hex
<<
std
::
setw
(
2
)
<<
std
::
setfill
(
'0'
)
<<
(
uint32_t
)
data
[
i
];
out
<<
" "
<<
std
::
hex
<<
std
::
setw
(
2
)
<<
std
::
setfill
(
'0'
)
<<
static_cast
<
uint32_t
>
(
data
[
i
]);
}
else
{
...
...
@@ -51,7 +52,8 @@ void ngraph::dump(ostream& out, const void* _data, size_t _size)
{
if
(
index
+
i
<
len
)
{
out
<<
" "
<<
std
::
hex
<<
std
::
setw
(
2
)
<<
std
::
setfill
(
'0'
)
<<
(
uint32_t
)
data
[
i
];
out
<<
" "
<<
std
::
hex
<<
std
::
setw
(
2
)
<<
std
::
setfill
(
'0'
)
<<
static_cast
<
uint32_t
>
(
data
[
i
]);
}
else
{
...
...
src/ngraph/uuid.hpp
View file @
2d05276d
...
...
@@ -34,7 +34,7 @@ public:
{
m_data
[
0
]
=
random_generator
();
m_data
[
1
]
=
random_generator
();
uint8_t
*
p
=
(
uint8_t
*
)
m_data
;
uint8_t
*
p
=
reinterpret_cast
<
uint8_t
*>
(
m_data
)
;
p
[
6
]
=
(
p
[
6
]
&
0x0F
)
|
0x40
;
p
[
8
]
=
(
p
[
8
]
&
0x3F
)
|
0x80
;
}
...
...
@@ -42,21 +42,31 @@ public:
std
::
string
to_string
()
const
{
std
::
stringstream
ss
;
uint8_t
*
p
=
(
uint8_t
*
)
m_data
;
const
uint8_t
*
p
=
reinterpret_cast
<
const
uint8_t
*>
(
m_data
)
;
for
(
int
i
=
0
;
i
<
4
;
i
++
)
ss
<<
std
::
hex
<<
std
::
setw
(
2
)
<<
std
::
setfill
(
'0'
)
<<
(
int
)
*
p
++
;
{
ss
<<
std
::
hex
<<
std
::
setw
(
2
)
<<
std
::
setfill
(
'0'
)
<<
static_cast
<
int
>
(
*
p
++
);
}
ss
<<
"-"
;
for
(
int
i
=
0
;
i
<
2
;
i
++
)
ss
<<
std
::
hex
<<
std
::
setw
(
2
)
<<
std
::
setfill
(
'0'
)
<<
(
int
)
*
p
++
;
{
ss
<<
std
::
hex
<<
std
::
setw
(
2
)
<<
std
::
setfill
(
'0'
)
<<
static_cast
<
int
>
(
*
p
++
);
}
ss
<<
"-"
;
for
(
int
i
=
0
;
i
<
2
;
i
++
)
ss
<<
std
::
hex
<<
std
::
setw
(
2
)
<<
std
::
setfill
(
'0'
)
<<
(
int
)
*
p
++
;
{
ss
<<
std
::
hex
<<
std
::
setw
(
2
)
<<
std
::
setfill
(
'0'
)
<<
static_cast
<
int
>
(
*
p
++
);
}
ss
<<
"-"
;
for
(
int
i
=
0
;
i
<
2
;
i
++
)
ss
<<
std
::
hex
<<
std
::
setw
(
2
)
<<
std
::
setfill
(
'0'
)
<<
(
int
)
*
p
++
;
{
ss
<<
std
::
hex
<<
std
::
setw
(
2
)
<<
std
::
setfill
(
'0'
)
<<
static_cast
<
int
>
(
*
p
++
);
}
ss
<<
"-"
;
for
(
int
i
=
0
;
i
<
6
;
i
++
)
ss
<<
std
::
hex
<<
std
::
setw
(
2
)
<<
std
::
setfill
(
'0'
)
<<
(
int
)
*
p
++
;
{
ss
<<
std
::
hex
<<
std
::
setw
(
2
)
<<
std
::
setfill
(
'0'
)
<<
static_cast
<
int
>
(
*
p
++
);
}
return
ss
.
str
();
}
...
...
@@ -68,11 +78,7 @@ public:
return
rc
;
}
bool
operator
==
(
const
uuid_type
&
other
)
const
{
return
memcmp
((
char
*
)
m_data
,
(
char
*
)
other
.
m_data
,
16
)
==
0
;
}
bool
operator
==
(
const
uuid_type
&
other
)
const
{
return
memcmp
(
m_data
,
other
.
m_data
,
16
)
==
0
;
}
bool
operator
!=
(
const
uuid_type
&
other
)
const
{
return
!
(
*
this
==
other
);
}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
uuid_type
&
id
)
{
...
...
test/main.cpp
View file @
2d05276d
...
...
@@ -25,7 +25,7 @@ int main(int argc, char** argv)
const
char
*
exclude
=
"--gtest_filter=-benchmark.*"
;
vector
<
char
*>
argv_vector
;
argv_vector
.
push_back
(
argv
[
0
]);
argv_vector
.
push_back
(
(
char
*
)
exclude
);
argv_vector
.
push_back
(
const_cast
<
char
*>
(
exclude
)
);
for
(
int
i
=
1
;
i
<
argc
;
i
++
)
{
argv_vector
.
push_back
(
argv
[
i
]);
...
...
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