diff options
Diffstat (limited to 'intern/cycles/device/device.cpp')
-rw-r--r-- | intern/cycles/device/device.cpp | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/intern/cycles/device/device.cpp b/intern/cycles/device/device.cpp index efdfa98cfb5..3a33b8fb68b 100644 --- a/intern/cycles/device/device.cpp +++ b/intern/cycles/device/device.cpp @@ -11,7 +11,7 @@ * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and - * limitations under the License + * limitations under the License. */ #include <stdlib.h> @@ -20,9 +20,6 @@ #include "device.h" #include "device_intern.h" -#include "cuew.h" -#include "clew.h" - #include "util_debug.h" #include "util_foreach.h" #include "util_half.h" @@ -268,5 +265,28 @@ vector<DeviceInfo>& Device::available_devices() return devices; } -CCL_NAMESPACE_END +string Device::device_capabilities() +{ + string capabilities = "CPU device capabilities: "; + capabilities += device_cpu_capabilities() + "\n"; +#ifdef WITH_CUDA + if(device_cuda_init()) { + capabilities += "\nCUDA device capabilities:\n"; + capabilities += device_cuda_capabilities(); + } +#endif +#ifdef WITH_OPENCL + /* TODO(sergey): Needs proper usable implementation. */ + /* + if(device_opencl_init()) { + capabilities += "\nOpenCL device capabilities:\n"; + capabilities += device_opencl_capabilities(); + } + */ +#endif + + return capabilities; +} + +CCL_NAMESPACE_END |