 __global__ 
 void compute_row_partition_numbers(gdf_table<size_type> const & the_table, 
                                    const size_type num_rows,
-                                   const int_fastdiv num_partitions,
                                    const partitioner_type the_partitioner,
                                    size_type * row_partition_numbers,
                                    size_type * partition_sizes)

                                   gdf_table<size_type> & partitioned_output)
{

  // Determines how the mapping between hash value and partition number is computed
  using partitioner_type = modulo_partitioner<hash_value_type, size_type, size_type>;

  const size_type num_rows = table_to_hash.get_column_length();


    return hash_value % divisor;
  }

  const size_type divisor;
};

/* --------------------------------------------------------------------------*/
/** 
 * @Synopsis  This function determines if a number is a power of 2.
 * 
 * @Param number The number to check.
 * 
 * @Returns True if the number is a power of 2.
 */
/* ----------------------------------------------------------------------------*/
template <typename T>
bool is_power_two( T number )
{
  return (0 == (number & (number - 1)));
}

/* --------------------------------------------------------------------------*/
/** 
 * @Synopsis  Functor to map a hash value to a particular 'bin' or partition number
 * that uses bitshifts. Only works when num_partitions is a power of 2.
 *
 * For n % d, if d is a power of two, then it can be computed more efficiently via 
 * a single bitwise AND as:
 * n & (d - 1)
 */
/* ----------------------------------------------------------------------------*/
template <typename hash_value_t,
          typename size_type,
          typename output_type>
struct bitwise_partitioner
{
  bitwise_partitioner(size_type num_partitions) : divisor{(num_partitions - 1)}
  {
    assert( is_power_two(num_partitions) );
  }

  __host__ __device__
  output_type operator()(hash_value_t hash_value) const 
  {
    return hash_value & (divisor);
  }

  const size_type divisor;
};

/* --------------------------------------------------------------------------*/
