由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - what wrong with these thread program. Thanks for helping
相关主题
question about temperay file in sort command[转载] windows C++ -> Unix C++
关于CPU时间急问!how to track page faults when allocation
what's wrong with gcc?How to sort email address?
Does perl support record/struct?[转载] HELP:如何产生(0..N-1)共N个"各不相同"的随机数?要求算法最快
[转载] 活见鬼了---搞不定的程序Pine: how to sort the received email?
Which library include gethostbyname?请教:Variable in sed command
SYSV shared memory questionHow to sort files by date?
Socket programming help[转载] 继续请教几个问题!急!!
相关话题的讨论汇总
话题: data话题: thread话题: my话题: array话题: helping
进入Unix版参与讨论
1 (共1页)
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
1 (共1页)
进入Unix版参与讨论
相关主题
[转载] 继续请教几个问题!急!![转载] 活见鬼了---搞不定的程序
How to edit @INC array for perl?Which library include gethostbyname?
sort problemSYSV shared memory question
How to do that using "sort" command?Socket programming help
question about temperay file in sort command[转载] windows C++ -> Unix C++
关于CPU时间急问!how to track page faults when allocation
what's wrong with gcc?How to sort email address?
Does perl support record/struct?[转载] HELP:如何产生(0..N-1)共N个"各不相同"的随机数?要求算法最快
相关话题的讨论汇总
话题: data话题: thread话题: my话题: array话题: helping