|
Blender V5.0
|
#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 (uint) const override |
| bool | load_texture_info () |
| 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 |
| 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 | tex_alloc (device_texture &mem) |
| void | tex_free (device_texture &mem) |
| void | build_bvh (BVH *bvh, Progress &progress, bool refit) override |
| void * | get_guiding_device () const override |
| void | get_cpu_kernel_thread_globals (vector< ThreadKernelGlobalsCPU > &kernel_thread_globals) override |
| OSLGlobals * | get_cpu_osl_memory () 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 () |
| 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 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 |
| device_vector< TextureInfo > | texture_info |
| bool | need_texture_info |
| Public Attributes inherited from Device | |
| DeviceInfo | info |
| Stats & | stats |
| Profiler & | profiler |
| bool | headless = true |
Protected Member Functions | |
| bool | load_kernels (uint) 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 |
Definition at line 37 of file cpu/device_impl.h.
| CCL_NAMESPACE_BEGIN CPUDevice::CPUDevice | ( | const DeviceInfo & | info_, |
| Stats & | stats_, | ||
| Profiler & | profiler_, | ||
| bool | headless_ ) |
Definition at line 42 of file cpu/device_impl.cpp.
References Device::Device(), Device::get_cpu_kernels(), CPUKernelFunction< FunctionType >::get_uarch_name(), Device::info, CPUKernels::integrator_init_from_camera, LOG_INFO, TaskScheduler::max_concurrency(), MEM_GLOBAL, need_texture_info, and texture_info.
|
override |
Definition at line 60 of file cpu/device_impl.cpp.
References texture_info.
Reimplemented from Device.
Definition at line 253 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 184 of file cpu/device_impl.cpp.
References assert, data, kernel_const_copy(), kernel_globals, name, and size().
|
overridevirtual |
Implements Device.
Definition at line 69 of file cpu/device_impl.cpp.
References BVH_LAYOUT_BVH2, and BVH_LAYOUT_EMBREE.
|
overridevirtual |
Reimplemented from Device.
Definition at line 302 of file cpu/device_impl.cpp.
References get_cpu_osl_memory(), i, Device::info, kernel_globals, load_texture_info(), and Device::profiler.
|
overridevirtual |
Reimplemented from Device.
Definition at line 315 of file cpu/device_impl.cpp.
Referenced by get_cpu_kernel_thread_globals().
|
overridevirtual |
Reimplemented from Device.
Definition at line 285 of file cpu/device_impl.cpp.
References guiding_device_type().
| 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::host_pointer, kernel_global_memory_copy(), kernel_globals, LOG_DEBUG, device_memory::memory_size(), device_memory::name, 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 213 of file cpu/device_impl.cpp.
References Device::device_memory, device_memory::device_pointer, device_memory::device_size, and Device::stats.
Referenced by mem_copy_to(), and mem_free().
|
overrideprotectedvirtual |
Reimplemented from Device.
Definition at line 324 of file cpu/device_impl.cpp.
| bool CPUDevice::load_texture_info | ( | ) |
Definition at line 78 of file cpu/device_impl.cpp.
References need_texture_info, and texture_info.
Referenced by get_cpu_kernel_thread_globals().
|
overridevirtual |
Implements Device.
Definition at line 90 of file cpu/device_impl.cpp.
References assert, data, Device::device_memory, device_memory::device_pointer, device_memory::device_size, device_memory::host_pointer, LOG_DEBUG, MEM_DEVICE_ONLY, MEM_GLOBAL, MEM_TEXTURE, device_memory::memory_size(), MIN_ALIGNMENT_DEVICE_MEMORY, device_memory::name, 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 179 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 144 of file cpu/device_impl.cpp.
References Device::device_memory.
|
overridevirtual |
Implements Device.
Definition at line 120 of file cpu/device_impl.cpp.
References Device::device_memory, device_memory::device_pointer, global_alloc(), global_free(), mem_alloc(), MEM_GLOBAL, MEM_TEXTURE, tex_alloc(), tex_free(), and device_memory::type.
|
overridevirtual |
Implements Device.
Definition at line 161 of file cpu/device_impl.cpp.
References Device::device_memory, device_memory::device_pointer, device_memory::device_size, global_free(), MEM_DEVICE_ONLY, MEM_GLOBAL, MEM_TEXTURE, device_memory::memory_size(), Device::stats, tex_free(), device_memory::type, and util_aligned_free().
|
overridevirtual |
Implements Device.
Definition at line 139 of file cpu/device_impl.cpp.
References Device::device_memory.
|
overridevirtual |
Implements Device.
Definition at line 150 of file cpu/device_impl.cpp.
References Device::device_memory, device_memory::device_pointer, mem_alloc(), and device_memory::memory_size().
| void CPUDevice::tex_alloc | ( | device_texture & | mem | ) |
Definition at line 222 of file cpu/device_impl.cpp.
References device_memory::device_pointer, device_memory::device_size, device_memory::host_pointer, device_texture::info, LOG_DEBUG, device_memory::memory_size(), device_memory::name, need_texture_info, device_texture::slot, Device::stats, string_human_readable_number(), string_human_readable_size(), and texture_info.
Referenced by mem_copy_to().
| void CPUDevice::tex_free | ( | device_texture & | mem | ) |
Definition at line 243 of file cpu/device_impl.cpp.
References device_memory::device_pointer, device_memory::device_size, need_texture_info, and Device::stats.
Referenced by mem_copy_to(), and mem_free().
| KernelGlobalsCPU CPUDevice::kernel_globals |
Definition at line 39 of file cpu/device_impl.h.
Referenced by const_copy_to(), get_cpu_kernel_thread_globals(), and global_alloc().
| bool CPUDevice::need_texture_info |
Definition at line 42 of file cpu/device_impl.h.
Referenced by CPUDevice(), load_texture_info(), tex_alloc(), and tex_free().
| device_vector<TextureInfo> CPUDevice::texture_info |
Definition at line 41 of file cpu/device_impl.h.
Referenced by CPUDevice(), load_texture_info(), tex_alloc(), and ~CPUDevice().