Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/device/device.cpp
| Show First 20 Lines • Show All 334 Lines • ▼ Show 20 Lines | #ifdef WITH_CUDA | ||||
| if(device_cuda_init()) { | if(device_cuda_init()) { | ||||
| device_cuda_info(devices); | device_cuda_info(devices); | ||||
| } | } | ||||
| #endif | #endif | ||||
| device_cpu_info(devices); | device_cpu_info(devices); | ||||
| #ifdef WITH_NETWORK | #ifdef WITH_NETWORK | ||||
| device_network_info(devices); | device_network_info(devices); | ||||
| #endif | #endif | ||||
| /* Disambiguate OpenCL and CUDA devices. */ | |||||
| bool have_cuda = false; | |||||
| bool have_opencl = false; | |||||
| foreach(DeviceInfo& info, devices) { | |||||
| have_cuda = have_cuda || (info.type == DEVICE_CUDA); | |||||
| have_opencl = have_opencl || (info.type == DEVICE_OPENCL); | |||||
| } | |||||
| foreach(DeviceInfo& info, devices) { | |||||
| if(info.type == DEVICE_CUDA && have_opencl) { | |||||
| if(info.description.find("CUDA") == string::npos) { | |||||
| info.description += " (CUDA)"; | |||||
| } | |||||
| } | |||||
| if(info.type == DEVICE_OPENCL && have_cuda) { | |||||
| if(info.description.find("OpenCL") == string::npos) { | |||||
| info.description += " (OpenCL)"; | |||||
| } | |||||
| } | |||||
| } | |||||
| need_devices_update = false; | need_devices_update = false; | ||||
| } | } | ||||
| return devices; | return devices; | ||||
| } | } | ||||
| string Device::device_capabilities() | string Device::device_capabilities() | ||||
| { | { | ||||
| string capabilities = "CPU device capabilities: "; | string capabilities = "CPU device capabilities: "; | ||||
| ▲ Show 20 Lines • Show All 91 Lines • Show Last 20 Lines | |||||