找回密码
 FreeOZ用户注册
查看: 1613|回复: 2
打印 上一主题 下一主题

[业界新闻] Cilk++的作者加入Intel, 整个Cilk++技术和开发团队当作见面礼一起送给了Intel

[复制链接]
跳转到指定楼层
1#
发表于 3-8-2009 15:38:17 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?FreeOZ用户注册

x
Cilk Arts, developer of the Cilk++platform which lets C++ developers more easily exploit multicoreprocessors, has joined Intel. Intel acquired the entire developmentteam and all of Cilk Arts products and technology.

According to Intel's James Reinders, Cilk technology willcomplement tools such as OpenMP and Intel Threading Building Blocks.Over the coming weeks, Cilk++ will be integrated into Intel paralleltools like Intel Parallel Studio.

Cilk technology offers parallel extensions that are tightly tiedinto a compiler. This has pluses and minuses when compared withcompiler independent methods like Intel Threading Building Blocks.Having both is better than either alone, and both will have strongfollowings.

The Cilk++ cross-platform solution lets developers maximize applicationperformance on multicore processors by providing a set of extensionsfor C++, coupled with a runtime system for multicore-enabledapplications. Cilk++ enables rapid development, testing, and deploymentof high-performance multicore applications.

Cilk++ addresses two large problems:

  • Enabling programmers to develop multithreaded (or parallel) applications; and
  • Providing a smooth path to multicore for legacy applicationsthat otherwise cannot easily leverage the performance capabilities ofmulticore processors.

With Cilk++, developers can retain the serial semantics ofexisting applications, use existing serial methodologies forprogramming, tooling, debugging, and regression testing.

不知道Cilk++为何物的可以从下面的代码得到感性认识:
  1. 1  // -*- Cilk++ -*-
  2. 2
  3. 3  // A demonstration of a Cilk for-loop.
  4. 4
  5. 5  #include <iostream>
  6. 6  #include <cstdlib>
  7. 7  #include <ctime>

  8. 8  #include <windows.h>
  9. 9  #include <cilk.h>
  10. 10  
  11. 11  int dowork(int i)
  12. 12  {
  13. 13      // Waste time:
  14. 14      volatile int j = 0;
  15. 15      for (j = 0; j < 50000; ++j)
  16. 16          ;
  17. 17  
  18. 18      return i;
  19. 19  }
  20. 20  
  21. 21  int cilk_main(int argc, char *argv[])
  22. 22  {
  23. 23      int n = 100000;
  24. 24      if (argc > 1)
  25. 25          n = std::atoi(argv[1]);
  26. 26  
  27. 27      int *a = new int[n];
  28. 28      for (int j = 0; j < n; ++j)
  29. 29          a[j] = j;
  30. 30  
  31. 30      std::cout << "Iterating over " << n << " integers" << std::endl;
  32. 32      int = GetTickCount();
  33. 33  

  34. 34      cilk_for (int i = 0; i < n; ++i)
  35. 35          dowork(a[i]);
  36. 36  
  37. 37      int t2 = GetTickCount();
  38. 38      std::cout << (t2-t1)/1000 << "." << (t2-t1)%1000 << " seconds" << std::endl;
  39. 39  
  40. 40      return 0;
  41. 41  }
复制代码
回复  

使用道具 举报

2#
发表于 3-8-2009 17:27:51 | 只看该作者
多核优化的那个?
不了解,感觉很深奥...
回复  

使用道具 举报

3#
 楼主| 发表于 3-8-2009 17:30:55 | 只看该作者
再对C++的并行扩展方面cilk不走OpenMP这样的标准路线,但是却是实现的比较优雅的一个。OpenMP虽然受到大厂商支持,还有相应的国际标准,不过的确是丑陋得有些过分。
回复  

使用道具 举报

您需要登录后才可以回帖 登录 | FreeOZ用户注册

本版积分规则

小黑屋|手机版|Archiver|FreeOZ论坛

GMT+11, 5-3-2025 13:35 , Processed in 0.029846 second(s), 18 queries , Gzip On, Redis On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表