Decrease threshold to use GPU

This commit is contained in:
Yutaka Sawada
2023-09-30 18:44:34 +09:00
committed by GitHub
parent 323a53d808
commit aeb8913a58
2 changed files with 8 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
// par2_cmd.c
// Copyright : 2023-09-18 Yutaka Sawada
// Copyright : 2023-09-28 Yutaka Sawada
// License : GPL
#ifndef _UNICODE
@@ -1507,6 +1507,9 @@ ri= switch_set & 0x00040000
k = ((cpu_num & 0x00FF0000) >> 16) - 1;
} else if (k == 255){ // 物理コア数より増やす
k = ((cpu_num & 0x00FF0000) >> 16) + 1;
//k = cpu_num >> 16;
//k = ((k & 0xFF) + (k >> 8)) / 2; // 物理コア数と論理コア数の中間にする?
// タスクマネージャーにおける CPU使用率は 100%になるけど、速くはならない・・・
}
if (k > MAX_CPU){
k = MAX_CPU;

View File

@@ -1,5 +1,5 @@
// reedsolomon.c
// Copyright : 2023-09-23 Yutaka Sawada
// Copyright : 2023-09-28 Yutaka Sawada
// License : GPL
#ifndef _UNICODE
@@ -30,20 +30,13 @@
// GPU を使う最小データサイズ (MB 単位)
// GPU の起動には時間がかかるので、データが小さすぎると逆に遅くなる
#define GPU_DATA_LIMIT 512
#define GPU_DATA_LIMIT 200
// GPU を使う最小ブロックサイズとブロック数
// CPU と GPU で処理を割り振る為には、ある程度のブロック数を必要とする
#define GPU_BLOCK_SIZE_LIMIT 65536
#define GPU_SOURCE_COUNT_LIMIT 256
#define GPU_PARITY_COUNT_LIMIT 32
/*
#define GPU_DATA_LIMIT 1
#define GPU_BLOCK_SIZE_LIMIT 32768
#define GPU_SOURCE_COUNT_LIMIT 16
#define GPU_PARITY_COUNT_LIMIT 4
*/
#define GPU_SOURCE_COUNT_LIMIT 192
#define GPU_PARITY_COUNT_LIMIT 8
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */