This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parallel.For(0, 200, i=> | |
{ | |
result[i] = 0; | |
for(int j = 0; j<200; j++) | |
{ | |
result[i] += Math.Sqrt(Math.Sin(i + j)); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# カレントディレクトリに移動 | |
cd "対象ディレクトリ"; | |
# 各ファイルに対して操作 | |
Get-ChildItem | ForEach-Object | |
{ | |
# ファイル名を'-'で区切ってみたり | |
$data = $_.Name.Split('-'); | |
# ファイル名が"H"で始まってたら除外したり |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
// 2次元ベクトルCPU | |
void Length2() | |
{ | |
// 要素数 | |
const int N = 5; | |
// x, y方向成分 | |
double x[N] = {0, 1, 2, 3, 4}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/aokomoriuta/StudiesOfOpenCLWithCloo/tree/master/VectorAddition/UseHostPointer の倍精度の結果 | |
単精度と傾向は同じ。 | |
ただしやはり加速率は倍精度のほうが上。 | |
= ベクトル加算の試験 = | |
ホストポインタの使用有無での比較 | |
プラットフォーム:NVIDIA CUDA (OpenCL 1.1 CUDA 4.1.1) | |
デバイス数:2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/aokomoriuta/StudiesOfOpenCLWithCloo/tree/master/VectorAddition/MultiGpu の倍精度版。 | |
倍精度にすると更に速い(単一CPUに比べてx6)。 | |
あれ?倍精度演算のほうが計算速度遅いんじゃないの、と思ったが、たぶんメモリ律速のせい。 | |
= ベクトル加算の試験 = | |
複数GPUを使う | |
プラットフォーム:NVIDIA CUDA (OpenCL 1.1 CUDA 4.1.1) | |
デバイス数:2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/aokomoriuta/StudiesOfOpenCLWithCloo/tree/master/VectorAddition/HeavyWorkItem の倍精度での結果。 | |
単精度と同じでした(処理量変えても早くならない)。 | |
= ベクトル加算の試験 = | |
1ワークアイテムの処理量を変えてみる | |
プラットフォーム:NVIDIA CUDA (OpenCL 1.1 CUDA 4.1.1) | |
デバイス数:2 | |
* GeForce GTX 295 (NVIDIA Corporation) | |
* GeForce GTX 295 (NVIDIA Corporation) |
NewerOlder