Techmo Posted May 24, 2018 Share Posted May 24, 2018 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. Quote Link to comment Share on other sites More sharing options...
ForrestMarkX Posted May 24, 2018 Share Posted May 24, 2018 (edited) Being able to move LUA heavy functions to a C++ module would be the best. http://wiki.garrysmod.com/page/Creating_Binary_Modules Edited May 24, 2018 by ForrestMarkX Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.