eMDPM: Efficient Multidimensional Pattern Matching Algorithm for GPU

  • Supragya RajEmail author
  • Siddha Prabhu Chodnekar
  • T. Harish
  • Harini Sriraman
Conference paper
Part of the Advances in Intelligent Systems and Computing book series (AISC, volume 851)


Parallelizing pattern matching in multidimensional images is very vital in many applications to improve the performance. With SIMT architectures, the performance can be greatly enhanced if the hardware threads are utilized to the maximum. In the case of pattern matching algorithms, the main bottleneck arises due to the reduction operation that needs to be performed on the multiple parallel search operations. This can be solved by using Shift-Or operations. The recent trend has shown the improvement in pattern matching using Shift-Or operations for bit pattern matching. This has to be extended for multiple dimensional images like hyper-cubes. In this paper, we have extended the Shift-Or pattern matching for multidimensional images. The algorithm is implemented for GPU architectures. The complexity of the proposed algorithm is \( m*\frac{log(n)}{kw} \) where m is the number of dimensions, n is the size of the array if the multidimensional matrix values are placed in a single dimensional array, k is the size of the pattern and w is the size of the tile. From the result analysis it is found that the performance is maximum, when the pattern size matches the tile size and it is less than 64. This restriction is due to the size of the warp considered.


Pattern matching Parallelism GPU Shift-Or operations 


  1. 1.
    Mitani, Y., Ino, F., Hagihara, K.: Parallelizing exact and approximate string matching via inclusive scan on a GPU. IEEE Trans. Parallel Distrib. Syst. 28(7), 1989–2002 (2017)CrossRefGoogle Scholar
  2. 2.
    Agrawal, J., Diao, Y., Gyllstrom, D., Immerman, N.: Efficient pattern matching over event streams. In: Proceedings of the 2008 ACM SIGMOD International Conference on Management of Data, pp. 147–160. ACM (2008)Google Scholar
  3. 3.
    Cantone, D., Cristofaro, S., Faro, S.: A space-efficient implementation of the good-suffix heuristic. In: Stringology, pp. 63–75 (2010)Google Scholar
  4. 4.
    Sahli, M., Shibuya, T.: Max-shift BM and max-shift horspool: practical fast exact string matching algorithms. J. Inf. Process. 20(2), 419–425 (2012)Google Scholar
  5. 5.
    Oladunjoye, J.A., Afolabi, A.O., Olabiyisi, S.O., Moses, T.: A comparative analysis of pattern matching algorithm using bit-parallelism technique. IUP J. Inf. Technol. 13(4), 20–36 (2017)Google Scholar
  6. 6.
    Fredriksson, K.: Shift-or string matching with super-alphabets. Inf. Process. Lett. 87(4), 201–204 (2003)MathSciNetCrossRefGoogle Scholar
  7. 7.
    Goyal, R., Billa, S.L., Cavium Inc.: Generating a non-deterministic finite automata (NFA) graph for regular expression patterns with advanced features. U.S. Patent 9,563,399 (2017)Google Scholar
  8. 8.
    Kida, T., Takeda, M., Shinohara, A., Arikawa, S.: Shift-And approach to pattern matching in LZW compressed text. In: Annual Symposium on Combinatorial Pattern Matching, pp. 1–13. Springer, Berlin, Heidelberg (1999)Google Scholar
  9. 9.
    Park, B., Won, C.S.: Fast binary matching for edge histogram descriptor. In: The 18th IEEE International Symposium Consumer Electronics (ISCE 2014), pp. 1–2 (2014)Google Scholar
  10. 10.
    Hirvola, T., Tarhio, J.: Bit-parallel approximate matching of circular strings with k mismatches. J. Exp. Algorithmics (JEA) 22, 1–5 (2017)MathSciNetCrossRefGoogle Scholar
  11. 11.
    Pfaffe, P., Tillmann, M., Lutteropp, S., Scheirle, B., Zerr, K.: Parallel string matching. In: European Conference on Parallel Processing, pp. 187–198. Springer, Cham (2016)Google Scholar
  12. 12.
    Faro, S.: Evaluation and improvement of fast algorithms for exact matching on genome sequences. In: International Conference on Algorithms for Computational Biology, pp. 145–157. Springer, Cham (2016)Google Scholar
  13. 13.
    Alfred, V.: Algorithms for finding patterns in strings. In: Algorithms and Complexity, p. 255, pp. 1–5 (2014)Google Scholar

Copyright information

© Springer Nature Singapore Pte Ltd. 2019

Authors and Affiliations

  • Supragya Raj
    • 1
    Email author
  • Siddha Prabhu Chodnekar
    • 1
  • T. Harish
    • 1
  • Harini Sriraman
    • 1
  1. 1.School of Computing Science and EngineeringVellore Institute of TechnologyChennaiIndia

Personalised recommendations