diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2018-01-19 20:08:49 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2018-01-19 20:08:49 +0300 |
commit | f1033ac281878ce049aa9afccf530264e73c2b36 (patch) | |
tree | f906e8c8ac04850548ce4f8cfd584085e3586cce | |
parent | 79de7a566eff6b8d374fb62d764892a1854dc444 (diff) |
topup whenn half empty
-rw-r--r-- | src/amun/gpu/decoder/encoder_decoder.cu | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/amun/gpu/decoder/encoder_decoder.cu b/src/amun/gpu/decoder/encoder_decoder.cu index 444fb701..6bf85ffc 100644 --- a/src/amun/gpu/decoder/encoder_decoder.cu +++ b/src/amun/gpu/decoder/encoder_decoder.cu @@ -426,9 +426,8 @@ void EncoderDecoder::AssembleBeamStateTopup(const Histories& histories, unsigned EncoderDecoder::SentencesToGet(const Histories& histories) { ///* - if (histories.NumActive() < 256) { - unsigned ret1 = histories.NumInactive(); - return ret1; + if (histories.size() < 8 || histories.NumActive() < histories.size() / 2) { + return histories.NumInactive(); } else { return 0; |