Blender V5.0
device_only_memory< T > Class Template Reference

#include <memory.h>

Inherits device_memory.

Public Member Functions

 device_only_memory (Device *device, const char *name, bool allow_host_memory_fallback=false)
 device_only_memory (device_only_memory &&other) noexcept
 ~device_only_memory () override
void alloc_to_device (const size_t num, bool shrink_to_fit=true)
void free ()
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_memoryoperator= (const device_memory &)=delete
device_memoryoperator= (device_memory &&)=delete

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
Devicedevice
device_ptr device_pointer
void * host_pointer
void * shared_pointer
int shared_counter
bool move_to_host = false
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 ()
Protected Attributes inherited from device_memory
device_ptr original_device_ptr
size_t original_device_size
Deviceoriginal_device
bool need_realloc_
bool modified

Detailed Description

template<typename T>
class device_only_memory< T >

Definition at line 311 of file cycles/device/memory.h.

Constructor & Destructor Documentation

◆ device_only_memory() [1/2]

◆ device_only_memory() [2/2]

template<typename T>
device_only_memory< T >::device_only_memory ( device_only_memory< T > && other)
inlinenoexcept

Definition at line 320 of file cycles/device/memory.h.

References device_only_memory().

◆ ~device_only_memory()

template<typename T>
device_only_memory< T >::~device_only_memory ( )
inlineoverride

Definition at line 322 of file cycles/device/memory.h.

References free().

Member Function Documentation

◆ alloc_to_device()

template<typename T>
void device_only_memory< T >::alloc_to_device ( const size_t num,
bool shrink_to_fit = true )
inline

◆ free()

template<typename T>
void device_only_memory< T >::free ( )
inline

◆ zero_to_device()

template<typename T>
void device_only_memory< T >::zero_to_device ( )
inline

Definition at line 352 of file cycles/device/memory.h.

References device_memory::device_zero().


The documentation for this class was generated from the following file: