Results 1 to 3 of 3

Thread: Marching Cubes - Outputting Variable-Size Array

  1. #1
    Junior Member
    Join Date
    Oct 2009
    Posts
    18

    Marching Cubes - Outputting Variable-Size Array

    I've been working on a port of Paul Bourke's Marching-Cubes implementation
    http://local.wasp.uwa.edu.au/~pbourke/g ... olygonise/
    trying to make an OpenCL version. I'm now wondering if this is in fact going to be possible, though.

    I envisage the stumbling-block being the fact that the kernel needs to return an array containing a variable number of vertices, depending on the input texture (the plan is to use it to render slabs of consecutive pairs of slices through a 3D volume).

    I know OpenCL is sensitive about memory-management, so I suspect the answer may be 'no', but can anyone tell me definitively if this would in fact be possible? I know I've posted on this before, so apologies if you've read a similar cry for help in the past, but I never got a definitive answer.

    I've seen code for a CUDA marching-cubes implementation, incidentally. I don't know if the fact it works in CUDA makes it necessarily more likely to be possible in OpenCL...

    Cheers,

    a|x
    http://machinesdontcare.wordpress.com

  2. #2
    Senior Member
    Join Date
    Jul 2009
    Location
    Northern Europe
    Posts
    311

    Re: Marching Cubes - Outputting Variable-Size Array

    If it works in CUDA it will almost certainly port over easily to OpenCL. They have (at the moment) very similar feature sets and limitations. So the answer is almost certainly that it will work, and a high-performance CUDA implementation should port naturally over to a high-performance OpenCL one. (Modulo the beta status of Nvidia's drivers, of course.)

  3. #3
    Junior Member
    Join Date
    Oct 2009
    Posts
    18

    Re: Marching Cubes - Outputting Variable-Size Array

    Thanks for that dbs2. I'll have another look at the CUDA version on the NVIDIA site. I did have a look through the code, but it looked a bit over my head, to be honest. It's obviously built for speed, rather than ease-of-understanding for newbies like me!

    a|x

Similar Threads

  1. Array size at runtime
    By jeffheaton in forum OpenCL
    Replies: 2
    Last Post: 05-12-2010, 03:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •