
Greetings, With OpenGL shaders it is possible to write code utilizing loops with unknown number of iterations, I'm wondering if the same can be done with GPipe? Fractals would be one use case and implicit surfaces another. Fragment Floats had to be compared with IfB from Data.Boolean, so I tried something recursive like foo x = boolean x (foo (x * 0.9)) (x <* 1) which compiles fine but seems to concentrate on eating stack space while running :)

Hi, Am Dienstag, den 22.03.2011, 11:07 +0200 schrieb Jarkko Vilhunen:
which compiles fine but seems to concentrate on eating stack space while running :)
„if it compiles, it works“. Nobody ever said what exactly it would work on. Greetings, Joachim -- Joachim "nomeata" Breitner mail: mail@joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C JID: nomeata@joachim-breitner.de | http://www.joachim-breitner.de/ Debian Developer: nomeata@debian.org

On Tue, 22 Mar 2011, Jarkko Vilhunen wrote:
Greetings,
With OpenGL shaders it is possible to write code utilizing loops with unknown number of iterations, I'm wondering if the same can be done with GPipe? Fractals would be one use case and implicit surfaces another. Fragment Floats had to be compared with IfB from Data.Boolean, so I tried something recursive like
foo x = boolean x (foo (x * 0.9)) (x <* 1)
This is not tail-recursive - could that be the problem? I also assume that GPipe is an EDSL and thus your expression just produces infinitely code in the shader language instead of running it.
participants (3)
-
Henning Thielemann
-
Jarkko Vilhunen
-
Joachim Breitner