Blender  V2.93
Public Member Functions | List of all members
device_only_memory< T > Class Template Reference

#include <device_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
 
virtual ~device_only_memory ()
 
void alloc_to_device (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 (int elements)
 
virtual ~device_memory ()
 
void swap_device (Device *new_device, size_t new_device_size, device_ptr new_device_ptr)
 
void restore_device ()
 
bool is_resident (Device *sub_device) const
 

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
 
size_t data_depth
 
MemoryType type
 
const char * name
 
Devicedevice
 
device_ptr device_pointer
 
void * host_pointer
 
void * shared_pointer
 
int shared_counter
 
- Protected Member Functions inherited from device_memory
 device_memory (Device *device, const char *name, MemoryType type)
 
 device_memory (device_memory &&other) noexcept
 
 device_memory (const device_memory &)=delete
 
device_memoryoperator= (const device_memory &)=delete
 
void * host_alloc (size_t size)
 
void host_free ()
 
void device_alloc ()
 
void device_free ()
 
void device_copy_to ()
 
void device_copy_from (int y, int w, int h, int elem)
 
void device_zero ()
 
- 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 272 of file device_memory.h.

Constructor & Destructor Documentation

◆ device_only_memory() [1/2]

template<typename T >
device_only_memory< T >::device_only_memory ( Device device,
const char *  name,
bool  allow_host_memory_fallback = false 
)
inline

Definition at line 274 of file device_memory.h.

References device_memory::data_elements, device_memory::data_type, and max.

◆ device_only_memory() [2/2]

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

Definition at line 281 of file device_memory.h.

◆ ~device_only_memory()

template<typename T >
virtual device_only_memory< T >::~device_only_memory ( )
inlinevirtual

Definition at line 285 of file device_memory.h.

References device_only_memory< T >::free().

Member Function Documentation

◆ alloc_to_device()

template<typename T >
void device_only_memory< T >::alloc_to_device ( 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

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