Move statistic calculation to parser. Show Vertex and GFX count in GUI. CLI -A param is now broken. Will implement in next commits.
This commit is contained in:
@@ -35,43 +35,7 @@
|
||||
|
||||
#include <gds-render/gds-utils/gds-types.h>
|
||||
|
||||
struct gds_cell_statistics {
|
||||
size_t gfx_count;
|
||||
size_t vertex_count;
|
||||
size_t reference_count;
|
||||
const struct gds_cell *cell;
|
||||
};
|
||||
|
||||
struct gds_lib_statistics {
|
||||
size_t gfx_count;
|
||||
size_t vertex_count;
|
||||
size_t reference_count;
|
||||
size_t cell_count;
|
||||
GList *cell_statistics;
|
||||
const struct gds_library *library;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Calculate statistics of a single cell
|
||||
* @param[in] cell GDS cell
|
||||
* @param[out] stat Statistics output
|
||||
*/
|
||||
void gds_statistics_calc_cell(const struct gds_cell *cell,
|
||||
struct gds_cell_statistics *stat);
|
||||
|
||||
/**
|
||||
* @brief Calc statistic information for library
|
||||
* @param[in] library_list List containing all libraries
|
||||
* @param[in,out] lib_stat_list Statistic list
|
||||
*/
|
||||
void gds_statistics_calc_library(GList * library_list,
|
||||
GList ** lib_stat_list);
|
||||
|
||||
/**
|
||||
* @brief Free library statistics GList
|
||||
* @param[in,out] lib_stat_list List to free
|
||||
*/
|
||||
void gds_statistics_free_lib_stat_list(GList ** lib_stat_list);
|
||||
void gds_statistics_calc_cummulative_counts_in_lib(struct gds_library *lib);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
@@ -65,6 +65,22 @@ struct gds_point {
|
||||
int y;
|
||||
};
|
||||
|
||||
struct gds_cell_statistics {
|
||||
size_t gfx_count;
|
||||
size_t vertex_count;
|
||||
size_t total_vertex_count;
|
||||
size_t total_gfx_count;
|
||||
size_t reference_count;
|
||||
};
|
||||
|
||||
struct gds_lib_statistics {
|
||||
size_t gfx_count;
|
||||
size_t vertex_count;
|
||||
size_t reference_count;
|
||||
size_t cell_count;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @brief Stores the result of the cell checks.
|
||||
*/
|
||||
@@ -127,6 +143,7 @@ struct gds_cell {
|
||||
GList *graphic_objs; /**< @brief List of #gds_graphics */
|
||||
struct gds_library *parent_library; /**< @brief Pointer to parent library */
|
||||
struct gds_cell_checks checks; /**< @brief Checking results */
|
||||
struct gds_cell_statistics stats; /**< @brief Optional statistic info */
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -147,8 +164,10 @@ struct gds_library {
|
||||
double unit_in_meters; /**< Length of a database unit in meters */
|
||||
GList *cells; /**< List of #gds_cell that contains all cells in this library*/
|
||||
GList *cell_names /**< List of strings that contains all cell names */;
|
||||
struct gds_lib_statistics stats;
|
||||
};
|
||||
|
||||
|
||||
/** @} */
|
||||
|
||||
#endif /* __GDS_TYPES_H__ */
|
||||
|
Reference in New Issue
Block a user