FastParallelMergeSort
OpenMP parallelized merge sort optimized with merge sort algorithm (for the record, this seems to be the only version available on github that implemented merge sort algorithm with OpenMP). Traditional parallel merge sort cannot efficiently parallel merge process. With merge path algorithm, we can achieve O(n/d) time complexity (traditional parallel merge sort can only achieve O(n) during the last few merge steps) on merge process. More detail about merge sort algorithm can be found: https://arxiv.org/abs/1406.2628 .
Install / Use
/learn @GlenGGG/FastParallelMergeSortREADME
Fast Parallel Merge Sort With Merge Path
OpenMP parallelized merge sort optimized with merge sort algorithm (for the record, this seems to be the only version available on github that implemented merge sort algorithm with OpenMP). Traditional parallel merge sort cannot efficiently parallel merge process. With merge path algorithm, we can achieve O(n/d) time complexity (traditional parallel merge sort can only achieve O(n) during the last few merge steps) on merge process. More detail about merge sort algorithm can be found: https://arxiv.org/abs/1406.2628 . This code also implemented plain, binary, segmented merge path and unsegmented merge path versions of parallel merge sort.
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Prerequisites
You need to have gcc and make in your PATH.
Installing
Clone this repository.
git clone https://github.com/GlenGGG/FastParallelMergeSort.git
cd FastParallelMergeSort
Build the project
make
Usage
Simply run the code.
./omp_mergesort [num_threads] [array_length] [--merge-type-{plain, binary, mergepath, segmented-mergepath}] [--inc-threads]
For example, run this code to get an insight:
./omp_mergesort 16 20000000 --inc-threads
Related Skills
node-connect
352.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
