  */
 namespace grid {
 
-template<architecture_t GUNROCK_CUDA_ARCH,
-         unsigned _LOG_ACTIVE_THREADS, // Number of threads placing a lane
-                                       // partial (i.e., the number of partials
-                                       // per lane)
-         unsigned _LOG_SCAN_LANES,     // Number of scan lanes
-         unsigned _LOG_RAKING_THREADS, // Number of threads used for raking
-                                       // (typically 1 warp)
-         bool _DEPENDENT_LANES, // If there are prefix dependences between lanes
-                                // (i.e., downsweeping will incorporate
-                                // aggregates from previous lanes)
-         typename raking_value_t // Type of items we will be reducing/scanning
-         >
-struct rake
+/**
+ * @brief
+ *
+ * @tparam GUNROCK_CUDA_ARCH
+ * @tparam _LOG_ACTIVE_THREADS Number of threads placing a lane partial (i.e.,
+ * the number of partials per lane)
+ * @tparam _LOG_SCAN_LANES Number of scan lanes
+ * @tparam _LOG_RAKING_THREADS Number of threads used for raking (typically 1
+ * warp)
+ * @tparam _DEPENDENT_LANES If there are prefix dependences between lanes (i.e.,
+ * downsweeping will incorporate aggregates from previous lanes)
+ * @tparam reducing/scanning Type of items we will be reducing/scanning
+ */
+template<
+  // architecture_t GUNROCK_CUDA_ARCH,
+  unsigned _LOG_ACTIVE_THREADS,
+  unsigned _LOG_SCAN_LANES,
+  unsigned _LOG_RAKING_THREADS,
+  bool _DEPENDENT_LANES,
+  typename raking_value_t>
+struct raking
 {
   // Type of items we will be reducing/scanning
   typedef raking_value_t value_t;

   * both evaluation targets as local const expressions
   * @todo verify if the bug still exists, if not, remove this enum
   * representation.
   */

  enum
  {
    // Number of scan lanes
    log_scan_lanes = _LOG_SCAN_LANES,
    scan_lanes = 1 << log_scan_lanes,

    // Number of partials per lange
    log_partials_per_lane = _LOG_ACTIVE_THREADS,
    partials_per_lane = 1 << log_partials_per_lane,

    // Number of raking threads
    log_raking_threads = _LOG_RAKING_THREADS,
    raking_threads = 1 << log_raking_threads,

    // Number of raking threads per lane
    log_raking_threads_per_lane =
      log_raking_threads - log_scan_lanes, // must be positive!
    raking_threads_per_lane = 1 << log_raking_threads_per_lane,

    // Partials to be raked per raking thread
    log_partials_per_segment =
      log_partials_per_lane - log_raking_threads_per_lane,
    partials_per_segment = 1 << log_partials_per_segment,

    // Number of partials that we can put in one stripe across the shared memory
    // banks
    log_partials_per_bank_array =
      util::math::log2(util::properties::shared_memory_banks()) +
      util::math::log2(util::properties::shared_memory_bank_stride()) -
      util::math::log2(sizeof(value_t)),
    partials_per_bank_array = 1 << log_partials_per_bank_array,

    log_segments_per_bank_array =
      util::limits::max(0,
                        log_partials_per_bank_array - log_partials_per_segment),
    segments_per_bank_array = 1 << log_segments_per_bank_array,

    // Whether or not one warp of raking threads can rake entirely in one stripe
    // across the shared memory banks
    no_padding =
      (log_segments_per_bank_array >=
       util::math::log2(util::properties::maximum_threads_per_warp())),

    // Number of raking segments we can have without padding (i.e., a "row")
    log_segments_per_row =
      (no_padding) ? log_raking_threads : // All raking threads (segments)
        util::limits::min(
          log_raking_threads_per_lane,
          log_segments_per_bank_array), // Up to as many segments per lane (all
                                        // lanes must have same amount of
                                        // padding to have constant lane stride)

    segments_per_row = 1 << log_segments_per_row,

    // Number of partials per row
    log_partials_per_row = log_segments_per_row + log_partials_per_segment,
    partials_per_row = 1 << log_partials_per_row,

    // Number of partials that we must use to "pad out" one memory bank
    log_bank_padding_partials = util::limits::max(
      0,
      util::math::log2(util::properties::shared_memory_bank_stride()) -
        util::math::log2(sizeof(value_t))),
    bank_padding_partials = 1 << log_bank_padding_partials,

    // Number of partials that we must use to "pad out" a lane to one memory
    // bank
    lane_padding_partials =
      util::limits::max(0, partials_per_bank_array - partials_per_lane),

    // Number of partials (including padding) per "row"
    padded_partials_per_row =
      (no_padding)
        ? partials_per_row
        : partials_per_row + lane_padding_partials + bank_padding_partials,

    // Number of rows in a grid
    log_rows = log_raking_threads - log_segments_per_row,
    rows = 1 << log_rows,

    // Number of rows per lane (always at least one)
    log_rows_per_lane =
      util::limits::max(0, log_raking_threads_per_lane - log_segments_per_row),
    rows_per_lane = 1 << log_rows_per_lane,

    // Padded stride between lanes (in partials)
    lane_stride = (no_padding) ? partials_per_lane
                               : rows_per_lane * padded_partials_per_row,

    // Number of elements needed to back this level of the raking grid
    raking_elements = rows * padded_partials_per_row,
  }; // enum
};

} // namespace grid

} // namespace device
} // namespace raking


 */

#pragma once
#include <gunrock/util/device_properties.hxx>
#include <gunrock/util/limits.hxx>
#include <gunrock/util/meta.hxx>
#include <gunrock/util/numeric_traits.hxx>
