Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/util/util_debug.cpp
| Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | void DebugFlags::CUDA::reset() | ||||
| if(getenv("CYCLES_CUDA_ADAPTIVE_COMPILE") != NULL) | if(getenv("CYCLES_CUDA_ADAPTIVE_COMPILE") != NULL) | ||||
| adaptive_compile = true; | adaptive_compile = true; | ||||
| split_kernel = false; | split_kernel = false; | ||||
| } | } | ||||
| DebugFlags::OpenCL::OpenCL() | DebugFlags::OpenCL::OpenCL() | ||||
| : device_type(DebugFlags::OpenCL::DEVICE_ALL), | : device_type(DebugFlags::OpenCL::DEVICE_ALL), | ||||
| debug(false), | debug(false) | ||||
| single_program(false) | |||||
| { | { | ||||
| reset(); | reset(); | ||||
| } | } | ||||
| void DebugFlags::OpenCL::reset() | void DebugFlags::OpenCL::reset() | ||||
| { | { | ||||
| /* Initialize device type from environment variables. */ | /* Initialize device type from environment variables. */ | ||||
| device_type = DebugFlags::OpenCL::DEVICE_ALL; | device_type = DebugFlags::OpenCL::DEVICE_ALL; | ||||
| Show All 15 Lines | else if(strcmp(device, "GPU") == 0) { | ||||
| device_type = DebugFlags::OpenCL::DEVICE_GPU; | device_type = DebugFlags::OpenCL::DEVICE_GPU; | ||||
| } | } | ||||
| else if(strcmp(device, "ACCELERATOR") == 0) { | else if(strcmp(device, "ACCELERATOR") == 0) { | ||||
| device_type = DebugFlags::OpenCL::DEVICE_ACCELERATOR; | device_type = DebugFlags::OpenCL::DEVICE_ACCELERATOR; | ||||
| } | } | ||||
| } | } | ||||
| /* Initialize other flags from environment variables. */ | /* Initialize other flags from environment variables. */ | ||||
| debug = (getenv("CYCLES_OPENCL_DEBUG") != NULL); | debug = (getenv("CYCLES_OPENCL_DEBUG") != NULL); | ||||
| single_program = (getenv("CYCLES_OPENCL_SINGLE_PROGRAM") != NULL); | |||||
| } | } | ||||
| DebugFlags::DebugFlags() | DebugFlags::DebugFlags() | ||||
| : viewport_static_bvh(false) | : viewport_static_bvh(false) | ||||
| { | { | ||||
| /* Nothing for now. */ | /* Nothing for now. */ | ||||
| } | } | ||||
| Show All 39 Lines | case DebugFlags::OpenCL::DEVICE_GPU: | ||||
| break; | break; | ||||
| case DebugFlags::OpenCL::DEVICE_ACCELERATOR: | case DebugFlags::OpenCL::DEVICE_ACCELERATOR: | ||||
| opencl_device_type = "ACCELERATOR"; | opencl_device_type = "ACCELERATOR"; | ||||
| break; | break; | ||||
| } | } | ||||
| os << "OpenCL flags:\n" | os << "OpenCL flags:\n" | ||||
| << " Device type : " << opencl_device_type << "\n" | << " Device type : " << opencl_device_type << "\n" | ||||
| << " Debug : " << string_from_bool(debug_flags.opencl.debug) << "\n" | << " Debug : " << string_from_bool(debug_flags.opencl.debug) << "\n" | ||||
| << " Single program : " << string_from_bool(debug_flags.opencl.single_program) << "\n" | |||||
| << " Memory limit : " << string_human_readable_size(debug_flags.opencl.mem_limit) << "\n"; | << " Memory limit : " << string_human_readable_size(debug_flags.opencl.mem_limit) << "\n"; | ||||
| return os; | return os; | ||||
| } | } | ||||
| CCL_NAMESPACE_END | CCL_NAMESPACE_END | ||||