How might one implement continuations (ie, call-with-current-continuation)
in CUDA? Is it possible?
Well… CUDA is Turing complete… it should be possible.
Question remains is it fesible to do so, can it be implemented efficiently?
Note that CUDA program has no stack, all functions are inlined. There is no support for calling a function, that is — put something onto stack, jump somewhere, and then jump back depending on the stack content. A stack could be implemented manually, I am not sure about jumping to a variable address.
I think one would have to think first how to implement real function calling before playing with continuations.
Mr. Turing just rotated a little in his grave.
Why is so? Is my statement incorrect?
You misspelled his name. Turing not Touring ;)
Ow… lol.
OK.
I stand corrected!
Apologies for mr. Turing and anyone concerned…