Open computing language (OpenCL)-based red-black tree acceleration algorithm
A red-black tree and algorithm technology, applied in computing, special data processing applications, instruments, etc., can solve the problems of time-consuming red-black trees and large computing time, and achieve a large amount of calculation, shortened tree-building time, and rapid establishment. Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0033] Embodiment one: a preferred embodiment of the red-black tree acceleration method based on OpenCL is described as follows in conjunction with accompanying drawing, and its concrete implementation method can be divided into the following steps:
[0034] Step 1: CPU data input, GPU device initialization: find hardware devices that support OpenCL, create memory objects required for program execution, and allocate threads according to the number of cores supported by the device.
[0035] Step 2: Data segmentation: divide the original massive data into blocks according to the allocated threads on the GPU. This experiment uses a GT420 graphics card, the hardware supports 512 threads, and the data volume is m=100M, so each thread allocates data separately The size is 200KB.
[0036] Step 3: Assign chunked data to each thread and perform the following operations:
[0037] 1) Insert the data value to be inserted directly into the end of the tree.
[0038] 2) Mark the color attr...
Embodiment 2
[0049] Step 1: CPU data input, GPU device initialization: find hardware devices that support OpenCL, create memory objects required for program execution, and allocate threads according to the number of cores supported by the device.
[0050] Step 2: Data chunking: Divide the original massive data into chunks according to the allocated threads on the GPU. The hardware supports 512 threads, and the data volume is m=200M. Therefore, each thread allocates a data volume of 400KB.
[0051] Further calculations are performed according to steps 3 to 5 in the first embodiment.
[0052] For the 200M data volume used in this example, the total time spent on tree building is 1121ms, while the total time spent on tree building by the standard red-black tree algorithm on the CPU side is 3689ms, which is 2568ms less than the time-consuming comparison, and the computing efficiency is increased by 69.6%.
[0053] Experimental results
[0054] The present invention has been carried out based ...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com