Coder Social home page Coder Social logo

jtramm / fastparallelmergesort Goto Github PK

View Code? Open in Web Editor NEW

This project forked from glenggg/fastparallelmergesort

0.0 1.0 0.0 5 KB

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 .

C 98.29% Makefile 1.71%

fastparallelmergesort's Introduction

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

fastparallelmergesort's People

Contributors

glenggg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.