Re: Anyone understand this?

"David McClain (as dbm at refined-audiometrics dot com)" <[email protected]>
Newsgroups gmane.lisp.lispworks.general
Message-ID <[email protected]>
YES!! Thanks for that suggestion!

Use FLI:INCF-POINTER by START * 8 for a :DOUBLE array. And now it works!

Thanks for the suggestion!!


> On Jan 22, 2025, at 12:36, David McClain <[email protected]> wrote:
> 
> I do seem to recall doing that sort of thing, many years ago when I wrote a direct memory file access mechanism for Lisp. Maybe…
> 
> 
> 
>> On Jan 22, 2025, at 12:35, Yuri Davidovsky <[email protected]> wrote:
>> 
>> 
>> Is there a way to increment a pointer in a separate step after creation?
>> 
>>> On 22 Jan 2025, at 20:15, David McClain <[email protected]> wrote:
>>> 
>>> This produces 10.0 instead of 30.0.
>>> 
>>> (let* ((arr (make-array 3
>>>                         :element-type 'double-float
>>>                         :allocation :pinnable
>>>                         :initial-contents '(10d0 20d0 30d0))))
>>>   (hcl:with-pinned-objects (arr)
>>>     (fli:with-dynamic-lisp-array-pointer (parr arr :start 2 :type :double-float)
>>>       (fli:dereference parr))))
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.