Commit 307f923 David Reveman
committed
1 parent 5491d4a commit 307f923 Copy full SHA for 307f923
File tree 1 file changed +18
-0
lines changed
velox/experimental/breeze/breeze/functions
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,24 @@ struct RadixSortTraits {
37
37
static ATTR T from_bit_ordered (T value);
38
38
};
39
39
40
+ // specialization for T=short
41
+ template <>
42
+ struct RadixSortTraits <short > {
43
+ static ATTR short to_bit_ordered (short value) {
44
+ return value ^ (1 << utils::Msb<short >::VALUE);
45
+ }
46
+ static ATTR short from_bit_ordered (short value) {
47
+ return value ^ (1 << utils::Msb<short >::VALUE);
48
+ }
49
+ };
50
+
51
+ // specialization for T=unsigned short
52
+ template <>
53
+ struct RadixSortTraits <unsigned short > {
54
+ static ATTR unsigned short to_bit_ordered (unsigned short value) { return value; }
55
+ static ATTR unsigned short from_bit_ordered (unsigned short value) { return value; }
56
+ };
57
+
40
58
// specialization for T=int
41
59
template <>
42
60
struct RadixSortTraits <int > {
You can’t perform that action at this time.
0 commit comments