Program Listing for File options.hpp

Return to documentation for file (SeQuant/core/optimize/options.hpp)

#ifndef SEQUANT_CORE_OPTIMIZE_OPTIONS_HPP
#define SEQUANT_CORE_OPTIMIZE_OPTIONS_HPP

#include <cstddef>
#include <functional>

namespace sequant {

class Index;

enum class OptFor { Flops, Memsize };

enum class ReorderSum { Reorder, NoReorder };

enum class SubnetCSE { Enable, Disable };

using index_to_extent_t = std::function<std::size_t(Index const&)>;

struct OptimizeOptions {
  OptFor opt_for = OptFor::Flops;

  ReorderSum reorder = ReorderSum::Reorder;

  SubnetCSE subnet_cse = SubnetCSE::Disable;

  index_to_extent_t idx_to_extent = {};
};

}  // namespace sequant

#endif  // SEQUANT_CORE_OPTIMIZE_OPTIONS_HPP