Blender
V5.0
intern
cycles
device
cpu
device/cpu/device.cpp
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
2
*
3
* SPDX-License-Identifier: Apache-2.0 */
4
5
#include "
device/cpu/device.h
"
6
#include "
device/cpu/device_impl.h
"
7
#include "
device/device.h
"
8
9
/* Used for `info.denoisers`. */
10
/* TODO(sergey): The denoisers are probably to be moved completely out of the device into their
11
* own class. But until then keep API consistent with how it used to work before. */
12
#include "
util/guiding.h
"
13
#include "
util/openimagedenoise.h
"
14
15
CCL_NAMESPACE_BEGIN
16
17
unique_ptr<Device>
device_cpu_create
(
const
DeviceInfo
&info,
18
Stats
&stats,
19
Profiler
&profiler,
20
bool
headless)
21
{
22
return
make_unique<CPUDevice>(info, stats, profiler, headless);
23
}
24
25
void
device_cpu_info
(
vector<DeviceInfo>
&devices)
26
{
27
DeviceInfo
info;
28
29
info.
type
=
DEVICE_CPU
;
30
info.
description
=
system_cpu_brand_string
();
31
info.
id
=
"CPU"
;
32
info.
num
= 0;
33
info.
has_osl
=
true
;
34
info.
has_nanovdb
=
true
;
35
info.
has_profiling
=
true
;
36
if
(
guiding_supported
()) {
37
info.
has_guiding
=
true
;
38
}
39
else
{
40
info.
has_guiding
=
false
;
41
}
42
if
(
openimagedenoise_supported
()) {
43
info.
denoisers
|=
DENOISER_OPENIMAGEDENOISE
;
44
}
45
46
devices.insert(devices.begin(), info);
47
}
48
49
string
device_cpu_capabilities
()
50
{
51
return
system_cpu_support_avx2
() ?
"AVX2"
:
""
;
52
}
53
54
CCL_NAMESPACE_END
DeviceInfo
Definition
device/device.h:79
DeviceInfo::num
int num
Definition
device/device.h:85
DeviceInfo::id
string id
Definition
device/device.h:84
DeviceInfo::has_osl
bool has_osl
Definition
device/device.h:89
DeviceInfo::denoisers
DenoiserTypeMask denoisers
Definition
device/device.h:103
DeviceInfo::has_guiding
bool has_guiding
Definition
device/device.h:90
DeviceInfo::has_nanovdb
bool has_nanovdb
Definition
device/device.h:87
DeviceInfo::has_profiling
bool has_profiling
Definition
device/device.h:91
DeviceInfo::type
DeviceType type
Definition
device/device.h:81
DeviceInfo::description
string description
Definition
device/device.h:82
Profiler
Definition
profiling.h:71
Stats
Definition
util/stats.h:11
unique_ptr
vector
Definition
cycles/util/vector.h:20
device_impl.h
DENOISER_OPENIMAGEDENOISE
@ DENOISER_OPENIMAGEDENOISE
Definition
denoise.h:13
device_cpu_info
void device_cpu_info(vector< DeviceInfo > &devices)
Definition
device/cpu/device.cpp:25
device_cpu_capabilities
string device_cpu_capabilities()
Definition
device/cpu/device.cpp:49
device_cpu_create
CCL_NAMESPACE_BEGIN unique_ptr< Device > device_cpu_create(const DeviceInfo &info, Stats &stats, Profiler &profiler, bool headless)
Definition
device/cpu/device.cpp:17
device.h
CCL_NAMESPACE_END
#define CCL_NAMESPACE_END
Definition
device/cuda/compat.h:10
device.h
DEVICE_CPU
@ DEVICE_CPU
Definition
device/device.h:40
CCL_NAMESPACE_BEGIN
Definition
python.cpp:37
openimagedenoise.h
openimagedenoise_supported
static CCL_NAMESPACE_BEGIN bool openimagedenoise_supported()
Definition
openimagedenoise.h:15
system_cpu_support_avx2
bool system_cpu_support_avx2()
Definition
system.cpp:220
system_cpu_brand_string
string system_cpu_brand_string()
Definition
system.cpp:64
guiding.h
guiding_supported
static bool guiding_supported()
Definition
util/guiding.h:35
Generated on
for Blender by
doxygen
1.16.1