|
Blender V5.3
|
#include <device_impl.h>
Inherits Device.
Public Member Functions | |
| CPUDevice (const DeviceInfo &info_, Stats &stats_, Profiler &profiler_, bool headless_) | |
| ~CPUDevice () override | |
| BVHLayoutMask | get_bvh_layout_mask (uint64_t kernel_features) const override |
| void | mem_alloc (device_memory &mem) override |
| void | mem_copy_to (device_memory &mem) override |
| void | mem_move_to_host (device_memory &mem) override |
| void | mem_copy_from (device_memory &mem, const size_t y, size_t w, const size_t h, size_t elem) override |
| void | mem_zero (device_memory &mem) override |
| void | mem_free (device_memory &mem) override |
| void | mem_or_from_device (device_memory &mem) override |
| device_ptr | mem_alloc_sub_ptr (device_memory &mem, const size_t offset, size_t) override |
| void | const_copy_to (const char *name, void *host, const size_t size) override |
| void | global_alloc (device_memory &mem) |
| void | global_free (device_memory &mem) |
| void | image_alloc (device_image &mem) |
| void | image_free (device_image &mem) |
| bool | has_unified_image_memory_all () const override |
| void | build_bvh (BVH *bvh, Progress &progress, bool refit) override |
| void * | get_guiding_device () const override |
| vector< ThreadKernelGlobalsCPU > * | acquire_cpu_kernel_thread_globals () override |
| void | release_cpu_kernel_thread_globals () override |
| OSLGlobals * | get_cpu_osl_memory () override |
| void | set_image_cache_func (KernelImageLoadRequestedCPU image_load_requested_cpu, KernelImageLoadRequestedGPU image_load_requested_gpu) override |
| Public Member Functions inherited from Device | |
| virtual | ~Device () noexcept(false) |
| virtual const string & | error_message () |
| bool | have_error () |
| virtual void | set_error (const string &error) |
| virtual bool | load_osl_kernels () |
| virtual void | cancel () |
| virtual bool | is_ready (string &) const |
| virtual unique_ptr< DeviceQueue > | gpu_queue_create () |
| void | image_load_requested_gpu (DeviceQueue &queue) |
| virtual void | release_bvh (BVH *) |
| virtual bool | set_bvh_limits (size_t, size_t) |
| virtual int | device_number (Device *) |
| virtual void | optimize_for_scene (Scene *) |
| virtual bool | is_resident (device_ptr, Device *sub_device) |
| virtual device_ptr | mem_device_ptr (const device_memory &mem, Device *sub_device) |
| virtual bool | check_peer_access (Device *) |
| virtual bool | is_shared (const void *, const device_ptr, Device *) |
| virtual bool | should_use_graphics_interop (const GraphicsInteropDevice &, const bool=false) |
| virtual void * | get_native_buffer (device_ptr) |
| virtual void | foreach_device (const std::function< void(Device *)> &callback) |
Public Attributes | |
| KernelGlobalsCPU | kernel_globals |
| vector< ThreadKernelGlobalsCPU > | kernel_thread_globals_ |
| unique_ptr< device_vector< KernelImageInfo > > | image_info |
| list< unique_ptr< device_vector< KernelImageInfo > > > | old_image_infos |
| Public Attributes inherited from Device | |
| DeviceInfo | info |
| Stats & | stats |
| Profiler & | profiler |
| bool | headless = true |
Protected Member Functions | |
| bool | load_kernels (uint64_t kernel_features) override |
| Protected Member Functions inherited from Device | |
| Device (const DeviceInfo &info_, Stats &stats_, Profiler &profiler_, bool headless_) | |
| virtual void | mem_free_sub_ptr (device_ptr) |
| virtual void * | host_alloc (const MemoryType type, const size_t size) |
| virtual void | host_free (const MemoryType type, void *host_pointer, const size_t size) |
Additional Inherited Members | |
| Static Public Member Functions inherited from Device | |
| static const CPUKernels & | get_cpu_kernels () |
| static unique_ptr< Device > | create (const DeviceInfo &info, Stats &stats, Profiler &profiler, bool headless) |
| static DeviceType | type_from_string (const char *name) |
| static string | string_from_type (DeviceType type) |
| static vector< DeviceType > | available_types () |
| static vector< DeviceInfo > | available_devices (const uint device_type_mask=DEVICE_MASK_ALL) |
| static DeviceInfo | dummy_device (const string &error_msg="") |
| static string | device_capabilities (const uint device_type_mask=DEVICE_MASK_ALL) |
| static DeviceInfo | get_multi_device (const vector< DeviceInfo > &subdevices, const int threads, bool background) |
| static void | tag_update () |
| static void | free_memory () |
| Protected Attributes inherited from Device | |
| string | error_msg |
| KernelImageLoadRequestedGPU | image_load_requested_gpu_ |
Definition at line 38 of file cpu/device_impl.h.
| CCL_NAMESPACE_BEGIN CPUDevice::CPUDevice | ( | const DeviceInfo & | info_, |
| Stats & | stats_, | ||
| Profiler & | profiler_, | ||
| bool | headless_ ) |
Definition at line 44 of file cpu/device_impl.cpp.
References DeviceInfo::cpu_threads, Device::Device(), Device::get_cpu_kernels(), CPUKernelFunction< FunctionType >::get_uarch_name(), image_info, Device::info, CPUKernels::integrator_init_from_camera, LOG_INFO, TaskScheduler::max_concurrency(), and MEM_GLOBAL.
|
override |
Definition at line 63 of file cpu/device_impl.cpp.
References image_info.
|
overridevirtual |
Reimplemented from Device.
Definition at line 329 of file cpu/device_impl.cpp.
References assert, DeviceInfo::cpu_threads, get_cpu_osl_memory(), Device::info, kernel_globals, kernel_thread_globals_, and Device::profiler.
Reimplemented from Device.
Definition at line 280 of file cpu/device_impl.cpp.
References Device::build_bvh(), BVHParams::bvh_layout, BVH_LAYOUT_EMBREE, BVH_LAYOUT_MULTI_EMBREEGPU_EMBREE, BVH_LAYOUT_MULTI_HIPRT_EMBREE, BVH_LAYOUT_MULTI_METAL_EMBREE, BVH_LAYOUT_MULTI_OPTIX_EMBREE, BVH::params, refit(), Device::stats, and BVHParams::top_level.
|
overridevirtual |
Implements Device.
Definition at line 178 of file cpu/device_impl.cpp.
References assert, kernel_const_copy(), kernel_globals, and kernel_thread_globals_.
|
overridevirtual |
Implements Device.
Definition at line 72 of file cpu/device_impl.cpp.
References BVH_LAYOUT_BVH2, and BVH_LAYOUT_EMBREE.
|
overridevirtual |
Reimplemented from Device.
Definition at line 348 of file cpu/device_impl.cpp.
Referenced by acquire_cpu_kernel_thread_globals().
|
overridevirtual |
Reimplemented from Device.
Definition at line 312 of file cpu/device_impl.cpp.
| void CPUDevice::global_alloc | ( | device_memory & | mem | ) |
Definition at line 200 of file cpu/device_impl.cpp.
References device_memory::data_size, Device::device_memory, device_memory::device_pointer, device_memory::device_size, device_memory::global_name(), device_memory::host_pointer, kernel_global_memory_copy(), kernel_globals, kernel_thread_globals_, LOG_DEBUG, device_memory::log_name(), Stats::mem_alloc(), device_memory::memory_size(), Device::stats, string_human_readable_number(), and string_human_readable_size().
Referenced by mem_copy_to().
| void CPUDevice::global_free | ( | device_memory & | mem | ) |
Definition at line 218 of file cpu/device_impl.cpp.
References Device::device_memory, device_memory::device_pointer, device_memory::device_size, Stats::mem_free(), and Device::stats.
Referenced by mem_copy_to(), and mem_free().
|
overridevirtual |
Reimplemented from Device.
Definition at line 275 of file cpu/device_impl.cpp.
| void CPUDevice::image_alloc | ( | device_image & | mem | ) |
Definition at line 227 of file cpu/device_impl.cpp.
References KernelImageInfo::data, device_memory::device_pointer, device_memory::device_size, device_memory::host_pointer, image_info, device_image::image_info_id, Device::info, device_image::info, LOG_DEBUG, device_image::log_name(), max, Stats::mem_alloc(), MEM_GLOBAL, device_memory::memory_size(), old_image_infos, Device::stats, string_human_readable_number(), and string_human_readable_size().
Referenced by mem_copy_to().
| void CPUDevice::image_free | ( | device_image & | mem | ) |
Definition at line 266 of file cpu/device_impl.cpp.
References device_memory::device_pointer, device_memory::device_size, Stats::mem_free(), and Device::stats.
Referenced by mem_copy_to(), and mem_free().
|
overrideprotectedvirtual |
Reimplemented from Device.
Definition at line 363 of file cpu/device_impl.cpp.
|
overridevirtual |
Implements Device.
Definition at line 81 of file cpu/device_impl.cpp.
References assert, Device::device_memory, device_memory::device_pointer, device_memory::device_size, device_memory::host_pointer, LOG_DEBUG, device_memory::log_name(), Stats::mem_alloc(), MEM_DEVICE_ONLY, MEM_GLOBAL, MEM_IMAGE_TEXTURE, device_memory::memory_size(), MIN_ALIGNMENT_DEVICE_MEMORY, Device::stats, string_human_readable_number(), string_human_readable_size(), device_memory::type, and util_aligned_malloc().
Referenced by mem_copy_to(), and mem_zero().
|
overridevirtual |
Reimplemented from Device.
Definition at line 173 of file cpu/device_impl.cpp.
References Device::device_memory, device_memory::device_pointer, and device_memory::memory_elements_size().
|
overridevirtual |
Implements Device.
Definition at line 133 of file cpu/device_impl.cpp.
References Device::device_memory.
|
overridevirtual |
Implements Device.
Definition at line 109 of file cpu/device_impl.cpp.
References Device::device_memory, device_memory::device_pointer, global_alloc(), global_free(), image_alloc(), image_free(), mem_alloc(), MEM_GLOBAL, MEM_IMAGE_TEXTURE, and device_memory::type.
|
overridevirtual |
Implements Device.
Definition at line 155 of file cpu/device_impl.cpp.
References Device::device_memory, device_memory::device_pointer, device_memory::device_size, global_free(), image_free(), MEM_DEVICE_ONLY, Stats::mem_free(), MEM_GLOBAL, MEM_IMAGE_TEXTURE, device_memory::memory_size(), Device::stats, device_memory::type, and util_aligned_free().
|
overridevirtual |
Implements Device.
Definition at line 128 of file cpu/device_impl.cpp.
References Device::device_memory.
|
overridevirtual |
Reimplemented from Device.
Definition at line 139 of file cpu/device_impl.cpp.
References Device::device_memory.
|
overridevirtual |
Implements Device.
Definition at line 144 of file cpu/device_impl.cpp.
References Device::device_memory, device_memory::device_pointer, mem_alloc(), and device_memory::memory_size().
|
overridevirtual |
Reimplemented from Device.
Definition at line 342 of file cpu/device_impl.cpp.
References kernel_thread_globals_, and old_image_infos.
|
overridevirtual |
Reimplemented from Device.
Definition at line 357 of file cpu/device_impl.cpp.
References KernelGlobalsCPU::image_load_requested_cpu, and kernel_globals.
| unique_ptr<device_vector<KernelImageInfo> > CPUDevice::image_info |
Definition at line 43 of file cpu/device_impl.h.
Referenced by CPUDevice(), image_alloc(), and ~CPUDevice().
| KernelGlobalsCPU CPUDevice::kernel_globals |
Definition at line 40 of file cpu/device_impl.h.
Referenced by acquire_cpu_kernel_thread_globals(), const_copy_to(), global_alloc(), and set_image_cache_func().
| vector<ThreadKernelGlobalsCPU> CPUDevice::kernel_thread_globals_ |
Definition at line 41 of file cpu/device_impl.h.
Referenced by acquire_cpu_kernel_thread_globals(), const_copy_to(), global_alloc(), and release_cpu_kernel_thread_globals().
| list<unique_ptr<device_vector<KernelImageInfo> > > CPUDevice::old_image_infos |
Definition at line 44 of file cpu/device_impl.h.
Referenced by image_alloc(), and release_cpu_kernel_thread_globals().