From 50781f00ebaab95ad578c6c37a8f7f44019ac7a6 Mon Sep 17 00:00:00 2001 From: hakemimi <34901335+hakemimi@users.noreply.github.com> Date: Wed, 10 Jan 2018 20:24:50 +0900 Subject: [PATCH] lyra2: Translate japanese comments into english (#40) * Revert "lyra2: fix compilation on japanese windows (#38)" This reverts commit 30db7d2433c2df880c05ba1fba736de4c05c88cc. * Restore comments removed in #38, translate them into English The original line says "allocate XXXX bytes to adjust for X Warp." Remove the number from comment since they are trivial * Translate Japanese comments --- lyra2/cuda_lyra2.cu | 8 +++++--- lyra2/cuda_lyra2Z.cu | 10 ++++++---- lyra2/cuda_lyra2Z_sm5.cuh | 18 +++++++++--------- lyra2/cuda_lyra2_sm5.cuh | 16 ++++++++-------- 4 files changed, 28 insertions(+), 24 deletions(-) diff --git a/lyra2/cuda_lyra2.cu b/lyra2/cuda_lyra2.cu index 4d0d67c..7905d23 100644 --- a/lyra2/cuda_lyra2.cu +++ b/lyra2/cuda_lyra2.cu @@ -274,7 +274,7 @@ void reduceDuplexRowSetup(const int rowIn, const int rowInOut, const int rowOut, ST4S(rowOut, Ncol - i - 1, state1, thread, threads); - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2]; @@ -311,7 +311,7 @@ void reduceDuplexRowt(const int rowIn, const int rowInOut, const int rowOut, uin round_lyra(state); - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2]; @@ -356,7 +356,7 @@ void reduceDuplexRowt_8(const int rowInOut, uint2* state, const uint32_t thread, round_lyra(state); - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2]; @@ -555,8 +555,10 @@ void lyra2_cpu_hash_32(int thr_id, uint32_t threads, uint32_t startNounce, uint6 size_t shared_mem = 0; if (gtx750ti) + // suitable amount to adjust for 8warp shared_mem = 8192; else + // suitable amount to adjust for 10warp shared_mem = 6144; lyra2_gpu_hash_32_1_sm5 <<< grid2, block2 >>> (threads, startNounce, (uint2*)d_hash); diff --git a/lyra2/cuda_lyra2Z.cu b/lyra2/cuda_lyra2Z.cu index a5d4cab..3a7e565 100644 --- a/lyra2/cuda_lyra2Z.cu +++ b/lyra2/cuda_lyra2Z.cu @@ -510,7 +510,7 @@ void reduceDuplexRowSetup(const int rowIn, const int rowInOut, const int rowOut, ST4S(rowOut, Ncol - i - 1, state1, thread, threads); - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2]; @@ -547,7 +547,7 @@ void reduceDuplexRowt(const int rowIn, const int rowInOut, const int rowOut, uin round_lyra(state); - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2]; @@ -593,7 +593,7 @@ void reduceDuplexRowt_8(const int rowInOut, uint2* state, const uint32_t thread, round_lyra(state); - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2]; @@ -649,7 +649,7 @@ void reduceDuplexRowt_8_v2(const int rowIn, const int rowOut, const int rowInOut round_lyra(state); - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2]; @@ -950,8 +950,10 @@ uint32_t lyra2Z_cpu_hash_32(int thr_id, uint32_t threads, uint32_t startNounce, size_t shared_mem = 0; if (gtx750ti) + // suitable amount to adjust for 8warp shared_mem = 8192; else + // suitable amount to adjust for 10warp shared_mem = 6144; lyra2Z_gpu_hash_32_1_sm5 <<< grid2, block2 >>> (threads, startNounce, (uint2*)d_hash); diff --git a/lyra2/cuda_lyra2Z_sm5.cuh b/lyra2/cuda_lyra2Z_sm5.cuh index 2a3bd5d..1d8ae68 100644 --- a/lyra2/cuda_lyra2Z_sm5.cuh +++ b/lyra2/cuda_lyra2Z_sm5.cuh @@ -225,7 +225,7 @@ void reduceDuplexV5(uint2 state[4], const uint32_t thread, const uint32_t thread for (int j = 0; j < 3; j++) *(DMatrix + s2 + j*threads*blockDim.x) = state1[j] ^ state[j]; - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2]; @@ -271,7 +271,7 @@ void reduceDuplexV5(uint2 state[4], const uint32_t thread, const uint32_t thread for (int j = 0; j < 3; j++) *(DMatrix + s3 + j*threads*blockDim.x) = state1[j] ^ state[j]; - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2]; @@ -316,7 +316,7 @@ void reduceDuplexV5(uint2 state[4], const uint32_t thread, const uint32_t thread for (int j = 0; j < 3; j++) *(DMatrix + s4 + j*threads*blockDim.x) = state1[j] ^ state[j]; - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2]; @@ -360,7 +360,7 @@ void reduceDuplexV5(uint2 state[4], const uint32_t thread, const uint32_t thread for (int j = 0; j < 3; j++) *(DMatrix + s5 + j*threads*blockDim.x) = state1[j] ^ state[j]; - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2]; @@ -406,7 +406,7 @@ void reduceDuplexV5(uint2 state[4], const uint32_t thread, const uint32_t thread for (int j = 0; j < 3; j++) *(DMatrix + s6 + j*threads*blockDim.x) = state1[j] ^ state[j]; - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2]; @@ -452,7 +452,7 @@ void reduceDuplexV5(uint2 state[4], const uint32_t thread, const uint32_t thread for (int j = 0; j < 3; j++) *(DMatrix + s7 + j*threads*blockDim.x) = state1[j] ^ state[j]; - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2]; @@ -505,7 +505,7 @@ void reduceDuplexRowV50(const int rowIn, const int rowInOut, const int rowOut, u round_lyra(state); - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2]; @@ -554,7 +554,7 @@ void reduceDuplexRowV50_8(const int rowInOut, uint2 state[4], const uint32_t thr round_lyra(state); - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2]; @@ -618,7 +618,7 @@ void reduceDuplexRowV50_8_v2(const int rowIn, const int rowOut,const int rowInOu round_lyra(state); - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2]; diff --git a/lyra2/cuda_lyra2_sm5.cuh b/lyra2/cuda_lyra2_sm5.cuh index 82fd380..fc13172 100644 --- a/lyra2/cuda_lyra2_sm5.cuh +++ b/lyra2/cuda_lyra2_sm5.cuh @@ -216,7 +216,7 @@ void reduceDuplexV5(uint2 state[4], const uint32_t thread, const uint32_t thread for (int j = 0; j < 3; j++) *(DMatrix + s2 + j*threads*blockDim.x) = state1[j] ^ state[j]; - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2]; @@ -262,7 +262,7 @@ void reduceDuplexV5(uint2 state[4], const uint32_t thread, const uint32_t thread for (int j = 0; j < 3; j++) *(DMatrix + s3 + j*threads*blockDim.x) = state1[j] ^ state[j]; - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2]; @@ -307,7 +307,7 @@ void reduceDuplexV5(uint2 state[4], const uint32_t thread, const uint32_t thread for (int j = 0; j < 3; j++) *(DMatrix + s4 + j*threads*blockDim.x) = state1[j] ^ state[j]; - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2]; @@ -351,7 +351,7 @@ void reduceDuplexV5(uint2 state[4], const uint32_t thread, const uint32_t thread for (int j = 0; j < 3; j++) *(DMatrix + s5 + j*threads*blockDim.x) = state1[j] ^ state[j]; - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2]; @@ -397,7 +397,7 @@ void reduceDuplexV5(uint2 state[4], const uint32_t thread, const uint32_t thread for (int j = 0; j < 3; j++) *(DMatrix + s6 + j*threads*blockDim.x) = state1[j] ^ state[j]; - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2]; @@ -443,7 +443,7 @@ void reduceDuplexV5(uint2 state[4], const uint32_t thread, const uint32_t thread for (int j = 0; j < 3; j++) *(DMatrix + s7 + j*threads*blockDim.x) = state1[j] ^ state[j]; - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2]; @@ -496,7 +496,7 @@ void reduceDuplexRowV50(const int rowIn, const int rowInOut, const int rowOut, u round_lyra(state); - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2]; @@ -545,7 +545,7 @@ void reduceDuplexRowV50_8(const int rowInOut, uint2 state[4], const uint32_t thr round_lyra(state); - //一個手前のスレッドからデータを貰う(同時に一個先のスレッドにデータを送る) + // simultaneously receive data from preceding thread and send data to following thread uint2 Data0 = state[0]; uint2 Data1 = state[1]; uint2 Data2 = state[2];