并行程序设计
LazzyBoi懒惰男孩
Everybody dies in their nightmare.
展开
-
运用Pthread实现并行计算矩阵向量乘法
#include <stdio.h> #include <stdlib.h> #include <pthread.h> #define MAX 10000 int thread_count; // number of threads int m; // row int n; // column double A[MAX][MAX]; // matr...原创 2018-07-15 09:32:47 · 3239 阅读 · 0 评论 -
运用MPI并行实现归并排序
比较可惜的是没有用到树形结构,仅仅是在线程中进行计算后全部在0号进程中合并#include <stdio.h> #include <mpi.h> #include <stdlib.h> #define MAX_SIZE 10000 void Merge(int* a, int* b,int start, int middle, int end)...原创 2018-07-15 09:38:33 · 4778 阅读 · 1 评论