Chapter

Algorithms and Architectures for Parallel Processing

Volume 5574 of the series Lecture Notes in Computer Science pp 281-290

A Fast and Flexible Sorting Algorithm with CUDA

  • Shifu ChenAffiliated withShenzhen Institute of Advanced Integration Technology, Chinese Academy of Sciences/The Chinese University of Hong Kong
  • , Jing QinAffiliated withDepartment of Computer Science and Engineering, The Chinese University of Hong Kong
  • , Yongming XieAffiliated withDepartment of Computer Science and Engineering, The Chinese University of Hong Kong
  • , Junping ZhaoAffiliated withInstitue of Medical Informatics, Chinese PLA General Hospital & Postgraduate Medical School
  • , Pheng-Ann HengAffiliated withShenzhen Institute of Advanced Integration Technology, Chinese Academy of Sciences/The Chinese University of Hong KongDepartment of Computer Science and Engineering, The Chinese University of Hong Kong

* Final gross prices may vary according to local VAT.

Get Access

Abstract

In this paper, we propose a fast and flexible sorting algorithm with CUDA. The proposed algorithm is much more practical than the previous GPU-based sorting algorithms, as it is able to handle the sorting of elements represented by integers, floats and structures. Meanwhile, our algorithm is optimized for the modern GPU architecture to obtain high performance. We use different strategies for sorting disorderly list and nearly-sorted list to make it adaptive. Extensive experiments demon- strate our algorithm has higher performance than previous GPU-based sorting algorithms and can support real-time applications.

Keywords

Parallel sorting algorithm CUDA GPU-based sorting algorithm