CUDA GUI anyone? Is there some way to direct GUI's from kernel code?

Is there some way to direct GUI’s from kernel code?
It seems silly to be doing all my computation on the GPU and then copying the results into host memory, just for the host to then put those results back into GPU memory to be displayed. The answer may be academic as I’m waiting for my tesla cards to arrive (which have no graphics out), but the pictures of Fermi would seem to include a DVI output so this topic might be back on the cards so to say…

Right now I’m using CAIRO and GTK to display and control GUI’s on both linux and mac… One solution would be for CAIRO and GTK to access an image in GPU memory assigned by CUDA but I don’t think this is the case currently, or am I wrong?

You should take a look at the CUDA/OpenGL interoperability API. These functions allow you to make a buffer on the card visible from both CUDA and OpenGL at the same time. You can then perform computations in CUDA and display the results in OpenGL.

There are several examples of this in the SDK, mostly in the projects with “GL” at the end of the name.