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