Computer Graphics Group Department of Computer Science Sheffield University, UK Paul Richmond paul@dcs.shef.ac.uk http://www.dcs.shef.ac.uk/~paul/ Mapping Agent Functions to the GPU __FLAME_GPU_FUNC__ int input_function( xmachine_memory_pedestrian* xmemory, xmachine_message_pedestrian_location_list* location_messages) { /* Get the first message */ xmachine_message_pedestrian_location* location_message = get_first_pedestrian_location_message(location_messages); /* Repeat untill there are no more messages */ while(location_message) { /* Process the message */ if distance_check(xmemory, location_message) { updateSteerVelocity(xmemory, location_message); } /* Get the next message */ location_message = get_next_pedestrian_location_message(location_message, location_messages); } /* Update any other xmemory variables */ xmemory->x += xmemory->vel_x*TIME_STEP;...
{}