|
Blender V4.3
|
#include <device_impl.h>
Inherits Device.
Public Member Functions | |
| CPUDevice (const DeviceInfo &info_, Stats &stats_, Profiler &profiler_, bool headless_) | |
| ~CPUDevice () | |
| virtual BVHLayoutMask | get_bvh_layout_mask (uint) const override |
| bool | load_texture_info () |
| virtual void | mem_alloc (device_memory &mem) override |
| virtual void | mem_copy_to (device_memory &mem) override |
| virtual void | mem_copy_from (device_memory &mem, size_t y, size_t w, size_t h, size_t elem) override |
| virtual void | mem_zero (device_memory &mem) override |
| virtual void | mem_free (device_memory &mem) override |
| virtual device_ptr | mem_alloc_sub_ptr (device_memory &mem, size_t offset, size_t) override |
| virtual void | const_copy_to (const char *name, void *host, 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 |
| virtual void | get_cpu_kernel_thread_globals (vector< CPUKernelThreadGlobals > &kernel_thread_globals) override |
| virtual void * | 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 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 | should_use_graphics_interop () |
| virtual void * | get_native_buffer (device_ptr) |
| virtual void | foreach_device (const 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 | |
| virtual 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) |
Additional Inherited Members | |
Static Public Member Functions inherited from Device | |
| static const CPUKernels & | get_cpu_kernels () |
| static 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 (uint device_type_mask=DEVICE_MASK_ALL) |
| static DeviceInfo | dummy_device (const string &error_msg="") |
| static string | device_capabilities (uint device_type_mask=DEVICE_MASK_ALL) |
| static DeviceInfo | get_multi_device (const vector< DeviceInfo > &subdevices, int threads, bool background) |
| static void | tag_update () |
| static void | free_memory () |
Protected Attributes inherited from Device | |
| string | error_msg |
Definition at line 39 of file cpu/device_impl.h.
| CCL_NAMESPACE_BEGIN CPUDevice::CPUDevice | ( | const DeviceInfo & | info_, |
| Stats & | stats_, | ||
| Profiler & | profiler_, | ||
| bool | headless_ ) |
Definition at line 58 of file cpu/device_impl.cpp.
References DeviceInfo::cpu_threads, Device::get_cpu_kernels(), CPUKernelFunction< FunctionType >::get_uarch_name(), Device::info, CPUKernels::integrator_init_from_camera, kernel_globals, TaskScheduler::max_concurrency(), need_texture_info, and VLOG_INFO.
| CPUDevice::~CPUDevice | ( | ) |
Definition at line 79 of file cpu/device_impl.cpp.
References device_vector< T >::free(), and texture_info.
Reimplemented from Device.
Definition at line 264 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 197 of file cpu/device_impl.cpp.
References kernel_const_copy(), kernel_globals, and KernelData.
|
overridevirtual |
Implements Device.
Definition at line 88 of file cpu/device_impl.cpp.
References BVH_LAYOUT_BVH2, and BVH_LAYOUT_EMBREE.
|
overridevirtual |
Reimplemented from Device.
Definition at line 307 of file cpu/device_impl.cpp.
References DeviceInfo::cpu_threads, get_cpu_osl_memory(), Device::info, kernel_globals, load_texture_info(), and Device::profiler.
|
overridevirtual |
Reimplemented from Device.
Definition at line 320 of file cpu/device_impl.cpp.
References NULL.
Referenced by get_cpu_kernel_thread_globals().
|
overridevirtual |
Reimplemented from Device.
Definition at line 290 of file cpu/device_impl.cpp.
References guiding_device_type().
| void CPUDevice::global_alloc | ( | device_memory & | mem | ) |
Definition at line 211 of file cpu/device_impl.cpp.
References device_memory::data_size, device_memory::device_pointer, device_memory::device_size, device_memory::host_pointer, kernel_global_memory_copy(), kernel_globals, Stats::mem_alloc(), device_memory::memory_size(), device_memory::name, Device::stats, string_human_readable_number(), string_human_readable_size(), and VLOG_WORK.
Referenced by mem_copy_to().
| void CPUDevice::global_free | ( | device_memory & | mem | ) |
Definition at line 224 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 329 of file cpu/device_impl.cpp.
| bool CPUDevice::load_texture_info | ( | ) |
Definition at line 97 of file cpu/device_impl.cpp.
References device_vector< T >::copy_to_device(), need_texture_info, and texture_info.
Referenced by get_cpu_kernel_thread_globals().
|
overridevirtual |
Implements Device.
Definition at line 109 of file cpu/device_impl.cpp.
References device_memory::device_pointer, device_memory::device_size, device_memory::host_pointer, Stats::mem_alloc(), MEM_DEVICE_ONLY, MEM_GLOBAL, MEM_TEXTURE, device_memory::memory_size(), MIN_ALIGNMENT_CPU_DATA_TYPES, device_memory::name, Device::stats, string_human_readable_number(), string_human_readable_size(), device_memory::type, util_aligned_malloc(), and VLOG_WORK.
Referenced by mem_copy_to(), and mem_zero().
|
overridevirtual |
Reimplemented from Device.
Definition at line 192 of file cpu/device_impl.cpp.
References device_memory::device_pointer, and device_memory::memory_elements_size().
|
overridevirtual |
Implements Device.
Definition at line 157 of file cpu/device_impl.cpp.
|
overridevirtual |
Implements Device.
Definition at line 138 of file cpu/device_impl.cpp.
References 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 174 of file cpu/device_impl.cpp.
References device_memory::device_pointer, device_memory::device_size, global_free(), device_memory::host_pointer, MEM_DEVICE_ONLY, Stats::mem_free(), MEM_GLOBAL, MEM_TEXTURE, Device::stats, tex_free(), device_memory::type, and util_aligned_free().
|
overridevirtual |
Implements Device.
Definition at line 163 of file cpu/device_impl.cpp.
References device_memory::device_pointer, mem_alloc(), and device_memory::memory_size().
| void CPUDevice::tex_alloc | ( | device_texture & | mem | ) |
Definition at line 233 of file cpu/device_impl.cpp.
References device_vector< T >::data(), device_memory::device_pointer, device_memory::device_size, device_memory::host_pointer, device_texture::info, Stats::mem_alloc(), device_memory::memory_size(), device_memory::name, need_texture_info, device_vector< T >::resize(), device_vector< T >::size(), device_texture::slot, Device::stats, string_human_readable_number(), string_human_readable_size(), texture_info, and VLOG_WORK.
Referenced by mem_copy_to().
| void CPUDevice::tex_free | ( | device_texture & | mem | ) |
Definition at line 254 of file cpu/device_impl.cpp.
References device_memory::device_pointer, device_memory::device_size, Stats::mem_free(), need_texture_info, and Device::stats.
Referenced by mem_copy_to(), and mem_free().
| KernelGlobalsCPU CPUDevice::kernel_globals |
Definition at line 41 of file cpu/device_impl.h.
Referenced by const_copy_to(), CPUDevice(), get_cpu_kernel_thread_globals(), and global_alloc().
| bool CPUDevice::need_texture_info |
Definition at line 44 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 43 of file cpu/device_impl.h.
Referenced by load_texture_info(), tex_alloc(), and ~CPUDevice().