java-ppgia.pptVIP

  • 12
  • 0
  • 约1.94万字
  • 约 62页
  • 2016-10-06 发布于天津
  • 举报
java-ppgia

* Partitioning: Process Parallelism int add (int a, int b, int result) // function stuff int sub(int a, int b, int result) // function stuff pthread t1, t2; pthread-create(t1, add, a,b, r1); pthread-create(t2, sub, c,d, r2); pthread-par (2, t1, t2); MISD and MIMD Processing a b r1 c d r2 add sub Processor Data IS1 IS2 Processor * do “ “ dn/2 dn2/+1 “ “ dn Sort Data IS Partitioning: Data Parallelism sort( int *array, int count) //...... //...... pthread-t, thread1, thread2; “ “ pthread-create( thread1, sort, array, N/2); pthread-create( thread2, sort, array, N/2); pthread-par(2, thread1,

文档评论(0)

1亿VIP精品文档

相关文档