[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[debbugs-tracker] bug#18224: closed (Shared arrays are incompatible with
From: |
GNU bug Tracking System |
Subject: |
[debbugs-tracker] bug#18224: closed (Shared arrays are incompatible with bytevector accessors) |
Date: |
Fri, 30 Oct 2015 16:16:02 +0000 |
Your message dated Fri, 30 Oct 2015 17:15:21 +0100
with message-id <address@hidden>
and subject line Re: bug-guile Digest, Vol 137, Issue 2
has caused the debbugs.gnu.org bug report #18224,
regarding Shared arrays are incompatible with bytevector accessors
to be marked as done.
(If you believe you have received this mail in error, please contact
address@hidden)
--
18224: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18224
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message ---
Subject: |
Shared arrays are incompatible with bytevector accessors |
Date: |
Fri, 8 Aug 2014 16:48:08 +0200 |
Creating a shared array based on a bytevector results with an object
whose print representation is identical with a print-representation of
a bytevector:
(define bv #vu8(0 1 2 3))
(define bv/shared
(make-shared-array bv (lambda(i)(list (+ i 2))) '(0 1)))
bv/shared
====> #vu8(2 3)
However, accessing these "shared bytevectors" using the bytevector api
is impossible:
(bytevector-u8-ref bv/shared 0)
====> error: wrong type argument in position 1 (expecting bytevector): #vu8(2 3)
Since the print-representation is identical, this behaviour is
unexpected. Furthermore, the lack of capability of creating shared
bytevectors limits their usefullness. On the other hand, if the shared
bytevector remains contiguous, there should be no performance
concerns.
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug-guile Digest, Vol 137, Issue 2 |
Date: |
Fri, 30 Oct 2015 17:15:21 +0100 |
http://git.savannah.gnu.org/gitweb/?p=guile.git;a=commitdiff;h=eb3d623da57e6d31a58d95f932345fb761f9b701
on master fixes printing of scm_tc7_array (shared array) to be #1(...) or
#1typetag(...) so they aren't confused with actual vectors or bytevectors.
With respect to the lack of capability to create shared bytevectors, use the
array procedures instead. If you need the arrays to be contiguous, you can
check this at run time.
The fundamental distinction between shared arrays on one side and
bytevectors/vectors/bitvectors on the other side is not of contiguity, rank,
element type, etc. but that the latter types are containers, while the shared
arrays are just views. That is why I don't think indirection fields should be
added to the bytevectors, this would complicate the lookup functions and
overlap in functionality with arrays.
--- End Message ---
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [debbugs-tracker] bug#18224: closed (Shared arrays are incompatible with bytevector accessors),
GNU bug Tracking System <=