diff --git a/vpr/src/route/heap_type.h b/vpr/src/route/heap_type.h index 8e446a151bd..9562eaf7e3d 100644 --- a/vpr/src/route/heap_type.h +++ b/vpr/src/route/heap_type.h @@ -27,21 +27,21 @@ struct t_heap { t_heap_path* path_data; /** - * @brief Get u.next. + * @brief Get the next t_heap item in the linked list. */ t_heap* next_heap_item() const { return u.next; } /** - * @brief Set u.next. + * @brief Set the next t_heap item in the linked list. */ void set_next_heap_item(t_heap* next) { u.next = next; } /** - * @brief Get u.prev_edge. + * @brief Get the edge from the previous node used to reach the current node. * * @note * Be careful: will return 0 (a valid id!) if uninitialized. @@ -52,7 +52,7 @@ struct t_heap { } /** - * @brief Set u.prev_edge. + * @brief Set the edge from the previous node used to reach the current node.. */ inline void set_prev_edge(RREdgeId edge) { static_assert(sizeof(uint32_t) == sizeof(RREdgeId)); @@ -61,7 +61,7 @@ struct t_heap { private: union { - ///@brief Pointer to the next s_heap structure in the free linked list. + ///@brief Pointer to the next t_heap structure in the free linked list. t_heap* next = nullptr; /** @@ -121,12 +121,13 @@ class HeapStorage { * As a general rule, any t_heap objects returned from this interface, * **must** be HeapInterface::free'd before destroying the HeapInterface * instance. This ensure that no leaks are present in the users of the heap. - * Violating this assumption may result in a assertion violation. + * Violating this assumption may result in an assertion violation. */ class HeapInterface { public: virtual ~HeapInterface() {} + protected: /** * @brief Allocate a heap item. * @@ -160,7 +161,7 @@ class HeapInterface { * - empty_heap
* - build_heap
* - * @param grid + * @param grid The FGPA device grid */ virtual void init_heap(const DeviceGrid& grid) = 0; diff --git a/vpr/src/route/k_ary_heap.h b/vpr/src/route/k_ary_heap.h index fb0e8763fdf..f9fc511eeee 100644 --- a/vpr/src/route/k_ary_heap.h +++ b/vpr/src/route/k_ary_heap.h @@ -24,9 +24,6 @@ class KAryHeap : public HeapInterface { void set_prune_limit(size_t max_index, size_t prune_limit) final; void free_all_memory() final; - virtual bool is_valid() const = 0; - virtual t_heap* get_heap_head() = 0; - protected: /** * @brief The struct which the heap_ vector contains. @@ -54,6 +51,9 @@ class KAryHeap : public HeapInterface { float cost; }; + virtual bool is_valid() const = 0; + virtual t_heap* get_heap_head() = 0; + /** * @return The number of elements in the heap. */