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
dd16139a
Commit
dd16139a
authored
Mar 22, 2017
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made the mex wrapper deal with cell arrays that have null elements.
parent
b8e1282a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
mex_wrapper.cpp
dlib/matlab/mex_wrapper.cpp
+29
-0
No files found.
dlib/matlab/mex_wrapper.cpp
View file @
dd16139a
...
...
@@ -387,6 +387,29 @@ namespace mex_binding
return
escape_percent
(
sout
.
str
());
}
// -------------------------------------------------------
template
<
typename
matrix_type
>
typename
dlib
::
enable_if_c
<
is_matrix
<
matrix_type
>::
value
||
is_array2d
<
matrix_type
>::
value
>::
type
clear_mat
(
matrix_type
&
m
)
{
m
.
set_size
(
0
,
0
);
}
template
<
typename
matrix_type
>
typename
dlib
::
disable_if_c
<
is_matrix
<
matrix_type
>::
value
||
is_array2d
<
matrix_type
>::
value
>::
type
clear_mat
(
matrix_type
&
)
{
}
// -------------------------------------------------------
template
<
...
...
@@ -651,6 +674,12 @@ namespace mex_binding
}
else
if
(
is_matrix
<
T
>::
value
||
is_array2d
<
T
>::
value
)
{
if
(
prhs
==
NULL
)
{
clear_mat
(
arg
);
return
;
}
typedef
typename
inner_type
<
T
>::
type
type
;
const
int
num_dims
=
mxGetNumberOfDimensions
(
prhs
);
...
...
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