Blender V5.0
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"
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"
14
16
18 Stats &stats,
19 Profiler &profiler,
20 bool headless)
21{
22 return make_unique<CPUDevice>(info, stats, profiler, headless);
23}
24
26{
27 DeviceInfo info;
28
29 info.type = DEVICE_CPU;
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 }
44 }
45
46 devices.insert(devices.begin(), info);
47}
48
50{
51 return system_cpu_support_avx2() ? "AVX2" : "";
52}
53
DenoiserTypeMask denoisers
bool has_profiling
DeviceType type
string description
@ DENOISER_OPENIMAGEDENOISE
Definition denoise.h:13
void device_cpu_info(vector< DeviceInfo > &devices)
string device_cpu_capabilities()
CCL_NAMESPACE_BEGIN unique_ptr< Device > device_cpu_create(const DeviceInfo &info, Stats &stats, Profiler &profiler, bool headless)
#define CCL_NAMESPACE_END
@ DEVICE_CPU
static CCL_NAMESPACE_BEGIN bool openimagedenoise_supported()
bool system_cpu_support_avx2()
Definition system.cpp:220
string system_cpu_brand_string()
Definition system.cpp:64
static bool guiding_supported()