Jump to content

Check out our Community Blogs


Member Since 04 Mar 2011
Offline Last Active Sep 10 2015 10:05 AM

Posts I've Made

In Topic: Dynamic Arrays: Using malloc() and realloc()

09 June 2014 - 08:34 AM

If pointer is a pointer of int type, then you need to cast it as such:
int *pointer = (int *) malloc(2*sizeof(int));

In Topic: Goopies - Evolving neural networks (w.i.p.)

16 May 2014 - 08:43 AM

Yeah, better to save it for a later run, once you've got everything else nailed down. For one, you'd have to write a bunch of checks to perform on the target hardware to see if CUDA is even available, and branch off into the CUDA code if it detects the available hardware. Even more checks and branches if you want to support OpenCL. And then you have to provide a standard version when neither of those hardware configurations are available. A logistical nightmare if you want to make your code fully portable across all possible configurations.

In Topic: Goopies - Evolving neural networks (w.i.p.)

16 May 2014 - 06:28 AM

Thus, I'm not too concerned about graphic processing. I let SFML handle it for me instead (I believe it already does multi-threading). In fact the simulation is very light in terms of graphics (just a couple of textures are used, and when zoomed out Guppies and Pellets are not even rendered!). And on the new version you can actually close the render-window completely in order to run the sim faster when you're not looking. :)

CUDA/OpenCL isn't necessarily for graphics programming. These API's have been created by the graphics chip manufacturers in order to allow their hardware to be repurposed for general purpose programming. You can utilize the graphics chip's vast array of cores to crunch any algorithm you like, including your NN cycles. I've only briefly experimented with this technology myself, so I wouldn't be able to tell you how easy or difficult this would be, but it seems like it would lend itself perfectly to what you're trying to achieve. Don't know, though. Your addition of multithreading on the main CPU might have been all the performance boost you needed. CUDA/OpenCL is only if you really want to milk every last drop of processing power out of the whole computer.

In Topic: Goopies - Evolving neural networks (w.i.p.)

15 May 2014 - 01:34 PM

I hadn't realized you were using a parallel processing library for simultaneous multi-threading. I wonder, NVidia's got some form of massively multi-threading architecture whereby it allows you to use the hundreds of cores in your GPU for doing massively multi-threaded calculations. I'm sure AMD has some similar mechanism in their Radeon cards. Would something like this potentially benefit the Guppies project? With 2 graphics cards bridged together, who knows, you might be able to run thousands of simultaneous Guppies!

In Topic: Goopies - Evolving neural networks (w.i.p.)

14 May 2014 - 12:55 PM

My plan is to let it run 24/7 in a back room and hope it developes sentience! :biggrin:


But seriously, this'd make a wicked screen saver!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download