OpenMP parallel quicksort

前端 未结 3 980
天命终不由人
天命终不由人 2021-01-21 08:17

I try to use OpenMP to parallel quicksort in partition part and quicksort part. My C code is as follows:

#include \"stdlib.h\"
#include \"stdio.h\"
#include \"om         


        
3条回答
  •  暖寄归人
    2021-01-21 08:47

    This seems wrong my op is looking like this

    [student@localhost ~]$ g++ -openmp QuickSort1.cpp
    [student@localhost ~]$ ./a.out
    Enter the size of array:8
    Enter element at 0:77
    Enter element at 1:99
    Enter element at 2:22
    Enter element at 3:44
    Enter element at 4:11
    Enter element at 5:66
    Enter element at 6:88
    Enter element at 7:55
    =====================After Sorting===================
        11  22  44  99  55  66  77  88
    

提交回复
热议问题