Blender
V3.3
intern
cycles
integrator
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
8
CCL_NAMESPACE_BEGIN
9
10
struct
WorkBalanceInfo
{
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
29
CCL_NAMESPACE_END
vector< WorkBalanceInfo >
CCL_NAMESPACE_END
#define CCL_NAMESPACE_END
Definition:
cuda/compat.h:9
vector.h
CCL_NAMESPACE_BEGIN
Definition:
python.cpp:37
WorkBalanceInfo
Definition:
work_balancer.h:10
WorkBalanceInfo::occupancy
float occupancy
Definition:
work_balancer.h:15
WorkBalanceInfo::weight
double weight
Definition:
work_balancer.h:19
WorkBalanceInfo::time_spent
double time_spent
Definition:
work_balancer.h:12
work_balance_do_rebalance
bool work_balance_do_rebalance(vector< WorkBalanceInfo > &work_balance_infos)
Definition:
work_balancer.cpp:44
work_balance_do_initial
void work_balance_do_initial(vector< WorkBalanceInfo > &work_balance_infos)
Definition:
work_balancer.cpp:12
Generated on Tue Oct 22 2024 13:18:25 for Blender by
doxygen
1.9.1