Browse Source

1. delete launch bound in ethash_cuda_miner_kernel.cu 2. re-format the for loop in keccak.cuh

cl-refactor
David Li (Engrg-Hardware 1) 8 years ago
parent
commit
2f945b2216
  1. 2
      libethash-cuda/ethash_cuda_miner_kernel.cu
  2. 9
      libethash-cuda/keccak.cuh

2
libethash-cuda/ethash_cuda_miner_kernel.cu

@ -26,7 +26,6 @@
#endif
__global__ void
//__launch_bounds__(TPB, BPSM)
ethash_search(
volatile uint32_t* g_output,
uint64_t start_nonce
@ -56,7 +55,6 @@ void run_ethash_search(
#define NODE_WORDS (64/4)
__global__ void
//__launch_bounds__(128, 7)
ethash_calculate_dag_item(uint32_t start)
{
uint32_t const node_index = start + blockIdx.x * blockDim.x + threadIdx.x;

9
libethash-cuda/keccak.cuh

@ -332,10 +332,8 @@ __device__ __forceinline__ void keccak_f1600_init(uint2* state)
/* iota: a[0,0] ^= round constant */
s[0] ^= vectorize(keccak_round_constants[23]);
for(uint32_t i=0; i<12; i++)
{
for(int i=0; i<12; ++i)
state[i] = s[i];
}
}
__device__ __forceinline__ uint64_t keccak_f1600_final(uint2* state)
@ -343,10 +341,9 @@ __device__ __forceinline__ uint64_t keccak_f1600_final(uint2* state)
uint2 s[25];
uint2 t[5], u, v;
for (uint32_t i = 0; i<12; i++)
{
for (int i = 0; i<12; ++i)
s[i] = state[i];
}
for (uint32_t i = 12; i < 25; i++)
{
s[i] = make_uint2(0, 0);

Loading…
Cancel
Save