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
ac2f9550
Commit
ac2f9550
authored
Jul 19, 2014
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed more double __
parent
ca498ac2
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
83 additions
and
83 deletions
+83
-83
array2d_kernel.h
dlib/array2d/array2d_kernel.h
+19
-19
assert.h
dlib/assert.h
+7
-7
gui_core_kernel_1.h
dlib/gui_core/gui_core_kernel_1.h
+9
-9
gui_core_kernel_2.h
dlib/gui_core/gui_core_kernel_2.h
+7
-7
ormqr.h
dlib/matrix/lapack/ormqr.h
+6
-6
syevr.h
dlib/matrix/lapack/syevr.h
+2
-2
matrix_eigenvalue.h
dlib/matrix/matrix_eigenvalue.h
+2
-2
matrix_subexp.h
dlib/matrix/matrix_subexp.h
+6
-6
stack_trace.h
dlib/stack_trace.h
+8
-8
tester.cpp
dlib/test/tester.cpp
+11
-11
tester.h
dlib/test/tester.h
+6
-6
No files found.
dlib/array2d/array2d_kernel.h
View file @
ac2f9550
...
...
@@ -113,7 +113,7 @@ namespace dlib
private
:
row
(
T
*
data_
,
long
nc__
)
:
data
(
data_
),
nc_
(
nc__
)
{}
row
(
T
*
data_
,
long
cols
)
:
data
(
data_
),
nc_
(
cols
)
{}
T
*
data
;
long
nc_
;
...
...
@@ -138,8 +138,8 @@ namespace dlib
}
array2d
(
long
nr__
,
long
nc__
long
rows
,
long
cols
)
:
data
(
0
),
nc_
(
0
),
...
...
@@ -149,15 +149,15 @@ namespace dlib
at_start_
(
true
)
{
// make sure requires clause is not broken
DLIB_ASSERT
((
nc__
>=
0
&&
nr__
>=
0
),
"
\t
array2d::array2d(long
nr__, long nc__
)"
DLIB_ASSERT
((
cols
>=
0
&&
rows
>=
0
),
"
\t
array2d::array2d(long
rows, long cols
)"
<<
"
\n\t
The array2d can't have negative rows or columns."
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
nc__: "
<<
nc__
<<
"
\n\t
nr__: "
<<
nr__
<<
"
\n\t
cols: "
<<
cols
<<
"
\n\t
rows: "
<<
rows
);
set_size
(
nr__
,
nc__
);
set_size
(
rows
,
cols
);
}
virtual
~
array2d
(
...
...
@@ -230,8 +230,8 @@ namespace dlib
}
void
set_size
(
long
nr__
,
long
nc__
long
rows
,
long
cols
);
bool
at_start
(
...
...
@@ -413,17 +413,17 @@ namespace dlib
>
void
array2d
<
T
,
mem_manager
>::
set_size
(
long
nr__
,
long
nc__
long
rows
,
long
cols
)
{
// make sure requires clause is not broken
DLIB_ASSERT
((
nc__
>=
0
&&
nr__
>=
0
)
,
"
\t
void array2d::set_size(long
nr__, long nc__
)"
DLIB_ASSERT
((
cols
>=
0
&&
rows
>=
0
)
,
"
\t
void array2d::set_size(long
rows, long cols
)"
<<
"
\n\t
The array2d can't have negative rows or columns."
<<
"
\n\t
this: "
<<
this
<<
"
\n\t
nc__: "
<<
nc__
<<
"
\n\t
nr__: "
<<
nr__
<<
"
\n\t
cols: "
<<
cols
<<
"
\n\t
rows: "
<<
rows
);
// set the enumerator back at the start
...
...
@@ -431,13 +431,13 @@ namespace dlib
cur
=
0
;
// don't do anything if we are already the right size.
if
(
nc_
==
nc__
&&
nr_
==
nr__
)
if
(
nc_
==
cols
&&
nr_
==
rows
)
{
return
;
}
nc_
=
nc__
;
nr_
=
nr__
;
nc_
=
cols
;
nr_
=
rows
;
// free any existing memory
if
(
data
!=
0
)
...
...
dlib/assert.h
View file @
ac2f9550
...
...
@@ -92,13 +92,13 @@ namespace dlib
{if ( !(_exp) ) \
{ \
dlib_assert_breakpoint(); \
std::ostringstream dlib__out; \
dlib__out << "\n\nError detected at line " << __LINE__ << ".\n"; \
dlib__out << "Error detected in file " << __FILE__ << ".\n"; \
dlib__out << "Error detected in function " << DLIB_FUNCTION_NAME << ".\n\n"; \
dlib__out << "Failing expression was " << #_exp << ".\n"; \
dlib__out << std::boolalpha << _message << "\n"; \
throw dlib::fatal_error(dlib::EBROKEN_ASSERT,dlib__out.str()); \
std::ostringstream dlib_
o
_out; \
dlib_
o
_out << "\n\nError detected at line " << __LINE__ << ".\n"; \
dlib_
o
_out << "Error detected in file " << __FILE__ << ".\n"; \
dlib_
o
_out << "Error detected in function " << DLIB_FUNCTION_NAME << ".\n\n"; \
dlib_
o
_out << "Failing expression was " << #_exp << ".\n"; \
dlib_
o
_out << std::boolalpha << _message << "\n"; \
throw dlib::fatal_error(dlib::EBROKEN_ASSERT,dlib_
o
_out.str()); \
}}
...
...
dlib/gui_core/gui_core_kernel_1.h
View file @
ac2f9550
...
...
@@ -96,18 +96,18 @@ namespace dlib
friend
LRESULT
CALLBACK
gui_core_kernel_1_globals
::
WndProc
(
HWND
,
UINT
,
WPARAM
,
LPARAM
);
canvas
(
unsigned
char
*
bits_
_
,
unsigned
long
padding_
_
,
unsigned
long
left_
_
,
unsigned
long
top_
_
,
unsigned
long
right_
_
,
unsigned
long
bottom_
_
unsigned
char
*
bits_
,
unsigned
long
padding_
,
unsigned
long
left_
,
unsigned
long
top_
,
unsigned
long
right_
,
unsigned
long
bottom_
)
:
rectangle
(
left_
_
,
top__
,
right__
,
bottom_
_
),
bits
(
bits_
_
),
rectangle
(
left_
,
top_
,
right_
,
bottom
_
),
bits
(
bits_
),
width_
(
width
()),
height_
(
height
()),
row_width
(
width_
*
3
+
padding_
_
)
row_width
(
width_
*
3
+
padding_
)
{}
// restricted functions
...
...
dlib/gui_core/gui_core_kernel_2.h
View file @
ac2f9550
...
...
@@ -113,14 +113,14 @@ namespace dlib
canvas
(
unsigned
char
*
bits_
_
,
unsigned
long
left_
_
,
unsigned
long
top_
_
,
unsigned
long
right_
_
,
unsigned
long
bottom_
_
unsigned
char
*
bits_
,
unsigned
long
left_
,
unsigned
long
top_
,
unsigned
long
right_
,
unsigned
long
bottom_
)
:
rectangle
(
left_
_
,
top__
,
right__
,
bottom_
_
),
bits
(
bits_
_
),
rectangle
(
left_
,
top_
,
right_
,
bottom
_
),
bits
(
bits_
),
width_
(
width
()),
height_
(
height
()),
row_width
(
width_
*
4
)
...
...
dlib/matrix/lapack/ormqr.h
View file @
ac2f9550
...
...
@@ -16,35 +16,35 @@ namespace dlib
{
void
DLIB_FORTRAN_ID
(
dormqr
)
(
char
*
side
,
char
*
trans
,
integer
*
m
,
integer
*
n
,
integer
*
k
,
const
double
*
a
,
integer
*
lda
,
const
double
*
tau
,
double
*
c_
_
,
integer
*
ldc
,
double
*
work
,
integer
*
lwork
,
double
*
c_
,
integer
*
ldc
,
double
*
work
,
integer
*
lwork
,
integer
*
info
);
void
DLIB_FORTRAN_ID
(
sormqr
)
(
char
*
side
,
char
*
trans
,
integer
*
m
,
integer
*
n
,
integer
*
k
,
const
float
*
a
,
integer
*
lda
,
const
float
*
tau
,
float
*
c_
_
,
integer
*
ldc
,
float
*
work
,
integer
*
lwork
,
float
*
c_
,
integer
*
ldc
,
float
*
work
,
integer
*
lwork
,
integer
*
info
);
}
inline
int
ormqr
(
char
side
,
char
trans
,
integer
m
,
integer
n
,
integer
k
,
const
double
*
a
,
integer
lda
,
const
double
*
tau
,
double
*
c_
_
,
integer
ldc
,
double
*
work
,
integer
lwork
)
double
*
c_
,
integer
ldc
,
double
*
work
,
integer
lwork
)
{
integer
info
=
0
;
DLIB_FORTRAN_ID
(
dormqr
)(
&
side
,
&
trans
,
&
m
,
&
n
,
&
k
,
a
,
&
lda
,
tau
,
c_
_
,
&
ldc
,
work
,
&
lwork
,
&
info
);
c_
,
&
ldc
,
work
,
&
lwork
,
&
info
);
return
info
;
}
inline
int
ormqr
(
char
side
,
char
trans
,
integer
m
,
integer
n
,
integer
k
,
const
float
*
a
,
integer
lda
,
const
float
*
tau
,
float
*
c_
_
,
integer
ldc
,
float
*
work
,
integer
lwork
)
float
*
c_
,
integer
ldc
,
float
*
work
,
integer
lwork
)
{
integer
info
=
0
;
DLIB_FORTRAN_ID
(
sormqr
)(
&
side
,
&
trans
,
&
m
,
&
n
,
&
k
,
a
,
&
lda
,
tau
,
c_
_
,
&
ldc
,
work
,
&
lwork
,
&
info
);
c_
,
&
ldc
,
work
,
&
lwork
,
&
info
);
return
info
;
}
...
...
dlib/matrix/lapack/syevr.h
View file @
ac2f9550
...
...
@@ -17,13 +17,13 @@ namespace dlib
void
DLIB_FORTRAN_ID
(
dsyevr
)
(
char
*
jobz
,
char
*
range
,
char
*
uplo
,
integer
*
n
,
double
*
a
,
integer
*
lda
,
double
*
vl
,
double
*
vu
,
integer
*
il
,
integer
*
iu
,
double
*
abstol
,
integer
*
m
,
double
*
w
,
double
*
z_
_
,
integer
*
ldz
,
integer
*
isuppz
,
double
*
work
,
double
*
z_
,
integer
*
ldz
,
integer
*
isuppz
,
double
*
work
,
integer
*
lwork
,
integer
*
iwork
,
integer
*
liwork
,
integer
*
info
);
void
DLIB_FORTRAN_ID
(
ssyevr
)
(
char
*
jobz
,
char
*
range
,
char
*
uplo
,
integer
*
n
,
float
*
a
,
integer
*
lda
,
float
*
vl
,
float
*
vu
,
integer
*
il
,
integer
*
iu
,
float
*
abstol
,
integer
*
m
,
float
*
w
,
float
*
z_
_
,
integer
*
ldz
,
integer
*
isuppz
,
float
*
work
,
float
*
z_
,
integer
*
ldz
,
integer
*
isuppz
,
float
*
work
,
integer
*
lwork
,
integer
*
iwork
,
integer
*
liwork
,
integer
*
info
);
}
...
...
dlib/matrix/matrix_eigenvalue.h
View file @
ac2f9550
...
...
@@ -141,13 +141,13 @@ namespace dlib
template
<
typename
EXP
>
eigenvalue_decomposition
<
matrix_exp_type
>::
eigenvalue_decomposition
(
const
matrix_exp
<
EXP
>&
A_
_
const
matrix_exp
<
EXP
>&
A_
)
{
COMPILE_TIME_ASSERT
((
is_same_type
<
type
,
typename
EXP
::
type
>::
value
));
const_temp_matrix
<
EXP
>
A
(
A_
_
);
const_temp_matrix
<
EXP
>
A
(
A_
);
// make sure requires clause is not broken
DLIB_ASSERT
(
A
.
nr
()
==
A
.
nc
()
&&
A
.
size
()
>
0
,
...
...
dlib/matrix/matrix_subexp.h
View file @
ac2f9550
...
...
@@ -64,12 +64,12 @@ namespace dlib
struct
op_subm
{
op_subm
(
const
M
&
m_
,
const
long
&
r_
_
,
const
long
&
c_
_
,
const
long
&
nr_
_
,
const
long
&
nc_
_
)
:
m
(
m_
),
r_
(
r__
),
c_
(
c__
),
nr_
(
nr__
),
nc_
(
nc__
)
{
}
const
M
&
m_
x
,
const
long
&
r_
x
,
const
long
&
c_
x
,
const
long
&
nr_
x
,
const
long
&
nc_
x
)
:
m
(
m_
x
),
r_
(
r_x
),
c_
(
c_x
),
nr_
(
nr_x
),
nc_
(
nc_x
)
{
}
const
M
&
m
;
const
long
r_
;
...
...
dlib/stack_trace.h
View file @
ac2f9550
...
...
@@ -69,15 +69,15 @@ namespace dlib
#define DLIB_CASSERT(_exp,_message) \
{if ( !(_exp) ) \
{ \
std::ostringstream dlib__out; \
dlib__out << "\n\nError occurred at line " << __LINE__ << ".\n"; \
dlib__out << "Error occurred in file " << __FILE__ << ".\n"; \
dlib__out << "Error occurred in function " << DLIB_FUNCTION_NAME << ".\n\n"; \
dlib__out << "Failing expression was " << #_exp << ".\n"; \
dlib__out << _message << "\n\n"; \
dlib__out << "Stack Trace: \n" << dlib::get_stack_trace() << "\n"; \
std::ostringstream dlib_
o
_out; \
dlib_
o
_out << "\n\nError occurred at line " << __LINE__ << ".\n"; \
dlib_
o
_out << "Error occurred in file " << __FILE__ << ".\n"; \
dlib_
o
_out << "Error occurred in function " << DLIB_FUNCTION_NAME << ".\n\n"; \
dlib_
o
_out << "Failing expression was " << #_exp << ".\n"; \
dlib_
o
_out << _message << "\n\n"; \
dlib_
o
_out << "Stack Trace: \n" << dlib::get_stack_trace() << "\n"; \
dlib_assert_breakpoint(); \
throw dlib::fatal_error(dlib::EBROKEN_ASSERT,dlib__out.str()); \
throw dlib::fatal_error(dlib::EBROKEN_ASSERT,dlib_
o
_out.str()); \
}}
...
...
dlib/test/tester.cpp
View file @
ac2f9550
...
...
@@ -49,11 +49,11 @@ namespace test
test_count_mutex
.
unlock
();
if
(
!
(
_exp
)
)
{
std
::
ostringstream
dlib__out
;
dlib__out
<<
"
\n\n
Error occurred at line "
<<
line
<<
".
\n
"
;
dlib__out
<<
"Error occurred in file "
<<
file
<<
".
\n
"
;
dlib__out
<<
"Failing expression was "
<<
_exp_str
<<
".
\n
"
;
throw
dlib
::
error
(
dlib__out
.
str
());
std
::
ostringstream
dlib_
o
_out
;
dlib_
o
_out
<<
"
\n\n
Error occurred at line "
<<
line
<<
".
\n
"
;
dlib_
o
_out
<<
"Error occurred in file "
<<
file
<<
".
\n
"
;
dlib_
o
_out
<<
"Failing expression was "
<<
_exp_str
<<
".
\n
"
;
throw
dlib
::
error
(
dlib_
o
_out
.
str
());
}
}
...
...
@@ -70,13 +70,13 @@ namespace test
tester
::
tester
(
const
std
::
string
&
switch_name_
,
const
std
::
string
&
description_
_
,
unsigned
long
num_of_args_
_
const
std
::
string
&
switch_name_
x
,
const
std
::
string
&
description_
x
,
unsigned
long
num_of_args_
x
)
:
switch_name
(
switch_name_
),
description_
(
description_
_
),
num_of_args_
(
num_of_args_
_
)
switch_name
(
switch_name_
x
),
description_
(
description_
x
),
num_of_args_
(
num_of_args_
x
)
{
using
namespace
std
;
if
(
testers
().
is_in_domain
(
switch_name
))
...
...
dlib/test/tester.h
View file @
ac2f9550
...
...
@@ -22,12 +22,12 @@
#define DLIB_TEST_MSG(_exp,_message) \
{increment_test_count(); if ( !(_exp) ) \
{ \
std::ostringstream dlib__out; \
dlib__out << "\n\nError occurred at line " << __LINE__ << ".\n"; \
dlib__out << "Error occurred in file " << __FILE__ << ".\n"; \
dlib__out << "Failing expression was " << #_exp << ".\n"; \
dlib__out << _message << "\n"; \
throw dlib::error(dlib__out.str()); \
std::ostringstream dlib_
o
_out; \
dlib_
o
_out << "\n\nError occurred at line " << __LINE__ << ".\n"; \
dlib_
o
_out << "Error occurred in file " << __FILE__ << ".\n"; \
dlib_
o
_out << "Failing expression was " << #_exp << ".\n"; \
dlib_
o
_out << _message << "\n"; \
throw dlib::error(dlib_
o
_out.str()); \
}}
namespace
test
...
...
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