GENERAL TRAVERSING FRAMEWORK FOR PROCESSING GEOMETRIC QUERIES
The generalized traversal framework for geometric queries addresses inefficiencies in traditional methods by enabling flexible and efficient processing of hierarchical data structures, reducing latency and resource consumption, and enhancing the precision of photolithography processes.
Patent Information
- Application Number
- DE102024110587
- Authority / Receiving Office
- DE · DE
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-25
- Filing Date
- 2024-04-16
- Publication Date
- 2024-11-28
AI Technical Summary
Traditional geometric queries of hierarchical data structures in computational lithography are inefficient and resource-intensive, requiring separate workflows for different types of queries and leading to unnecessary memory and processor resource consumption.
A generalized traversal framework for geometric queries that allows flexible and configurable processing by specifying a hierarchical data structure, query primitives, search routines, sorting parameters, and filter parameters, enabling efficient traversal and filtering of nodes and objects.
The framework enables faster and more efficient processing of geometric queries with lower latency and resource overhead by allowing filtering before computationally intensive operations, improving the precision and efficiency of photolithography processes.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
BACKGROUND Area of the different designs
[0001] Embodiments of the present disclosure generally relate to computer science and hierarchical data structures, and in particular to a generalized traversal framework for processing geometric queries. Description of the state of the art
[0002] Photolithography, or optical lithography, is a process used in the fabrication of integrated circuits (ICs), microelectromechanical systems (MEMS), and other micro- and nanoscale semiconductor devices. In photolithography, a geometric pattern is transferred from an optical mask to a thin layer of light-sensitive material (called photoresist) deposited onto a substrate, such as a silicon wafer. When the photoresist is irradiated through the mask with ultraviolet (UV) light, the geometric pattern is transferred to the substrate. Areas of the substrate not protected by the photoresist can then be removed using an etching process to create various features within the substrate.
[0003] However, as modern semiconductor devices increasingly feature smaller and more densely packed features, conventional photolithographic methods are unable to accurately reproduce these features. In particular, the ability to project a clear image of a feature from a geometric pattern onto a silicon wafer can be physically limited by the wavelength of the light used for projection, the numerical aperture of the projection lens, the depth of field associated with the projection, light scattering or blurring caused by neighboring features, and / or other factors.These physical limits are reached or exceeded when features in semiconductor devices become increasingly smaller and denser, which can lead to blurring, underexposure, optical aberrations and / or other types of distortion that may negatively affect the manufacturing complexity, overall yield, or final performance of the semiconductor device.
[0004] To overcome the challenges mentioned above, computer-aided lithography techniques have been developed to improve the accuracy and precision of pattern transfer during photolithography. For example, computer lithography techniques can be used to modify an optical mask to compensate for limitations in the optical resolution of the projection system, diffraction-related blurring and underexposure, and / or individual characteristics of the lens system and the photolithography process.
[0005] Computer-aided lithography approaches typically involve the iterative optimization of billions of polygons in a mask pattern to improve the lithographic printability of the resulting shapes. During iterative optimization, the polygons are stored in a hierarchical data structure that progressively subdivides the mask pattern layout into smaller and smaller regions and / or clusters of shapes. This hierarchical data structure is traversed during a geometric query, which searches for and retrieves shapes that are intersected by, adjacent to, and / or located a certain distance from a query primitive such as a point, ray, polygon, and / or other type of geometric object.The retrieved shapes can then be optimized, analyzed using a simulation and / or a model and / or verified to meet the design rules and guidelines for the corresponding photolithography process.
[0006] A disadvantage of conventional computer-aided lithography processes is that the geometric queries of hierarchical data structures, in which mask geometries are stored, are typically implemented in an inefficient and resource-intensive manner. Conventional geometric queries can involve various types and / or combinations of query primitives, distances or measures, traversals or passes, hierarchical data structures, comparison criteria regarding match, and / or other parameters that reflect the underlying optimization. Accordingly, implementing a particular type of geometric query within a conventional computer-aided lithography process requires a separate workflow to be programmed and executed to perform that specific type of geometric query.Furthermore, geometric objects retrieved through conventional geometric queries are typically stored in memory and returned to a requesting component. The requesting component then filters the in-memory geometric objects before performing further optimizations. Because many of the returned geometric objects are filtered and subsequently not used by the requesting component, executing geometric queries and / or using their results often consumes unnecessary memory and processor resources.
[0007] As the preceding explanations show, more effective methods for processing geometric queries of hierarchical data structures are needed in the state of the art. SUMMARY
[0008] In one embodiment of the present invention, a method for processing a geometric query is described. The method includes determining a tree structure and a set of configurable parameters specified in the geometric query, wherein the set of configurable parameters comprises one or more query primitives and one or more search routines. The method also includes executing one or more operations that traverse the tree structure and execute the one or more search routines to compare the one or more query primitives with a first set of geometric objects contained in the tree structure for matches. The method further includes generating a response to the geometric query, wherein the response comprises the first set of geometric objects.
[0009] A technical advantage of the disclosed methods over the prior art is that geometric queries involving traversal of hierarchical data structures can be defined and executed in a flexible, configurable manner. Accordingly, the disclosed methods can be used to create and process geometric queries more quickly and efficiently than conventional approaches that involve programming and executing separate workflows for different types of geometric queries. Another technical advantage of the disclosed methods is the ability to filter specific nodes and / or geometric objects in a hierarchical data structure before performing computationally intensive matching operations.Consequently, the disclosed methods can be used to process geometric queries with lower latency and lower resource overhead than prior art approaches. These technical advantages represent one or more technological improvements over prior art approaches. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] To enable a detailed understanding of the aforementioned features of the various embodiments, a more precise description of the inventive concepts summarized above can be provided by referring to various embodiments, some of which are illustrated in the accompanying drawings. It should be noted, however, that the accompanying drawings only illustrate typical embodiments of the concepts according to the invention and are therefore in no way to be considered as limiting the scope, and that other equally effective embodiments exist. Fig. Figure 1 illustrates a system designed to implement one or more aspects of the different embodiments. Fig. Figure 2, according to various embodiments, is a block diagram of a parallel processing unit (PPU) located in the parallel processing subsystem of Fig. 1 is present. Fig. Figure 3 is a more detailed illustration of the traversal engine of Fig. 1 according to various embodiments. Fig. Figure 4 shows an exemplary table of configurable parameters for geometric queries according to various embodiments, which are performed by the traversal engine of the Fig. 1 can be processed. Fig. Figure 5 shows a flowchart of process steps for processing a geometric query according to different embodiments. DETAILED DESCRIPTION
[0011] The following description presents numerous specific details to enable a more thorough understanding of the various embodiments. However, it is clear to those skilled in the art that the concepts according to the invention can also be implemented without one or more of these specific details. General overview
[0012] Computer lithography processes typically involve iterative optimization of billions of polygons in mask patterns to improve the lithographic printability of the resulting shapes. During this iterative optimization, the polygons in a mask pattern are stored in a hierarchical data structure that progressively subdivides the mask pattern layout into smaller and smaller regions or clusters of shapes. This hierarchical data structure is traversed during a geometric query, which searches for and retrieves shapes that are intersected by, adjacent to, and / or located a certain distance from a query primitive such as a point, ray, polygon, and / or other type of geometric object.The retrieved shapes can then be optimized, analyzed using a simulation and / or a model and / or verified to meet design rules and guidelines for the corresponding photolithography process.
[0013] However, conventional geometric queries of hierarchical data structures storing mask geometries are typically implemented in an inefficient and resource-intensive manner. These geometric queries can involve various types and / or combinations of query primitives, distances or measures, traversals, hierarchical data structures, comparison criteria regarding match, and / or other parameters that reflect the underlying optimization. When a particular type of geometric query is used in a lithography process, a separate workflow must be programmed and executed to implement that type of geometric query.Furthermore, geometric objects retrieved through a conventional geometric query are typically stored in memory and returned to a requesting component, which filters the in-memory geometric objects before performing any further optimization. Since many of the returned geometric objects are subsequently not used by the requesting component, executing the geometric query and / or using its results unnecessarily consumes memory and processor resources.
[0014] To improve the flexibility and efficiency with which geometric queries of hierarchical data structures are implemented and executed, the disclosed methods provide a generalized traversal framework for processing the geometric queries. This generalized traversal framework receives a given geometric query that specifies a hierarchical data structure to be traversed, such as a bounding volume hierarchy (BVH) and / or another type of tree structure. The geometric query also includes a set of configurable parameters that control the traversal of the tree structure and / or the processing of the geometric query.The configurable parameters also point to (but are not limited to) data structures representing query primitives such as points, rays, line segments, rectangles, and / or polygons; search routines that define or implement search criteria for comparing the query primitives with geometric objects stored in the tree structure for matches; sort parameters used to sort shapes or regions that match the geometric query; and / or filter parameters used when filtering the shapes or regions while traversing the hierarchical data structure.
[0015] The generalized traversal framework processes the geometric query by traversing the hierarchical data structure. During traversal, the framework uses search routines to determine whether a given node in the hierarchical data structure represents a region that intersects, overlaps, is within a certain distance of, and / or otherwise satisfies the search criteria associated with one or more query primitives in the geometric query. The framework then repeats this process with the child nodes of each node that meets the search criteria. The framework also uses the filter parameters in the geometric query to filter nodes and / or their corresponding subtrees during the traversal.Once the traversal reaches a leaf node that meets the search criteria, the generalized traversal framework iterates over geometric objects stored in that leaf node and determines whether each geometric object meets the search criteria and / or passes all filters specified in the filter parameters. The generalized traversal framework then returns, as a response to the geometric query, the set of geometric objects that both meet the search criteria and pass the filters. System overview
[0016] Fig. Figure 1 is a block diagram showing a computer system 100 designed to implement one or more aspects of various embodiments. In some embodiments, the computer system 100 is a machine or processing node operating in a data center, cluster, or cloud computing environment, providing scalable computing resources (optionally as a service) over a network.
[0017] In various embodiments, the computer system 100 without restriction comprises a central processing unit (CPU) 102 and a system memory 104, which are coupled to a parallel processing subsystem 112 via a memory bridge 105 and a communication path 113. The memory bridge 105 is furthermore coupled to an I / O bridge (input / output) 107 via a communication path 106, and the I / O bridge 107 is in turn coupled to a switch 116.
[0018] In one embodiment, the I / O bridge 107 is configured to receive user input information from optional input devices 108, such as a keyboard or mouse, and forwards the input information to the CPU 102 for processing via the communication path 106 and the memory bridge 105. In some embodiments, the computer system 100 may be a server machine in a cloud computing environment. In such embodiments, the computer system 100 may not have input devices 108. Instead, the computer system 100 can obtain appropriate input information by receiving commands in the form of messages transmitted over a network and received via the network adapter 118. In one embodiment, the switch 116 is configured to provide connections between the I / O bridge 107 and other components of the computer system 100, such as...manufactures a network adapter 118 and various add-in cards 120 and 121.
[0019] In one embodiment, the I / O bridge 107 is coupled to a system disk 114, which can be configured to store content, applications, and data for use by the CPU 102 and the parallel processing subsystem 112. In one embodiment, the system disk 114 provides non-volatile memory for applications and data and can include fixed or removable hard disk drives, flash memory devices, and CD-ROM (Compact Disc Read-Only Memory), DVD-ROM (Digital Versatile Disc-ROM), Blu-ray, HD-DVD (High Definition DVD), or other magnetic, optical, or solid-state storage devices. In other embodiments, other components, such as Universal Serial Bus or other interfaces, Compact Disc drives, Digital Versatile Disc drives, movie recording devices, and the like, can also be connected to the I / O bridge 107.
[0020] In various embodiments, the memory bridge 105 can be a northbridge chip and the I / O bridge 107 a southbridge chip. Furthermore, the communication paths 106 and 113, as well as other communication paths within the computer system 100, can be implemented using any technically suitable protocols, including, without limitation, AGP (Accelerated Graphics Port), HyperTransport, or any other bus or point-to-point communication protocol known in the prior art.
[0021] In some embodiments, the parallel processing subsystem 112 includes a graphics subsystem that supplies pixels to an optional display device 110, which may be a conventional cathode ray tube, liquid crystal display, light-emitting diode display, or the like. In such embodiments, the parallel processing subsystem 112 includes a circuit optimized for graphics and video processing, which, for example, includes a video output circuit. As shown here in conjunction with Fig. As described in more detail in Section 2, such circuits can be contained in one or more parallel processing units (PPUs), also referred to here as parallel processors, which are present in the parallel processing subsystem 112. In other embodiments, the parallel processing subsystem 112 contains circuits optimized for general-purpose use and / or data processing. Here, too, such a circuit can be contained in one or more PPUs that are included in the parallel processing subsystem 112 and are configured to perform such general-purpose and / or arithmetic operations. In other embodiments, the one or more PPUs included in the parallel processing subsystem 112 can be configured to perform graphics processing, general-purpose processing, and arithmetic operations.System memory 104 has at least one device driver designed to manage the processing operations of one or more PPUs within parallel processing subsystem 112.
[0022] In one or more embodiments, the parallel processing subsystem 112 includes a traversal engine 122 that processes a geometric query 124 associated with a set of geometric objects. These geometric objects may, for example, be shapes in a photolithography mask, a physics simulation, a computer game, a two-dimensional (2D) or three-dimensional (3D) scene, and / or another type of spatial environment. Within this spatial environment, the traversal engine 122 can be used to process a given geometric query 124 to perform collision detection, proximity detection, ray tracing, nearest neighbor search, occlusion culling, visibility culling, and / or other tasks associated with the geometric objects.
[0023] In various embodiments, the parallel processing subsystem 112 can be combined with one or more of the other elements of the Fig. 1. It can be integrated to form a single system. For example, the parallel processing subsystem 112 can be integrated with the CPU 102 and other interconnect circuitry on a single chip to form a system on a chip (SoC).
[0024] In one embodiment, the CPU 102 is the main processor of the computer system 100, controlling and coordinating the operations of the other system components. In another embodiment, the CPU 102 issues instructions that control the operation of the PPUs. In some embodiments, the communication path 113 is a PCI Express connection in which dedicated lanes are assigned to each PPU, as is known in the prior art. Other communication paths may also be used. The PPU advantageously implements a highly parallel processing architecture. A PPU can be equipped with any amount of local parallel processing memory (PP memory).
[0025] It is clear that the system shown here is illustrative and that variations and modifications are possible. The connection topology, which includes the number and arrangement of the bridges, the number of CPUs 102, and the number of parallel processing subsystems 112, can be changed as desired. In some embodiments, for example, the system memory 104 can be connected directly to the CPU 102 and not via the memory bridge 105, and other devices can communicate with the system memory 104 via the memory bridge 105 and the CPU 102. In other embodiments, the parallel processing subsystem 112 can be connected to the I / O bridge 107 or directly to the CPU 102 and not via the memory bridge 105. In still other embodiments, the I / O bridge 107 and the memory bridge 105 can be integrated into a single chip instead of existing as one or more discrete devices.Finally, in certain embodiments, one or more of the features described in . Fig. The components shown in Figure 1 may not be present. For example, the switch 116 can be omitted, and the network adapter 118 and the add-on cards 120, 121 can be directly connected to the I / O bridge 107.
[0026] Fig. Figure 2 is, according to various embodiments, a block diagram of a parallel processing unit (PPU) 202, which is located in the parallel processing subsystem 112 of Fig. 1 is present. Although in Fig. Figure 2 shows a PPU 202. The parallel processing subsystem 112, as shown above, can have any number of PPUs 202. As shown, the PPU 202 is coupled to a local parallel processing memory (PP memory) 204. The PPU 202 and the PP memory 204 can be implemented using one or more integrated circuits, such as programmable processors, application-specific integrated circuits (ASICs), or memory devices, or in any other technically feasible way.
[0027] In some embodiments, the PPU 202 includes a graphics processing unit (GPU) that may be configured to implement a graphics rendering pipeline for performing various operations related to generating pixel data based on graphics data supplied by the CPU 102 and / or the system memory 104. During graphics data processing, the PP memory 204 can be used as graphics memory, storing one or more conventional image buffers and, if required, one or more other rendering targets. The PP memory 204 can be used, among other things, to store and update pixel data and to deliver the final pixel data or display images to an optional display device 110 for display. In some embodiments, the PPU 202 may also be configured for general-purpose processing and computational operations.In some embodiments, the computer system 100 may be a server computer in a cloud computing environment. In such embodiments, the computer system 100 may not have a display device 110. Instead, the computer system 100 may generate appropriate output information by transmitting commands in the form of messages over a network via the network adapter 118.
[0028] As mentioned previously, the CPU 102 can operate as the main processor, controlling and coordinating the operations of other system components in the computer system 100. In one embodiment, the CPU 102 issues instructions that control the operation of the PPU 202. For example, the CPU 102 can write a stream of instructions for the PPU 202 into a data structure (neither in Fig. 1 still in Fig. (2 explicitly shown), which may reside in system memory 104, PP memory 204, or another memory location accessible to both CPU 102 and PPU 202. A pointer to the data structure is written to an instruction queue, also referred to here as a push buffer, to initiate the processing of the instruction stream in the data structure. In one embodiment, PPU 202 reads the instruction streams from the instruction queue and then executes the instructions asynchronously to the operation of CPU 102. In embodiments where multiple push buffers are created, execution priorities for each push buffer can be set by an application program via a device driver to control the flow control or scheduling of the different push buffers.
[0029] In one embodiment, the PPU 202 includes an input / output (I / O) unit 205 that communicates with the rest of the computer system 100 via the communication path 113 and the memory bridge 105. In one embodiment, the I / O unit 205 generates packets (or other signals) for transmission on the communication path 113 and also receives all incoming packets (or other signals) from the communication path 113 and forwards the incoming packets to the appropriate components of the PPU 202. For example, commands relating to processing tasks can be directed to a host interface 206, while commands relating to operations in memory (e.g., reading from or writing to the PP memory 204) can be directed to a coupling field unit 210. In one embodiment, a host interface 206 reads each command queue and transmits the command stream stored in the command queue to a frontend 212.
[0030] As previously stated in connection with Fig. As mentioned in Section 1, the connection of the PPU 202 to the rest of the computer system 100 can be varied. In some embodiments, the parallel processing subsystem 112, which includes at least one PPU 202, is implemented as an add-in card that can be inserted into an expansion slot of the computer system 100. In other embodiments, the PPU 202 can be integrated on a single chip with a bus bridge, such as the memory bridge 105 or the I / O bridge 107. In still other embodiments, some or all elements of the PPU 202 can be present together with the CPU 102 in a single integrated circuit or system of chips (SoC).
[0031] In one embodiment, the frontend 212 transmits the processing tasks received from the host interface 206 to a workload distribution unit (not shown) within a task / work unit 207. In one embodiment, the workload distribution unit receives pointers to processing tasks, which are encoded as task metadata (TMD) and stored in memory. The pointers to the TMDs are contained in an instruction stream, which is stored as an instruction queue and is received by the frontend 212 from the host interface 206. Processing tasks, which can be encoded as TMDs, have indices associated with the data to be processed, as well as state parameters and instructions that define how the data is to be processed. The state parameters and instructions can, for example, define the program to be executed with the data.TMDs can also define, for example, the number and configuration of CTAs. Generally, each TMD corresponds to a task. The task / work unit 207 receives tasks from the frontend 212 and ensures that general processing clusters (GPCs) 208 are configured in a valid state before initiating the processing task specified by the respective TMD. A priority can be set for each TMD, which is used to control the execution flow of the processing tasks. Processing tasks can also be received from a processing cluster array 230. Optionally, the TMDs can have a parameter that controls whether the TMD is added to the beginning or end of a list of processing tasks (or to a list of pointers to the processing tasks), thus providing another layer of control over the execution priority.
[0032] In one embodiment, the PPU 202 implements a highly parallel processing architecture based on a processing cluster array 230, which includes a set of C general processing clusters (GPCs) 208, where C ≥ 1. Each GPC 208 is capable of executing a large number (e.g., hundreds or thousands) of threads concurrently, with each thread being an instance of a program. In different applications, different GPCs 208 can be allocated for processing different types of programs or for performing different types of computations. The allocation of GPCs 208 can vary depending on the workload generated by each type of program or computation.
[0033] In one embodiment, the memory interface 214 has a set of D partition units 215, where D ≥ 1. Each partition unit 215 is coupled to one or more dynamic random-access memory (DRAM) units 220 located in the PP memory 204. In some embodiments, the number of partition units 215 is equal to the number of DRAM units 220, and each partition unit 215 is coupled to a different DRAM unit 220. In other embodiments, the number of partition units 215 may differ from the number of DRAM units 220. It is understood that a DRAM unit 220 can be replaced by any other technically suitable device. During operation, various rendering targets, such as texture maps and image buffers, can be stored across DRAMs 220, enabling the partition units 215 to write sections of each rendering target in parallel to efficiently utilize the available bandwidth of the PP memory 204.
[0034] In one embodiment, a specific GPC 208 can process data to be written to any of the DRAMs 220 within the PP memory 204. In one embodiment, the coupling unit 210 is configured to forward the output of each GPC 208 to the input of any partition unit 215 or to another GPC 208 for further processing. The GPCs 208 communicate with the memory interface 214 via the coupling unit 210 to read from or write to various DRAMs 220. In other embodiments, in addition to a connection to the PP memory 204 via the memory interface 214, the coupling unit 210 also has a connection to the I / O unit 205, enabling the processing cores in the various GPCs 208 to communicate with the system memory 104 or other memory not belonging to the PPU 202. In the embodiment of the Fig. 2 The coupling field unit 210 is directly connected to the I / O unit 205. In various embodiments, the coupling field unit 210 can use virtual channels to separate traffic flows between the GPCs 208 and the partition units 215.
[0035] In one embodiment, the GPCs 208 can be programmed to perform processing tasks associated with a variety of applications, including, but not limited to, linear and nonlinear data transformations, filtering of video and / or audio data, modeling operations (e.g., applying physical laws to determine the position, velocity, and other attributes of objects), image rendering operations (e.g., tessellation shader, vertex shader, geometry shader, and / or pixel / fragment shader programs), general arithmetic operations, etc. In operation, the PPU 202 is configured to transfer data from system memory 104 and / or PP memory 204 to one or more on-chip memory units, process the data, and write the resulting data back to system memory 104 and / or PP memory 204.The result data can then be accessed by other system components, including CPU 102, another PPU 202 within the parallel processing subsystem 112, or another parallel processing subsystem 112 within the computer system 100.
[0036] In one embodiment, any number of PPUs 202 can be present in a parallel processing subsystem 112. For example, multiple PPUs 202 can be housed on a single add-in card, or multiple add-in cards can be connected to the communication path 113, or one or more PPUs 202 can be integrated into a bridge chip. The PPUs 202 in the multi-PPU system can be identical or different from one another. For example, different PPUs 202 can have a different number of processor cores and / or a different amount of PP memory 204. In implementations where multiple PPUs 202 are present, these PPUs can be operated in parallel to process data at a higher throughput than is possible with a single PPU 202.Systems containing one or more PPUs 202 can be implemented in a variety of configurations and form factors, including, without limitation, desktops, laptops, handheld personal computers or other handheld devices, servers, workstations, game consoles, embedded systems, and the like.
[0037] As shown, each GPC 208 has access to a corresponding instance of the traversal engine 122, and each DRAM 220 in the PP memory 204 stores a partial or complete copy of the traversal data 222, which is used by one or more instances of the traversal engine 122 to process a corresponding geometric query 124. For example, each GPC 208 can communicate with a separate accelerator implementing the traversal engine 122 to traverse a tree structure in which nodes and / or objects are stored during the processing of the geometric query 124. The traversal engine 122 and the traversal data 222 are further detailed in the Fig. 3-5 described.
[0038] The expert understands that the traversing engine 122 and the traversing data 222 are in the systems of the Fig. 1 and Fig. 2. The traversal engine 122 and / or traversal data 222 can be implemented, replicated, or distributed in various ways. First, one or more sections of the traversal engine 122 and / or traversal data 222 can be stored in on-chip memory (e.g., static random access memory (SRAM), scratchpad memory, on-chip cache, etc.) for each GPC 208, instead of or in addition to storing the traversal engine 122 and / or traversal data 222 in the DRAM 220 in the PP memory 204. A particular GPC 208 or instance of the traversal engine 122 can use direct memory access (DMA) to transfer sections of the traversal data 222 between the DRAM 220 and the on-chip memory. Secondly, one or more sections of the traversal engine 122 and / or traversal data 222 can be stored in an L2 cache in each partition unit 215, instead of or in addition to storage in the DRAM 220 in the PP memory 204.Third, one instance of the Traversal Engine 122 can be implemented per GPC 208, or one or more instances of the Traversal Engine 122 can be shared by multiple GPCs 208. Fourth, the Traversal Engine 122 can be implemented by one or more GPCs 208, one or more CPUs, and / or by a standalone accelerator that processes queries from one or more GPCs 208. Generalized traversal framework for processing
[0039] Fig. Figure 3 is a more detailed representation of the traversing engine 122 from Fig. 1 according to various embodiments. As it is in Fig. As shown in Figure 3, the traversal engine 122 processes a geometric query 124 using traversal data 222 stored in memory 302 (e.g., on-chip SRAM, DRAM 220, system memory 104, etc.).
[0040] As mentioned above, geometric query 124 specifies a tree structure 328 to be traversed. The tree structure 328 has a BVH, a quad tree, a KD tree, an R tree, a rectilinear tree, a ball tree, and / or another type of data structure that spatially organizes geometric objects in a hierarchy of nodes. Each node in the hierarchy can represent a specific region of space that includes (i.e., bounds) some or all of the geometric objects. The root node in the tree structure represents a single space that includes (i.e., bounds) all the objects, and the child nodes, or subordinate nodes, of a given node in the tree structure represent a partitioning of the spatial region represented by the node into smaller, non-overlapping regions.The leaf nodes in the tree structure represent the smallest regions in which objects are grouped or organized. Each leaf node also stores a set of objects that fall within that region.
[0041] In some embodiments, the tree structure 328 is defined and / or traversed using node data 306, which refers to nodes in the tree structure 328, and object data 308, which refers to geometric objects stored in the tree structure 328. The node data 306 includes the nodes 310 in the tree structure 328 and the node relationships 314 between pairs of nodes 310 in the tree structure 328. For example, each of the nodes 310 in the BVH tree structure 328 may have a unique node identifier (ID) for the node, a node type (e.g., non-leaf node, leaf node, etc.), and / or other data associated with the node. The node may also have node relationships 314 that specify offsets to other nodes that are the node's children and / or parent.
[0042] The node data 306 can also have spatial regions 316 represented by the nodes. For example, the spatial regions 316 can have bounding volumes represented by nodes in a BVH and / or partitions used to subdivide the bounding volumes represented by the nodes into smaller bounding volumes represented by child nodes of the node.
[0043] Furthermore, the node data can contain object lists (326) that identify objects associated with the leaf nodes in the tree structure (328). For example, each leaf node in the tree structure (328) can have offsets to one or more data structures that store objects associated with that leaf node.
[0044] The object data 308 have object types 320 that are assigned to the geometric objects stored in the tree structure 328. For example, the object types 320 can have assignments of an identifier and / or an index for each geometric object to a value that identifies the geometric object as a point, line segment, triangle, rectangle, arbitrarily shaped polygon, circle, curve, polyhedron, cuboid, sphere, ellipsoid and / or another type of n-dimensional shape.
[0045] The object data 308 also includes representative points 324 for geometric objects, which are stored in the tree structure 328. Representative points 324 can, for example, be vertices, centroids, bounding box corners, and / or other points that represent the location, dimensions, boundaries, and / or size of each geometric object.
[0046] In some embodiments, the traversal engine 122 accesses node data 306 and object data 308 from the tree structure 328 and / or stores them as a subset of the traversal data 222 in memory 302. For example, the traversal engine 122 can retrieve a reference and / or a pointer to the tree structure 328 from the geometric query 124 and use the reference and / or pointer to access the node data 306 and object data 308 in memory 302. The traversal engine 122 also receives, or alternatively receives, some or all of the node data 306 and / or object data 308 in the geometric query 124 and stores the received node data 306 and / or object data 308 in memory 302.
[0047] The geometric query 124 also has a set of configurable parameters 330, which are used to retrieve a set of geometric objects from the tree structure 328. The configurable parameters 330 contain data and / or programs that control how the geometric query 124 is processed by the traversal engine. As described in Fig. As shown in Figure 3, the configurable parameters include one or more query primitives 332, one or more search routines 334, one or more sort parameters 336 and / or one or more filter parameters 338.
[0048] The query primitives 332 have one or more geometric objects that are checked for spatial relationships to other geometric objects in the tree structure 328 using the geometric query 124. The query primitives 332 can, for example, have one or more points, line segments, rays, rectangles, circles, polygons, cuboids, spheres, ellipsoids, polyhedra, and / or other types of n-dimensional shapes. Some or all of the query primitives 332 can be selected from the set of geometric objects stored in the tree structure 328. Some or all of the query primitives 332 can also be specified or defined separately from, or instead of, the set of geometric objects stored in the tree structure 328.
[0049] The search routines 334 have programmable functions, rules, and / or other user-defined representations of criteria that are used to search for spatial relationships between the query primitives 332 and geometric objects in the tree structure 328. For example, the search routines 334 may have user-defined criteria to determine whether a node and / or a geometric object in the tree structure 328 is intersected by a ray in the query primitives 332, overlaps with one or more query primitives 332, is within a certain distance of one or more query primitives 332, is a k-nearest neighbor of one or more query primitives 332, and / or has some other type of spatial relationship to one or more query primitives 332.
[0050] The sorting parameters 336 include programmable functions, rules, and / or other user-defined representations of criteria used to sort nodes 310 in the tree structure 328 as the tree structure 328 is traversed during the processing of the geometric query 124. For example, the sorting parameters 336 can specify that the nodes in the tree structure 328 within a node stack 318 are to be sorted based on the distances between certain vertices or points in regions represented by the nodes and a "sort origin" point. The sorting parameters 336 can be specified and / or defined to increase the efficiency and / or performance with which the geometric query 124 is processed. For example, the sorting parameters 336 can specify an arrangement orEstablish the order of the nodes 310 within the node stack 318, which reduces the probability of performing computationally intensive comparison operations on nodes 310, which are less likely to match the query primitives 332, which increases the probability of early termination of the geometric query 124 (e.g., as soon as a valid result or termination condition is met), which balances the computational load across the processing units (e.g., CPU cores, GPCs 208, threads, etc.), which reduces cache failed attempts, and / or which otherwise improves the speed, computational complexity, and / or resource overhead associated with processing the geometric query 124.
[0051] Filter parameters 338 include programmable functions, rules, and / or other user-defined representations of criteria used to filter nodes 310 and / or geometric objects in the tree structure 328 as the tree structure 328 is traversed during the processing of the geometric query 124. For example, filter parameters 338 may specify certain types of geometric objects, orientations of geometric objects, orientations of geometric objects relative to the orientations of one or more of the query primitives 332, regions within the space represented by the tree structure 328, and / or other attributes associated with nodes 310 and / or geometric objects in the tree structure 328.Filter parameter 338 can additionally specify that a particular attribute is used to exclude corresponding nodes 310 and / or geometric objects from further processing and / or inclusion in the results of geometric query 124. Filter parameter 338 can also, or alternatively, specify that a given attribute must be present in corresponding nodes 310 and / or geometric objects before these nodes 310 and / or geometric objects are further processed and / or included in the results of geometric query 124.
[0052] In one or more embodiments, the traversing engine 122 has an interface 300 that receives the geometric query 124 from a requesting component or entity. The interface 300 may, for example, be an application programming interface (API), a web-based user interface, a graphical user interface (GUI), a command-line interface (CLI), a network interface, a serial interface, a parallel interface, and / or another type of hardware and / or software interface. The requesting component or entity may transmit the geometric query 124 to the traversing engine via a call to the interface 300, a signaling via the interface 300, and / or other types of communication supported by the interface 300.
[0053] Interface 300 can, for example, have the following representation: Template <typename tree, typename programmableSort, typename programmableIntersection, typename programmableFilters> generalizedTraversal (const tree & treeForTraversal, const queryPrimitive & queryPrimitives, const programmableSort & sortNodes, const programmableIntersection & queryPrimitiveTests, const programmableFilters & filterParameters)
[0054] The above diagram includes a function called "generalizedTraversal" that can be called to submit a specific geometric query 124 to the traversal engine 122. The "generalizedTraversal" function has parameters named "treeForTraversal", "queryPrimitives", "sortNodes", "queryPrimitiveTests", and "filterParameters". The "treeForTraversal" parameter references a tree structure 328. The "queryPrimitives" parameter references a set of query primitives 332 that are compared to geometric objects in the tree structure 328 for a match. The "sortNodes" parameter references a set of sorting parameters 336 that are used to determine the order in which the nodes in the tree structure 328 are processed during the processing of the geometric query 124.The parameter “queryPrimitiveTests” refers to one or more search routines 334 that can be executed to evaluate criteria for matching one or more query primitives 332 with one or more nodes 310 and / or geometric objects in the tree structure 328. The parameter “filterParameters” refers to a set of filter parameters 338 that can be used to filter nodes 310 and / or geometric objects in the tree structure 328 while traversing the tree structure 328.
[0055] As mentioned previously, query primitives 332 have one or more geometric objects that are compared for a match with additional geometric objects in tree structure 328 using geometric query 124. Continuing the example above, each query primitive passed to the Generalized Traversal function can be defined using the following data structure:
[0056] The data structure above has a variable `numVertices` that specifies the number of vertices in the query primitive. The variable `numVertices` can be set to 1 to indicate that the query primitive is a point, to 2 to indicate that the query primitive represents a ray or bounding box, and to a value greater than 2 to indicate that the query primitive represents a polygon. The data structure also has a `vertexDimensionality` variable that specifies the dimensionality of the query primitive. Additionally, the data structure has a `sortOrigin` variable that identifies a point or vertex used to sort the nodes (310) from the tree structure (328). Furthermore, the data structure has a `vertices` variable that identifies a list of vertices in the query primitive.
[0057] As mentioned above, the sort parameters 336 can have user-defined representations of criteria used to sort nodes in the tree structure 328 as the tree structure 328 is traversed during the processing of the geometric query 124. An example of a set of sort parameters 336 that can be passed to the traversal engine 122 via the example interface 300 above has the following representation: `auto sortNodesExamplel = [&](const typename Box nodelBBox, const typename Box node2BBox, const typename Point sortOrigin) { return nodelBBox.UpperRight.DistTo(sortOrigin) < node2BBox.UpperRight.DistTo(sortOrigin);};`
[0058] More precisely, the above example sorting parameters 336 can be used to sort bounding boxes named "node1 BBox" and "node2BBox", represented by two nodes 310 in the tree structure 328. These sorting parameters 336 specify that the two bounding boxes are to be sorted according to the distance between the upper right vertex of each bounding box and a "sortOrigin" point (e.g., the "sortOrigin" from the "queryPrimitive" data structure and / or another point).
[0059] Another example of a set of sorting parameters 336, which can be used with the example interface 300 above, has the following representation: auto sortNodesExample2 = [&](const typename Box nodelBBox, const typename Box node2BBox, const typename Point sortOrigin) { return std::min(std::abs(nodelBBox.UpperRight.DistTo(sortOrgin)), std::abs(nodelBBox.LowerLeft.DistTo(sortOrigin))) < std::min(std::abs(node2BBox.UpperRight.DistTo(sortOrigin)), std::abs(node2BBox.LowerLeft.DistTo(sortOrigin)) );};
[0060] These exemplary sorting parameters 336 can also be used to sort bounding boxes named "node1 BBox" and "node2BBox", represented by two nodes 310 in the tree structure 328. In this example, the sorting parameters 336 specify that the two bounding boxes should be sorted according to the distance between a "sortOrigin" point and the point closer to the upper right vertex or the lower left vertex of each bounding box.
[0061] As mentioned previously, the search routines 334 have user-defined representations of criteria used to compare nodes 310 and / or query primitives 332 with geometric objects in the tree structure 328 for a match. An example search routine that can be used with the example interface 300 above has the following representation: `auto queryPrimitiveTestExample = [&] (const typename Box anyBBoxl, const typename Box anyBBox2) { return (std::max(anyBBoxl.LowerLeft.x, anyBBox2.LowerLeft.x) < std::min(anyBBoxl.UpperRight.x, anyBBox2.UpperRight.x));};`
[0062] This example search routine determines whether two bounding boxes named "anyBBox1" and "anyBBox2" overlap in the x-dimension. If an overlap is found in the x-dimension, the search routine returns true to indicate that a match was found. If no overlap is found in the x-dimension, the search routine returns false to indicate that no match was found.
[0063] As mentioned previously, the filter parameters 338 have user-defined representations of criteria used to filter nodes 310 and / or geometric objects in the tree structure 328 as the tree structure 328 is traversed during the processing of the geometric query 124. An example set of filter parameters 338, which can be used with the example interface 300 above, has the following representation: `auto filterParametersExamplel = [&](const shapePrimitive segment) { return ((segment.IsHorizontal());};`
[0064] This exemplary set of filter parameters 338 can be used to identify geometric objects that are horizontal line segments.
[0065] Another exemplary set of filter parameters 338, which can be used with the exemplary interface 300 above, has the following representation: auto filterParametersExample2 = [&] (const queryPrimitive ray, const shapePrimitive segment) { return ray.Direction() != segment.Direction();};
[0066] This exemplary set of filter parameters 338 can be used to identify geometric objects that are line segments not parallel to an incoming ray in query primitives 332. In both examples, line segments that satisfy the conditions specified in the corresponding set of filter parameters 338 can be excluded from and / or included in the results of geometric query 124.
[0067] After the geometric query 124 is received via interface 300, a processing module 304 in the traversal engine 122 processes the geometric query 124 using the configurable parameters 330 and the traversal data 222. More precisely, the processing module 304 uses the node stack 318 stored in memory 302 to traverse the tree structure 328, starting with the root node of the tree structure 328. During the traversal, the processing module 304 executes search routines 334 to identify a set of node matches 340 between node 310 in the node stack 318 and one or more of the query primitives 332.When the search routines 334 determine that a particular node in the node stack 318 matches one or more query primitives 332, the processing module 304 adds the child nodes 310 of that node to the node stack 318 in the order specified in the sort parameters 336. The processing module 304 also uses filter parameters 338 to filter out specific child nodes 310 from the node stack 318. Once the processing module 304 encounters a leaf node in the node stack 318, it executes search routines 334 to identify a set of object matches 342 between the geometric objects stored in the leaf node and one or more of the query primitives 332. The processing module 304 adds the geometric objects that match the query primitives to the results of geometric query 124.The processing module 304 also uses filter parameter 338 to filter out specific geometric objects from the results. After the node stack 318 is empty, the processing module 304 returns the set of geometric objects that match the query primitives 332 in a response 312 to the geometric query 124.
[0068] The operation of processing module 304 can be represented, for example, by the following pseudocode: Inputs: tree structure, query primitive, sortNodes, queryPrimitiveTests, filterParameters Populate the node stack with root nodes from the tree structure. Process the node stack as long as it is not empty. Pop a node from the node stack. Call queryPrimitiveTests between the node and the query primitive. If a match is found: If no leaf node: For each child node of the node: Call filterParameters to check if the child node should be filtered. If the child node is not filtered: Call sortNodes to identify the sort position of the child node in the node stack. Add the child node to the node stack at the sort position. Else: For each object in the node: Call filterParameters to check...Whether the node should be filtered: Call queryPrimitiveTests between object & query primitive if (object is not filtered && match is found): Add the query primitive to the result. Return result
[0069] In the pseudocode above, the input to the processing module 304 consists of a tree structure 328, a "queryPrimitive" data structure (or query primitive data structure) that stores one or more query primitives 332, a set of sort parameters 336 specified in a "sortNodes" function, a set of search routines specified in a "queryPrimitiveTests" function, and a set of filter parameters 338 specified in a "filterParameters" function. As mentioned earlier, this input can be specified in a geometric query 124, which is received via the interface 300. With this input, the pseudocode begins by adding the root node from the tree structure 328 to the node stack 318. The pseudocode then processes the nodes 310 in the node stack 318 by taking nodes from the top of the node stack 318.
[0070] Continuing the discussion of the pseudocode above, each node taken from node stack 318 (from above) is evaluated using search routines 334 to determine if the node matches one or more query primitives 332. If the node matches one or more query primitives 332 and is not a leaf node, each child node of the node is evaluated using filter parameters 338. If the respective child node is not filtered out using filter parameters 338, sort parameters 336 are used to determine the child node's position within node stack 318, and the child node is added to node stack 318 at that position. If the respective child node is filtered out using filter parameters 338, that child node is not added to node stack 318.
[0071] When a leaf node is popped from the node stack 318, each geometric object stored in the leaf node is evaluated using search routines 334 to determine if the geometric object matches one or more of the query primitives 332. Each geometric object is also evaluated using filter parameters 338 to determine if the geometric object should be filtered out of a result of the geometric query 124. If the geometric object matches one or more of the query primitives 332 and is not filtered out using the filter parameters 338, the geometric object is added to the result. Otherwise, the geometric object is not added to the result.
[0072] The pseudocode repeats the procedure with the remaining nodes in node stack 318 until node stack 318 is empty. After node stack 318 is empty, the pseudocode returns the result of geometric query 124 with response 312. This result contains a list or set of geometric objects from tree structure 328 that match query primitives 332 using search routines 334 and were not filtered out by filter parameters 338.
[0073] In one or more embodiments, the processing module 304 processes the geometric query 124 with a single traverse of the tree structure 328. Unlike conventional approaches that perform a first traverse to determine the memory requirements associated with a geometric query and a second traverse to store matching shapes in the memory allocated after the first traverse, this single-traverse approach uses a pre-allocated memory pool to concurrently store matching geometric objects from all GPU cores or processing units executing the geometric query 124. The single-traverse approach also includes a post-processing step to group and sort the matching geometric objects according to user-defined regions of interest specified in configurable parameters 330.Consequently, traversing the tree structure 328 only once, which is made possible by the pre-allocated memory pool, can be faster and computationally more efficient than the conventional scheme with two traversals.
[0074] Fig. Figure 4 shows an exemplary table 400 with configurable parameters 330 for geometric queries according to various embodiments, which are performed by the traversal engine 122 of the Fig. 1 can be processed. As in Fig. As shown in Figure 4, Table 400 has a first column, 402, which lists various types of geometric queries that can be processed by the traversal engine 122, and a second column, 404, which lists query primitives 332 associated with each type of geometric query. Table 400 also has a third column, 406, which lists distance measures that can be used to sort nodes in the tree structure 328 during the processing of the corresponding geometric queries. The distance measures in column 406 can also be used, or alternatively, to evaluate distance-based criteria for assigning nodes and / or geometric objects in the tree structure 328 to query primitives 332.
[0075] Table 400 also has a fourth column, 408, which lists various types of sort origins that can be used to sort nodes in the tree structure 328 during the processing of the corresponding geometric queries. Table 400 further includes a fifth column, 410, which lists various types of tests that can be performed by the search routines 334 when comparing query primitives 332 with geometric objects in the tree structure 328 for a match in the corresponding types of geometric queries.
[0076] As mentioned previously, configurable parameters 330 can be defined for each type of geometric query 124 and / or each individual geometric query 124 processed by the traversal engine 122. For example, the configurable parameters 330 can have user-defined functions, rules, and / or values specified for each geometric query 124 and passed to the traversal engine 122 via the interface 300, as described above. In another example, at least some configurable parameters 330 (e.g., query primitive types 332, distance measures, sort parameters 336, search routines 334, filter parameters 338, etc.) can be predefined for a particular type of geometric query 124, and the interface 300 can have a specific function for executing that type of geometric query 124.When the function is called, a specific tree structure 328 and all remaining configurable parameters 330 (e.g., vertices and / or other values that define query primitives 332 to be compared for match with geometric objects stored in the tree structure 328) associated with this type of geometric query 124 can be passed to the traversal engine 122 so that the traversal engine 122 can generate a corresponding response.
[0077] Fig. Figure 5 shows a flowchart of process steps for processing a geometric query according to different embodiments. Although the process steps are related to the systems of Fig. As described in paragraphs 1 to 3, the person skilled in the art understands that any system designed to perform the process steps in any order falls within the scope of this disclosure.
[0078] As shown, in step 502, the Traversal Engine 122 determines a tree structure and a set of configurable parameters specified in a geometric query. For example, the Traversal Engine 122 can receive the geometric query via an interface. The geometric query can contain values, references to, and / or other representations of the tree structure and the configurable parameters.
[0079] Next, the Traversal Engine 122 traverses the tree structure and executes one or more search routines within the configurable parameters to process the geometric query. More specifically, in step 504, the Traversal Engine 122 adds the root node of the tree structure to a node stack. For example, the Traversal Engine 122 can initialize an empty node stack and push the root node onto it.
[0080] In step 506, the traversal engine 122 removes a node from the node stack. Continuing the example above, the traversal engine 122 can remove (pop) the topmost node from the node stack.
[0081] In step 508, the Traversal Engine 122 executes one or more search routines specified in the configurable parameters, based on the input, which contains the node and one or more query primitives from the geometric query. For example, the Traversal Engine 122 can call any search routine, passing the node and the query primitive(s) as arguments in the call. Each search routine can perform an intersection test, a distance test, an overlap test, and / or another type of spatial relationship test between the node and the query primitive(s).
[0082] In step 510, the traversal engine 122 determines whether the node matches the query primitive(s). For example, the traversal engine 122 may receive binary values and / or other indications of a match or mismatch between the node and the query primitive(s) from each search routine executed in step 508.
[0083] If, in step 510, the Traversal Engine 122 determines that the node does not match the query primitive(s), it executes step 512 to determine whether the node stack is empty. If the node stack is not empty, the Traversal Engine 122 returns to step 506 to process the remaining nodes in the node stack. If the node stack is empty, the Traversal Engine 122 executes step 514 to complete query processing. In step 514, the Traversal Engine 122 generates a response to the geometric query. If the Traversal Engine 122 executes step 514 after determining that the root node does not match any of the query primitives, the response may contain an empty set of geometric objects.
[0084] If, in step 510, the Traversal Engine 122 determines that the node extracted from the node stack matches the query primitive(s), it executes step 516 to determine whether the node is a leaf node. If, in step 516, the Traversal Engine 122 determines that the node is not a leaf node, it executes step 518 to filter the node's child nodes based on the filter parameters specified in the configurable parameters. For example, the Traversal Engine 122 can filter child nodes based on attributes of the regions represented by the child nodes, the distances between the regions represented by the child nodes, one or more points in one of the query primitives, and / or other criteria.Traversal Engine 122 also executes step 520 to add the child nodes that survived filtering to the node stack based on an order determined using the sorting parameters specified in the configurable parameters. For example, Traversal Engine 122 can sort the child nodes based on a distance measure, the sort origin, and / or other criteria included in the sorting parameters. Traversal Engine 122 then returns to step 506 to process the remaining nodes in the node stack.
[0085] If the Traversal Engine 122 determines in step 516 that the node is a leaf node, it executes step 522 to add geometric objects in the node that match the query primitive(s) and have not been filtered out based on the filter parameters to a result of the geometric query. For example, the Traversal Engine 122 can apply the search routines and filter parameters to each geometric object stored in the node. If the search routines and filter parameters indicate that a particular geometric object matches the query primitive(s) and is not filtered out, the Traversal Engine 122 can add the geometric object to a list of geometric objects returned in the query response.The Traversal Engine 122 can also add the geometric object to a position in the list based on additional sorting parameters in the configurable parameters. If the search routines and filter parameters indicate that a particular geometric object does not match the query primitive(s) and / or is being filtered out, the Traversal Engine 122 can remove the geometric object from the list of geometric objects to be returned in the query response.
[0086] After step 522 is complete, traversal engine 122 returns to step 512 to determine whether the node stack is empty. Once traversal engine 122 determines in step 512 that the node stack is empty, it executes step 514 to return all geometric objects in a response to the query that match the query primitive(s) and have not been filtered out.
[0087] In summary, the disclosed methods and techniques provide a generalized traversal framework for processing geometric queries. This framework receives a specific geometric query that specifies a hierarchical data structure to be traversed, such as a bounding volume hierarchy (BVH) and / or another type of tree structure. The geometric query also includes a set of configurable parameters that control the traversal of the tree structure and / or the processing of the geometric query.The configurable parameters also point to (but are not limited to) data structures representing query primitives such as points, rays, line segments, rectangles, and / or polygons; search routines that define or implement search criteria for matching the query primitives with geometric objects stored in the tree structure; sort parameters used to sort shapes or regions that match the geometric query; and / or filter parameters used when filtering the shapes or regions while traversing the hierarchical data structure.
[0088] The generalized traversal framework processes the geometric query by traversing the hierarchical data structure. During traversal, the framework uses search routines to determine whether a given node in the hierarchical data structure represents a region that intersects, overlaps, is within a certain distance of, and / or otherwise satisfies the search criteria associated with one or more of the query primitives in the geometric query. The framework then repeats this process with the child nodes of each node that meets the search criteria. The framework also uses the filter parameters in the geometric query to filter out nodes and / or their corresponding subtrees during the traversal.Once the traversal reaches a leaf node that meets the search criteria, the generalized traversal framework iterates over the geometric objects stored in that leaf node and determines whether each geometric object meets the search criteria and / or passes all filters specified in the filter parameters. The generalized traversal framework then returns, as a response to the geometric query, a set of geometric objects that both meet the search criteria and pass through the filters.
[0089] A technical advantage of the disclosed methods and techniques over the prior art is that geometric queries involving traversal of hierarchical data structures can be defined and executed in a flexible and configurable manner. Accordingly, the disclosed methods and techniques can be used to create and process geometric queries more quickly and efficiently than conventional approaches that involve programming and executing separate workflows for different types of geometric queries. Another technical advantage of the disclosed methods and techniques is the ability to filter out specific nodes and / or geometric objects in a hierarchical data structure before computationally intensive matching operations are performed.Comparison operations regarding matches are performed using the nodes and / or geometric objects. Consequently, the disclosed methods or techniques can be used to process geometric queries with lower latency and lower resource overhead than prior art approaches. These technical advantages represent one or more technological improvements over previous approaches.
[0090] 1. In some embodiments, a computer-implemented method for processing a geometric query includes: Determining a tree structure and a set of configurable parameters specified in the geometric query, wherein the set of configurable parameters includes one or more query primitives and one or more search routines; Performing one or more operations that traverse the tree structure and execute one or more search routines to match one or more query primitives with an initial set of geometric objects, to compare the elements contained in the tree structure with regard to a match, and Generating an answer to the geometric query, where the answer contains the first set of geometric objects.
[0091] 2. Computer-implemented method according to Theorem 1, wherein the one or more query primitives are compared with the first set of geometric objects, by: Inputting a first query primitive contained in the one or more query primitives and a first node contained in the tree structure into a first search routine contained in the one or more search routines; Executing the first search routine to determine whether the first node satisfies one or more search criteria associated with the geometric query; and Retrieving the first set of geometric objects from one or more nodes that are descendants of the first node within the tree structure.
[0092] 3. Computer-implemented method according to one of the sentences 1-2, wherein retrieving the first set of geometric objects from the one or more nodes comprises; Traversing one or more paths within the tree structure from the first node to the one or more nodes; and for each node present in the one or more paths, executing the first search routine to determine whether the node satisfies the one or more search criteria associated with the geometric query.
[0093] 4. Computer-implemented method according to one of sentences 1-3, wherein one or more search criteria include at least a common intersection test, a distance test or an overlap test.
[0094] 5. Computer-implemented method according to one of theorems 1-4, wherein the one or more query primitives are compared with the first set of geometric objects with respect to a match, by: Retrieving a second set of geometric objects from one or more leaf nodes present in the tree structure that match the one or more query primitives; and Filtering the second set of geometric objects based on one or several filter parameters that are present in the set of configurable parameters to determine the first set of geometric objects.
[0095] 6. Computer-implemented method according to one of sentences 1-5, wherein the one or more filter parameters comprise at least one orientation of a geometric object, an orientation of the one or more query primitives, or a type of a geometric object.
[0096] 7. Computer-implemented method according to one of theorems 1-6, wherein the tree structure is traversed by: Determining the order of a set of nodes contained in the tree structure based on one or more sorting parameters present in the set of configurable parameters; and evaluating the set of nodes based on the order.
[0097] 8. Computer-implemented method according to one of the sentences 1-7, wherein the tree structure is traversed by further filtering out one or more nodes from the sequence based on one or more filter parameters contained in the set of configurable parameters.
[0098] 9. Computer-implemented method according to one of sentences 1-8, wherein the one or more sorting parameters include at least one sorting origin or a distance measure.
[0099] 10. Computer-implemented method according to one of the sentences 1-9, wherein the geometric query includes at least one of: a ray-tracing query, an intersection query, a nearest neighbor query, or a range query.
[0100] 11. In some embodiments, one or more non-volatile, computer-readable media store instructions which, when executed by one or more processors, cause the one or more processors to perform the following steps: Determining a tree structure and a set of configurable parameters specified in a geometric query, wherein the set of configurable parameters includes one or more query primitives and one or more search routines; Performing one or more operations that traverse the tree structure and execute one or more search routines to match one or more query primitives with an initial set of geometric objects, to compare the elements contained in the tree structure with regard to a match; and Generating an answer to the geometric query, where the answer contains the first set of geometric objects.
[0101] 12. The one or more non-volatile computer-readable media according to Theorem 11, wherein the one or more query primitives are compared with the first set of geometric objects, by: Inputting a first query primitive contained in the one or more query primitives and a first node contained in the tree structure into a first search routine contained in the one or more search routines; Executing the first search routine to determine whether the first node satisfies one or more search criteria associated with the geometric query; and Adding the set of nodes that are children of the first node to a node stack.
[0102] 13. The one or more non-volatile, computer-readable media according to one of sentences 11-12, wherein the one or more query primitives are compared with the first set of geometric objects with respect to a match, furthermore by filtering the set of nodes on the basis of one or more filter parameters contained in the set of configurable parameters before adding the set of nodes to the node stack.
[0103] 14. The one or more non-volatile, computer-readable media according to any of sentences 11-13, wherein adding the set of nodes to the node stack includes determining an order of the set of nodes within the node stack based on one or more sorting parameters present in the set of configurable parameters.
[0104] 15. The one or more non-volatile, computer-readable media according to one of sentences 11-14, wherein the one or more query primitives are furthermore compared with the first set of geometric objects with respect to a match, by: Determine whether a second node contained in the set of nodes, corresponds to a leaf node within the tree structure; Retrieving a second set of geometric objects from the second node; and Adding one or more geometric objects contained in the second set of geometric objects that match one or more query primitives to the first set of geometric objects.
[0105] 16. The one or more non-volatile computer-readable media according to one of sentences 11-15, wherein the instructions further cause the one or more processors to perform the step of filtering the first set of geometric objects on the basis of one or more filter parameters contained in the set of configurable parameters prior to generating the response to the geometric query.
[0106] 17. The one or more non-volatile computer-readable media according to one of sentences 11-16, wherein determining the set of configurable parameters includes receiving the set of configurable parameters with geometric querying via an interface.
[0107] 18. The one or more non-volatile computer-readable media according to any one of sentences 11-17, wherein the tree structure comprises at least one of: a bounding volume hierarchy, a quad tree, a KD tree, an R tree, a sphere tree or a rectilinear tree.
[0108] 19. The one or more non-volatile computer-readable media according to any one of sentences 11-18, wherein the one or more query primitives comprise at least one of a point, a line segment, a ray, a rectangle or a polygon.
[0109] 20. In some embodiments, a system comprises one or more memories that store instructions, and a multitude of processing units coupled to the one or more memories, which, when executing the instructions, are designed to perform the following steps: Determining a tree structure and a set of configurable parameters specified in a geometric query, wherein the set of configurable parameters includes one or more query primitives and one or more search routines. Performing one or more operations that traverse the tree structure and execute one or more search routines to compare the one or more query primitives with a first set of geometric objects contained in the tree structure for a match; Storing the first set of geometric objects in a pre-allocated memory pool associated with the multitude of processing units; and Generating an answer to the geometric query, where the answer contains the first set of geometric objects.
[0110] All combinations of claim elements listed in the claims and / or of elements described in this application fall in any way within the considered scope of application of the present invention and the protection.
[0111] The descriptions of the various embodiments serve for illustration purposes but do not claim to be exhaustive or limited to the disclosed embodiments. Many modifications and variations are obvious to the person skilled in the art without departing from the scope and spirit of the described embodiments.
[0112] Aspects of the present embodiments may be designed as a system, method, or computer program product. Accordingly, aspects of the present disclosure may take the form of a purely hardware implementation, a purely software implementation (including firmware, resident software, microcode, etc.), or an embodiment that combines software and hardware aspects, all of which may herein be generally referred to as a "module," a "system," or a "computer." Furthermore, any hardware and / or software technique or method, process, function, component, engine, module, or system described in the present disclosure may be implemented as a circuit or a set of circuits.Furthermore, aspects of the present disclosure may take the form of a computer program product that is implemented in one or more computer-readable media containing computer-readable program code.
[0113] Any combination with one or more computer-readable media can be used. The computer-readable medium can be a computer-readable signaling medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not exclusively, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing.More specific examples (a non-exhaustive list) of computer-readable storage medium would include: an electrical connection with one or more wires, a portable computer disk, a hard disk, random-access memory (RAM), read-only memory (ROM), erasable programmable read-only memory, flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical device, a magnetic device, or any suitable combination of the foregoing. For the purposes of this document, computer-readable storage medium can be any tangible medium capable of containing or storing a program for use by or in conjunction with a command-execution system, device, or apparatus.
[0114] Aspects of the present disclosure are described in advance with reference to flowchart diagrams and / or block diagrams of processes, devices (systems), and computer program products according to embodiments of the disclosure. It is understood that each block of the flowchart diagrams and / or block diagrams, and combinations of blocks in the flowchart diagrams and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be fed to a processor of a general-purpose computer, a specialized computer, or another programmable data processing device to create a machine. When executed by the processor of the computer or other programmable data processing device, the instructions enable the implementation of the functions / actions specified in the flowchart and / or block diagram.Such processors can be, without restriction, general-purpose processors, special-purpose processors, application-specific processors, or field-programmable gate arrays.
[0115] The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, procedures, and computer program products according to various embodiments of the present disclosure. In this respect, each block in the flowchart or block diagrams can represent a module, segment, or section of code comprising one or more executable instructions for implementing the specified logical function(s). It should be noted that in some alternative implementations, the functions specified in the blocks may occur out of the order shown in the figures. For example, two blocks shown consecutively may in reality be executed essentially simultaneously, or the blocks may sometimes be executed in reverse order, depending on the functionality involved.It is also noted that each block of the block diagrams and / or flowchart representation and combinations of blocks in the block diagrams and / or flowchart representation can be implemented by special hardware-based systems that perform the specified functions or actions, or by combinations of special hardware and computer instructions.
[0116] While the foregoing relates to embodiments of the present disclosure, other and further embodiments of the disclosure may be developed without departing from the basic scope of the disclosure, and the scope of the disclosure is determined by the following claims.
Claims
[1] A computer-implemented method for processing a geometric query, the method comprising: Determining a tree structure and a set of configurable parameters specified in the geometric query, wherein the set of configurable parameters comprises one or more query primitives and one or more search routines; Performing one or more operations that traverse the tree structure and that execute the one or more search routines to compare the one or more query primitives with a first set of geometric objects, contained in the tree structure for a match, and Generating a response to the geometric query, the response comprising the first set of geometric objects. [2] The computer-implemented method of claim 1, wherein the one or more query primitives are compared to the first set of geometric objects by: inputting a first query primitive included in the one or more query primitives and a first node included in the tree structure into a first search routine included in the one or more search routines; Executing the first search routine to determine whether the first node satisfies one or more search criteria associated with the geometric query; and Retrieve the first set of geometric objects from one or more nodes that are descendants of the first node within the tree structure. [3] The computer-implemented method of claim 2, wherein retrieving the first set of geometric objects from the one or more nodes comprises; Traversing one or more paths within the tree structure from the first node to the one or more nodes; and for each node present in the one or more paths, executing the first search routine to determine whether the node satisfies the one or more search criteria associated with the geometric query. [4] A computer-implemented method according to claim 2 or 3, wherein the one or more search criteria comprise at least one of a common intersection test, a distance test, and an overlap test. [5] The computer-implemented method of claim 1, wherein the one or more query primitives are compared with the first set of geometric objects for a match by: Retrieving a second set of geometric objects from one or more leaf nodes present in the tree structure that match the one or more query primitives; and Filtering the second set of geometric objects based on one or several filter parameters present in the set of configurable parameters to determine the first set of geometric objects. [6] The computer-implemented method of claim 5, wherein the one or more filter parameters comprise at least one of an orientation of a geometric object, an orientation of the one or more query primitives, and a type of a geometric object. [7] Computer-implemented method according to one of the preceding claims, wherein the tree structure is traversed by: Determining an order of a set of nodes contained in the tree structure based on one or more sorting parameters present in the set of configurable parameters; and Evaluate the set of nodes based on the order. [8] The computer-implemented method of claim 7, wherein the tree structure is traversed by further filtering one or more nodes out of the order based on one or more filter parameters included in the set of configurable parameters. [9] A computer-implemented method according to claim 7 or 8, wherein the one or more sorting parameters comprise at least one of a sorting origin and a distance measure. [10] A computer-implemented method according to any preceding claim, wherein the geometric query comprises at least one of: a ray tracing query, an intersection query, a nearest neighbor query, or a range query. [11] One or more non-transitory computer-readable media storing instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of: Determining a tree structure and a set of configurable parameters specified in a geometric query, wherein the set of configurable parameters comprises one or more query primitives and one or more search routines; Performing one or more operations that traverse the tree structure and that execute the one or more search routines to compare the one or more query primitives with a first set of geometric objects, contained in the tree structure for a match; and Generating a response to the geometric query, the response comprising the first set of geometric objects. [12] The one or more non-transitory computer-readable media of claim 11, wherein the one or more query primitives are compared to the first set of geometric objects by: inputting a first query primitive included in the one or more query primitives and a first node included in the tree structure into a first search routine included in the one or more search routines; Executing the first search routine to determine whether the first node satisfies one or more search criteria associated with the geometric query; and Adding the set of nodes that are children of the first node to a node stack. [13] The one or more non-transitory computer-readable media of claim 12, wherein the one or more query primitives are compared to the first set of geometric objects for a match by further filtering the set of nodes based on one or more filter parameters included in the set of configurable parameters before adding the set of nodes to the node stack. [14] The one or more non-transitory computer-readable media of claim 12 or 13, wherein adding the set of nodes to the node stack comprises determining an order of the set of nodes within the node stack based on one or more sorting parameters present in the set of configurable parameters. [15] The one or more non-transitory computer-readable media of any of claims 12 to 14, wherein the one or more query primitives are further compared to the first set of geometric objects for a match by: Determining whether a second node included in the set of nodes corresponds to a leaf node within the tree structure; Retrieving a second set of geometric objects from the second node; and Adding one or more geometric objects contained in the second set of geometric objects that match the one or more query primitives to the first set of geometric objects. [16] The one or more non-transitory computer-readable media of any of claims 11 to 15, wherein the instructions further cause the one or more processors to perform the step of filtering the first set of geometric objects based on one or more filter parameters included in the set of configurable parameters prior to generating the response to the geometric query. [17] The one or more non-transitory computer-readable media of claim 11, wherein determining the set of configurable parameters comprises receiving the set of configurable parameters with the geometric query via an interface. [18] The one or more non-transitory computer-readable media of claim 11, wherein the tree structure comprises at least one of: a bounding volume hierarchy, a quad tree, a KD tree, an R-tree, a sphere tree, or a rectilinear tree. [19] The one or more non-transitory computer-readable media of claim 11, wherein the one or more query primitives comprise at least one of a point, a line segment, a ray, a rectangle, or a polygon. [20] System comprising: one or more memories that store instructions, and a plurality of processing units coupled to the one or more memories and which, when executing the instructions, are configured to perform the steps of: Determining a tree structure and a set of configurable parameters specified in a geometric query, wherein the set of configurable parameters comprises one or more query primitives and one or more search routines Performing one or more operations that traverse the tree structure and that execute the one or more search routines to compare the one or more query primitives with a first set of geometric objects, to compare the elements contained in the tree structure for a match; Storing the first set of geometric objects in a pre-allocated memory pool associated with the plurality of processing units; and Generating a response to the geometric query, the response comprising the first set of geometric objects.
