From 62f8b0fc489d8ea15c21a8ea469619f8c2349092 Mon Sep 17 00:00:00 2001 From: yao Date: Tue, 26 Feb 2013 17:44:19 +0800 Subject: [PATCH] Fix ocl::dft error when program end on Linux --- modules/ocl/src/fft.cpp | 3 +++ modules/ocl/src/initialization.cpp | 2 ++ 2 files changed, 5 insertions(+) diff --git a/modules/ocl/src/fft.cpp b/modules/ocl/src/fft.cpp index 300ae60..9ae0ee1 100644 --- a/modules/ocl/src/fft.cpp +++ b/modules/ocl/src/fft.cpp @@ -54,6 +54,9 @@ void cv::ocl::dft(const oclMat&, oclMat&, Size, int) { CV_Error(CV_StsNotImplemented, "OpenCL DFT is not implemented"); } +namespace cv { namespace ocl { + void fft_teardown(){} +}} #else #include "clAmdFft.h" namespace cv diff --git a/modules/ocl/src/initialization.cpp b/modules/ocl/src/initialization.cpp index c90b62b..d4dcd53 100644 --- a/modules/ocl/src/initialization.cpp +++ b/modules/ocl/src/initialization.cpp @@ -65,6 +65,7 @@ namespace cv { namespace ocl { + extern void fft_teardown(); /* * The binary caching system to eliminate redundant program source compilation. * Strictly, this is not a cache because we do not implement evictions right now. @@ -877,6 +878,7 @@ namespace cv } void Info::release() { + fft_teardown(); if(impl->oclplatform) { impl->oclplatform = 0; -- 2.7.4