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
369e4a22
Unverified
Commit
369e4a22
authored
Apr 16, 2019
by
Robert Kimball
Committed by
GitHub
Apr 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove uuid since it is not used (#2756)
parent
f9bed8c4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
148 deletions
+0
-148
uuid.hpp
src/ngraph/uuid.hpp
+0
-95
CMakeLists.txt
test/CMakeLists.txt
+0
-1
uuid.cpp
test/uuid.cpp
+0
-52
No files found.
src/ngraph/uuid.hpp
deleted
100644 → 0
View file @
f9bed8c4
//*****************************************************************************
// Copyright 2017-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//*****************************************************************************
#pragma once
#include <array>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <random>
#include <sstream>
#include <string>
static
std
::
mt19937_64
random_generator
;
namespace
ngraph
{
class
uuid_type
;
}
class
ngraph
::
uuid_type
{
public
:
uuid_type
()
{
m_data
[
0
]
=
random_generator
();
m_data
[
1
]
=
random_generator
();
uint8_t
*
p
=
reinterpret_cast
<
uint8_t
*>
(
m_data
);
p
[
6
]
=
(
p
[
6
]
&
0x0F
)
|
0x40
;
p
[
8
]
=
(
p
[
8
]
&
0x3F
)
|
0x80
;
}
std
::
string
to_string
()
const
{
std
::
stringstream
ss
;
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'
)
<<
static_cast
<
int
>
(
*
p
++
);
}
ss
<<
"-"
;
for
(
int
i
=
0
;
i
<
2
;
i
++
)
{
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'
)
<<
static_cast
<
int
>
(
*
p
++
);
}
ss
<<
"-"
;
for
(
int
i
=
0
;
i
<
2
;
i
++
)
{
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'
)
<<
static_cast
<
int
>
(
*
p
++
);
}
return
ss
.
str
();
}
static
uuid_type
zero
()
{
uuid_type
rc
;
rc
.
m_data
[
0
]
=
0
;
rc
.
m_data
[
1
]
=
0
;
return
rc
;
}
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
)
{
out
<<
id
.
to_string
();
return
out
;
}
private
:
uint64_t
m_data
[
2
];
};
test/CMakeLists.txt
View file @
369e4a22
...
...
@@ -66,7 +66,6 @@ set(SRC
tensor.cpp
type_prop.cpp
util.cpp
uuid.cpp
zero_dim_tensor_elimination.cpp
)
...
...
test/uuid.cpp
deleted
100644 → 0
View file @
f9bed8c4
//*****************************************************************************
// Copyright 2017-2019 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//*****************************************************************************
#include <sstream>
#include <string>
#include <vector>
#include "gtest/gtest.h"
#include "ngraph/uuid.hpp"
using
namespace
std
;
using
namespace
ngraph
;
TEST
(
uuid
,
zero
)
{
uuid_type
zero
=
uuid_type
::
zero
();
stringstream
ss
;
ss
<<
zero
;
std
::
string
expected
=
"00000000-0000-0000-0000-000000000000"
;
EXPECT_STREQ
(
expected
.
c_str
(),
ss
.
str
().
c_str
());
}
TEST
(
uuid
,
eq
)
{
uuid_type
z1
=
uuid_type
::
zero
();
uuid_type
z2
=
uuid_type
::
zero
();
EXPECT_EQ
(
z1
,
z2
);
}
TEST
(
uuid
,
ne
)
{
uuid_type
u1
;
uuid_type
u2
;
EXPECT_NE
(
u1
,
u2
);
}
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