Email list hosting service & mailing list manager

Comparison of SRFIs 122 and 164 John Cowan (30 Nov 2019 22:07 UTC)
Re: Comparison of SRFIs 122 and 164 Per Bothner (30 Nov 2019 23:28 UTC)
Re: Comparison of SRFIs 122 and 164 John Cowan (01 Dec 2019 03:58 UTC)
Re: Comparison of SRFIs 122 and 164 Per Bothner (01 Dec 2019 06:36 UTC)
Re: Comparison of SRFIs 122 and 164 John Cowan (01 Dec 2019 13:55 UTC)
Re: Comparison of SRFIs 122 and 164 Per Bothner (02 Dec 2019 04:28 UTC)
Re: Comparison of SRFIs 122 and 164 Bradley Lucier (01 Dec 2019 21:16 UTC)
Re: Comparison of SRFIs 122 and 164 Bradley Lucier (01 Dec 2019 01:18 UTC)

Re: Comparison of SRFIs 122 and 164 Per Bothner 30 Nov 2019 23:27 UTC

On 11/30/19 2:06 PM, John Cowan wrote:
> 3) SRFI 122 specifies how the user can create storage objects that are restricted to contain only particular values such as bytes or 64-bit floats.  SRFI 164 leaves that up to the implementation.

Well, SRFI 164 does integrate with SRFI 4 (or 160), assuming you allow uniform vectors as "gectors".

To allocate an f32 N*M matrix, one can do:
    (array-reshape (make-f32vector (* N M)) (vector N M))

> 6) SRFI 122's transformation procedures are affine, which means they are very efficient.  SRFI 164 provides general transformations, which can of course be written on top of SRFI 122, but aren't provided by default.

SRFI 164 includes share-array from SRFI 25, which which requires an affine transformation function.

array-index-share will create an efficient affine transformation when each index is an integer or a range.

In both cases, the implementation is optimized to take advantage of the affine mapping
(using the somewhat misnamed class GeneralArray).
--
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/