Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
opencv
Commits
0263727b
Commit
0263727b
authored
Jun 22, 2013
by
hbristow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Function templates now include the full skeleton, from input to output. Class templates need work
parent
f45bc356
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
functional.cpp
modules/matlab/generator/templates/functional.cpp
+2
-2
template_function_base.cpp
...les/matlab/generator/templates/template_function_base.cpp
+8
-2
No files found.
modules/matlab/generator/templates/functional.cpp
View file @
0263727b
...
...
@@ -66,5 +66,5 @@
{
%
for
opt
in
fun
.
opt
|
outputs
%
}
outputs
[{{
loop
.
index0
+
fun
.
rtp
|
void
|
not
+
fun
.
req
|
outputs
|
length
}}]
=
{{
opt
.
name
}};
{
%
endfor
%
}
{
%
-
endmacro
-
%
}
{
%
endmacro
%
}
modules/matlab/generator/templates/template_function_base.cpp
View file @
0263727b
...
...
@@ -36,9 +36,15 @@ void mexFunction(int nlhs, mxArray* plhs[],
// setup
std
::
vector
<
Bridge
>
inputs
(
plhs
,
plhs
+
nrhs
);
std
::
vector
<
Bridge
>
outputs
(
nlhs
);
{
%
set
noutputs
=
fun
.
rtp
|
void
|
not
+
fun
.
req
|
outputs
|
length
+
fun
.
opt
|
outputs
|
length
%
}
{
%-
if
noutputs
%
}
std
::
vector
<
Bridge
>
outputs
({{
noutputs
}});
{
%
endif
%
}
{{
functional
.
generate
(
fun
)
}}
// setdown
// push the outputs back to matlab
for
(
size_t
n
=
0
;
n
<
nlhs
;
++
n
)
{
plhs
[
n
]
=
outputs
[
n
].
mxArray
();
}
}
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