[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-janitors] Re: #113: Crunch egg: bug in define-crunch-primitives
From: |
Chicken Trac |
Subject: |
[Chicken-janitors] Re: #113: Crunch egg: bug in define-crunch-primitives / define-crunch-callback |
Date: |
Wed, 30 Dec 2009 23:57:05 -0000 |
#113: Crunch egg: bug in define-crunch-primitives / define-crunch-callback
------------------------+---------------------------------------------------
Reporter: jeronimo | Owner:
Type: defect | Status: new
Priority: minor | Milestone:
Component: extensions | Version: 4.2.x
Keywords: crunch |
------------------------+---------------------------------------------------
Comment(by felix):
Replying to [comment:6 jeronimo]:
(Sorry, I totally forgot about this ticket)
> BTW, since you mentioned that Crunch is kind of complicated, I suppose
it would be difficult to make it accept more types as arguments for
callbacks?
>
> I'd like to do something like this:
>
> {{{
> ;; m if a heterogeneous vector of f64vectors
> (define-crunch-callback
> (vector->f64vector-ref (SOME-TYPE m) (int i)) f64vector
> (vector-ref m i))
> }}}
>
> This is to compare different multidimensional matrix implementations
(either as a single vector, or as vector-of-vectors). In the vector-of-
vectors case, I'd have to use heterogeneous vectors in all dimensions but
the last:
>
> vector of vector of vector of f64vector
>
> (This is because I have some evidence that it may actually be quite
fast)
>
> But I could not get it to work: I've tried c-pointer and blob as "SOME-
TYPE" above. blob is not allowed that, and if I use c-pointer, the code
compiles but later complains (at execution time) that the Scheme vector is
not a c-pointer.
>
crunch has its own type-system and does not handle Scheme data well (since
it generates a more or less direct translation to C++, it uses C++ data
types). When I find the time, I'll try to look into this.
(Note that chicken 4.3.2 has heavily improved floating-point performance,
particularly for unboxed SRFI-4 vectors, when compiled in unsafe mode)
--
Ticket URL: <http://www.irp.oist.jp/trac/chicken/ticket/113#comment:7>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Chicken-janitors] Re: #113: Crunch egg: bug in define-crunch-primitives / define-crunch-callback,
Chicken Trac <=