         
       output_offset = cub::ShuffleIndex(output_offset, 0, warp_size, activemask);
 
-      for ( int shared_out_idx = lane_id; shared_out_idx<current_idx_shared[warp_id]; shared_out_idx+=num_threads ) {
+      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;
-        if (thread_offset < max_size) {
+        if (thread_offset < max_size) 
+        {
           output_l[thread_offset] = join_shared_l[warp_id][shared_out_idx];
           output_r[thread_offset] = join_shared_r[warp_id][shared_out_idx];
         }


  output_index_type probe_row_index = threadIdx.x + blockIdx.x * blockDim.x;

// For left-joins, always add an output even if the probe row is Null
const bool predicate = (JoinType::LEFT_JOIN || probe_table.is_row_valid(probe_row_index)) 
                        && (probe_row_index < probe_table_num_rows);             

#if defined(CUDA_VERSION) && CUDA_VERSION >= 9000
  const unsigned int activemask = __ballot_sync(0xffffffff, predicate );
#endif
  if ( predicate ) {
        
    const auto unused_key = multi_map->get_unused_key();
    const auto end = multi_map->end();  
    auto found = multi_map->end();    
    // Only probe the hash table if the row is valid
    hash_value_type probe_row_hash_value{0};
    if(probe_table.is_row_valid(probe_row_index))
    {
      // Search the hash map for the hash value of the probe row
      probe_row_hash_value = probe_table.hash_row(probe_row_index)};
      found = multi_map->find(probe_row_hash_value,
                                   true,
                                   probe_row_hash_value);


  size_type probe_row_index = threadIdx.x + blockIdx.x * blockDim.x;

#if defined(CUDA_VERSION) && CUDA_VERSION >= 9000
  const unsigned int activemask = __ballot_sync(0xffffffff, probe_row_index < probe_table_num_rows);
#endif
  if ( probe_row_index < probe_table_num_rows ) {
    const auto unused_key = multi_map->get_unused_key();
    const auto end = multi_map->end();
    auto found = end;

    // Search the hash map for the hash value of the probe row using the row's
    // hash value to determine the location where to search for the row in the hash map
    // Only probe the hash table if the probe row is valid
    hash_value_type probe_row_hash_value{0};
    if(probe_table.is_row_valid(probe_row_index))
    {
      // Search the hash map for the hash value of the probe row
      probe_row_hash_value = probe_table.hash_row(probe_row_index);
      found = multi_map->find(probe_row_hash_value,
                              true,
                              probe_row_hash_value);
    }

    // for left-joins we always need to add an output
