Skip to content

Commit

Permalink
🚨 Fixed clang-tidy warnings. (#519)
Browse files Browse the repository at this point in the history
* 🚨 fix clang-tidy warnings.

* 🎨 Incorporated pre-commit fixes

* 🎨 add missing header.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
Drewniok and pre-commit-ci[bot] committed Sep 2, 2024
1 parent 5c1bac7 commit 671f9b3
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <algorithm>
#include <cassert>
#include <cmath>
#include <limits>
#include <cstdlib>
#include <random>
#include <type_traits>
#include <utility>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct design_sidb_gates_params
/**
* Selector for the different termination conditions for the SiDB gate design process.
*/
enum class termination_condition
enum class termination_condition : uint8_t
{
/**
* The design process is terminated as soon as the first valid SiDB gate design is found.
Expand All @@ -60,7 +60,7 @@ struct design_sidb_gates_params
/**
* Selector for the available design approaches.
*/
enum class design_sidb_gates_mode
enum class design_sidb_gates_mode : uint8_t
{
/**
* All gate layouts are designed exhaustively.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

#include <mockturtle/utils/stopwatch.hpp>

#include <exception>
#include <iostream>
#include <optional>
#include <utility>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace fiction
* changes in the charge state of SiDBs, including transitions from neutral to negative, negative to neutral, neutral to
* positive, and positive to neutral.
*/
enum class transition_type
enum class transition_type : uint8_t
{
/**
* SiDB is neutrally charged, but is closest to being negatively charged.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <kitty/bit_operations.hpp>
#include <kitty/dynamic_truth_table.hpp>

#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdint>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "fiction/utils/layout_utils.hpp"
#include "fiction/utils/math_utils.hpp"

#include <fmt/format.h>
#include <mockturtle/utils/stopwatch.hpp>

#include <algorithm>
Expand All @@ -20,7 +19,6 @@
#include <cstdlib>
#include <limits>
#include <mutex>
#include <numeric>
#include <random>
#include <set>
#include <thread>
Expand Down Expand Up @@ -60,7 +58,7 @@ struct displacement_robustness_domain_params
/**
* Possible modes to determine the displacement robustness domain.
*/
enum class displacement_analysis_mode
enum class displacement_analysis_mode : uint8_t
{
/**
* All possible displacements are analyzed.
Expand All @@ -75,7 +73,7 @@ struct displacement_robustness_domain_params
/**
* Specifies the allowed displacement range options for SiDB fabrication simulation.
*/
enum class dimer_displacement_policy
enum class dimer_displacement_policy : uint8_t
{
/**
* In this mode, any displacement of SiDBs must remain within the boundaries
Expand Down Expand Up @@ -346,7 +344,7 @@ class displacement_robustness_domain_impl
/**
* The logical specification of the layout.
*/
const std::vector<TT>& truth_table;
const std::vector<TT> truth_table;
/**
* Random device for obtaining seed for the random number generator.
* Provides a source of quasi-non-deterministic pseudo-random numbers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "fiction/layouts/bounding_box.hpp"
#include "fiction/technology/sidb_defect_surface.hpp"
#include "fiction/technology/sidb_defects.hpp"
#include "fiction/types.hpp"
#include "fiction/traits.hpp"
#include "fiction/utils/execution_utils.hpp"
#include "fiction/utils/layout_utils.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define FICTION_OCCUPATION_PROBABILITY_OF_EXCITED_STATES_HPP

#include "fiction/algorithms/simulation/sidb/calculate_energy_and_state_type.hpp"
#include "fiction/algorithms/simulation/sidb/energy_distribution.hpp"
#include "fiction/technology/physical_constants.hpp"
#include "fiction/utils/math_utils.hpp"

Expand Down
4 changes: 2 additions & 2 deletions include/fiction/algorithms/simulation/sidb/quickexact.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct quickexact_params
/**
* Modes to use for the *QuickExact* algorithm.
*/
enum class automatic_base_number_detection
enum class automatic_base_number_detection : uint8_t
{
/**
* Simulation is conducted with the required base number (i.e., if positively charged SiDBs can occur, three
Expand Down Expand Up @@ -241,7 +241,7 @@ class quickexact_impl
/**
* Base number required for the correct physical simulation.
*/
enum class required_simulation_base_number
enum class required_simulation_base_number : uint8_t
{
/**
* Two state simulation (i.e., negative and neutral) is sufficient.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct generate_random_sidb_layout_params
* An enumeration of modes to use for the generation of random SiDB layouts to control control the appearance of
* positive charges.
*/
enum class positive_charges
enum class positive_charges : uint8_t
{
/**
* Positive charges can occur (i.e. SiDBs can be placed right next to each other).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
#ifndef FICTION_SIDB_SIMULATION_ENGINE_HPP
#define FICTION_SIDB_SIMULATION_ENGINE_HPP

#include <cstdint>

namespace fiction
{

/**
* Selector for the available SiDB simulation engines.
*/
enum class sidb_simulation_engine
enum class sidb_simulation_engine : uint8_t
{
/**
* *Exhaustive Ground State Search (EXGS)* is an exact simulation engine that always has exponential runtime.
Expand All @@ -31,7 +33,7 @@ enum class sidb_simulation_engine
/**
* Selector exclusively for exact SiDB simulation engines.
*/
enum class exact_sidb_simulation_engine
enum class exact_sidb_simulation_engine : uint8_t
{
/**
* *Exhaustive Ground State Search* (EXGS) is an exact simulation engine that always has exponential runtime.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#ifndef FICTION_TIME_TO_SOLUTION_HPP
#define FICTION_TIME_TO_SOLUTION_HPP

#include "fiction/algorithms/simulation/sidb/determine_groundstate_from_simulation_results.hpp"
#include "fiction/algorithms/simulation/sidb/exhaustive_ground_state_simulation.hpp"
#include "fiction/algorithms/simulation/sidb/is_ground_state.hpp"
#include "fiction/algorithms/simulation/sidb/quickexact.hpp"
Expand Down
1 change: 0 additions & 1 deletion include/fiction/io/write_sqd_layout.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <fstream>
#include <ostream>
#include <sstream>
#include <string>
#include <string_view>
#include <unordered_map>
#include <vector>
Expand Down
2 changes: 0 additions & 2 deletions include/fiction/io/write_sqd_sim_result.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@
#define FICTION_WRITE_SQD_SIM_RESULT_HPP

#include "fiction/algorithms/simulation/sidb/sidb_simulation_result.hpp"
#include "fiction/technology/cell_technologies.hpp"
#include "fiction/technology/charge_distribution_surface.hpp"
#include "fiction/technology/sidb_charge_state.hpp"
#include "fiction/technology/sidb_lattice_orientations.hpp"
#include "fiction/technology/sidb_nm_position.hpp"
#include "fiction/traits.hpp"
#include "utils/version_info.hpp"
Expand Down
2 changes: 1 addition & 1 deletion include/fiction/layouts/bounding_box.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#ifndef FICTION_BOUNDING_BOX_HPP
#define FICTION_BOUNDING_BOX_HPP

#include "fiction/layouts/coordinates.hpp"
#include "fiction/traits.hpp"
#include "fiction/types.hpp"
#include "fiction/utils/layout_utils.hpp"

#include <algorithm>
Expand Down
3 changes: 1 addition & 2 deletions include/fiction/technology/sidb_defects.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#define FICTION_SIDB_DEFECTS_HPP

#include <cassert>
#include <cmath>
#include <cstdint>
#include <optional>
#include <utility>
Expand All @@ -19,7 +18,7 @@ namespace fiction
* classification of the H–Si(100) surface through multi-mode scanning probe microscopy\" by Jeremiah Croshaw, Thomas
* Dienel, Taleana Huff, and Robert Wolkow in Journal of Nanotechnology in 2020.
*/
enum class sidb_defect_type
enum class sidb_defect_type : uint8_t
{
/**
* Defect-free H-Si.
Expand Down

0 comments on commit 671f9b3

Please sign in to comment.