Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Commit 6a18e8b

Browse files
committed
Addressed feedback on review for improved shuffle
1 parent 7cb68d7 commit 6a18e8b

File tree

4 files changed

+1
-255
lines changed

4 files changed

+1
-255
lines changed

internal/benchmark/bench.cu

-2
Original file line numberDiff line numberDiff line change
@@ -992,15 +992,13 @@ void run_core_primitives_experiments_for_type()
992992
, RegularTrials
993993
>::run_experiment();
994994

995-
#if THRUST_CPP_DIALECT >= 2011
996995
experiment_driver<
997996
shuffle_tester
998997
, ElementMetaType
999998
, Elements / sizeof(typename ElementMetaType::type)
1000999
, BaselineTrials
10011000
, RegularTrials
10021001
>::run_experiment();
1003-
#endif
10041002
}
10051003

10061004
///////////////////////////////////////////////////////////////////////////////

testing/shuffle.cu

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include <thrust/detail/config.h>
22

3-
#if THRUST_CPP_DIALECT >= 2011
43
#include <map>
54
#include <limits>
65
#include <thrust/random.h>
@@ -601,4 +600,3 @@ void TestShuffleEvenDistribution() {
601600
}
602601
}
603602
DECLARE_INTEGRAL_VECTOR_UNITTEST(TestShuffleEvenDistribution);
604-
#endif

testing/shuffle_mmd.cu

-250
This file was deleted.

thrust/system/detail/generic/shuffle.inl

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class feistel_bijection {
8383

8484
// Find the nearest power of two
8585
constexpr static __host__ __device__ std::uint64_t get_cipher_bits(std::uint64_t m) {
86-
if (m == 0) return 0;
86+
if (m <= 16) return 4;
8787
std::uint64_t i = 0;
8888
m--;
8989
while (m != 0) {

0 commit comments

Comments
 (0)