Blender V2.61 - r43446
|
Public Member Functions | |
CPUDevice (int threads_num) | |
~CPUDevice () | |
bool | support_full_kernel () |
string | description () |
void | mem_alloc (device_memory &mem, MemoryType type) |
void | mem_copy_to (device_memory &mem) |
void | mem_copy_from (device_memory &mem, int y, int w, int h, int elem) |
void | mem_zero (device_memory &mem) |
void | mem_free (device_memory &mem) |
void | const_copy_to (const char *name, void *host, size_t size) |
void | tex_alloc (const char *name, device_memory &mem, bool interpolation, bool periodic) |
void | tex_free (device_memory &mem) |
void * | osl_memory () |
void | thread_run (int t) |
void | thread_path_trace (DeviceTask &task) |
void | thread_tonemap (DeviceTask &task) |
void | thread_shader (DeviceTask &task) |
void | task_add (DeviceTask &task) |
void | task_wait () |
void | task_cancel () |
Public Attributes | |
vector< thread * > | threads |
ThreadQueue< DeviceTask > | tasks |
KernelGlobals * | kg |
Definition at line 40 of file device_cpu.cpp.
CPUDevice::CPUDevice | ( | int | threads_num | ) | [inline] |
Definition at line 47 of file device_cpu.cpp.
References function_bind, i, kernel_globals_create(), kg, system_cpu_support_optimized(), system_cpu_thread_count(), thread_run(), and threads.
CPUDevice::~CPUDevice | ( | ) | [inline] |
Definition at line 63 of file device_cpu.cpp.
References kernel_globals_free(), kg, ThreadQueue< T >::stop(), tasks, and threads.
void CPUDevice::const_copy_to | ( | const char * | name, |
void * | host, | ||
size_t | size | ||
) | [inline, virtual] |
Implements Device.
Definition at line 110 of file device_cpu.cpp.
References kernel_const_copy(), and kg.
string CPUDevice::description | ( | ) | [inline, virtual] |
Implements Device.
Definition at line 80 of file device_cpu.cpp.
References system_cpu_brand_string().
void CPUDevice::mem_alloc | ( | device_memory & | mem, |
MemoryType | type | ||
) | [inline, virtual] |
Implements Device.
Definition at line 85 of file device_cpu.cpp.
References device_memory::data_pointer, and device_memory::device_pointer.
void CPUDevice::mem_copy_from | ( | device_memory & | mem, |
int | y, | ||
int | w, | ||
int | h, | ||
int | elem | ||
) | [inline, virtual] |
Implements Device.
Definition at line 95 of file device_cpu.cpp.
void CPUDevice::mem_copy_to | ( | device_memory & | mem | ) | [inline, virtual] |
Implements Device.
Definition at line 90 of file device_cpu.cpp.
void CPUDevice::mem_free | ( | device_memory & | mem | ) | [inline, virtual] |
Implements Device.
Definition at line 105 of file device_cpu.cpp.
References device_memory::device_pointer.
void CPUDevice::mem_zero | ( | device_memory & | mem | ) | [inline, virtual] |
Implements Device.
Definition at line 100 of file device_cpu.cpp.
References device_memory::device_pointer, and device_memory::memory_size().
void* CPUDevice::osl_memory | ( | ) | [inline, virtual] |
Reimplemented from Device.
Definition at line 126 of file device_cpu.cpp.
References kernel_osl_memory(), kg, and NULL.
bool CPUDevice::support_full_kernel | ( | ) | [inline, virtual] |
Implements Device.
Definition at line 75 of file device_cpu.cpp.
void CPUDevice::task_add | ( | DeviceTask & | task | ) | [inline, virtual] |
Implements Device.
Definition at line 243 of file device_cpu.cpp.
References DeviceTask::split(), tasks, and threads.
void CPUDevice::task_cancel | ( | ) | [inline, virtual] |
Implements Device.
Definition at line 255 of file device_cpu.cpp.
References ThreadQueue< T >::cancel(), and tasks.
void CPUDevice::task_wait | ( | ) | [inline, virtual] |
Implements Device.
Definition at line 250 of file device_cpu.cpp.
References tasks, and ThreadQueue< T >::wait_done().
void CPUDevice::tex_alloc | ( | const char * | name, |
device_memory & | mem, | ||
bool | interpolation, | ||
bool | periodic | ||
) | [inline, virtual] |
Reimplemented from Device.
Definition at line 115 of file device_cpu.cpp.
References device_memory::data_height, device_memory::data_pointer, device_memory::data_width, device_memory::device_pointer, kernel_tex_copy(), and kg.
void CPUDevice::tex_free | ( | device_memory & | mem | ) | [inline, virtual] |
Reimplemented from Device.
Definition at line 121 of file device_cpu.cpp.
References device_memory::device_pointer.
void CPUDevice::thread_path_trace | ( | DeviceTask & | task | ) | [inline] |
Definition at line 151 of file device_cpu.cpp.
References DeviceTask::buffer, DeviceTask::h, kernel_cpu_path_trace(), kernel_osl_use(), kg, DeviceTask::offset, DeviceTask::rng_state, DeviceTask::sample, DeviceTask::stride, system_cpu_support_optimized(), tasks, DeviceTask::w, ThreadQueue< T >::worker_cancel(), DeviceTask::x, and DeviceTask::y.
Referenced by thread_run().
void CPUDevice::thread_run | ( | int | t | ) | [inline] |
Definition at line 135 of file device_cpu.cpp.
References DeviceTask::PATH_TRACE, DeviceTask::SHADER, tasks, thread_path_trace(), thread_shader(), thread_tonemap(), DeviceTask::TONEMAP, DeviceTask::type, ThreadQueue< T >::worker_done(), and ThreadQueue< T >::worker_wait_pop().
Referenced by CPUDevice().
void CPUDevice::thread_shader | ( | DeviceTask & | task | ) | [inline] |
Definition at line 210 of file device_cpu.cpp.
References kernel_cpu_shader(), kernel_osl_use(), kg, DeviceTask::shader_eval_type, DeviceTask::shader_input, DeviceTask::shader_output, DeviceTask::shader_w, DeviceTask::shader_x, system_cpu_support_optimized(), tasks, and ThreadQueue< T >::worker_cancel().
Referenced by thread_run().
void CPUDevice::thread_tonemap | ( | DeviceTask & | task | ) | [inline] |
Definition at line 191 of file device_cpu.cpp.
References DeviceTask::buffer, DeviceTask::h, kernel_cpu_tonemap(), kg, DeviceTask::offset, DeviceTask::resolution, DeviceTask::rgba, DeviceTask::sample, DeviceTask::stride, system_cpu_support_optimized(), DeviceTask::w, DeviceTask::x, and DeviceTask::y.
Referenced by thread_run().
KernelGlobals* CPUDevice::kg |
Definition at line 45 of file device_cpu.cpp.
Referenced by const_copy_to(), CPUDevice(), osl_memory(), tex_alloc(), thread_path_trace(), thread_shader(), thread_tonemap(), and ~CPUDevice().
Definition at line 44 of file device_cpu.cpp.
Referenced by task_add(), task_cancel(), task_wait(), thread_path_trace(), thread_run(), thread_shader(), and ~CPUDevice().
vector<thread*> CPUDevice::threads |
Definition at line 43 of file device_cpu.cpp.
Referenced by CPUDevice(), task_add(), and ~CPUDevice().