Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/device/cpu/kernel_thread_globals.h
| Show All 17 Lines | |||||
| #include "kernel/device/cpu/compat.h" | #include "kernel/device/cpu/compat.h" | ||||
| #include "kernel/device/cpu/globals.h" | #include "kernel/device/cpu/globals.h" | ||||
| CCL_NAMESPACE_BEGIN | CCL_NAMESPACE_BEGIN | ||||
| class Profiler; | class Profiler; | ||||
| /* A special class which extends memory ownership of the `KernelGlobals` decoupling any resource | /* A special class which extends memory ownership of the `KernelGlobalsCPU` decoupling any resource | ||||
| * which is not thread-safe for access. Every worker thread which needs to operate on | * which is not thread-safe for access. Every worker thread which needs to operate on | ||||
| * `KernelGlobals` needs to initialize its own copy of this object. | * `KernelGlobalsCPU` needs to initialize its own copy of this object. | ||||
| * | * | ||||
| * NOTE: Only minimal subset of objects are copied: `KernelData` is never copied. This means that | * NOTE: Only minimal subset of objects are copied: `KernelData` is never copied. This means that | ||||
| * there is no unnecessary data duplication happening when using this object. */ | * there is no unnecessary data duplication happening when using this object. */ | ||||
| class CPUKernelThreadGlobals : public KernelGlobals { | class CPUKernelThreadGlobals : public KernelGlobalsCPU { | ||||
| public: | public: | ||||
| /* TODO(sergey): Would be nice to have properly typed OSLGlobals even in the case when building | /* TODO(sergey): Would be nice to have properly typed OSLGlobals even in the case when building | ||||
| * without OSL support. Will avoid need to those unnamed pointers and casts. */ | * without OSL support. Will avoid need to those unnamed pointers and casts. */ | ||||
| CPUKernelThreadGlobals(const KernelGlobals &kernel_globals, | CPUKernelThreadGlobals(const KernelGlobalsCPU &kernel_globals, | ||||
| void *osl_globals_memory, | void *osl_globals_memory, | ||||
| Profiler &cpu_profiler); | Profiler &cpu_profiler); | ||||
| ~CPUKernelThreadGlobals(); | ~CPUKernelThreadGlobals(); | ||||
| CPUKernelThreadGlobals(const CPUKernelThreadGlobals &other) = delete; | CPUKernelThreadGlobals(const CPUKernelThreadGlobals &other) = delete; | ||||
| CPUKernelThreadGlobals(CPUKernelThreadGlobals &&other) noexcept; | CPUKernelThreadGlobals(CPUKernelThreadGlobals &&other) noexcept; | ||||
| Show All 13 Lines | |||||