Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/device/cpu/device_impl.cpp
| Show All 16 Lines | |||||
| #include "device/cpu/device_impl.h" | #include "device/cpu/device_impl.h" | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <string.h> | #include <string.h> | ||||
| /* So ImathMath is included before our kernel_cpu_compat. */ | /* So ImathMath is included before our kernel_cpu_compat. */ | ||||
| #ifdef WITH_OSL | #ifdef WITH_OSL | ||||
| /* So no context pollution happens from indirectly included windows.h */ | /* So no context pollution happens from indirectly included windows.h */ | ||||
| # include "util/util_windows.h" | # include "util/windows.h" | ||||
| # include <OSL/oslexec.h> | # include <OSL/oslexec.h> | ||||
| #endif | #endif | ||||
| #ifdef WITH_EMBREE | #ifdef WITH_EMBREE | ||||
| # include <embree3/rtcore.h> | # include <embree3/rtcore.h> | ||||
| #endif | #endif | ||||
| #include "device/cpu/kernel.h" | #include "device/cpu/kernel.h" | ||||
| #include "device/cpu/kernel_thread_globals.h" | #include "device/cpu/kernel_thread_globals.h" | ||||
| #include "device/device.h" | #include "device/device.h" | ||||
| // clang-format off | // clang-format off | ||||
| #include "kernel/device/cpu/compat.h" | #include "kernel/device/cpu/compat.h" | ||||
| #include "kernel/device/cpu/globals.h" | #include "kernel/device/cpu/globals.h" | ||||
| #include "kernel/device/cpu/kernel.h" | #include "kernel/device/cpu/kernel.h" | ||||
| #include "kernel/kernel_types.h" | #include "kernel/types.h" | ||||
| #include "kernel/osl/osl_shader.h" | #include "kernel/osl/shader.h" | ||||
| #include "kernel/osl/osl_globals.h" | #include "kernel/osl/globals.h" | ||||
| // clang-format on | // clang-format on | ||||
| #include "bvh/bvh_embree.h" | #include "bvh/embree.h" | ||||
| #include "render/buffers.h" | #include "session/buffers.h" | ||||
| #include "util/util_debug.h" | #include "util/debug.h" | ||||
| #include "util/util_foreach.h" | #include "util/foreach.h" | ||||
| #include "util/util_function.h" | #include "util/function.h" | ||||
| #include "util/util_logging.h" | #include "util/log.h" | ||||
| #include "util/util_map.h" | #include "util/map.h" | ||||
| #include "util/util_openimagedenoise.h" | #include "util/openimagedenoise.h" | ||||
| #include "util/util_optimization.h" | #include "util/optimization.h" | ||||
| #include "util/util_progress.h" | #include "util/progress.h" | ||||
| #include "util/util_system.h" | #include "util/system.h" | ||||
| #include "util/util_task.h" | #include "util/task.h" | ||||
| #include "util/util_thread.h" | #include "util/thread.h" | ||||
| CCL_NAMESPACE_BEGIN | CCL_NAMESPACE_BEGIN | ||||
| CPUDevice::CPUDevice(const DeviceInfo &info_, Stats &stats_, Profiler &profiler_) | CPUDevice::CPUDevice(const DeviceInfo &info_, Stats &stats_, Profiler &profiler_) | ||||
| : Device(info_, stats_, profiler_), texture_info(this, "__texture_info", MEM_GLOBAL) | : Device(info_, stats_, profiler_), texture_info(this, "__texture_info", MEM_GLOBAL) | ||||
| { | { | ||||
| /* Pick any kernel, all of them are supposed to have same level of microarchitecture | /* Pick any kernel, all of them are supposed to have same level of microarchitecture | ||||
| * optimization. */ | * optimization. */ | ||||
| VLOG(1) << "Will be using " << kernels.integrator_init_from_camera.get_uarch_name() | VLOG(1) << "Using " << kernels.integrator_init_from_camera.get_uarch_name() << " CPU kernels."; | ||||
| << " kernels."; | |||||
| if (info.cpu_threads == 0) { | if (info.cpu_threads == 0) { | ||||
| info.cpu_threads = TaskScheduler::num_threads(); | info.cpu_threads = TaskScheduler::num_threads(); | ||||
| } | } | ||||
| #ifdef WITH_OSL | #ifdef WITH_OSL | ||||
| kernel_globals.osl = &osl_globals; | kernel_globals.osl = &osl_globals; | ||||
| #endif | #endif | ||||
| ▲ Show 20 Lines • Show All 252 Lines • Show Last 20 Lines | |||||