Blender V2.61 - r43446
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

Device Class Reference

#include <AUD_PyAPI.h>

Inheritance diagram for Device:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~Device ()
virtual bool support_full_kernel ()=0
virtual string description ()=0
virtual const string & error_message ()
virtual void mem_alloc (device_memory &mem, MemoryType type)=0
virtual void mem_copy_to (device_memory &mem)=0
virtual void mem_copy_from (device_memory &mem, int y, int w, int h, int elem)=0
virtual void mem_zero (device_memory &mem)=0
virtual void mem_free (device_memory &mem)=0
virtual void const_copy_to (const char *name, void *host, size_t size)=0
virtual void tex_alloc (const char *name, device_memory &mem, bool interpolation=false, bool periodic=false)
virtual void tex_free (device_memory &mem)
virtual void pixels_alloc (device_memory &mem)
virtual void pixels_copy_from (device_memory &mem, int y, int w, int h)
virtual void pixels_free (device_memory &mem)
virtual void * osl_memory ()
virtual bool load_kernels (bool experimental)
virtual void task_add (DeviceTask &task)=0
virtual void task_wait ()=0
virtual void task_cancel ()=0
virtual void draw_pixels (device_memory &mem, int y, int w, int h, int dy, int width, int height, bool transparent)

Static Public Member Functions

static Devicecreate (DeviceInfo &info, bool background=true, int threads=0)
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 ()

Public Attributes

PyObject_HEAD
AUD_Reference_AUD_IDevice
device

Protected Member Functions

 Device ()

Protected Attributes

bool background
string error_msg

Detailed Description

Definition at line 58 of file AUD_PyAPI.h.


Constructor & Destructor Documentation

Device::Device ( ) [inline, protected]

Definition at line 96 of file device.h.

virtual Device::~Device ( ) [inline, virtual]

Definition at line 102 of file device.h.


Member Function Documentation

vector< DeviceInfo > & Device::available_devices ( ) [static]
vector< DeviceType > & Device::available_types ( ) [static]
virtual void Device::const_copy_to ( const char *  name,
void *  host,
size_t  size 
) [pure virtual]

Implemented in CPUDevice, and CUDADevice.

Referenced by Scene::device_update().

Device * Device::create ( DeviceInfo info,
bool  background = true,
int  threads = 0 
) [static]
virtual string Device::description ( ) [pure virtual]

Implemented in CPUDevice, and CUDADevice.

Referenced by main().

void Device::draw_pixels ( device_memory mem,
int  y,
int  w,
int  h,
int  dy,
int  width,
int  height,
bool  transparent 
) [virtual]

Reimplemented in CUDADevice.

Definition at line 121 of file device.cpp.

References device_memory::data_pointer, and pixels_copy_from().

Referenced by DisplayBuffer::draw().

virtual const string& Device::error_message ( ) [inline, virtual]

Definition at line 108 of file device.h.

References error_msg.

Referenced by Session::run(), Session::run_cpu(), and Session::run_gpu().

virtual bool Device::load_kernels ( bool  experimental) [inline, virtual]

Reimplemented in CUDADevice.

Definition at line 135 of file device.h.

Referenced by Session::run().

virtual void Device::mem_alloc ( device_memory mem,
MemoryType  type 
) [pure virtual]
virtual void Device::mem_copy_from ( device_memory mem,
int  y,
int  w,
int  h,
int  elem 
) [pure virtual]
virtual void Device::mem_copy_to ( device_memory mem) [pure virtual]

Implemented in CPUDevice, and CUDADevice.

Referenced by MeshManager::displace(), and RenderBuffers::reset().

virtual void Device::mem_free ( device_memory mem) [pure virtual]
virtual void Device::mem_zero ( device_memory mem) [pure virtual]

Implemented in CPUDevice, and CUDADevice.

Referenced by RenderBuffers::reset().

virtual void* Device::osl_memory ( ) [inline, virtual]

Reimplemented in CPUDevice.

Definition at line 132 of file device.h.

References NULL.

Referenced by MeshManager::update_osl_attributes().

void Device::pixels_alloc ( device_memory mem) [virtual]

Reimplemented in CUDADevice.

Definition at line 106 of file device.cpp.

References mem_alloc(), and MEM_READ_WRITE.

Referenced by DisplayBuffer::reset().

void Device::pixels_copy_from ( device_memory mem,
int  y,
int  w,
int  h 
) [virtual]

Reimplemented in CUDADevice.

Definition at line 111 of file device.cpp.

References mem_copy_from().

Referenced by draw_pixels(), and DisplayBuffer::write().

void Device::pixels_free ( device_memory mem) [virtual]

Reimplemented in CUDADevice.

Definition at line 116 of file device.cpp.

References mem_free().

Referenced by DisplayBuffer::device_free().

string Device::string_from_type ( DeviceType  type) [static]

Definition at line 205 of file device.cpp.

References DEVICE_CPU, DEVICE_CUDA, DEVICE_MULTI, DEVICE_NETWORK, and DEVICE_OPENCL.

Referenced by main(), and options_parse().

virtual bool Device::support_full_kernel ( ) [pure virtual]

Implemented in CPUDevice, and CUDADevice.

Referenced by SVMShaderManager::device_update().

virtual void Device::task_add ( DeviceTask task) [pure virtual]
virtual void Device::task_cancel ( ) [pure virtual]

Implemented in CPUDevice, and CUDADevice.

Referenced by Session::reset_cpu().

virtual void Device::task_wait ( ) [pure virtual]
virtual void Device::tex_alloc ( const char *  name,
device_memory mem,
bool  interpolation = false,
bool  periodic = false 
) [inline, virtual]
virtual void Device::tex_free ( device_memory mem) [inline, virtual]
DeviceType Device::type_from_string ( const char *  name) [static]

Definition at line 189 of file device.cpp.

References DEVICE_CPU, DEVICE_CUDA, DEVICE_MULTI, DEVICE_NETWORK, DEVICE_NONE, and DEVICE_OPENCL.

Referenced by main(), and options_parse().


Member Data Documentation

bool Device::background [protected]

Definition at line 60 of file AUD_PyAPI.h.

Referenced by create().

string Device::error_msg [protected]

Definition at line 99 of file device.h.

Referenced by CUDADevice::cuda_error(), and error_message().


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