diff options
author | Tomasz Dwojak <t.dwojak@amu.edu.pl> | 2017-03-09 14:54:33 +0300 |
---|---|---|
committer | Tomasz Dwojak <t.dwojak@amu.edu.pl> | 2017-03-09 14:54:33 +0300 |
commit | 359ec7bd9860dc41d10d1de008d1b37605c125df (patch) | |
tree | f55555c53287fa43598a1780530ffdd71deef89c /src | |
parent | eda37f3548786b14865abd21f096e3af1f955619 (diff) |
Fix again nth_element
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/mblas/nth_element.cu | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpu/mblas/nth_element.cu b/src/gpu/mblas/nth_element.cu index 8cce38c0..8e13e828 100644 --- a/src/gpu/mblas/nth_element.cu +++ b/src/gpu/mblas/nth_element.cu @@ -254,7 +254,7 @@ __global__ void gGetValueByKey(float* d_in, float* d_out, int* indeces, int n) NthElement::NthElement(size_t maxBeamSize, size_t maxBatchSize, cudaStream_t& stream) : stream_(stream), - NUM_BLOCKS(std::max(500, int(maxBeamSize * 85000 / (2 * BLOCK_SIZE)) + int(maxBeamSize * 85000 % (2 * BLOCK_SIZE) != 0))) + NUM_BLOCKS(std::min(500, int(maxBeamSize * 85000 / (2 * BLOCK_SIZE)) + int(maxBeamSize * 85000 % (2 * BLOCK_SIZE) != 0))) { HANDLE_ERROR( cudaMalloc((void**)&d_ind, maxBatchSize * NUM_BLOCKS * sizeof(int)) ); |