Single-loop gilbert-johnson-keerthi algorithm

The vectored GJK algorithm with a single loop and branch-free support function addresses branch mispredictions, improving computational efficiency and processing speed by optimizing memory access and reducing conditional statements.

WO2025162561A1PCT designated stage Publication Date: 2025-08-07HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
PCT/EP2024/052233
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-01-30
Publication Date
2025-08-07

AI Technical Summary

Technical Problem

The Gilbert-Johnson-Keerthi (GJK) algorithm for graphics processing is computationally expensive due to branch mispredictions and conditional statements within its inner loop, leading to inefficient memory access and processing delays.

Method used

A vectored implementation of the GJK algorithm using a single loop and a branch-free, loop-free support function, leveraging spatial coherence to cache and evaluate the support function on a subset of vertices, eliminating conditional branches and optimizing memory access.

Benefits of technology

This approach significantly reduces computational expense and improves processing speed by avoiding branch mispredictions and optimizing memory access, enhancing the efficiency of graphics processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure EP2024052233_07082025_PF_FP_ABST
    Figure EP2024052233_07082025_PF_FP_ABST
Patent Text Reader

Abstract

In some examples, a graphics processing method to process electronic data for display on a display screen comprises using an aligned, vectored data structure in a Gilbert-Johnson-Keerthi algorithm run on a single instruction multiple data, SIMD, processor to evaluate the distance between objects of a display scene which is to be rendered and displayed on the display screen, said structure including separating axes, position and rotation of a local coordinate system and a position of each point in a convex set, and implementing said Gilbert-Johnson-Keerthi algorithm using a support function and a single loop only, wherein the support function comprises a loop-free and a branch-free function to support a mapping function, and the single loop repeats the algorithm until an optimum point for a shortest distance between two objects is identified.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] SINGLE-LOOP GILBERT- JOHNS ON-KEERTHI ALGORITHM

[0002] TECHNICAL FIELD

[0003] The present disclosure relates, in general, to graphics processing. Aspects of the disclosure relate to a single-loop Gilbert- Johnson-Keeithi algorithm for graphics processing.

[0004] BACKGROUND

[0005] Graphics processing is the processing of electronic data for its display on a display screen, such as a computer monitor or a television.

[0006] The Gilbert- Johnson-Keeithi (GJK) algorithm is a method of determining the minimum distance between two convex sets, first published by Elmer G. Gilbert, Daniel W. Johnson, and S. Sathiya Keerthi in 1988. A convex set is a depiction of an object. Unlike many other distance algorithms, GJK does not require that the geometry data be stored in any specific format, but instead relies solely on a support function to iteratively generate closer simplices to the correct answer using the configuration space obstacle (CSO) of two convex shapes, more commonly known as the Minkowski difference.

[0007] The GJK algorithm operates through two nested loops, with the inner loop revolving around the support function. The outer loop orchestrates the overall iteration process, while the inner loop invokes the support function. This is responsible for calculating the farthest point in a given direction within the geometric shapes under examination. This nested loop structure plays a pivotal role in guiding the algorithm systematically toward a solution.

[0008] Several prior approaches have aimed to enhance the speed of the GJK algorithm by incorporating vectorized implementations or tailoring the algorithm for graphics processors. The publication "Enhancing GJK: computing minimum and penetration distances between convex polyhedra" by Cameron presents the hill-climbing technique. Hill climbing is an embodiment of spatial coherence and, as such, is an optimization technique used to refine the approximation of the closest points between convex shapes. While the publication suggests a new formulation of support function, hill climbing does not eliminate the computationally intensive control statements associated with the GJK algorithm.

[0009] Patent publication US8564601B2 discloses a parallel and vectored GJK graphics processing using SIMD devices. The application employs parallel and vectored data structures within a processor, aiming to enhance the computational efficiency of GJK. The emphasis is on vectoring and aligning data for optimal processing within the SIMD device . However, the approach does not reduce the computational costs associated with the GJK algorithm (in particular, the inner loop).

[0010] SUMMARY

[0011] An objective of the present disclosure is to provide reduce the computational expense associated with the Gilbert-Johnson- Keerthi algorithm and improve the speed thereof.

[0012] The foregoing and other objectives are achieved by the features of the independent claims.

[0013] Further implementation forms are apparent from the dependent claims, the description and the Figures.

[0014] A first aspect of the present disclosure provides a graphics processing method to process electronic data for display on a display screen, the method comprising using an aligned, vectored data structure in a Gilbert-Johnson-Keerthi algorithm run on a single instruction multiple data, SIMD, processor to evaluate the distance between objects of a display scene which is to be rendered and displayed on the display screen, said structure including separating axes, position and rotation of a local coordinate system and a position of each point in a convex set, and implementing said Gilbert-Johnson-Keerthi algorithm using a support function and a single loop only, wherein the support function comprises a loop-free and a branch-free function to support a mapping function, and the single loop repeats the algorithm until an optimum point for a shortest distance between two objects is identified.

[0015] Accordingly, the method addresses the high cost attributed to the conditional “if’ statement (as well as the “fob’ loop) within the inner loop of the GJK algorithm, specifically targeting branch misprediction. The method eliminates the need for the inner loop, thereby obviating the entire penalty arising from branch misprediction by introducing a branch-free support function.

[0016] The support function may comprise a function arranged to identify, from a first set of vectors, a first vector, wherein a dot product of the first vector and an input vector comprises the maximum value for any vector in the first set of vectors.

[0017] The method may further comprise calculating a dot product of the input vector and the first set of vectors, and storing the calculated dot product in a register. Identifying the first vector may further comprise using masking to find the maximum value stored in the register and its index in the register, whereby to identify the first vector.

[0018] The method may further comprise calculating, in parallel, multiple dot products of the input vector and multiple sub-sets of the first set of vectors, respectively, and storing each of the multiple dot products in a separate register of multiple registers. Identifying the first vector may comprise using masking to find a local maximum value stored in each register of the multiple registers, respectively, and comparing the local maximum values stored in each register to find a global maximum value stored across the multiple registers, whereby to identify the first vector.

[0019] The method may further comprise changing a value of the input vector to a value of the first vector.

[0020] A second aspect of the present disclosure provides a computer readable storage medium comprising computer program code, accessible by an apparatus comprising a processor, to provide instructions and / or data to the apparatus, the computer program code configured to, with the processor, cause the apparatus to perform the method described herein.

[0021] A third aspect of the present disclosure provides a graphics processing apparatus to process electronic data for display on a display screen, comprising a single instruction multiple data (SIMD) processor arranged to use an aligned, vectored data structure in a Gilbert-Johnson-Keerthi algorithm run on a single instruction multiple data (SIMD) processor to evaluate the distance between objects of a display scene which is to be rendered and displayed on the display screen, said structure including separating axes, position and rotation of a local coordinate system and a position of each point in a convex set, and implement said Gilbert-Johnson-Keerthi algorithm using a support function and a single loop only, wherein the support function comprises a loop-free and a branch-free function to support a mapping function, and the single loop repeats the algorithm until an optimum point for a shortest distance between two objects is identified.

[0022] The support function may comprise a function arranged to identify, from a first set of vectors, a first vector, wherein a dot product of the first vector and an input vector comprises the maximum value for any vector in the first set of vectors.

[0023] The processor may be further arranged to calculate a dot product of the input vector and the first set of vectors, and store the calculated dot product in a register. In order to identify the first vector, the processor may be further arranged to use masking to find the maximum value stored in the register and its index in the register, whereby to identify the first vector. The processor may be further arranged to calculate, in parallel, multiple dot products of the input vector and multiple sub-sets of the first set of vectors, respectively, and store each of the multiple dot products in a separate register of multiple registers. In order to identify the first vector, the processor may be further arranged to use masking to find a local maximum value stored in each register of the multiple registers, respectively, and compare the local maximum values stored in each register to find a global maximum value stored across the multiple registers, whereby to identify the first vector.

[0024] The processor may be further arranged to change a value of the input vector to a value of the first vector.

[0025] These and other aspects of the invention will be apparent from the embodiment s) described below.

[0026] BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order that the present invention may be more readily understood, embodiments of the invention will now be described, by way of example, with reference to the accompanying drawings, in which:

[0028] Fig. 1 is a flow chart of a method according to an example;

[0029] Fig. 2 is a flow chart of a support function according to an example;

[0030] Fig. 3 is a schematic depiction of the concept of spatial coherence to aid understanding of the invention; and

[0031] Fig. 4 is schematic representation of an apparatus according to an example.

[0032] DETAILED DESCRIPTION

[0033] Example embodiments are described below in sufficient detail to enable those of ordinary skill in the art to embody and implement the systems and processes herein described. It is important to understand that embodiments can be provided in many alternate forms and should not be construed as limited to the examples set forth herein.

[0034] Accordingly, while embodiments can be modified in various ways and take on various alternative forms, specific embodiments thereof are shown in the drawings and described in detail below as examples. There is no intent to limit to the particular forms disclosed. On the contrary, all modifications, equivalents, and alternatives falling within the scope of the appended claims should be included. Elements of the example embodiments are consistently denoted by the same reference numerals throughout the drawings and detailed description where appropriate.

[0035] The terminology used herein to describe embodiments is not intended to limit the scope. The articles “a,” “an,” and “the” are singular in that they have a single referent, however the use of the singular form in the present document should not preclude the presence of more than one referent. In other words, elements referred to in the singular can number one or more, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises,” “comprising,” “includes,” and / or “including,” when used herein, specify the presence of stated features, items, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, items, steps, operations, elements, components, and / or groups thereof.

[0036] Unless otherwise defined, all terms (including technical and scientific terms) used herein are to be interpreted as is customary in the art. It will be further understood that terms in common usage should also be interpreted as is customary in the relevant art and not in an idealized or overly formal sense unless expressly so defined herein. A branch predictor in a central processing unit (CPU) is a component for optimising instruction execution by forecasting the outcomes of conditional branches, such as those associated with “if’ statements. Predicting whether a branch will be taken helps maintain a smooth instruction pipeline. However, if a prediction fails, resulting in a misprediction, a performance penalty is incurred by the CPU. In the case of a mispredicted branch, the speculatively executed instructions following the misprediction must be discarded, thus leading to wasted processing cycles and potential pipeline stalls.

[0037] The Gilbert-Johnson-Keerthi (GJK) algorithm has always been conceived as a system involving at least two nested loops. The inner loop revolves around the support function, while the outer loop orchestrates the overall iteration process. The high cost of the inner loop is primarily attributed to the conditional “if’ statement within its structure. This conditional statement causes potential cache flushing if the branch predictor makes a wrong guess. An incorrect guess may lead to inefficient memory access patterns, disrupting the processor’s cache, and causing a delay in fetching the required data. Overall, branch misprediction significantly contributes to the computational expense associated with the inner loop of the GJK and is a disadvantage that the currently utilised approaches exhibit.

[0038] According to an example, there is provided a mechanism to reduce computational expense associated with the Gilbert-Johnson- Keerthi algorithm and improve the speed thereof. More specifically, aspects relate addressing the high cost attributed to the conditional “if ’ statement within the inner loop, specifically targeting the branch misprediction. The proposed solution involves a vectored implementation of the GJK algorithm, achieved through a single loop that invokes a branch-free and loop-free support function. The mechanism described herein leverages spatial coherence, such that the solution from a previous time step is caches, and the evaluation of the support function is restricted to a subset of vertices. The size of this subset is predetermined during compile time to ensure it fits an integer number of cache lines. Similar to Cameron’s approach (mentioned above), neighbouring elements are pre-computed and stored in a memory-aligned array. The memory array aligns with the length of vector registers for an optimised memory access pattern. Importantly, the support function is implemented without any control structure. In other words, the support function does not use either one of a “for” loop or an “if’ statement.

[0039] Examples in the present disclosure can be provided as methods, systems or machine-readable instructions, such as any combination of software, hardware, firmware or the like. Such machine-readable instructions may be included on a computer readable storage medium (including but not limited to disc storage, CD-ROM, optical storage, etc.) having computer readable program codes therein or thereon.

[0040] The present disclosure is described with reference to flow charts and / or block diagrams of the method, devices and systems according to examples of the present disclosure. Although the flow diagrams described above show a specific order of execution, the order of execution may differ from that which is depicted. Blocks described in relation to one flow chart may be combined with those of another flow chart. In some examples, some blocks of the flow diagrams may not be necessary and / or additional blocks may be added. It shall be understood that each flow and / or block in the flow charts and / or block diagrams, as well as combinations of the flows and / or diagrams in the flow charts and / or block diagrams can be realized by machine readable instructions.

[0041] The machine-readable instructions may, for example, be executed by a machine such as a general-purpose computer, user equipment such as a smart device, e.g., a smart phone, a special purpose computer, an embedded processor or processors of other programmable data processing devices to realize the functions described in the description and diagrams. In particular, a processor or processing apparatus may execute the machine-readable instructions. Thus, modules of apparatus (for example, a module implementing a comparator unit, or a firewall structure and so on) may be implemented by a processor executing machine readable instructions stored in a memory, or a processor operating in accordance with instructions embedded in logic circuitry. The term 'processor' is to be interpreted broadly to include a CPU, processing unit, ASIC, logic unit, or programmable gate set etc. The methods and modules may all be performed by a single processor or divided amongst several processors. Such machine-readable instructions may also be stored in a computer readable storage that can guide the computer or other programmable data processing devices to operate in a specific mode. For example, the instructions may be provided on a non- transitory computer readable storage medium encoded with instructions, executable by a processor.

[0042] Fig. 1 is a flow chart of a method according to an example. The graphics processing method to process electronic data for display on a display screen comprises, in block 101, using an aligned, vectored data structure in a Gilbert-Johnson-Keerthi algorithm run on a single instruction multiple data (SIMD) processor to evaluate the distance between objects of a display scene which is to be rendered and displayed on the display screen, said structure including separating axes, position and rotation of a local coordinate system and a position of each point in a convex set. The separating axes may support a mapping function by constituting direction vectors for the local coordinate system. Each point in the convex set may be represented using its X, Y and Z coordinate values.

[0043] The SIMD processor performs operations on aligned and vectored data, thereby efficiently utilising its hardware by exploiting data parallelism, thus improving performance. Here, the terms “aligned” and “vectored” refer to data structures whose starting addresses are multiplies of the executing processor’s width, which makes them efficient for the SIMD processor. In an example, the size of an array in which the data is stored may match the size of a vector register of the SIMD processor.

[0044] In block 102, the method comprises implementing said Gilbert-Johnson-Keerthi algorithm using a support function and a single loop only, wherein the support function comprises a loop-free and a branch-free function to support a mapping function, and the single loop repeats the algorithm until an optimum point for a shortest distance between two objects is identified.

[0045] The support function, in the context of the GJK algorithm, may refer to a mathematical function that determines the farthest point in a given direction within a convex shape. Specifically, the support function may take a direction vector and returns the point on the convex shape that is farthest in that direction. The support function is crucial for iteratively expanding the simplex. The support function may involve iterating through the vertices of a convex shape and computing the dot product of each vertex's position vector with a specified direction vector. The vertex with the maximum dot product, indicating the farthest point in the given direction, may then be returned as the output of the support function.

[0046] Advantageously, the support function is designed to be branch-free, i.e., it operates without conditional branches. By removing the conditional branches, efficiency of the GJK algorithm can be improved by avoiding potential branch mispredictions and facilitating optimised execution in vectorised or parallel processing environments. To aid understanding of the support function, reference will be now made to Fig. 2. Fig. 2 is a flow chart of a support function according to an example.

[0047] The objective of the support function may be to find a vector M among a first set of vectors (SI, S2, ..., Sn), such that a dot product of an input vector V and the vector M comprises the maximum value for any vector in the first set of vectors. The input vector V may comprise a search direction initialised during the first iteration of the GJK algorithm, evaluated by the support function. The vector M may comprise a vector realising the farthest distance in the direction V. Advantageously, the support function is designed to be loop-free and branch-free, therefore improving the performance of the GJK algorithm.

[0048] The first set of vectors may be split into multiple non-overlapping batches. The number of batches that the first set may be split into may be smaller than the number of vectors in the first set of vectors. Each batch of the multiple batches may fit within the processor’s register. Each batch may be stored in a separate register.

[0049] In block 201, a vector dot product may be calculated. In particular, multiple vector dot products may be calculated, such that a vector dot product is calculated for each batch of the multiple batches of vectors. SIMD instructions may be used to compute the dot product between the input vector V and a batch of vectors of the first set of vectors. Advantageously, the use of the SIMD processor allows the dot product calculation for a batch to be performed in parallel. The calculated vector dot products may be stored in the processor’s registers, respectively, such that each batch has a dedicated register.

[0050] In block 202, vector masking may be utilised to find the vector M. In order to find the vector M, the method may comprise looking for the maximum value (and the corresponding index) of the values computed at the previous stage. That is, each used register may be checked. The SIMD processor may use masks to find the maximum value. If the set of vectors was split into multiple batches, the masks may be performed logically, such that a “local” maximum of each register is found first. Then, the local maximums may be compared to find the “global” maximum, thereby finding the vector M.

[0051] In block 203, the value of the input vector V may be updated. In particular, the value of the input vector M may be updated using the vector M that was computed in block 202.

[0052] Removal of the inner loops and branches within the support function 200 may be possible by exploiting spatial coherence. Fig. 3 is a schematic depiction of the concept of spatial coherence to aid understanding of the invention. Fig. 3 depicts two objects - object P 310 and object Q 320 - at a time N and at a time N+l. The objects 310 and 320 enclose a convex set (not shown). Here, “convex” refers to the actual shape of the item within the bounds depicted by the objects 310 and 320 in FIG. 3. The set of points for each vertex, consisting of X, Y, and Z coordinates, enclose the convex object. The minimum distance between the objects 310 and 320 is shown in the figure. In a time-marching simulation, adjacent objects 310 and 320 exhibit small displacement between the N and the subsequent time N+l. As such, the computation of the support function may be accelerated by caching the solution at time N and speculating that, at time N+l, the subsequent solution will be in the vicinity of the cache solution. Thus, the inner loop of the support function can be replaced by a branch-free unrolled loop, known at a compile time, limited to a subset of neighbouring points. The subset of neighbouring points may be a memory-aligned array whose size matches the vector register of the processor.

[0053] In particular, spatial coherence can accelerate the solution at time T+l by storing the vertices of each object that “support the solution”. Referring once again to Fig. 3, the “support” vertices of object P 310 may include, for example, vertices P6 and P7, and the “support” vertices of object Q 320 may include vertices QI and Q8. These points may be cached, and, at the next timestep, their neighbours may be considered. The neighbouring vertices may be identified in any suitable manner, for example, based on a graph, or using a nearest neighbour algorithm.

[0054] Exemplarily, by virtue of the concepts of "neighbour and “convexity”, P6 or P7 may be considered when looking for the furthest point toward the object Q 320. Furthermore, the neighbours of either P6 or P7 may be considered. For example, when considering the vertex P6, assuming that a register can fit four vertices, the dot product for P7, P8, P5 and P4 may be computed in parallel. The resulting values may then be compared to the dot product of P6, and the index of the vertex that gives the highest product may be returned. At this point, a “local” maximum has been found. While the solution could stop at this point, for complex applications, more batches may be considered, and the local maximum for more than one register may be considered. In an example, if two registers are considered, eight neighbours of P6 may be found. The number of registers to be used may be defined at compile time, and cannot be changed at runtime. However, an executable with multiple implementations of the support function may be provided, such that, at initialisation time, the desired number of registers may be selected.

[0055] Advantageously, the present invention removes all conditional (“if’, “else”) branches from the support function. The invention produces vector code for the widest register available in the processor. Furthermore, by unrolling the inner loops, all “jump” instructions can be eliminated (for example, the compiler will not generate them).

[0056] Fig. 4 is a schematic representation of an apparatus according to an example. The apparatus 400 may comprise a single instruction multiple data (SIMD) processor 403. The processor 403 may be configured to perform the method described herein. According to an example, machine-readable instructions can be loaded onto a computer or other programmable data processing devices, so that the computer or other programmable data processing devices perform a series of operations to produce computer-implemented processing, thus the instructions executed on the computer or other programmable devices provide an operation for realizing functions specified by flow(s) in the flow charts and / or block(s) in the block diagrams.

[0057] Further, the teachings herein may be implemented in the form of a computer or software product, such as a non-transitory machine-readable storage medium, the computer software or product being stored in a storage medium and comprising a plurality of instructions, e.g., machine readable instructions, for making a computer device implement the methods recited in the examples of the present disclosure.

[0058] In some examples, some methods can be performed in a cloud-computing or network-based environment. Cloud-computing environments may provide various services and applications via the Internet. These cloud-based services (e.g., software as a service, platform as a service, infrastructure as a service, etc.) may be accessible through a web browser or other remote interface of the user equipment for example. Various functions described herein may be provided through a remote desktop environment or any other cloud-based computing environment.

[0059] While various embodiments have been described and / or illustrated herein in the context of fully functional computing systems, one or more of these exemplary embodiments may be distributed as a program product in a variety of forms, regardless of the particular type of computer-readable-storage media used to actually carry out the distribution. The embodiments disclosed herein may also be implemented using software modules that perform certain tasks. These software modules may include script, batch, or other executable files that may be stored on a computer-readable storage medium or in a computing system. In some embodiments, these software modules may configure a computing system to perform one or more of the exemplary embodiments disclosed herein. In addition, one or more of the modules described herein may transform data, physical devices, and / or representations of physical devices from one form to another.

[0060] The preceding description has been provided to enable others skilled in the art to best utilize various aspects of the exemplary embodiments disclosed herein. This exemplary description is not intended to be exhaustive or to be limited to any precise form disclosed. Many modifications and variations are possible without departing from the spirit and scope of the instant disclosure. The embodiments disclosed herein should be considered in all respects illustrative and not restrictive. Reference should be made to the appended claims and their equivalents in determining the scope of the instant disclosure.

Claims

CLAIMS1. A graphics processing method to process electronic data for display on a display screen, comprising: using an aligned, vectored data structure in a Gilbert-Johnson-Keerthi algorithm run on a single instruction multiple data, SIMD, processor to evaluate the distance between objects of a display scene which is to be rendered and displayed on the display screen, said structure including separating axes, position and rotation of a local coordinate system and a position of each point in a convex set (101); and implementing said Gilbert-Johnson-Keerthi algorithm using a support function and a single loop only, wherein the support function comprises a loop-free and a branch-free function to support a mapping function, and the single loop repeats the algorithm until an optimum point for a shortest distance between two objects is identified (102).

2. The method of claim 1 , wherein the support function comprises a function arranged to : identify, from a first set of vectors, a first vector, wherein a dot product of the first vector and an input vector comprises the maximum value for any vector in the first set of vectors.

3. The method of claim 2, further comprising: calculating a dot product of the input vector and the first set of vectors; and storing the calculated dot product in a register.

4. The method of claim 3, wherein identifying the first vector further comprises: using masking to find the maximum value stored in the register and its index in the register, whereby to identify the first vector.

5. The method of claim 2, further comprising: calculating, in parallel, multiple dot products of the input vector and multiple sub-sets of the first set of vectors, respectively; and storing each of the multiple dot products in a separate register of multiple registers.

6. The method of claim 5 , wherein identifying the first vector further comprises : using masking to find a local maximum value stored in each register of the multiple registers, respectively; and comparing the local maximum values stored in each register to find a global maximum value stored across the multiple registers, whereby to identify the first vector.

7. The method of claim 4 or 6, further comprising: changing a value of the input vector to a value of the first vector.

8. A computer readable storage medium comprising computer program code, accessible by an apparatus comprising a processor, to provide instructions and / or data to the apparatus, the computer program code configured to, with the processor, cause the apparatus to: perform the steps of the method described in any one of claims 1 to 7.

9. A graphics processing apparatus (400) to process electronic data for display on a display screen, comprising: a single instruction multiple data, SIMD, processor (403) arranged to: use an aligned, vectored data structure in a Gilbert-Johnson-Keerthi algorithm run on a single instruction multiple data, SIMD, processor (403) to evaluate the distance between objects of a display scene which is to be rendered and displayed on the display screen, said structure including separating axes, position and rotation of a local coordinate system and a position of each point in a convex set; and implement said Gilbert-Johnson-Keerthi algorithm using a support function and a single loop only, wherein the support function comprises a loop-free and a branch-free function to support a mapping function, and the single loop repeats the algorithm until an optimum point for a shortest distance between two objects is identified.

10. The apparatus of claim 9, wherein the support function comprises a function arranged to: identify, from a first set of vectors, a first vector, wherein a dot product of the first vector and an input vector comprises the maximum value for any vector in the first set of vectors.

11. The apparatus of claim 10, wherein the processor (403) is further arranged to: calculate a dot product of the input vector and the first set of vectors; and store the calculated dot product in a register.

12. The apparatus of claim 11, wherein, in order to identify the first vector, the processor (403) is further arranged to: use masking to find the maximum value stored in the register and its index in the register, whereby to identify the first vector.

13. The apparatus of claim 10, wherein the processor (403) is further arranged to: calculate, in parallel, multiple dot products of the input vector and multiple sub-sets of the first set of vectors, respectively; and store each of the multiple dot products in a separate register of multiple registers.

14. The apparatus of claim 13, wherein, in order to identify the first vector, the processor (403) is further arranged to: use masking to find a local maximum value stored in each register of the multiple registers, respectively; and compare the local maximum values stored in each register to find a global maximum value stored across the multiple registers, whereby to identify the first vector.

15. The apparatus of claim 12 or 14, wherein the processor (403) is further arranged to change a value of the input vector to a value of the first vector.

Citation Information

Patent Citations

  • Parallel and vectored Gilbert-Johnson-Keerthi graphics processing

    US8564601B2