Lisp HUG Maillist Archive

Questions about SYS:SIMPLE-INT64-VECTOR

Hi,

I have two questions about the new SYS:SIMPLE-INT64-VECTOR in 64-bit LispWorks 7:

1. What’s the predicate for this type?

Actually I found an internal function SYS::SIMPLE-INT64-VECTOR-P which seems to work ...

2. How to get the length of a SYS:SIMPLE-INT64-VECTOR?

Currently I’m using this way: (LENGTH (SYS::SIMPLE-INT64-VECTOR-DATA …)), is there a better one?

Thanks,

Chun Tian (binghe)


Re: Questions about SYS:SIMPLE-INT64-VECTOR


> On 24 Dec 2015, at 00:59, Chun Tian (binghe) <binghe.lisp@gmail.com> wrote:
> 
> Hi,
> 
> I have two questions about the new SYS:SIMPLE-INT64-VECTOR in 64-bit LispWorks 7:
> 
> 1. What’s the predicate for this type?
> 
> Actually I found an internal function SYS::SIMPLE-INT64-VECTOR-P which seems to work …


(typep thing ‘sys:simple-int64-vector) seems to do the trick.

> 2. How to get the length of a SYS:SIMPLE-INT64-VECTOR?
> 
> Currently I’m using this way: (LENGTH (SYS::SIMPLE-INT64-VECTOR-DATA …)), is there a better one?

This may defeat the purpose of simple-int64-vector: (type-of (sys::simple-int64-vector-data …)) returns (simple-array (signed-byte 64) …), and (signed-byte 64) values probably need to be boxed. It seems to me that the -data function is only there for debugging purposes, but I’m only guessing…

I don’t see any other way to determine the length of such a vector. You may have to record the length separately.


Pascal

--
Pascal Costanza
The views expressed in this email are my own, and not those of my employer.




_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Updated at: 2020-12-10 08:32 UTC