Skip to content

Commit

Permalink
re-introduce array_in and array_out parameter wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
lofidevops committed Sep 21, 2015
1 parent e8b87b9 commit 39ac756
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions wrapper/libpm.i
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@
%include "carrays.i"
%array_class(float, floatArray);

/* C# wrappers for array parameters */

%include "arrays_csharp.i"
%apply float INPUT[] {float* array_in}
%apply float OUTPUT[] {float* array_out}
// wraps arrays used in helper functions mapArrayToMatrix and mapMatrixToArray
// (note that array_out seems unreliable and iteration over a floatArray is preferred;
// array_in works as expected)
// see also http://stackoverflow.com/questions/5822529/swig-returning-an-array-of-doubles

/* Prerequisite headers - SWIG definitions */

%rename(process) operator ();
Expand Down

0 comments on commit 39ac756

Please sign in to comment.