Permalink
Browse files

use async memcpy

1 parent a8cdf22 commit 8629a71303c57d04b721fc0b80d61a13b5070499 @KlausT committed Dec 6, 2016
Showing with 4 additions and 4 deletions.
  1. +4 −4 neoscrypt/cuda_neoscrypt.cu
@@ -1489,10 +1489,10 @@ __host__ void neoscrypt_setBlockTarget(uint32_t* pdata, const void *target)
Blake2Shost(input, key);
- cudaMemcpyToSymbol(pTarget, target, 8 * sizeof(uint32_t), 0, cudaMemcpyHostToDevice);
- cudaMemcpyToSymbol(input_init, input, 16 * sizeof(uint32_t), 0, cudaMemcpyHostToDevice);
- cudaMemcpyToSymbol(key_init, key, 16 * sizeof(uint32_t), 0, cudaMemcpyHostToDevice);
+ cudaMemcpyToSymbolAsync(pTarget, target, 8 * sizeof(uint32_t), 0, cudaMemcpyHostToDevice, stream[1]);
+ cudaMemcpyToSymbolAsync(input_init, input, 16 * sizeof(uint32_t), 0, cudaMemcpyHostToDevice, stream[0]);
+ cudaMemcpyToSymbolAsync(key_init, key, 16 * sizeof(uint32_t), 0, cudaMemcpyHostToDevice, stream[1]);
- cudaMemcpyToSymbol(c_data, PaddedMessage, 64 * sizeof(uint32_t), 0, cudaMemcpyHostToDevice);
+ cudaMemcpyToSymbolAsync(c_data, PaddedMessage, 64 * sizeof(uint32_t), 0, cudaMemcpyHostToDevice, stream[0]);
CUDA_SAFE_CALL(cudaGetLastError());
}

0 comments on commit 8629a71

Please sign in to comment.