summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ffb1eb4)
raw | patch | inline | side by side (parent: ffb1eb4)
author | Djordje Senicic <x0157990@ti.com> | |
Thu, 14 Sep 2017 20:11:12 +0000 (16:11 -0400) | ||
committer | Djordje Senicic <x0157990@ti.com> | |
Thu, 14 Sep 2017 20:11:12 +0000 (16:11 -0400) |
Signed-off-by: Djordje Senicic <x0157990@ti.com>
modules/core/src/ocl.cpp | patch | blob | history |
index 1cb2a6d91595cdbdf0476bd1b6c6e6f3086e1ffe..80bb3f5eb585f7cf4fd8cc4c0f3221d2e8b56f7d 100644 (file)
--- a/modules/core/src/ocl.cpp
+++ b/modules/core/src/ocl.cpp
if (!g_isOpenCLInitialized)
{
+#ifdef CV_TIOPENCL
+ if (0 == access("/dev/cmem", 0))
+ {
+ if(0 == system("pidof -x ti-mctd > /dev/null"))
+ {
+ //A process having name PROCESS is running.
+ } else {
+ g_isOpenCLInitialized = true;
+ return false;
+ }
+ }
+ else {
+ g_isOpenCLInitialized = true;
+ return false;
+ }
+#endif
try
{
cl_uint n = 0;