Blender
V5.0
intern
cycles
kernel
device
cpu
device/cpu/globals.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 "
kernel/device/cpu/globals.h
"
6
#include "
kernel/osl/globals.h
"
7
8
#include "
util/guiding.h
"
// IWYU pragma: keep
9
#include "
util/profiling.h
"
10
11
CCL_NAMESPACE_BEGIN
12
13
ThreadKernelGlobalsCPU::ThreadKernelGlobalsCPU
(
const
KernelGlobalsCPU
&kernel_globals,
14
OSLGlobals *osl_globals,
15
Profiler
&cpu_profiler,
16
const
int
thread_index)
17
:
KernelGlobalsCPU
(kernel_globals),
18
#ifdef WITH_OSL
19
osl(osl_globals, thread_index),
20
#endif
21
cpu_profiler_
(cpu_profiler)
22
{
23
#ifndef WITH_OSL
24
(void)thread_index;
25
(void)osl_globals;
26
#endif
27
28
#if defined(WITH_PATH_GUIDING)
29
opgl_path_segment_storage = make_unique<openpgl::cpp::PathSegmentStorage>();
30
#endif
31
}
32
33
void
ThreadKernelGlobalsCPU::start_profiling
()
34
{
35
cpu_profiler_
.add_state(&
profiler
);
36
}
37
38
void
ThreadKernelGlobalsCPU::stop_profiling
()
39
{
40
cpu_profiler_
.remove_state(&
profiler
);
41
}
42
43
CCL_NAMESPACE_END
Profiler
Definition
profiling.h:71
globals.h
CCL_NAMESPACE_END
#define CCL_NAMESPACE_END
Definition
device/cuda/compat.h:10
CCL_NAMESPACE_BEGIN
Definition
python.cpp:37
globals.h
profiling.h
KernelGlobalsCPU
Definition
device/cpu/globals.h:42
KernelGlobalsCPU::profiler
ProfilingState profiler
Definition
device/cpu/globals.h:48
ThreadKernelGlobalsCPU::ThreadKernelGlobalsCPU
ThreadKernelGlobalsCPU(const KernelGlobalsCPU &kernel_globals, OSLGlobals *osl_globals_memory, Profiler &cpu_profiler, const int thread_index)
Definition
device/cpu/globals.cpp:13
ThreadKernelGlobalsCPU::start_profiling
void start_profiling()
Definition
device/cpu/globals.cpp:33
ThreadKernelGlobalsCPU::stop_profiling
void stop_profiling()
Definition
device/cpu/globals.cpp:38
ThreadKernelGlobalsCPU::cpu_profiler_
Profiler & cpu_profiler_
Definition
device/cpu/globals.h:89
guiding.h
Generated on
for Blender by
doxygen
1.16.1