Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
782a9096
Commit
782a9096
authored
Jan 21, 2018
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed warnings in gcc 7
parent
d1d45f50
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
24 deletions
+29
-24
murmur_hash3.h
dlib/general_hash/murmur_hash3.h
+18
-16
serialize.h
dlib/serialize.h
+2
-2
pegasos.h
dlib/svm/pegasos.h
+5
-5
svm_c_linear_trainer.h
dlib/svm/svm_c_linear_trainer.h
+1
-1
cca.cpp
dlib/test/cca.cpp
+2
-0
xml_parser_kernel_1.h
dlib/xml_parser/xml_parser_kernel_1.h
+1
-0
No files found.
dlib/general_hash/murmur_hash3.h
View file @
782a9096
...
...
@@ -214,7 +214,9 @@ namespace dlib
switch
(
len
&
3
)
{
case
3
:
k1
^=
tail
[
2
]
<<
16
;
// fall through
case
2
:
k1
^=
tail
[
1
]
<<
8
;
// fall through
case
1
:
k1
^=
tail
[
0
];
k1
*=
c1
;
k1
=
DLIB_ROTL32
(
k1
,
15
);
k1
*=
c2
;
h1
^=
k1
;
};
...
...
@@ -384,24 +386,24 @@ namespace dlib
switch
(
len
&
15
)
{
case
15
:
k2
^=
uint64
(
tail
[
14
])
<<
48
;
case
14
:
k2
^=
uint64
(
tail
[
13
])
<<
40
;
case
13
:
k2
^=
uint64
(
tail
[
12
])
<<
32
;
case
12
:
k2
^=
uint64
(
tail
[
11
])
<<
24
;
case
11
:
k2
^=
uint64
(
tail
[
10
])
<<
16
;
case
10
:
k2
^=
uint64
(
tail
[
9
])
<<
8
;
case
15
:
k2
^=
uint64
(
tail
[
14
])
<<
48
;
// fall through
case
14
:
k2
^=
uint64
(
tail
[
13
])
<<
40
;
// fall through
case
13
:
k2
^=
uint64
(
tail
[
12
])
<<
32
;
// fall through
case
12
:
k2
^=
uint64
(
tail
[
11
])
<<
24
;
// fall through
case
11
:
k2
^=
uint64
(
tail
[
10
])
<<
16
;
// fall through
case
10
:
k2
^=
uint64
(
tail
[
9
])
<<
8
;
// fall through
case
9
:
k2
^=
uint64
(
tail
[
8
])
<<
0
;
k2
*=
c2
;
k2
=
DLIB_ROTL64
(
k2
,
33
);
k2
*=
c1
;
h2
^=
k2
;
case
8
:
k1
^=
uint64
(
tail
[
7
])
<<
56
;
case
7
:
k1
^=
uint64
(
tail
[
6
])
<<
48
;
case
6
:
k1
^=
uint64
(
tail
[
5
])
<<
40
;
case
5
:
k1
^=
uint64
(
tail
[
4
])
<<
32
;
case
4
:
k1
^=
uint64
(
tail
[
3
])
<<
24
;
case
3
:
k1
^=
uint64
(
tail
[
2
])
<<
16
;
case
2
:
k1
^=
uint64
(
tail
[
1
])
<<
8
;
k2
*=
c2
;
k2
=
DLIB_ROTL64
(
k2
,
33
);
k2
*=
c1
;
h2
^=
k2
;
// fall through
case
8
:
k1
^=
uint64
(
tail
[
7
])
<<
56
;
// fall through
case
7
:
k1
^=
uint64
(
tail
[
6
])
<<
48
;
// fall through
case
6
:
k1
^=
uint64
(
tail
[
5
])
<<
40
;
// fall through
case
5
:
k1
^=
uint64
(
tail
[
4
])
<<
32
;
// fall through
case
4
:
k1
^=
uint64
(
tail
[
3
])
<<
24
;
// fall through
case
3
:
k1
^=
uint64
(
tail
[
2
])
<<
16
;
// fall through
case
2
:
k1
^=
uint64
(
tail
[
1
])
<<
8
;
// fall through
case
1
:
k1
^=
uint64
(
tail
[
0
])
<<
0
;
k1
*=
c1
;
k1
=
DLIB_ROTL64
(
k1
,
31
);
k1
*=
c2
;
h1
^=
k1
;
k1
*=
c1
;
k1
=
DLIB_ROTL64
(
k1
,
31
);
k1
*=
c2
;
h1
^=
k1
;
// fall through
};
//----------
...
...
dlib/serialize.h
View file @
782a9096
...
...
@@ -277,7 +277,7 @@ namespace dlib
size
&=
0x0F
;
// check if the serialized object is too big
if
(
size
>
sizeof
(
T
)
)
if
(
size
>
(
unsigned
long
)
tmin
<
sizeof
(
T
),
8
>::
value
||
size
==
0
)
{
return
true
;
}
...
...
@@ -391,7 +391,7 @@ namespace dlib
size
&=
0x8F
;
// check if an error occurred
if
(
size
>
sizeof
(
T
))
if
(
size
>
(
unsigned
long
)
tmin
<
sizeof
(
T
),
8
>::
value
||
size
==
0
)
return
true
;
...
...
dlib/svm/pegasos.h
View file @
782a9096
...
...
@@ -355,7 +355,7 @@ namespace dlib
//typedef typename K::sample_type sample_type;
typedef
typename
K
::
mem_manager_type
mem_manager_type
;
caching_kernel
()
:
samples
(
0
),
counter
(
0
),
counter_threshold
(
0
)
{}
caching_kernel
()
{}
caching_kernel
(
const
K
&
kern
,
...
...
@@ -458,12 +458,12 @@ namespace dlib
std
::
vector
<
std
::
pair
<
long
,
long
>
>
frequency_of_use
;
};
const
sample_vector_type
*
samples
;
const
sample_vector_type
*
samples
=
0
;
std
::
shared_ptr
<
cache_type
>
cache
;
mutable
unsigned
long
counter
;
unsigned
long
counter_threshold
;
long
cache_size
;
mutable
unsigned
long
counter
=
0
;
unsigned
long
counter_threshold
=
0
;
long
cache_size
=
0
;
};
// ------------------------------------------------------------------------------------
...
...
dlib/svm/svm_c_linear_trainer.h
View file @
782a9096
...
...
@@ -692,7 +692,7 @@ namespace dlib
bool
learn_nonnegative_weights
;
bool
last_weight_1
;
matrix
<
scalar_type
,
0
,
1
>
prior
;
scalar_type
prior_b
;
scalar_type
prior_b
=
0
;
};
// ----------------------------------------------------------------------------------------
...
...
dlib/test/cca.cpp
View file @
782a9096
...
...
@@ -375,6 +375,7 @@ namespace
// ----------------------------------------------------------------------------------------
/*
typedef std::vector<std::pair<unsigned int, float>> sv;
sv rand_sparse_vector()
{
...
...
@@ -423,6 +424,7 @@ namespace
timing::print();
}
*/
// ----------------------------------------------------------------------------------------
...
...
dlib/xml_parser/xml_parser_kernel_1.h
View file @
782a9096
...
...
@@ -357,6 +357,7 @@ namespace dlib
case
empty_element
:
is_empty
=
true
;
// fall through
case
element_start
:
{
seen_root_tag
=
true
;
...
...
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