Efficient Parallel Knuth-Morris-Pratt Algorithm for Multi-GPUs with CUDA
String matching is an important technique among various applications. The traditional string matching algorithm needs the backtracking procedure and does the comparison repeatedly, thus these factors affect its efficiency. Knuth-Morris-Pratt (KMP) is one of well-known and efficient string matching algorithms. However, the computation time of KMP algorithm still is large for processing thousands of pattern strings. Current high-end graphics processing units (GPUs), contain up to hundreds cores per chip, are very popular in the high performance computing community. In this paper, we proposed an efficient parallel KMP algorithm, called KMP-GPU, for multi-GPUs with CUDA. The experimental results showed that the proposed KMP-GPU algorithm can achieve 97x speedups compared with the CPU-based KMP algorithm.
KeywordsString matching Knuth-Morris-Pratt CUDA Graphics Processing Units Parallel Processing
Unable to display preview. Download preview PDF.
- 1.Cao, P.: Parallel research on KMP algorithm. CECNet, 4253–4255 (2011)Google Scholar
- 2.Duan, G.: The implementation of KMP algorithm based on MPI and OpenMP. In: 9th International Conference on Fuzzy Systems and Knowledge Discovery, pp. 2511–2514 (2012)Google Scholar
- 3.Tumeo, A.: Accelerating DNA analysis applications on GPU clusters. In: 8th IEEE Symposium on Application Specific Processors, pp. 71–76 (2010)Google Scholar
- 5.Bayer, R.S., Moore, J.S.: A fast string searching algorithm. Communication of ACM, 762–772 (1977)Google Scholar
- 6.Cheng, L.L.: Approximate string matching in DNA sequences. In: 8th International Conference on Database Systems for Advanced Applications, pp. 303–310 (2003)Google Scholar
- 8.Peiravi, A.: Application of string matching in Internet security and Reliability. Journal of American Science, 25–3 (2010)Google Scholar
- 9.Flynn, M.: Some Computer Organizations and Their Effectiveness. IEEE Trans. Comput. C-21, 948 (1972)Google Scholar
- 10.SaiKrishna, V., Rasool, A., Khare, N.: String Matching and its Applications in Diversified Fields. International Journal of Computer Science Issues 9 (2012)Google Scholar
- 11.Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction To Algorithm. The MIT Press (2009)Google Scholar