Quansight / pearu-sandbox

Pearu's sandbox
BSD 3-Clause "New" or "Revised" License
5 stars 1 forks source link

cub 1.8 changed API #1

Closed pearu closed 5 years ago

pearu commented 6 years ago

For some reasons libgdf/thirdparty/cub got updated to cub 1.8 (or newer) and that broke building libgdf. As a fix, apply the following patch

diff --git a/libgdf/src/hash-join/join_kernels.cuh b/libgdf/src/hash-join/join_kernels.cuh
index 50fd9e6..6144c80 100644
--- a/libgdf/src/hash-join/join_kernels.cuh
+++ b/libgdf/src/hash-join/join_kernels.cuh
@@ -148,7 +148,7 @@ __global__ void probe_hash_tbl(
                 unsigned long long int output_offset = 0;
                 if ( 0 == lane_id )
                     output_offset = atomicAdd( current_idx, current_idx_shared[warp_id] );
-                output_offset = cub::ShuffleIndex(output_offset, 0, warp_size, activemask);
+                output_offset = cub::ShuffleIndex<warp_size>(output_offset, 0, activemask);

                 for ( int shared_out_idx = lane_id; shared_out_idx<current_idx_shared[warp_id]; shared_out_idx+=num_threads ) {
                     joined[output_offset+shared_out_idx] = joined_shared[warp_id][shared_out_idx];
@@ -174,7 +174,7 @@ __global__ void probe_hash_tbl(
             unsigned long long int output_offset = 0;
             if ( 0 == lane_id )
                 output_offset = atomicAdd( current_idx, current_idx_shared[warp_id] );
-            output_offset = cub::ShuffleIndex(output_offset, 0, warp_size, activemask);
+            output_offset = cub::ShuffleIndex<warp_size>(output_offset, 0, activemask);

             for ( int shared_out_idx = lane_id; shared_out_idx<current_idx_shared[warp_id]; shared_out_idx+=num_threads ) {
                 size_type thread_offset = output_offset + shared_out_idx;