connecting Gem and Gridflow (Was: Re: [Gridflow-dev] feature requests: @fold1, @foldr, @foldr1, @scan1. @scanr, @scanr1, unary ignore)

Mathieu Bouchard matju at sympatico.ca
Wed Sep 8 16:11:21 EDT 2004


On Wed, 8 Sep 2004, Claudius Maximus wrote:
> I managed to get Gridflow images into Gem like this:

Note that, according to doc/architecture.html, you can send lists in place
of grids, and they may contain about the same information as you'd have in
@import/@cast/@redim. Another thing is that all six data types may have
their name abbreviated to a single letter that is the initial letter of
each java name: b=uint8, s=int16, i=int32, l=int64, f=float32, d=float64.
One last is that lists can be arguments in GridFlow, if you enclose them
in space-separated parens, and drop the "list" selector too.

So you can actually write [@ / ( f # 255 )] as a shorthand.

> Is there a way to cast Gridflow operators directly so I don't have to
> cast both inputs?

The GF-0.7 series introduced multiple datatypes, but not automatic
casting, because I'm not too sure what would be the best way to do it, and
that if I implement the "wrong one", then I can't go back because I have
to keep some compatibility.

> My experiments trying to get Gem output into Gridflow with [pix_snap],
> [pix_dump] and [@import] have so far been unsuccessful, possibly
> because the float to int conversion is happening at the wrong time - I
> end up with a grid full of 0s.

[@import] has an argument for doing the job of [@cast] all at once, but it
didn't fully work because in some cases the conversion from floats/lists
was going through the int32 type in the middle. I since hacked something
so that it actually works, but I don't recall which version it was, maybe
0.7.6, maybe even 0.7.7.

________________________________________________________________
Mathieu Bouchard                       http://artengine.ca/matju




More information about the Gridflow-dev mailing list