Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/integrator/path_trace_work_cpu.h
| Show All 22 Lines | |||||
| #include "integrator/path_trace_work.h" | #include "integrator/path_trace_work.h" | ||||
| #include "util/util_vector.h" | #include "util/util_vector.h" | ||||
| CCL_NAMESPACE_BEGIN | CCL_NAMESPACE_BEGIN | ||||
| struct KernelWorkTile; | struct KernelWorkTile; | ||||
| struct KernelGlobals; | struct KernelGlobalsCPU; | ||||
| class CPUKernels; | class CPUKernels; | ||||
| /* Implementation of PathTraceWork which schedules work on to queues pixel-by-pixel, | /* Implementation of PathTraceWork which schedules work on to queues pixel-by-pixel, | ||||
| * for CPU devices. | * for CPU devices. | ||||
| * | * | ||||
| * NOTE: For the CPU rendering there are assumptions about TBB arena size and number of concurrent | * NOTE: For the CPU rendering there are assumptions about TBB arena size and number of concurrent | ||||
| * queues on the render device which makes this work be only usable on CPU. */ | * queues on the render device which makes this work be only usable on CPU. */ | ||||
| Show All 19 Lines | public: | ||||
| virtual bool copy_render_buffers_to_device() override; | virtual bool copy_render_buffers_to_device() override; | ||||
| virtual bool zero_render_buffers() override; | virtual bool zero_render_buffers() override; | ||||
| virtual int adaptive_sampling_converge_filter_count_active(float threshold, bool reset) override; | virtual int adaptive_sampling_converge_filter_count_active(float threshold, bool reset) override; | ||||
| virtual void cryptomatte_postproces() override; | virtual void cryptomatte_postproces() override; | ||||
| protected: | protected: | ||||
| /* Core path tracing routine. Renders given work time on the given queue. */ | /* Core path tracing routine. Renders given work time on the given queue. */ | ||||
| void render_samples_full_pipeline(KernelGlobals *kernel_globals, | void render_samples_full_pipeline(KernelGlobalsCPU *kernel_globals, | ||||
| const KernelWorkTile &work_tile, | const KernelWorkTile &work_tile, | ||||
| const int samples_num); | const int samples_num); | ||||
| /* CPU kernels. */ | /* CPU kernels. */ | ||||
| const CPUKernels &kernels_; | const CPUKernels &kernels_; | ||||
| /* Copy of kernel globals which is suitable for concurrent access from multiple threads. | /* Copy of kernel globals which is suitable for concurrent access from multiple threads. | ||||
| * | * | ||||
| * More specifically, the `kernel_globals_` is local to each threads and nobody else is | * More specifically, the `kernel_globals_` is local to each threads and nobody else is | ||||
| * accessing it, but some "localization" is required to decouple from kernel globals stored | * accessing it, but some "localization" is required to decouple from kernel globals stored | ||||
| * on the device level. */ | * on the device level. */ | ||||
| vector<CPUKernelThreadGlobals> kernel_thread_globals_; | vector<CPUKernelThreadGlobals> kernel_thread_globals_; | ||||
| }; | }; | ||||
| CCL_NAMESPACE_END | CCL_NAMESPACE_END | ||||