IP Library Granted Patent US 7,852,336
Granted Patent B2
US 7,852,336 · App. 11/563,772 · Granted Dec 14, 2010

Dynamic determination of optimal spatial index mapping to processor thread resources

Assignee: International Business Machines Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,852,336
App. No.
11/563,772
Granted
Dec 14, 2010
Kind
B2
Abstract

By mapping leaf nodes of a spatial index to processing elements, efficient distribution of workload in an image processing system may be achieved. In addition, processing elements may use a thread table to redistribute workload from processing elements which are experiencing an increased workload to processing elements which may be idle. Furthermore, the workload experienced by processing elements may be monitored in order to determine if workload is balanced. Periodically the leaf nodes for which processing elements are responsible may be remapped in response to a detected imbalance in workload. By monitoring the workload experienced by the processing elements and remapping leaf nodes to different processing elements in response to unbalanced workload, efficient distribution of workload may be maintained. Efficient distribution of workload may improve the performance of the image processing system.

Claims (40)

1. A method of performing ray tracing, comprising:

issuing a ray into a three-dimensional scene;

with a first processing element, traversing the ray through a spatial index having nodes representing bounding volumes within a three dimensional scene by taking branches to nodes defining bounding volumes intersected by the ray until a leaf node is reached;

determining a current workload of a first processing thread based on a number of rays in an inbox associated with the first processing thread and a predetermined threshold level associated with the first processing thread, wherein the inbox is a memory mapped address space; and

if the number of rays in the inbox does not exceed the predetermined threshold level, sending information defining the ray and information defining the leaf node to the first processing thread to determine if the ray intersects a primitive contained within a bounding volume defined by the leaf node.

2. The method of claim 1 , wherein determining a current workload of the first processing thread comprises:

searching a thread table comprising at least one entry mapping the leaf node to the first processing thread.

3. The method of claim 1 , further comprising, if the number of rays in the inbox associated with the first processing thread exceeds the threshold level:

sending information defining the ray and information defining the leaf node to a second processing thread.

4. The method of claim 3 , further comprising determining if the second processing thread is at least one of idle or underutilized.

5. The method of claim 4 , further comprising determining the second processing thread is idle by examining an idle bit associated with the second processing thread.

6. The method of claim 5 , wherein the idle bit is contained in an entry in a thread table.

7. The method of claim 1 , further comprising:

determining a processing thread to which the leaf node is assigned based on information in the spatial index.

8. A computer-readable storage medium containing a program which, when executed, performs an operation, comprising:

issuing a ray into a three-dimensional scene;

with a first processing element, traversing the ray through a spatial index having nodes representing bounding volumes within a three dimensional scene by taking branches to nodes defining bounding volumes intersected by the ray until a leaf node is reached;

determining a current workload of a first processing thread based on a number of rays in an inbox associated with the first processing thread and a predetermined threshold level associated with the first processing thread, wherein the inbox is a memory mapped address space; and

if the number of rays in the inbox does not exceed the predetermined threshold level, sending information defining the ray and information defining the leaf node to the first processing thread to determine if the ray intersects a primitive contained within a bounding volume defined by the leaf node.

9. The computer-readable storage medium of claim 8 , wherein determining a current workload of the first processing thread comprises:

searching a thread table comprising at least one entry mapping the leaf node to the first processing thread.

10. The computer-readable storage medium of claim 8 , wherein the operations further comprise, if the number of rays in the inbox associated with a the first processing thread exceeds the threshold level: sending information defining the ray and information defining the leaf node to a second processing thread.

11. The computer-readable storage medium of claim 10 , wherein the operations further comprise, determining if the second processing thread is at least one of idle or underutilized.

12. The computer-readable storage medium of claim 11 , wherein the operations further comprise, determining the second processing thread is idle by examining an idle bit associated with the second processing thread.

13. The computer-readable storage medium of claim 12 , wherein the idle bit is contained in an entry in a thread table.

14. The computer-readable storage medium of claim 8 , wherein the operations further comprise:

determining a processing thread to which the leaf node is assigned based on information in the spatial index.

15. A system, comprising:

a first processing thread;

a spatial index having nodes defining bounding volumes of a three-dimensional scene; and

a first processing element configured to:

issue a ray into a three-dimensional scene;

traverse the ray through the spatial index by taking branches to nodes defining bounding volumes intersected by the ray until a leaf node is reached;

determine a current workload of the first processing thread based on a number of rays in an inbox associated with the first processing thread and a predetermined threshold level associated with the first processing thread, wherein the inbox is a memory mapped address space; and

if the number of rays in the inbox does not exceed the predetermined threshold level, send information defining the ray and information defining the leaf node to the first processing thread to determine if the ray intersects a primitive contained within a bounding volume defined by the leaf node.

16. The system of claim 15 , further comprising:

a thread table comprising at least one entry mapping the leaf node to a processing thread; and

wherein the first processing element is further configured to determine a current workload of the first processing thread by searching the thread table.

17. The system of claim 15 , wherein the first processing element is further configured to:

send information defining the ray and information defining the leaf node to a second processing thread, if the number of rays in the inbox associated with the first processing thread exceeds the threshold level.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 28, 2006
From: BROWN, JEFFREY DOUGLAS; HOOVER, RUSSELL DEAN; MEJDRICH, ERIC OLIVER; SHEARER, ROBERT ALLEN
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 018556/0021 →
Continuity (1)
Related Publication 20080122845A1 · May 29, 2008