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
b9bd3eb8
Commit
b9bd3eb8
authored
Oct 09, 2017
by
Robert Kimball
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable old-style cast warning and fix new warnings
parent
e74f448f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
18 deletions
+25
-18
clang_4_0_flags.cmake
cmake/clang_4_0_flags.cmake
+1
-2
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 @
b9bd3eb8
...
...
@@ -23,10 +23,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-exit-time-destructors")
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-missing-prototypes"
)
# # 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-sign-compare"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-unused-parameter"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-undefined-func-template"
)
src/ngraph/types/element_type.cpp
View file @
b9bd3eb8
...
...
@@ -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
f
);
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 @
b9bd3eb8
...
...
@@ -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 @
b9bd3eb8
...
...
@@ -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 @
b9bd3eb8
...
...
@@ -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