Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-01-06 12:13:21 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-01-06 12:13:21 +0300
commita922be9270496de95b8c8a4ec7923dd0cb50f184 (patch)
treefe416d0abfe21f88b1f7de94de763e0e0742e4f8 /intern/cycles/blender/blender_python.cpp
parente961c06a6ea9fbe48a375eaf78fd2ca536bd430e (diff)
Cycles: Repot CPU and CUDA capabilities to system info operator
For CPU it gives available instructions set (SSE, AVX and so). For GPU CUDA it reports most of the attribute values returned by cuDeviceGetAttribute(). Ideally we need to only use set of those which are driver-specific (so we don't clutter system info with values which we can get from GPU specifications and be sure they stay the same because driver can't affect on them).
Diffstat (limited to 'intern/cycles/blender/blender_python.cpp')
-rw-r--r--intern/cycles/blender/blender_python.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/intern/cycles/blender/blender_python.cpp b/intern/cycles/blender/blender_python.cpp
index 5a9895a8f12..37191bb797a 100644
--- a/intern/cycles/blender/blender_python.cpp
+++ b/intern/cycles/blender/blender_python.cpp
@@ -473,6 +473,12 @@ static PyObject *osl_compile_func(PyObject *self, PyObject *args)
}
#endif
+static PyObject *system_info_func(PyObject *self, PyObject *value)
+{
+ string system_info = Device::device_capabilities();
+ return PyUnicode_FromString(system_info.c_str());
+}
+
static PyMethodDef methods[] = {
{"init", init_func, METH_VARARGS, ""},
{"create", create_func, METH_VARARGS, ""},
@@ -487,6 +493,7 @@ static PyMethodDef methods[] = {
{"osl_compile", osl_compile_func, METH_VARARGS, ""},
#endif
{"available_devices", available_devices_func, METH_NOARGS, ""},
+ {"system_info", system_info_func, METH_NOARGS, ""},
{NULL, NULL, 0, NULL},
};