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

Inactive Publication Date: 2014-09-10
SHANGHAI UNIV
View PDF2 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] For the application in big data retrieval, Guan Jian needs to calculate its red-black tree model first, and the previous method needs to consume a lot of computing time. This invention uses the heterogeneous platform framework of OpenCL to solve the time-consuming problem of building a red-black tree. raised by the question

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Open computing language (OpenCL)-based red-black tree acceleration algorithm
  • Open computing language (OpenCL)-based red-black tree acceleration algorithm
  • Open computing language (OpenCL)-based red-black tree acceleration algorithm

Examples

Experimental program
Comparison scheme
Effect test

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 ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses an open computing language (OpenCL)-based red-black tree acceleration algorithm. The method includes that according to the characteristic that multiple calculations are capable of being parallel processed during establishing the red-black tree, an OpenCL heterogeneous platform is adopted to rapidly establish a red-black tree model on the basis of big data; with an idea of employing graphics processing unit (GPU) acceleration, to-be-operated data are divided into multiple data blocks, and multiple cores enter a data insertion operation at the same time by the GPU; and after operations of all GPUs are synchronized, by means of a merge operation, the whole red-black tree is established. The OpenCL-based red-black tree acceleration algorithm has the advantages that in the situation of the big data, the red-black tree is rapid to be established within a short time.

Description

technical field [0001] The invention relates to the field of GPU-based parallel computing, in particular to an OpenCL-based red-black tree acceleration algorithm. Background technique [0002] A red-black tree is a self-balancing binary search tree. Its typical use is to implement associative arrays, and it can also be used for retrieval of large data. It is complex, but its operations have good worst-case running times, and are efficient in practice: it can do lookup, insertion, and deletion in O(log n) time, where n is the element in the tree Number of. A red-black tree is a binary search tree in which each node has a color attribute, either red or black. Its statistical performance is better than that of balanced binary trees, so red-black trees are used in many places. In C++ STL, many parts (currently including set, multiset, map, multimap) apply variants of red-black trees. [0003] The present invention adopts a red-black tree acceleration algorithm based on OpenC...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F19/00
Inventor 余小清熊玮万旺根杨超丁玉朴段石石
Owner SHANGHAI UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products