Blender  V3.3
work_balancer.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: Apache-2.0
2  * Copyright 2011-2022 Blender Foundation */
3 
4 #pragma once
5 
6 #include "util/vector.h"
7 
9 
11  /* Time spent performing corresponding work. */
12  double time_spent = 0;
13 
14  /* Average occupancy of the device while performing the work. */
15  float occupancy = 1.0f;
16 
17  /* Normalized weight, which is ready to be used for work balancing (like calculating fraction of
18  * the big tile which is to be rendered on the device). */
19  double weight = 1.0;
20 };
21 
22 /* Balance work for an initial render integration, before any statistics is known. */
23 void work_balance_do_initial(vector<WorkBalanceInfo> &work_balance_infos);
24 
25 /* Rebalance work after statistics has been accumulated.
26  * Returns true if the balancing did change. */
27 bool work_balance_do_rebalance(vector<WorkBalanceInfo> &work_balance_infos);
28 
#define CCL_NAMESPACE_END
Definition: cuda/compat.h:9
bool work_balance_do_rebalance(vector< WorkBalanceInfo > &work_balance_infos)
void work_balance_do_initial(vector< WorkBalanceInfo > &work_balance_infos)