[<<][staapl][>>][..]
Thu Jul 10 12:17:19 CEST 2008

porting old ip.ss

Let's start from the previous approach from entry://20070330-160157
and see if there's something to do with the new insights. This code is
mainly about generating C code from a grid-function specification:

(fn (gain x)
  (* (gain)
     (+ (x 0)
        (x -1)
        (x +1)))

This has the advantage that it translates straight to array accesses:
arrays are finite functions mapping coordinates to value.

Porting to the new cgen.ss involves some switch from
symbols/lists->syntax


Got syntax port working, now need to change the 'grid' and 'loop'
macros + check if they worked before.. Looks like there's some code
missing.

Hmm.. Should i go back to working with symbols, or get the syntax
working? The problem is 'substitute'. This should be replaced by a
variant of 'syntax-case' that recurses over expression arguments.

Ok. using 'syntax-case/r' this becomes quite simple. Got it ported.

NEXT: this implementes 'map', now find a way to express fold/integral
style functions like the Hough transform, on top of this mechanism. No
DSP without inner product.. Maybe focus on the Hough-like accumulator
style first: that requires random access, which is genuinely
different. It seems like a lot of generality is necessary to express
such a specific data flow.



[Reply][About]
[<<][staapl][>>][..]