Matlab bindings now only building once rather than every call to make, via the use of some proxies. Matlab build currently only happens in one thread, so it can be pretty slow

This commit is contained in:
hbristow
2013-06-22 23:26:27 -07:00
parent 3b4814a52e
commit 755ce9d654
6 changed files with 159 additions and 38 deletions

View File

@@ -8,7 +8,7 @@
{% macro compose(fun) %}
{# ----------- Return type ------------- #}
{%- if not fun.rtp|void -%} retval = {% endif -%}
{%- if fun.clss -%}inst.{%- else -%} cv:: {% endif -%}
{%- if fun.clss -%}inst.{%- else -%} cv:: {%- endif -%}
{{fun.name}}(
{#- ----------- Required ------------- -#}
{%- for arg in fun.req -%}
@@ -32,10 +32,10 @@
// unpack the arguments
{# ----------- Inputs ------------- #}
{% for arg in fun.req|inputs %}
{{arg.tp}} {{arg.name}} = inputs[{{ loop.index0 }}];
{{arg.tp}} {{arg.name}} = inputs[{{ loop.index0 }}].to{{arg.tp|toUpperCamelCase}}();
{% endfor %}
{% for opt in fun.opt|inputs %}
{{opt.tp}} {{opt.name}} = (nrhs > {{loop.index0 + fun.req|inputs|length}}) ? ({{opt.tp}})inputs[{{loop.index0 + fun.req|inputs|length}}] : {{opt.default}};
{{opt.tp}} {{opt.name}} = (nrhs > {{loop.index0 + fun.req|inputs|length}}) ? inputs[{{loop.index0 + fun.req|inputs|length}}].to{{opt.tp|toUpperCamelCase}}() : {% if opt.ref == '*' -%} {{opt.tp}}() {%- else -%} {{opt.default}} {%- endif %};
{% endfor %}
{# ----------- Outputs ------------ #}
{% for arg in fun.req|only|outputs %}