Help us understand the problem. What is going on with this article?

ライフゲームをOpenMP, CUDAで実装したときのベンチマーク

More than 1 year has passed since last update.

比較内容

ライフゲームを、C++, OpenMP, CUDAを使用して実装した時のベンチマークです。描画にはOpenGLを使用しました。参考としてJavaScriptを使用したときの数値も載せていますが、アルゴリズムが異なるので参考程度です。

CUDA最適化内容

  • メモリ配置 (pinned memory)
  • Shared Memory
  • Stream (パイプライン化)
  • メモリコピー回数の削減

実行環境

  • Core i7-6400 @3.4GHz
    • 4 cores (8 logical cores)
  • GeForce GTX 1070 @1.531GHz
    • 1920 CUDA Cores
    • 15 SMs
    • 256GByte/s (256 bit x 8Gbps)

結果

Generation Per Second (この数字が大きいほど高速)

Size 512 x 512 1024 x 1024 2048 x 2048 4096 x 4096 8192 x 8192
JavaScript 34 9 2.6 0.63 0
C++ 500 83 19 5.35 1.2
OpenMP 1000 250 66 19.61 4.5
CUDA 1000 1000 250 76.92 18.18
CUDA + Optimization 1000 1000 1000 125 43.48

縦軸は対数です。
image.png

ソースコードと実行結果ビデオ

Youtube Link to Youtube
https://github.com/take-iwiw/LifeGameFast

iwatake2222
クソコード、放置するのも、同罪です (自分への戒め)
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした