<div dir="ltr">Fantastic! Thanks Bill, do you know if there is an example of doing this up anywhere or in the repo?<div><br></div><div>thanks again, will let you know how it goes.</div><div>iain</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, Mar 9, 2025 at 10:30 AM &lt;<a href="mailto:bil@ccrma.stanford.edu">bil@ccrma.stanford.edu</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">If your data is in a C array of doubles, you can<br>
use it directly in s7 (i.e. without copying anything);<br>
use the s7 function s7_make_float_vector_wrapper.<br>
There&#39;s a similar function to wrap GSL complex<br>
vectors which are (from C&#39;s point of view) arrays<br>
of doubles with real/imaginary parts interleaved.<br>
It would be easy to add integer vector wrappers.<br>
Both allocation and free of the actual vector is<br>
left to C.<br>
<br>
In the other direction, you can access the s7 float-vector<br>
(or int/complex) directly in C via s7_float_vector_elements<br>
and its friends.  In this case allocation and free are<br>
left to s7.<br>
<br>
<br>
</blockquote></div>