[plt-scheme] Re: partial evaluation and mzc [was: The programs that write the programs]
From: Artem Baguinski (artm at v2.nl)
Date: Thu Oct 21 05:46:26 EDT 2004 |
|
On Wed, 20 Oct 2004 11:49:46 -0400, Eric Kidd wrote:
>> But often it is faster to combine several pixel / scan line operations
>> in one loop what simple approach does not allow (among other things to
>> minimise memory access)
>
> This is a very cool idea, although you should definitely look into
> automatically generating code for modern GPUs, which have far more image
> processing horsepower than the main CPU. There's a weird--but
> cool--library which uses C++ as macro language and partial evaluator for
> various GPU languages; you can find it at SourceForge:
>
> http://libsh.sourceforge.net/
i had using GPUs in my mind, but since I've no experience programming them
I didn't want to introduce too much unknown factors at the same time. If
I had a proof of a concept generating C code for something like hermes
library but with YUV formats and more primitive operations, I could see if
I can add a GPU code generation.
oh, and generating GPU code from scheme would be even weirder (if not
cooler).
> I have friends who write image munging code for a living, and I've
> talked these ideas over with them in the past. In general, generating
> image processing code from Scheme seems to be a very good idea.
nice to know that :)
> In answer to your second question, generating ANSI C from Scheme is not
> hard at all--you could probably define a prefix-syntax for C, and use it
> as a target language for macro expansion and partial evaluation.
>
> I'm actually quite interested in working on this in my (non-existent)
> free time.
hmm... is it a collaboration offer? I also have some non-existent free
time we could meet and discuss this in ;-)
--
gr{oe|ee}t{en|ings}
artm