Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/device/device_cpu.cpp
| Show All 28 Lines | |||||
| #include "device/device_split_kernel.h" | #include "device/device_split_kernel.h" | ||||
| #include "kernel/kernel.h" | #include "kernel/kernel.h" | ||||
| #include "kernel/kernel_compat_cpu.h" | #include "kernel/kernel_compat_cpu.h" | ||||
| #include "kernel/kernel_types.h" | #include "kernel/kernel_types.h" | ||||
| #include "kernel/split/kernel_split_data.h" | #include "kernel/split/kernel_split_data.h" | ||||
| #include "kernel/kernel_globals.h" | #include "kernel/kernel_globals.h" | ||||
| #include "kernel/filter/filter.h" | |||||
| #include "kernel/osl/osl_shader.h" | #include "kernel/osl/osl_shader.h" | ||||
| #include "kernel/osl/osl_globals.h" | #include "kernel/osl/osl_globals.h" | ||||
| #include "render/buffers.h" | #include "render/buffers.h" | ||||
| #include "util/util_debug.h" | #include "util/util_debug.h" | ||||
| #include "util/util_foreach.h" | #include "util/util_foreach.h" | ||||
| #include "util/util_function.h" | #include "util/util_function.h" | ||||
| ▲ Show 20 Lines • Show All 121 Lines • ▼ Show 20 Lines | #endif | ||||
| DeviceRequestedFeatures requested_features; | DeviceRequestedFeatures requested_features; | ||||
| KernelFunctions<void(*)(KernelGlobals *, float *, unsigned int *, int, int, int, int, int)> path_trace_kernel; | KernelFunctions<void(*)(KernelGlobals *, float *, unsigned int *, int, int, int, int, int)> path_trace_kernel; | ||||
| KernelFunctions<void(*)(KernelGlobals *, uchar4 *, float *, float, int, int, int, int)> convert_to_half_float_kernel; | KernelFunctions<void(*)(KernelGlobals *, uchar4 *, float *, float, int, int, int, int)> convert_to_half_float_kernel; | ||||
| KernelFunctions<void(*)(KernelGlobals *, uchar4 *, float *, float, int, int, int, int)> convert_to_byte_kernel; | KernelFunctions<void(*)(KernelGlobals *, uchar4 *, float *, float, int, int, int, int)> convert_to_byte_kernel; | ||||
| KernelFunctions<void(*)(KernelGlobals *, uint4 *, float4 *, float*, int, int, int, int, int)> shader_kernel; | KernelFunctions<void(*)(KernelGlobals *, uint4 *, float4 *, float*, int, int, int, int, int)> shader_kernel; | ||||
| KernelFunctions<void(*)(int, TilesInfo*, int, int, float*, float*, float*, float*, float*, int*, int, int, bool)> filter_divide_shadow_kernel; | |||||
| KernelFunctions<void(*)(int, TilesInfo*, int, int, int, int, float*, float*, int*, int, int, bool)> filter_get_feature_kernel; | |||||
| KernelFunctions<void(*)(int, int, float*, float*, float*, float*, int*, int)> filter_combine_halves_kernel; | |||||
| KernelFunctions<void(*)(int, int, float*, float*, float*, int*, int, int, float, float)> filter_nlm_calc_difference_kernel; | |||||
| KernelFunctions<void(*)(float*, float*, int*, int, int)> filter_nlm_blur_kernel; | |||||
| KernelFunctions<void(*)(float*, float*, int*, int, int)> filter_nlm_calc_weight_kernel; | |||||
| KernelFunctions<void(*)(int, int, float*, float*, float*, float*, int*, int, int)> filter_nlm_update_output_kernel; | |||||
| KernelFunctions<void(*)(float*, float*, int*, int)> filter_nlm_normalize_kernel; | |||||
| KernelFunctions<void(*)(float*, int, int, int, float*, int*, int*, int, int, float)> filter_construct_transform_kernel; | |||||
| KernelFunctions<void(*)(int, int, float*, float*, float*, float*, float*, int*, float*, float3*, int*, int*, int, int, int, int)> filter_nlm_construct_gramian_kernel; | |||||
| KernelFunctions<void(*)(int, int, int, int, int, float*, int*, float*, float3*, int*, int)> filter_finalize_kernel; | |||||
| KernelFunctions<void(*)(KernelGlobals *, ccl_constant KernelData*, ccl_global void*, int, ccl_global char*, | KernelFunctions<void(*)(KernelGlobals *, ccl_constant KernelData*, ccl_global void*, int, ccl_global char*, | ||||
| ccl_global uint*, int, int, int, int, int, int, int, int, ccl_global int*, int, | ccl_global uint*, int, int, int, int, int, int, int, int, ccl_global int*, int, | ||||
| ccl_global char*, ccl_global unsigned int*, unsigned int, ccl_global float*)> data_init_kernel; | ccl_global char*, ccl_global unsigned int*, unsigned int, ccl_global float*)> data_init_kernel; | ||||
| unordered_map<string, KernelFunctions<void(*)(KernelGlobals*, KernelData*)> > split_kernels; | unordered_map<string, KernelFunctions<void(*)(KernelGlobals*, KernelData*)> > split_kernels; | ||||
| #define KERNEL_FUNCTIONS(name) \ | #define KERNEL_FUNCTIONS(name) \ | ||||
| KERNEL_NAME_EVAL(cpu, name), \ | KERNEL_NAME_EVAL(cpu, name), \ | ||||
| KERNEL_NAME_EVAL(cpu_sse2, name), \ | KERNEL_NAME_EVAL(cpu_sse2, name), \ | ||||
| KERNEL_NAME_EVAL(cpu_sse3, name), \ | KERNEL_NAME_EVAL(cpu_sse3, name), \ | ||||
| KERNEL_NAME_EVAL(cpu_sse41, name), \ | KERNEL_NAME_EVAL(cpu_sse41, name), \ | ||||
| KERNEL_NAME_EVAL(cpu_avx, name), \ | KERNEL_NAME_EVAL(cpu_avx, name), \ | ||||
| KERNEL_NAME_EVAL(cpu_avx2, name) | KERNEL_NAME_EVAL(cpu_avx2, name) | ||||
| CPUDevice(DeviceInfo& info, Stats &stats, bool background) | CPUDevice(DeviceInfo& info, Stats &stats, bool background) | ||||
| : Device(info, stats, background), | : Device(info, stats, background), | ||||
| #define REGISTER_KERNEL(name) name ## _kernel(KERNEL_FUNCTIONS(name)) | #define REGISTER_KERNEL(name) name ## _kernel(KERNEL_FUNCTIONS(name)) | ||||
| REGISTER_KERNEL(path_trace), | REGISTER_KERNEL(path_trace), | ||||
| REGISTER_KERNEL(convert_to_half_float), | REGISTER_KERNEL(convert_to_half_float), | ||||
| REGISTER_KERNEL(convert_to_byte), | REGISTER_KERNEL(convert_to_byte), | ||||
| REGISTER_KERNEL(shader), | REGISTER_KERNEL(shader), | ||||
| REGISTER_KERNEL(filter_divide_shadow), | |||||
| REGISTER_KERNEL(filter_get_feature), | |||||
| REGISTER_KERNEL(filter_combine_halves), | |||||
| REGISTER_KERNEL(filter_nlm_calc_difference), | |||||
| REGISTER_KERNEL(filter_nlm_blur), | |||||
| REGISTER_KERNEL(filter_nlm_calc_weight), | |||||
| REGISTER_KERNEL(filter_nlm_update_output), | |||||
| REGISTER_KERNEL(filter_nlm_normalize), | |||||
| REGISTER_KERNEL(filter_construct_transform), | |||||
| REGISTER_KERNEL(filter_nlm_construct_gramian), | |||||
| REGISTER_KERNEL(filter_finalize), | |||||
| REGISTER_KERNEL(data_init) | REGISTER_KERNEL(data_init) | ||||
| #undef REGISTER_KERNEL | #undef REGISTER_KERNEL | ||||
| { | { | ||||
| #ifdef WITH_OSL | #ifdef WITH_OSL | ||||
| kernel_globals.osl = &osl_globals; | kernel_globals.osl = &osl_globals; | ||||
| #endif | #endif | ||||
| use_split_kernel = DebugFlags().cpu.split_kernel; | use_split_kernel = DebugFlags().cpu.split_kernel; | ||||
| ▲ Show 20 Lines • Show All 490 Lines • Show Last 20 Lines | |||||