'Cilk'에 해당되는 글 2

  1. 2009/08/06 My Recent Tweets 20090806
  2. 2009/07/21 두가지 C++ 차세대 병렬 플랫폼 간단 비교 (1)

My Recent Tweets 20090806

  • profile_image RT ujeani: RT urpurple: 엄청난 각종 전문서적 원서 e-book이 가득한 곳 http://knowfree.net 내 취향을 분석해주는 사이트 http://www.idsolution.co.kr/ 저보고 아방가르드취향이라는 군요. #
    • 또다른 공짜 이북 소개 사이트
  • profile_image RT nvidiadeveloper: Slides for "Efficient Substitutes for Subdivision Surfaces" is now available! http://is.gd/23HLQ #siggraph #
    • 엔비디아시그래프 2009 세션 정보 및 자료를 구할 수 있는 페이지
  • profile_image RT sioum: 수학노트라는 훌륭한 사이트 발견! pythagoras0님 대단하십니다 RT pythagoras0:puzzlist http://pythagoras0.springnote.com/ 에 가입하시면 써포트 해드리겠습니다 ㅋㅋㅋ #
    • 수학을 좋아하셨거나 좋아하시고 싶은 분들에게 유용할 위키 사이트
  • profile_image VSBuildStatusAddin display the status of a build/clean/deploy operation: http://su.pr/5RxOgw #
    • 비주얼스튜디오에서 빌드 진행 상태를 깔끔하게 보여주는 add-in
  • profile_image RT mike_acton: Roundup: Recent sketches on concurrency, data design and performance. http://post.ly/1u4J #
    • Insomniac Games에서 일하는 마이크의 영감을 주는 concurrency 관련 슬라이드들
  • profile_image RT KageKirin: "OpenGL 3.2 and GLSL 1.5 released at Siggraph!" - http://ping.fm/q4S7c #gl #programming #
    • 이번 시그래프에서 OpenGL 3.2GLSL 1.5가 발표되었답니다!
  • profile_image RT nvidiadeveloper: We've announced the launch of the NVIDIA Application Acceleration Engines, including Optix http://is.gd/22hNa #
    • 엔비디아도 이번 시그래프에서 실시간 광선추적 엔진을 비롯한 응용프로그램 가속 엔진들을 발표했습니다.
  • profile_image RT bjoernknafla: RT JamesReinders:Intel Threading Building Blocks, new version 2.2, appeals to C++ and C programmers http://tr.im/vrAi #
    • 인텔 TBB도 2.2 버전이 나오면서 C++0x의 람다도 지원하고 Cilk와 유사한 런타임 엔진을 제공한다는군요. 인텔이 Cilk++를 사들인 것과 무관하지 않은듯. 앞으로 더욱 기대가 되는군요!
  • profile_image RT unclebobmartin: http://bit.ly/127rtT Interview with Barbara Liskov. #
  • profile_image RT SoftTalkBlog: Some parallel programming locking strategies that can speed up programs while avoiding data races: http://bit.ly/WTPyc #
    • 병렬 프로그래밍에서의 locking 전략에 관한 팁들
  • profile_image RT programmingjoy: Lua bitstring parsing and creation library based on Erlang bit syntax #programming http://bit.ly/rMzwl #
    • 루아 비트열 파싱 및 생성 라이브러리
  • profile_image RT programmingjoy: C++ vs Java vs Python vs Ruby : a first impression #programming http://bit.ly/ke1e9 #
    • C++/Java/Python/Ruby 언어의 간단 비교
  • profile_image RT programmingjoy: The Scheme Programming Language, 4th Edition, now available #programming http://bit.ly/A8Atw #
  • profile_image RT programmingjoy: List of freely available programming books #programming http://bit.ly/vLVD6 #
    • 역시 프로그래밍 관련 공짜 이북
  • profile_image Ask.C++: Looking for references on coding for optimization on x86 architectures http://su.pr/7ApBEq #
    • 최적화 관련 도움을 주는 링크들
  • profile_image RT programmingjoy: Engineers are artists too. Reply to Merlin Mann on "engineering block" #programming http://bit.ly/zhLa7 #
    • 엔지니어도 아티스트다!
  • profile_image RT KageKirin: "rsizr" - seamless image resizing - http://rsizr.com/ #
    • 이미지를 깔끔하게 리사이징해주는 웹 도구
  • profile_image RT insic: 50 Eye-Popping Examples of Concept Art | Webdesigner Depot http://bit.ly/38FMvS #
    • 50가지 멋진 원화
  • profile_image RT mike_acton: Cool! Handy regex cheat sheet. RT FrankSansC http://bit.ly/zg9LV #
    • 아주 유용한 정규표현식 컨닝페이퍼
  • profile_image RT programmingjoy: Probably the hardest (answerable) logic question ever. #programming http://bit.ly/I95qJ #
    • 골때리는(?) 퀴즈 문제
  • profile_image RT programmingjoy: Don?t use standard library/CRT functions in static initializers/DllMain! #programming http://bit.ly/z9Wmt #
    • 정적 초기자 및 DllMain에서 표준 라이브러리/CRT 함수를 쓸 경우의 문제점
  • profile_image RT KageKirin: "Unigine" - http://unigine.com/ #programming #opengl #
    • 또다른 실시간 3D 엔진
  • profile_image RT programmingjoy: Sony Pictures Imageworks - Open Source #programming http://bit.ly/17z5As #
    • 소니 픽쳐스 이미지웍스오픈 소스 페이지
  • profile_image RT programmingjoy: Programming Praxis: Josephus' Circle #programming http://bit.ly/D0vt3 #
    • 풀어볼만한 프로그래밍 퀴즈
  • profile_image RT programmingjoy: How Bad Design Patterns Ruin Good Programmers #programming http://bit.ly/3oAoK #
    • 디자인패턴이 좋은 것만은 아니다!?
  • profile_image RT SoftTalkBlog: Two parallel programming debugging tools compared: Intel Thread Checker and Intel Parallel Inspector. http://bit.ly/iwrp1 #
    • 인텔에서 만든 두가지 병렬 프로그래밍 디버깅 도구의 간단 비교
  • profile_image RT programmingjoy: RethinkDB - The database for solid state drives. #programming http://bit.ly/ENVTG #
    • 이런 것도 나오네요. SSD를 위한 데이터베이스입니다.
  • profile_image The Passionate Programmer: Creating a Remarkable Career in Software Development (a book): http://su.pr/6w2YAH #
    • 구입예정인 책
  • profile_image RT programmingjoy: The Haskell Cheatsheet #programming http://bit.ly/8ICjH #
    • Haskell 컨닝페이퍼
  • profile_image RT programmingjoy: Can Agile development work for a team of experts? Doesn't look like it... #programming http://bit.ly/BBVs8 #
    • 애자일 개발이 전문가로 구성된 팀에 적절한가?
  • profile_image Pro Git - professional version control (A book about git now online): http://su.pr/2exnde #
    • 분산버전관리시스템 Git 온라인 서적
  • profile_image Intel Advanced Graphics Lab papers: http://su.pr/9aXwmJ #
    • 인텔 고급 그래픽스 연구실 논문들
  • profile_image Morphological Antialiasing: http://su.pr/2UTEKS #
    • 최근 발표된 새로운 안티알리아싱 기법 논문
  • profile_image RT programmingjoy: Statistics of two years of blogging about programming #programming http://bit.ly/5uByY #
    • 구글 엔지니어인듯한 한 친구의 블로그

* 이 포스트는 blogkorea [블코채널 : 웹, 컴퓨터, it에 관련된 유용한 정보 및 소식] 에 링크 되어있습니다.


크리에이티브 커먼즈 라이선스
Creative Commons License

'Tweets' 카테고리의 다른 글

My Recent Tweets 20090826  (0) 2009/08/26
My Recent Tweets 20090812  (0) 2009/08/13
My Recent Tweets 20090806  (0) 2009/08/06
My Recent Tweets 20090727  (0) 2009/07/27
My Recent Tweets 20090715  (0) 2009/07/15
My Recent Tweets 20090705  (0) 2009/07/06
Trackback 0 Comment 0

두가지 C++ 차세대 병렬 플랫폼 간단 비교

C++0x의 기본적인 병렬 지원 강화와 함께 여러 병렬 플랫폼이 대두되고 있습니다. OpenMP(얼마 전 3.0 스펙이 나왔죠), 인텔의 TBB(Threading Building Blocks), VS 2010과 함께 등장할 PPL(Parallel Patterns Library) 및 AAL(Asynchronous Agents Library), MIT 스핀오프인 Cilk++(상용) 등이 그것입니다.


제가 일원으로 참여하고 있는 Visual Studio Team System 2010 공식 팀 블로그에 며칠 전 PPL을 이용한 피보나치 수 병렬 계산에 대한 글을 올렸습니다. 근데 그 후 Cilk++ 1.1.0 베타 버전이 출시되었다는 소식을 들었습니다. 그래서 한 번 받아서 테스트 해보았습니다.



코드의 전반적인 구성에 대한 설명은 팀블로그 글을 참고해주세요. 기본적으로 거기의 예제 코드에서 메모리 관련 테스트를 빼고 병렬 버전의 함수를 PPL이 아닌 Cilk++을 사용토록 수정한 것입니다. cilk_spawn이 PPL 코드의 tasks.run() 함수에 해당하고, cilk_sync가 tasks.wait() 함수에 해당한다고 보면 됩니다.

일단 순차 버전과의 실제 코드 차이가 PPL 버전 보다 더욱 좁혀졌습니다. 몇가지 키워드가 추가된 것 말고는 완전히 동일하죠. 라이브러리 형태로 태스크 개념을 지원하는 PPL과 달리, Cilk++는 언어 확장 키워드(31과 33줄의 cilk_spawn, cilk_sync가 그 예)로 병렬 개념을 지원합니다. 또한 OpenMP처럼 수많은 디렉티브를 공부해야할 필요도 없습니다. 서너 개의 키워드만이 제공되기 때문이죠.

그리고 Cilk++ 키워드의 장점은 그것이 강제 사항이 아니라 권고 사항이라는 겁니다. 따라서 위에서 cilk_spawn 했다고 해서 반드시 별도 스레드로 병렬 수행되는 것이 아니라 실제 하드웨어 병렬성을 조사하여 그냥 순차 실행하는 것이 낫다고 판단할 경우 순차실행할 수도 있다는거죠.

어쨌든 2 코어의 제 컴에서 릴리즈 빌드를 돌린 결과를 보면 다음과 같습니다.

PPL 버전:


Cilk++ 버전:


Cilk++ 버전이 병렬화를 더 잘하고 있음(1.82X > 1.51X)을 확인할 수 있습니다. 약간의 차이지만 여러번 돌려보아도 계속 비슷한 결과가 나왔습니다. PPL 버전은 VS 2010 기반이고 Cilk++ 버전은 VS 2080 기반이며, 그 밖에도 여러가지 면에서 엄정한 테스트와는 거리가 멉니다만... 그래도 어느 정도 Cilk++의 성능상 장점을 보여준다고 생각합니다(물론, PPL은 아직 정식 버전이 나온게 아니죠).

단, PPL은 VS 2010을 사면 공짜가 되겠지만, Cilk++은 상업적 용도로는 분명 유료라는 점!을 간과해서는 안되겠죠. ^^

* 이 포스트는 blogkorea [블코채널 : 웹, 컴퓨터, it에 관련된 유용한 정보 및 소식] 에 링크 되어있습니다.  


크리에이티브 커먼즈 라이선스
Creative Commons License
Trackback 0 Comment 1

top