Compiler SDK™ .NET assembly exports one or more
public methods that accept and return data using
Adding a type-safe interface to a MATLAB Compiler SDK assembly creates another set of methods (with the same names) that accept and return native .NET types.
The figure Architecture of a Deployed Component with a Type-Safe Interface illustrates the data paths between the .NET host application and the deployed MATLAB function.
Architecture of a Deployed Component with a Type-Safe Interface
The MATLAB function
addOne returns its
input plus one.
addOne with a type-safe interface
creates two .NET
One that accepts and returns .NET
One that accepts and returns
You may create multiple type-safe interface methods for a single MATLAB function. Type-safe interface methods follow the standard .NET methods for overloading.
Notice that the type-safe methods co-exist with the
Your .NET application may mix and match calls to either type of method,
You may find
MWArray methods more efficient
when passing large data values in loops to one or more deployed functions.
In such cases, creating an
MWArray object allows
you to marshal the data only once whereas the type-safe interface
marshals inputs on every call.