Welcome to The Forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads

Gmod Server Compute Module


Recommended Posts

I've been working on this in my spare time for a while, and thought I might ask the other developers here what they would add. This module is intended to be a way for the server to make large amounts of repetitive calculations (bullets, collisions, anything) quickly.

 

This module is almost functional, and allows OpenCL functions to be loaded, compiled, and used as lua functions in code.

 

CLInit() -- Just sets everything up.

CLShowDevices() -- Lists all OpenCL compatible devices.

CLSetDevice(int) -- Sets the device to use.

CLLoadProgram(path) -- Loads an OpenCL source file, compiles it, and returns the id of the compiled program (should only be executed once).

CLExecute(id, params ...) -- Executes a loaded program with the supplied parameters. The results of the program are returned as an array.

 

This module is capable of using pretty much any GPU for it's calculations, including any intel integrated graphics, but a beffy gpu would allow for larger data sets to be processed.

I don't really expect this to be used much, as it would require significant effort in writing various CL kernels to be used.

 

The reason for this post is to get input from the developers who have experience with development, and to ask what functionality would be helpful to add? I have little experience with the various mechanics of gmod development, and can't access the source code (git lab) to see how things are done.

 

I do plan to make a general purpose multi core module to allow data sets and entities to be split among multiple concurrent instances of the same lua script, which I imagine would be much more useful, but I wanted to finish this up first.

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.

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.

 Share