Blender
V5.0
intern
cycles
integrator
integrator/tile.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 <iosfwd>
8
9
#include "
util/types_int2.h
"
10
11
CCL_NAMESPACE_BEGIN
12
13
struct
TileSize
{
14
TileSize
() =
default
;
15
16
TileSize
(
const
int
width
,
const
int
height
,
const
int
num_samples
)
17
:
width
(
width
),
height
(
height
),
num_samples
(
num_samples
)
18
{
19
}
20
21
bool
operator==
(
const
TileSize
&other)
const
22
{
23
return
width
== other.
width
&&
height
== other.
height
&&
num_samples
== other.
num_samples
;
24
}
25
bool
operator!=
(
const
TileSize
&other)
const
26
{
27
return
!(*
this
== other);
28
}
29
30
int
width
= 0,
height
= 0;
31
int
num_samples
= 0;
32
};
33
34
std::ostream &
operator<<
(std::ostream &os,
const
TileSize
&tile_size);
35
36
/* Calculate tile size which is best suitable for rendering image of a given size with given number
37
* of active path states.
38
* Will attempt to provide best guess to keep path tracing threads of a device as localized as
39
* possible, and have as many threads active for every tile as possible. */
40
TileSize
tile_calculate_best_size
(
const
bool
accel_rt,
41
const
int2
&image_size,
42
const
int
num_samples,
43
const
int
max_num_path_states,
44
const
float
scrambling_distance);
45
46
CCL_NAMESPACE_END
CCL_NAMESPACE_END
#define CCL_NAMESPACE_END
Definition
device/cuda/compat.h:10
operator<<
std::ostream & operator<<(std::ostream &os, const TileSize &tile_size)
Definition
integrator/tile.cpp:14
tile_calculate_best_size
TileSize tile_calculate_best_size(const bool accel_rt, const int2 &image_size, const int num_samples, const int max_num_path_states, const float scrambling_distance)
Definition
integrator/tile.cpp:39
CCL_NAMESPACE_BEGIN
Definition
python.cpp:37
TileSize
Definition
integrator/tile.h:13
TileSize::TileSize
TileSize(const int width, const int height, const int num_samples)
Definition
integrator/tile.h:16
TileSize::TileSize
TileSize()=default
TileSize::num_samples
int num_samples
Definition
integrator/tile.h:31
TileSize::height
int height
Definition
integrator/tile.h:30
TileSize::width
int width
Definition
integrator/tile.h:30
TileSize::operator!=
bool operator!=(const TileSize &other) const
Definition
integrator/tile.h:25
TileSize::operator==
bool operator==(const TileSize &other) const
Definition
integrator/tile.h:21
int2
Definition
int_vector_types.h:8
types_int2.h
Generated on
for Blender by
doxygen
1.16.1