>> On Fri, Nov 28, 2008 at 10:25 PM, Tamas K Papp <tkpapp@...> wrote:
>>> A lot of the code in FFA was created to work around the fact that
>>> sb-sys:vector-sap doesn't work for simple-arrays that have a rank
>>> higher than 1. Currently the workaround is to create a simple array of
>>> rank 1, and then displace to this when I need multidimensional arrays.
I would like to stick this:
;;; User visible extension
(declaim (ftype (function (simple-array) (values (simple-array * (*))
(defun simple-array-vector (array)
"ARRAY must be a SIMPLE-ARRAY. If ARRAY is multidimensional, returns the
underlying one-dimensional SIMPLE-ARRAY, which shares storage with ARRAY.
Otherwise returns ARRAY."
;; KLUDGE: Without TRULY-THE the system is not smart enough to figure out that
;; (1) SIMPLE-ARRAY without ARRAY-HEADER-P is a vector (2) the data vector of
;; a SIMPLE-ARRAY is a vector.
(truly-the (simple-array * (*))
(if (array-header-p array)
in SB-EXT. Any objections?
On Mon, Dec 1, 2008 at 5:35 PM, Nikodemus Siivola
> (defun simple-array-vector (array)
Committed as 188.8.131.52, with a health warning re.
implementation-detail nature of this.
> -- Nikodemus
On Thu, Dec 4, 2008 at 12:02 PM, Nikodemus Siivola
> On Mon, Dec 1, 2008 at 5:35 PM, Nikodemus Siivola
> <nikodemus@...> wrote:
>> (defun simple-array-vector (array)
> Committed as 184.108.40.206, with a health warning re.
> implementation-detail nature of this.
Thanks to Gabor's comments on #lisp, renamed ARRAY-STORAGE-VECTOR and
allowed use on all non-displaced arrays.