Research Article
Three Strategies for Improving Shortest Vector Enumeration Using GPUs
Algorithm 4
The proposed GPU-based pruned enumeration.
(1) | Input: basis , and a small integer | (2) | Compute the quadratic norm of the Gram–Schmidt orthogonalization basis and coefficients and for | (3) | Generate a better basis using Algorithm 2 | (4) | Determine the best choice of level using the strategy shown in Section 5.1.2, | (5) | while true do | (6) | denotes the number of elements | (7) | Generate GPU-points on level using Algorithm 3 | (8) | | (9) | ifthen | (10) | Enumerate the GPU-points in on CPU | (11) | ; | (12) | end if | (13) | Copy to GPU memories | (14) | Start the GPU stage | (15) | for eachdo | (16) | if the current enumeration corresponding to a start-point is cut off or reaches level then | (17) | Produce a neighbor-point of the start-point | (18) | Calculate for the neighbor-point | (19) | ifthen | (20) | The enumeration corresponding to is launched on the current thread | (21) | else | (22) | if this start-point is the last point in then | (23) | Stop enumeration on GPU and return to CPU | (24) | end if | (25) | Set a flag that indicates that the start-point terminates its corresponding enumeration | (26) | Select a new start-point and launch its corresponding enumeration on the current thread | (27) | end if | (28) | end if | (29) | end for each | (30) | Stop the GPU stage | (31) | Copy start points that terminate their enumerations in GPU to | (32) | | (33) | end while | (34) | Output: a shorter vector |
|