Skip to content

[Infra] The Great VPR Pragma PR #3077

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions vpr/src/analytical_place/analytical_placement_flow.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#pragma once
/**
* @file
* @author Alex Singer
* @date September 2024
* @brief Methods for running the Analytical Placement flow.
*/

#pragma once

// Forward declarations
struct t_vpr_setup;

Expand Down
3 changes: 1 addition & 2 deletions vpr/src/analytical_place/analytical_solver.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#pragma once
/**
* @file
* @author Alex Singer and Robert Luo
Expand All @@ -6,8 +7,6 @@
* to define the functionality of all solvers used in the AP flow.
*/

#pragma once

#include <memory>
#include "ap_flow_enums.h"
#include "ap_netlist.h"
Expand Down
3 changes: 1 addition & 2 deletions vpr/src/analytical_place/ap_flow_enums.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#pragma once
/**
* @file
* @author Alex Singer
* @date February 2025
* @brief Enumerations used by the Analytical Placement Flow.
*/

#pragma once

/**
* @brief The type of an Analytical Solver.
*
Expand Down
3 changes: 1 addition & 2 deletions vpr/src/analytical_place/ap_netlist.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#pragma once
/**
* @file
* @author Alex Singer
Expand All @@ -18,8 +19,6 @@
* unused by Analytical Placement are ignored.
*/

#pragma once

#include <string>
#include "netlist.h"
#include "ap_netlist_fwd.h"
Expand Down
3 changes: 1 addition & 2 deletions vpr/src/analytical_place/ap_netlist_fwd.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#pragma once
/**
* @file
* @author Alex Singer
Expand All @@ -7,8 +8,6 @@
* Forward declares the APNetlist class, and defines common types used by it.
*/

#pragma once

#include "netlist_fwd.h"
#include "vtr_strong_id.h"

Expand Down
3 changes: 1 addition & 2 deletions vpr/src/analytical_place/detailed_placer.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#pragma once
/**
* @file
* @author Alex Singer
Expand All @@ -6,8 +7,6 @@
* and placement and optimizes them while remaining legal.
*/

#pragma once

#include <memory>
#include "ap_flow_enums.h"
#include "clustered_netlist_utils.h"
Expand Down
3 changes: 1 addition & 2 deletions vpr/src/analytical_place/flat_placement_bins.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#pragma once
/**
* @file
* @author Alex Singer
Expand All @@ -8,8 +9,6 @@
* FPGA.
*/

#pragma once

#include <unordered_set>
#include "ap_netlist.h"
#include "vtr_assert.h"
Expand Down
3 changes: 1 addition & 2 deletions vpr/src/analytical_place/flat_placement_density_manager.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#pragma once
/**
* @file
* @author Alex Singer
Expand All @@ -8,8 +9,6 @@
* defines a bin that is "overfilled".
*/

#pragma once

#include <tuple>
#include <unordered_set>
#include <vector>
Expand Down
3 changes: 1 addition & 2 deletions vpr/src/analytical_place/flat_placement_mass_calculator.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#pragma once
/**
* @file
* @author Alex Singer
* @date February 2024
* @brief Mass calculation for AP blocks and logical/physical block/tile types
*/

#pragma once

#include <vector>
#include "ap_netlist_fwd.h"
#include "primitive_vector.h"
Expand Down
3 changes: 1 addition & 2 deletions vpr/src/analytical_place/full_legalizer.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#pragma once
/**
* @file
* @author Alex Singer
Expand All @@ -7,8 +8,6 @@
* routed by VTR.
*/

#pragma once

#include <memory>
#include "ap_flow_enums.h"

Expand Down
3 changes: 1 addition & 2 deletions vpr/src/analytical_place/gen_ap_netlist_from_atoms.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#pragma once
/**
* @file
* @author Alex Singer
Expand All @@ -6,8 +7,6 @@
* results of the prepacker to generate an APNetlist.
*/

#pragma once

// Forward declarations
class APNetlist;
class AtomNetlist;
Expand Down
3 changes: 1 addition & 2 deletions vpr/src/analytical_place/global_placer.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#pragma once
/**
* @file
* @author Alex Singer
Expand All @@ -12,8 +13,6 @@
* architecture.
*/

#pragma once

#include <memory>
#include "ap_flow_enums.h"
#include "flat_placement_density_manager.h"
Expand Down
3 changes: 1 addition & 2 deletions vpr/src/analytical_place/model_grouper.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#pragma once
/**
* @file
* @author Alex Singer
Expand All @@ -6,8 +7,6 @@
* that must be legalized together in a flat placement.
*/

#pragma once

#include <vector>
#include "logic_types.h"
#include "vtr_assert.h"
Expand Down
3 changes: 1 addition & 2 deletions vpr/src/analytical_place/partial_legalizer.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#pragma once
/**
* @file
* @author Alex Singer and Robert Luo
Expand All @@ -11,8 +12,6 @@
* constraints of the architecture).
*/

#pragma once

#include <functional>
#include <memory>
#include <vector>
Expand Down
3 changes: 1 addition & 2 deletions vpr/src/analytical_place/partial_placement.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#pragma once
/**
* @file
* @author Alex Singer
Expand All @@ -10,8 +11,6 @@
* will always be on the device and will respect fixed block locations.
*/

#pragma once

#include <cmath>
#include "ap_netlist.h"
#include "physical_types.h"
Expand Down
3 changes: 1 addition & 2 deletions vpr/src/analytical_place/primitive_vector.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#pragma once
/**
* @file
* @author Alex Singer
Expand All @@ -8,8 +9,6 @@
* efficiently operated upon.
*/

#pragma once

#include <cmath>
#include <cstdlib>
#include <unordered_map>
Expand Down
5 changes: 1 addition & 4 deletions vpr/src/base/CheckArch.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#ifndef CHECKARCH_H
#define CHECKARCH_H
#pragma once

#include "physical_types.h"

void CheckArch(const t_arch& Arch);

#endif
5 changes: 1 addition & 4 deletions vpr/src/base/CheckSetup.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef CHECKSETUP_H
#define CHECKSETUP_H
#pragma once

#include "vpr_types.h"

Expand All @@ -12,5 +11,3 @@ void CheckSetup(const t_packer_opts& packer_opts,
const std::vector<t_segment_inf>& segments,
const t_timing_inf& timing,
const t_chan_width_dist& chans);

#endif
6 changes: 1 addition & 5 deletions vpr/src/base/SetupGrid.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#ifndef SETUPGRID_H
#define SETUPGRID_H

#pragma once
/**
* @file
* @author Jason Luu
Expand Down Expand Up @@ -32,5 +30,3 @@ DeviceGrid create_device_grid(const std::string& layout_name,
* (size of the bounding box of non-empty grid tiles)
*/
size_t count_grid_tiles(const DeviceGrid& grid);

#endif
5 changes: 2 additions & 3 deletions vpr/src/base/SetupVPR.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef SETUPVPR_H
#define SETUPVPR_H
#pragma once

#include <vector>
#include "read_options.h"
#include "physical_types.h"
Expand Down Expand Up @@ -28,4 +28,3 @@ void SetupVPR(const t_options* Options,
std::string* GraphicsCommands,
t_power_opts* PowerOpts,
t_vpr_setup* vpr_setup);
#endif
5 changes: 1 addition & 4 deletions vpr/src/base/ShowSetup.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef SHOWSETUP_H
#define SHOWSETUP_H
#pragma once

#include <ostream>
#include <string>
Expand Down Expand Up @@ -35,5 +34,3 @@ struct ClusteredNetlistStats {

void ShowSetup(const t_vpr_setup& vpr_setup);
void writeClusteredNetlistStats(const std::string& block_usage_filename);

#endif
6 changes: 2 additions & 4 deletions vpr/src/base/atom_lookup.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef ATOM_LOOKUP_H
#define ATOM_LOOKUP_H
#pragma once

#include "atom_lookup_fwd.h"

#include "vtr_vector_map.h"
Expand Down Expand Up @@ -149,5 +149,3 @@ class AtomLookup {
vtr::linear_map<AtomPinId, tatum::NodeId> atom_pin_tnode_internal_;
vtr::linear_map<tatum::NodeId, AtomPinId> tnode_atom_pin_;
};

#endif
5 changes: 1 addition & 4 deletions vpr/src/base/atom_lookup_fwd.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#ifndef VPR_ATOM_LOOKUP_FWD_H
#define VPR_ATOM_LOOKUP_FWD_H
#pragma once

class AtomLookup;

enum class BlockTnode {
INTERNAL, ///<tnodes corresponding to internal paths withing atom blocks
EXTERNAL ///<tnodes corresponding to external interface of atom blocks
};

#endif
6 changes: 2 additions & 4 deletions vpr/src/base/atom_netlist.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef ATOM_NETLIST_H
#define ATOM_NETLIST_H
#pragma once

/**
* @file
Expand Down Expand Up @@ -65,6 +64,7 @@
* Refer to netlist.h for more information.
*
*/

#include <vector>
#include <unordered_map>

Expand Down Expand Up @@ -280,5 +280,3 @@ class AtomNetlist : public Netlist<AtomBlockId, AtomPortId, AtomPinId, AtomNetId
};

#include "atom_lookup.h"

#endif
6 changes: 2 additions & 4 deletions vpr/src/base/atom_netlist_fwd.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef ATOM_NETLIST_FWD_H
#define ATOM_NETLIST_FWD_H
#pragma once

#include "vtr_strong_id.h"
#include "netlist_fwd.h"
/*
Expand Down Expand Up @@ -100,5 +100,3 @@ struct hash<AtomPinId> {
}
};
} // namespace std

#endif
5 changes: 2 additions & 3 deletions vpr/src/base/atom_netlist_utils.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef ATOM_NETLIST_UTILS_H
#define ATOM_NETLIST_UTILS_H
#pragma once

#include <cstdio>
#include <set>
#include "atom_netlist.h"
Expand Down Expand Up @@ -122,4 +122,3 @@ std::set<AtomPinId> find_netlist_logical_clock_drivers(const AtomNetlist& netlis

///@brief Prints out information about netlist clocks
void print_netlist_clock_info(const AtomNetlist& netlist, const LogicalModels& models);
#endif
5 changes: 1 addition & 4 deletions vpr/src/base/check_netlist.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#ifndef CHECK_NETLIST_H
#define CHECK_NETLIST_H
#pragma once

void check_netlist(int verbosity);

#endif
5 changes: 1 addition & 4 deletions vpr/src/base/clock_modeling.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef CLOCK_MODELING_H
#define CLOCK_MODELING_H
#pragma once

enum e_clock_modeling {
IDEAL_CLOCK, ///<Treat the clock pins as ideal (i.e. not routed)
Expand All @@ -16,5 +15,3 @@ namespace ClockModeling {
*/
void treat_clock_pins_as_non_globals();
} // namespace ClockModeling

#endif
5 changes: 1 addition & 4 deletions vpr/src/base/clustered_netlist.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef CLUSTERED_NETLIST_H
#define CLUSTERED_NETLIST_H
#pragma once
/**
* @file
* @brief This file defines the ClusteredNetlist class in the ClusteredContext
Expand Down Expand Up @@ -340,5 +339,3 @@ class ClusteredNetlist : public Netlist<ClusterBlockId, ClusterPortId, ClusterPi

//Nets
};

#endif
Loading