Skip to content

Commit

Permalink
lyra2: Translate japanese comments into english (tpruvot#40)
Browse files Browse the repository at this point in the history
* Revert "lyra2: fix compilation on japanese windows (tpruvot#38)"

This reverts commit 30db7d2.

* Restore comments removed in tpruvot#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
  • Loading branch information
hakemimi authored and tpruvot committed Jan 10, 2018
1 parent 30db7d2 commit 50781f0
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 24 deletions.
8 changes: 5 additions & 3 deletions lyra2/cuda_lyra2.cu
Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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);
Expand Down
10 changes: 6 additions & 4 deletions lyra2/cuda_lyra2Z.cu
Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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);
Expand Down
18 changes: 9 additions & 9 deletions lyra2/cuda_lyra2Z_sm5.cuh
Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down
16 changes: 8 additions & 8 deletions lyra2/cuda_lyra2_sm5.cuh
Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit 50781f0

Please sign in to comment.