Blender
V2.93
source
blender
depsgraph
intern
eval
deg_eval_stats.cc
Go to the documentation of this file.
1
/*
2
* This program is free software; you can redistribute it and/or
3
* modify it under the terms of the GNU General Public License
4
* as published by the Free Software Foundation; either version 2
5
* of the License, or (at your option) any later version.
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software Foundation,
14
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15
*
16
* The Original Code is Copyright (C) 2017 Blender Foundation.
17
* All rights reserved.
18
*/
19
24
#include "
intern/eval/deg_eval_stats.h
"
25
26
#include "
BLI_utildefines.h
"
27
28
#include "
intern/depsgraph.h
"
29
30
#include "
intern/node/deg_node.h
"
31
#include "
intern/node/deg_node_component.h
"
32
#include "
intern/node/deg_node_id.h
"
33
#include "
intern/node/deg_node_operation.h
"
34
35
namespace
blender::deg
{
36
37
void
deg_eval_stats_aggregate
(
Depsgraph
*
graph
)
38
{
39
/* Reset current evaluation stats for ID and component nodes.
40
* Those are not filled in by the evaluation engine. */
41
for
(
Node
*
node
:
graph
->
id_nodes
) {
42
IDNode
*
id_node
= (
IDNode
*)
node
;
43
for
(
ComponentNode
*comp_node :
id_node
->
components
.values()) {
44
comp_node->
stats
.
reset_current
();
45
}
46
id_node
->
stats
.
reset_current
();
47
}
48
/* Now accumulate operation timings to components and IDs. */
49
for
(
OperationNode
*op_node :
graph
->
operations
) {
50
ComponentNode
*comp_node = op_node->
owner
;
51
IDNode
*
id_node
= comp_node->
owner
;
52
id_node
->
stats
.
current_time
+= op_node->
stats
.
current_time
;
53
comp_node->
stats
.
current_time
+= op_node->
stats
.
current_time
;
54
}
55
}
56
57
}
// namespace blender::deg
BLI_utildefines.h
node
OperationNode * node
Definition:
deg_builder_cycle.cc:54
graph
Depsgraph * graph
Definition:
deg_builder_cycle.cc:74
id_node
const IDNode * id_node
Definition:
deg_debug_stats_gnuplot.cc:52
deg_eval_stats.h
deg_node.h
deg_node_component.h
deg_node_id.h
deg_node_operation.h
depsgraph.h
blender::deg
Definition:
deg_builder.cc:53
blender::deg::deg_eval_stats_aggregate
void deg_eval_stats_aggregate(Depsgraph *graph)
Definition:
deg_eval_stats.cc:37
blender::deg::ComponentNode
Definition:
deg_node_component.h:44
blender::deg::ComponentNode::owner
IDNode * owner
Definition:
deg_node_component.h:110
blender::deg::Depsgraph
Definition:
depsgraph.h:60
blender::deg::Depsgraph::operations
OperationNodes operations
Definition:
depsgraph.h:126
blender::deg::Depsgraph::id_nodes
IDDepsNodes id_nodes
Definition:
depsgraph.h:103
blender::deg::IDNode
Definition:
deg_node_id.h:51
blender::deg::IDNode::components
Map< ComponentIDKey, ComponentNode * > components
Definition:
deg_node_id.h:96
blender::deg::Node::Stats::current_time
double current_time
Definition:
deg_node.h:165
blender::deg::Node::Stats::reset_current
void reset_current()
Definition:
deg_node.cc:283
blender::deg::Node
Definition:
deg_node.h:148
blender::deg::Node::stats
Stats stats
Definition:
deg_node.h:177
blender::deg::OperationNode
Definition:
deg_node_operation.h:232
blender::deg::OperationNode::owner
ComponentNode * owner
Definition:
deg_node_operation.h:259
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1