Patent ID: 8538185

Claim:
A computer-implemented method for optimizing bounds checking in a structured lattice having neighboring nodes, the method comprising: visiting a node in the lattice, the visiting: performed using a processor, including bounds checking the node, and performing a neighborhood process on the node; calculating, by the processor, a distance to a specified node, wherein the specified node is between an interior node and a nearest boundary node to the node, the specified node, the interior node, and the nearest boundary node being nodes in the lattice; visiting a plurality of nodes in the lattice based on the calculated distance, the visiting: performed using the processor, performed without bounds checking, and including performing a neighborhood process on the visited nodes; determining, by the processor, whether a node of the visited nodes satisfies criteria, wherein the node of the visited nodes is added to a processing queue when the node of the visited nodes satisfies the criteria; determining, by the processor, a lower-bound distance from the node of the visited nodes to a nearest boundary node of the node of the visited nodes, wherein the lower-bound distance is added to the processing queue with the node of the visited nodes; and wherein neighborhood processing occurs only on nodes in the processing queue.