Lisp HUG Maillist Archive

Arrays with static allocation

Dear list,

What is the most efficient way to make a array with static allocation from another array?
I would like to avoid to copy each members of the array one by one.

Array with static allocation are useful when used with foreign calls.


Best Regards,
Camille


Re: Arrays with static allocation

you mean displaced arrays?

   http://www.lispworks.com/documentation/HyperSpec/Body/f_mk_ar.htm

On 11/16/2011 12:07 PM, Camille Troillard wrote:
> Dear list,
>
> What is the most efficient way to make a array with static allocation from another array?
> I would like to avoid to copy each members of the array one by one.
>
> Array with static allocation are useful when used with foreign calls.
>
>
> Best Regards,
> Camille
>

-- 
Chris Riesbeck

Home page: http://www.cs.northwestern.edu/~riesbeck/
Calendar: http://calendar.yahoo.com/criesbeck


RE: Arrays with static allocation

> From: camille@osculator.net
> Subject: Arrays with static allocation
> Date: Wed, 16 Nov 2011 19:07:08 +0100
> To: lisp-hug@lispworks.com
>
>
> Dear list,
>
> What is the most efficient way to make a array with static allocation from another array?
> I would like to avoid to copy each members of the array one by one.
>
> Array with static allocation are useful when used with foreign calls.
>
>
> Best Regards,
> Camille
>



Hi Camille,


You can use fli:replace-foreign-array for bulk copying of foreign/static arrays. Also see fli:with-dynamic-lisp-array-pointer.


Chris
Updated at: 2020-12-10 08:37 UTC