摘要 |
A machine-implemented method of updating a memory comprises: receiving, from a computation unit, a request to update a memory, the request including a first value to be used to update a specified location in the memory and a condition to be satisfied in order for the first value to be used to update the memory, the condition comprising a reference to a second location in the memory, and a criteria to be satisfied by a value in the second location; accessing the second location in the memory; and determining whether the value in the second location satisfies the criteria, and if so, then using the first value to update the specified location atomically, where atomically comprises that the value in the specified location is not changed between when an update unit 150 accesses the value in the second location and when the update unit updates the specified location using the first value. Updates can include one or more of incrementing and swapping values. The update unit may include a buffer to hold received update requests from a plurality of computation units in a queue 81. A computation unit may test whether a ray intersects a shape. |