Adding optimized Mat Allocator
authorAndrey Pavlenko <no@email>
Fri, 25 Nov 2011 15:39:24 +0000 (15:39 +0000)
committerAndrey Pavlenko <no@email>
Fri, 25 Nov 2011 15:39:24 +0000 (15:39 +0000)
OpenCVModule.cmake
modules/core/src/matrix.cpp

index 5f79514..48e6dee 100644 (file)
@@ -210,7 +210,9 @@ macro(define_opencv_module name)
     endif()
 
     # Dependencies of this target:
-    add_dependencies(${the_target} ${ARGN})
+    if(ARGN)
+        add_dependencies(${the_target} ${ARGN})
+    endif()
 
     install(TARGETS ${the_target}
         RUNTIME DESTINATION bin COMPONENT main
index 4906deb..83357af 100644 (file)
@@ -203,6 +203,9 @@ void Mat::create(int d, const int* _sizes, int _type)
     
     if( total() > 0 )
     {
+#ifdef HAVE_TGPU
+        if( !allocator ) allocator = tegra::getAllocator(d, _sizes, _type);
+#endif
         if( !allocator )
         {
             size_t total = alignSize(step.p[0]*size.p[0], (int)sizeof(*refcount));