Skip to content

Commit c669a82

Browse files
Add documentation for AtomContext getter functions
1 parent d6e2b45 commit c669a82

File tree

1 file changed

+31
-11
lines changed

1 file changed

+31
-11
lines changed

vpr/src/base/vpr_context.h

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,17 @@ struct Context {
6767
*
6868
* This should contain only data structures related to user specified netlist
6969
* being implemented by VPR onto the target device.
70+
*
71+
* This class provides two categories of getter functions that give mutable or
72+
* immutable reference to the global state. If you need read-only access, use
73+
* the normal getter functions and if you need write access to the context use
74+
* the mutable functions.
7075
*/
7176
struct AtomContext : public Context {
7277
/********************************************************************
7378
* Atom Netlist
7479
********************************************************************/
75-
private:
76-
//bool atom_lock_ = true;
80+
private:
7781
/// @brief Atom netlist
7882
AtomNetlist nlist_;
7983
/// @brief Mappings to/from the Atom Netlist to physically described .blif models
@@ -82,16 +86,32 @@ struct AtomContext : public Context {
8286
/// algorithm) before packing and the cluster-level placement.
8387
FlatPlacementInfo flat_placement_info_;
8488

85-
public:
86-
87-
const AtomNetlist& netlist() const {return nlist_;}
88-
AtomNetlist& mutable_netlist() {return nlist_;}
89+
public:
8990

90-
const AtomLookup& lookup() const {return lookup_;}
91-
AtomLookup& mutable_lookup() {return lookup_;}
92-
93-
const FlatPlacementInfo& flat_placement_info() const {return flat_placement_info_;}
94-
FlatPlacementInfo& mutable_flat_placement_info() {return flat_placement_info_;}
91+
/**
92+
* @brief Immutable reference to the AtomNetlist
93+
*/
94+
inline const AtomNetlist& netlist() const {return nlist_;}
95+
/**
96+
* @brief Mutable reference to the AtomNetlist
97+
*/
98+
inline AtomNetlist& mutable_netlist() {return nlist_;}
99+
/**
100+
* @brief Immutable reference to the AtomLookup
101+
*/
102+
inline const AtomLookup& lookup() const {return lookup_;}
103+
/**
104+
* @brief Mutable reference to the AtomLookup
105+
*/
106+
inline AtomLookup& mutable_lookup() {return lookup_;}
107+
/**
108+
* @brief Immutable reference to the FlatPlacementInfo
109+
*/
110+
inline const FlatPlacementInfo& flat_placement_info() const {return flat_placement_info_;}
111+
/**
112+
* @brief Mutable reference to the FlatPlacementInfo
113+
*/
114+
inline FlatPlacementInfo& mutable_flat_placement_info() {return flat_placement_info_;}
95115

96116
};
97117

0 commit comments

Comments
 (0)