Blender
V3.3
|
#include <device_impl.h>
Public Attributes | |
KernelGlobalsCPU | kernel_globals |
device_vector< TextureInfo > | texture_info |
bool | need_texture_info |
![]() | |
DeviceInfo | info |
Stats & | stats |
Profiler & | profiler |
Protected Member Functions | |
virtual bool | load_kernels (uint) override |
![]() | |
Device (const DeviceInfo &info_, Stats &stats_, Profiler &profiler_) | |
virtual void | mem_free_sub_ptr (device_ptr) |
Additional Inherited Members | |
![]() | |
static const CPUKernels & | get_cpu_kernels () |
static Device * | create (const DeviceInfo &info, Stats &stats, Profiler &profiler) |
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 () |
![]() | |
string | error_msg |
Definition at line 32 of file cpu/device_impl.h.
CCL_NAMESPACE_BEGIN CPUDevice::CPUDevice | ( | const DeviceInfo & | info_, |
Stats & | stats_, | ||
Profiler & | profiler_ | ||
) |
Definition at line 53 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 74 of file cpu/device_impl.cpp.
References device_vector< T >::free(), and texture_info.
Reimplemented from Device.
Definition at line 259 of file cpu/device_impl.cpp.
References Device::build_bvh(), BVHParams::bvh_layout, BVH_LAYOUT_EMBREE, BVH_LAYOUT_MULTI_METAL_EMBREE, BVH_LAYOUT_MULTI_OPTIX_EMBREE, BVH::params, refit(), Device::stats, and BVHParams::top_level.
Implements Device.
Definition at line 192 of file cpu/device_impl.cpp.
References data, kernel_const_copy(), kernel_globals, and size().
|
overridevirtual |
Implements Device.
Definition at line 83 of file cpu/device_impl.cpp.
References BVH_LAYOUT_BVH2, and BVH_LAYOUT_EMBREE.
|
overridevirtual |
Reimplemented from Device.
Definition at line 282 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 295 of file cpu/device_impl.cpp.
References NULL.
Referenced by get_cpu_kernel_thread_globals().
void CPUDevice::global_alloc | ( | device_memory & | mem | ) |
Definition at line 206 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 219 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().
Reimplemented from Device.
Definition at line 304 of file cpu/device_impl.cpp.
bool CPUDevice::load_texture_info | ( | ) |
Definition at line 92 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 104 of file cpu/device_impl.cpp.
References data, 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 187 of file cpu/device_impl.cpp.
References device_memory::device_pointer, device_memory::memory_elements_size(), and offset.
|
overridevirtual |
Implements Device.
Definition at line 152 of file cpu/device_impl.cpp.
|
overridevirtual |
Implements Device.
Definition at line 133 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 169 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 158 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 228 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 249 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 34 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 37 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 36 of file cpu/device_impl.h.
Referenced by load_texture_info(), tex_alloc(), and ~CPUDevice().