1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

changed kernel.set to support unsuccssful set

This commit is contained in:
mlyashko
2014-03-07 11:15:54 +04:00
parent 66ed6a8a50
commit eb2e8a11fa
4 changed files with 6 additions and 130 deletions
-11
View File
@@ -599,17 +599,6 @@ protected:
CV_EXPORTS MatAllocator* getOpenCLAllocator();
#define SAFE_KERNEL_SET_ARG(idx, arg) \
{\
int idxNew = kernel.set(idx, arg); \
if (-1 == idxNew)\
{\
printf("algorithm can't setup argument index = %d to kernel\n", idx); \
return false; \
}\
idx = idxNew; \
}
}}
#endif
+4 -2
View File
@@ -2796,7 +2796,8 @@ int Kernel::set(int i, const void* value, size_t sz)
{
if (!p || !p->handle)
return -1;
CV_Assert(i >= 0);
if (i < 0)
return i;
if( i == 0 )
p->cleanupUMats();
@@ -2822,7 +2823,8 @@ int Kernel::set(int i, const KernelArg& arg)
{
if( !p || !p->handle )
return -1;
CV_Assert( i >= 0 );
if (i < 0)
return i;
if( i == 0 )
p->cleanupUMats();
if( arg.m )