News for hackers. Stuff that matters.
Re:Show HN: Boids Simulation by 14113 on Tuesday March 31, 2015 @06:47PM (#9300422)
Ah, Boids! One of my favorite examples of systems that can be "embarassingly parallel". I managed to write (with very little optimisation - not even using quadtrees to optimise neighbour lookup) a GPU accelerated version about a year ago that managed to stay above 30fps even up to about 5000 individual agents.

It also hammered home the problem of device/host memory reigions which you've got to deal with when doing GPU programming. I found that other, simpler, systems didn't manage to get as much speedup as Boids did, as transferring data, not computation, was where they bottlenecked. With Boids, by contrast, I could keep everything (computation, and rendering) on the GPU, and never even have to touch the CPU, aside from calling various CUDA and OpenCL functions.

Re:Show HN: Boids Simulation by M8 on Wednesday April 01, 2015 @07:02AM (#9302767)
Can you really call them agents if they are calculated on GPU? I always assumed that using GPU would reduce them to particles (colour + position). They were probably stored in a huge array as values rather than a linked list of objects?
Re:Show HN: Boids Simulation by 14113 on Wednesday April 01, 2015 @10:19AM (#9303725)
They were stored as values in a huge array. I fail, however, to see how that causes them to be distinguished from "agents"? Surely they still fulfil the properties required to be "agents" in an abstract sense? They gather information about their environment (the positions of other agents), deliberate (work out where to move to next), and then act (change their position). That process is entirely abstracted from the storage method of the agent data itself!
Re:Show HN: Boids Simulation by M8 on Wednesday April 01, 2015 @12:25PM (#9304768)
What would happen if you need to add more properties/state to agents?
Re:Show HN: Boids Simulation by 14113 on Thursday April 02, 2015 @08:04AM (#9310095)
You'd have to change the program? Each agent was stored as a C structure - so adding further information to that would be trivial.