Jump to content

Gas OpenCL


TheDude

Recommended Posts

I was wondering where I could learn how to make functions in the Gas OpenCL dop node? I could barely find any documentation on it aside from AMDs site, but that's a lot more low level programming related. Just looking for simple houdini-centric openCL demonstrations / examples.

 

Update: A friend Artem showed me where the kernels live $HFS/houdini/ocl/ -- You can open them up and have a lil dig around, but even the simplest functions take a lot of overhead to set up

Edited by TheDude
  • Like 2
Link to comment
Share on other sites

  • 4 weeks later...

Has anyone ever gotten the open cl dop to work on fields?

I've been trying to get a simple scenario to work where it essentially does:

density *= 2.;

 

The actual code I'm using is:

kernel void test(   
    global float* density_
)
{
  density_[0] = density_ * 2.0;
}

It throws an error saying no output field specified, I'm not sure if this is an issue with my code, or if this needs to be specified elsewhere on the dop itself?

 

Thanks!

Link to comment
Share on other sites

  • 1 year later...

yes, it works well on volumes. Have a look inside $HFS/houdini/ocl/
The most basic example is : $HFS/houdini/ocl/sim/dissipate.cl
I'll post a file tomorrow, it doesn't seem to work well on my macbook pro at home 
<_<

Edited by bunker
Link to comment
Share on other sites

it might be that underscore after density.

 

Perhaps something like this...?

kernel void test(
		int stride_x, 
		int stride_y, 
		int stride_z, 
		int stride_offset,
    	global float * density
)
{
int idx = stride_offset +
	    get_global_id(0) * stride_x +
	    get_global_id(1) * stride_y +
	    get_global_id(2) * stride_z;

    float density_ = density[idx];

  density[idx] = density_ * 2.0;
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...