|
Blender V5.0
|
#include <memory.h>
Inherits device_memory.
Public Member Functions | |
| device_vector (Device *device, const char *name, MemoryType type) | |
| ~device_vector () override | |
| T * | alloc (const size_t width, const size_t height=0) |
| T * | resize (const size_t width, const size_t height=0) |
| void | steal_data (array< T > &from) |
| void | free () |
| void | free_if_need_realloc (bool force_free) |
| bool | is_modified () const |
| bool | need_realloc () |
| void | tag_modified () |
| void | tag_realloc () |
| size_t | size () const |
| T * | data () |
| const T * | data () const |
| T & | operator[] (size_t i) |
| void | copy_to_device () |
| void | copy_to_device_if_modified () |
| void | clear_modified () |
| void | copy_from_device () |
| void | copy_from_device (const size_t y, const size_t w, size_t h) |
| void | zero_to_device () |
| Public Member Functions inherited from device_memory | |
| size_t | memory_size () |
| size_t | memory_elements_size (const int elements) |
| virtual | ~device_memory () |
| void | swap_device (Device *new_device, const size_t new_device_size, device_ptr new_device_ptr) |
| void | restore_device () |
| bool | is_resident (Device *sub_device) const |
| bool | is_shared (Device *sub_device) const |
| device_memory (const device_memory &)=delete | |
| device_memory (device_memory &&other) noexcept=delete | |
| device_memory & | operator= (const device_memory &)=delete |
| device_memory & | operator= (device_memory &&)=delete |
Protected Member Functions | |
| size_t | size (const size_t width, const size_t height) |
| Protected Member Functions inherited from device_memory | |
| device_memory (Device *device, const char *name, MemoryType type) | |
| void * | host_alloc (const size_t size) |
| void | device_alloc () |
| void | device_copy_to () |
| void | device_move_to_host () |
| void | device_copy_from (const size_t y, const size_t w, size_t h, const size_t elem) |
| void | device_zero () |
| void | host_and_device_free () |
| bool | device_is_cpu () |
Additional Inherited Members | |
| Public Attributes inherited from device_memory | |
| DataType | data_type |
| int | data_elements |
| size_t | data_size |
| size_t | device_size |
| size_t | data_width |
| size_t | data_height |
| MemoryType | type |
| const char * | name |
| string | name_storage |
| Device * | device |
| device_ptr | device_pointer |
| void * | host_pointer |
| void * | shared_pointer |
| int | shared_counter |
| bool | move_to_host = false |
| Protected Attributes inherited from device_memory | |
| device_ptr | original_device_ptr |
| size_t | original_device_size |
| Device * | original_device |
| bool | need_realloc_ |
| bool | modified |
Definition at line 369 of file cycles/device/memory.h.
|
inline |
Definition at line 371 of file cycles/device/memory.h.
References assert, device_memory::data_elements, device_memory::data_type, device_type_traits< T >::data_type, device_memory::Device, device_memory::device, device_memory::device_memory(), device_memory::modified, device_memory::name, device_memory::need_realloc_, device_type_traits< T >::num_elements, and device_memory::type.
|
inlineoverride |
Definition at line 382 of file cycles/device/memory.h.
References free().
|
inline |
Definition at line 388 of file cycles/device/memory.h.
References assert, data(), device_memory::data_height, device_memory::data_size, device_memory::data_width, device_memory::device_pointer, device_memory::host_alloc(), device_memory::host_and_device_free(), device_memory::host_pointer, device_memory::modified, size(), and T.
Referenced by PathTraceWorkGPU::adaptive_sampling_convergence_check_count_active(), LightTree::build(), Camera::device_update(), Integrator::device_update(), LightManager::device_update_background(), ShaderManager::device_update_common(), LightManager::device_update_distribution(), LightManager::device_update_ies(), LightManager::device_update_lights(), GeometryManager::device_update_mesh(), ParticleSystemManager::device_update_particles(), ObjectManager::device_update_prim_offsets(), SVMShaderManager::device_update_specific(), ObjectManager::device_update_transforms(), LightManager::device_update_tree(), and GeometryManager::update_svm_attributes().
|
inline |
Definition at line 529 of file cycles/device/memory.h.
References device_memory::modified, and device_memory::need_realloc_.
Referenced by Integrator::device_update(), ObjectManager::device_update_flags(), and ObjectManager::device_update_prim_offsets().
|
inline |
Definition at line 535 of file cycles/device/memory.h.
References device_memory::data_height, device_memory::data_width, device_memory::device_copy_from(), and T.
|
inline |
Definition at line 540 of file cycles/device/memory.h.
References device_memory::device_copy_from(), T, w(), and y.
|
inline |
Definition at line 513 of file cycles/device/memory.h.
References device_memory::data_size, and device_memory::device_copy_to().
Referenced by copy_to_device_if_modified(), Camera::device_update(), Integrator::device_update(), LookupTables::device_update(), LightManager::device_update_background(), GeometryManager::device_update_bvh(), LightManager::device_update_distribution(), ObjectManager::device_update_flags(), ObjectManager::device_update_geom_offsets(), LightManager::device_update_ies(), LightManager::device_update_lights(), GeometryManager::device_update_mesh(), ParticleSystemManager::device_update_particles(), ObjectManager::device_update_prim_offsets(), LightManager::device_update_tree(), and GeometryManager::update_svm_attributes().
|
inline |
Definition at line 520 of file cycles/device/memory.h.
References copy_to_device(), and device_memory::modified.
Referenced by GeometryManager::device_update_mesh(), and ShaderManager::device_update_post().
|
inline |
Definition at line 497 of file cycles/device/memory.h.
References device_memory::host_pointer, and T.
Referenced by PathTraceWorkGPU::adaptive_sampling_convergence_check_count_active(), LookupTables::add_table(), alloc(), ObjectManager::apply_static_transforms(), PathTraceWork::copy_from_render_buffers(), PathTraceWork::copy_to_render_buffers(), DenoiserGPU::denoise_buffer(), ObjectManager::device_update_flags(), ObjectManager::device_update_geom_offsets(), LightManager::device_update_tree(), fill_shader_input(), fill_shader_input(), fill_shader_input(), PassAccessor::get_render_tile_pixels(), PassAccessor::get_render_tile_pixels(), operator[](), read_shader_output(), read_shader_output(), read_shader_output(), render_buffers_host_copy_denoised(), resize(), PassAccessorCPU::run_get_pass_kernel_processor_float(), PassAccessorCPU::run_get_pass_kernel_processor_half_rgba(), PassAccessor::set_render_tile_pixels(), shade_background_pixels(), and TileManager::write_tile().
|
inline |
Definition at line 502 of file cycles/device/memory.h.
References device_memory::host_pointer, and T.
|
inline |
Definition at line 451 of file cycles/device/memory.h.
References assert, device_memory::data_height, device_memory::data_size, device_memory::data_width, device_memory::device_pointer, device_memory::host_and_device_free(), device_memory::host_pointer, device_memory::modified, and device_memory::need_realloc_.
Referenced by Camera::device_free(), LightManager::device_free(), LookupTables::device_free(), ParticleSystemManager::device_free(), SVMShaderManager::device_free(), VolumeManager::device_free(), ShaderManager::device_free_common(), Camera::device_update(), Integrator::device_update(), VolumeManager::device_update(), ShaderManager::device_update_common(), LightManager::device_update_distribution(), free_if_need_realloc(), and ~device_vector().
|
inline |
Definition at line 464 of file cycles/device/memory.h.
References free(), and device_memory::need_realloc_.
Referenced by GeometryManager::device_free(), Integrator::device_free(), and ObjectManager::device_free().
|
inline |
Definition at line 471 of file cycles/device/memory.h.
References device_memory::modified.
|
inline |
Definition at line 476 of file cycles/device/memory.h.
References device_memory::need_realloc_.
Referenced by GeometryManager::device_update_attributes(), GeometryManager::device_update_mesh(), ObjectManager::device_update_transforms(), and GeometryManager::update_svm_attributes().
|
inline |
Definition at line 507 of file cycles/device/memory.h.
References assert, data(), device_memory::data_size, i, and T.
|
inline |
Definition at line 409 of file cycles/device/memory.h.
References assert, data(), device_memory::data_height, device_memory::data_size, device_memory::data_width, device_memory::device_pointer, device_memory::host_alloc(), device_memory::host_and_device_free(), device_memory::host_pointer, i, size(), and T.
Referenced by LookupTables::add_table().
|
inline |
Definition at line 492 of file cycles/device/memory.h.
References device_memory::data_size.
Referenced by alloc(), DenoiserGPU::denoise_buffer(), Integrator::device_update(), ObjectManager::device_update_geom_offsets(), read_shader_output(), resize(), and GeometryManager::update_svm_attributes().
|
inlineprotected |
Definition at line 551 of file cycles/device/memory.h.
|
inline |
Definition at line 439 of file cycles/device/memory.h.
References assert, device_memory::data_height, device_memory::data_size, device_memory::data_width, device_memory::device_pointer, device_memory::host_and_device_free(), device_memory::host_pointer, array< T, alignment >::size(), and array< T, alignment >::steal_pointer().
Referenced by GeometryManager::device_update_bvh().
|
inline |
Definition at line 481 of file cycles/device/memory.h.
References device_memory::modified.
Referenced by ObjectManager::device_update(), GeometryManager::device_update_preprocess(), and tag_realloc().
|
inline |
Definition at line 486 of file cycles/device/memory.h.
References device_memory::need_realloc_, and tag_modified().
Referenced by ObjectManager::device_update(), and GeometryManager::device_update_preprocess().
|
inline |
Definition at line 545 of file cycles/device/memory.h.
References device_memory::device_zero().