Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
d1435a2c
Commit
d1435a2c
authored
Feb 12, 2016
by
Davis King
Browse files
merged
parents
d9638f22
1af517bc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
3 deletions
+28
-3
dlib/matrix/matrix_qr.h
dlib/matrix/matrix_qr.h
+4
-2
dlib/test/matrix4.cpp
dlib/test/matrix4.cpp
+10
-0
setup.py
setup.py
+14
-1
No files found.
dlib/matrix/matrix_qr.h
View file @
d1435a2c
...
...
@@ -62,8 +62,9 @@ namespace dlib
const
matrix_type
get_q
(
)
const
;
template
<
typename
T
,
long
R
,
long
C
,
typename
MM
,
typename
L
>
void
get_q
(
matrix
_type
&
Q
matrix
<
T
,
R
,
C
,
MM
,
L
>
&
Q
)
const
;
template
<
typename
EXP
>
...
...
@@ -270,9 +271,10 @@ namespace dlib
// ----------------------------------------------------------------------------------------
template
<
typename
matrix_exp_type
>
template
<
typename
T
,
long
R
,
long
C
,
typename
MM
,
typename
L
>
void
qr_decomposition
<
matrix_exp_type
>::
get_q
(
matrix
_type
&
X
matrix
<
T
,
R
,
C
,
MM
,
L
>
&
X
)
const
{
#ifdef DLIB_USE_LAPACK
...
...
dlib/test/matrix4.cpp
View file @
d1435a2c
...
...
@@ -631,6 +631,16 @@ namespace
3
,
3
,
3
;
DLIB_TEST
(
upperbound
(
m
,
3
)
==
M
);
}
{
matrix
<
double
,
9
,
5
>
A
=
randm
(
9
,
5
);
matrix
<
double
>
B
=
A
;
orthogonalize
(
A
);
orthogonalize
(
B
);
DLIB_TEST
(
equal
(
A
,
B
));
}
}
...
...
setup.py
View file @
d1435a2c
...
...
@@ -37,7 +37,7 @@ from distutils.command.build_ext import build_ext as _build_ext
from
distutils.command.build
import
build
as
_build
from
distutils.errors
import
DistutilsSetupError
from
distutils.spawn
import
find_executable
from
distutils.sysconfig
import
get_python_inc
,
get_python_version
from
distutils.sysconfig
import
get_python_inc
,
get_python_version
,
get_config_var
from
distutils
import
log
import
os
import
sys
...
...
@@ -466,6 +466,19 @@ class build(_build):
if
sys
.
version_info
>=
(
3
,
0
):
cmake_extra_arch
+=
[
'-DPYTHON3=yes'
]
log
.
info
(
"Detected platform: %s"
%
sys
.
platform
)
if
sys
.
platform
==
"darwin"
:
# build on OS X
inc_dir
=
get_python_inc
()
cmake_extra_arch
+=
[
'-DPYTHON_INCLUDE_DIR={inc}'
.
format
(
inc
=
inc_dir
)]
# by default, cmake will choose the system python lib in /usr/lib
# this checks the sysconfig and will correctly pick up a brewed python lib
# e.g. in /usr/local/Cellar
py_ver
=
get_python_version
()
py_lib
=
os
.
path
.
join
(
get_config_var
(
'LIBDIR'
),
'libpython'
+
py_ver
+
'.dylib'
)
cmake_extra_arch
+=
[
'-DPYTHON_LIBRARY={lib}'
.
format
(
lib
=
py_lib
)]
if
platform_arch
==
'64bit'
and
sys
.
platform
==
"win32"
:
# 64bit build on Windows
...
...
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