f******k 发帖数: 26 | 1 A thread program for Parallel Sorting
#include
#include
#include
#include
struct thread_data{
int index_front;
int index_back;
int *array;
};
void *compare(void *threadarg)
{
int i,j,tmp;
struct thread_data *my_data;
my_data=(struct thread_data *) threadarg;
i=my_data->index_front;
j=my_data->index_back;
if(my_data->array[i]>my_data->array[j]){
tmp=my_data->array[i];
my_data->array[i]=my_data->arra |
|