| 111 | } |
| 112 | |
| 113 | static boost::python::list GetOpenCLDeviceList() { |
| 114 | luxrays::Context ctx; |
| 115 | vector<luxrays::DeviceDescription *> deviceDescriptions = ctx.GetAvailableDeviceDescriptions(); |
| 116 | |
| 117 | // Select only OpenCL devices |
| 118 | luxrays::DeviceDescription::Filter(luxrays::DEVICE_TYPE_OPENCL_ALL, deviceDescriptions); |
| 119 | |
| 120 | // Add all device information to the list |
| 121 | boost::python::list l; |
| 122 | for (size_t i = 0; i < deviceDescriptions.size(); ++i) { |
| 123 | luxrays::DeviceDescription *desc = deviceDescriptions[i]; |
| 124 | |
| 125 | l.append(boost::python::make_tuple( |
| 126 | desc->GetName(), |
| 127 | luxrays::DeviceDescription::GetDeviceType(desc->GetType()), |
| 128 | desc->GetComputeUnits(), |
| 129 | desc->GetNativeVectorWidthFloat(), |
| 130 | desc->GetMaxMemory(), |
| 131 | desc->GetMaxMemoryAllocSize())); |
| 132 | } |
| 133 | |
| 134 | return l; |
| 135 | } |
| 136 | |
| 137 | //------------------------------------------------------------------------------ |
| 138 | // Glue for Property class |
nothing calls this directly
no test coverage detected