Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/NOD_geometry_nodes_eval_log.hh
| Show First 20 Lines • Show All 175 Lines • ▼ Show 20 Lines | public: | ||||
| void log_value_for_sockets(Span<DSocket> sockets, GPointer value); | void log_value_for_sockets(Span<DSocket> sockets, GPointer value); | ||||
| void log_multi_value_socket(DSocket socket, Span<GPointer> values); | void log_multi_value_socket(DSocket socket, Span<GPointer> values); | ||||
| void log_node_warning(DNode node, NodeWarningType type, std::string message); | void log_node_warning(DNode node, NodeWarningType type, std::string message); | ||||
| }; | }; | ||||
| /** The root logger class. */ | /** The root logger class. */ | ||||
| class GeoLogger { | class GeoLogger { | ||||
| private: | private: | ||||
| /** The entire geometry of sockets in this set should be cached, because e.g. the spreadsheet | /** | ||||
| * displays the data. We don't log the entire geometry at all places, because that would require | * Log the entire value for these sockets, because they may be inspected afterwards. | ||||
| * way too much memory. */ | * We don't log everything, because that would take up too much memory and cause significant | ||||
| Set<DSocket> log_full_geometry_sockets_; | * slowdowns. | ||||
| */ | |||||
| Set<DSocket> log_full_sockets_; | |||||
| threading::EnumerableThreadSpecific<LocalGeoLogger> threadlocals_; | threading::EnumerableThreadSpecific<LocalGeoLogger> threadlocals_; | ||||
| friend LocalGeoLogger; | friend LocalGeoLogger; | ||||
| public: | public: | ||||
| GeoLogger(Set<DSocket> log_full_geometry_sockets) | GeoLogger(Set<DSocket> log_full_sockets) | ||||
| : log_full_geometry_sockets_(std::move(log_full_geometry_sockets)), | : log_full_sockets_(std::move(log_full_sockets)), | ||||
| threadlocals_([this]() { return LocalGeoLogger(*this); }) | threadlocals_([this]() { return LocalGeoLogger(*this); }) | ||||
| { | { | ||||
| } | } | ||||
| LocalGeoLogger &local() | LocalGeoLogger &local() | ||||
| { | { | ||||
| return threadlocals_.local(); | return threadlocals_.local(); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 111 Lines • Show Last 20 Lines | |||||