mirror of
https://github.com/opencv/opencv.git
synced 2024-11-28 05:06:29 +08:00
fft cleanup ignoring
This commit is contained in:
parent
fa11f04ae1
commit
5a309e8f6e
@ -133,16 +133,21 @@ void cv::ocl::fft_setup()
|
|||||||
void cv::ocl::fft_teardown()
|
void cv::ocl::fft_teardown()
|
||||||
{
|
{
|
||||||
PlanCache& pCache = *PlanCache::getPlanCache();
|
PlanCache& pCache = *PlanCache::getPlanCache();
|
||||||
|
|
||||||
if(!pCache.started)
|
if(!pCache.started)
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
for(size_t i = 0; i < pCache.planStore.size(); i ++)
|
for(size_t i = 0; i < pCache.planStore.size(); i ++)
|
||||||
{
|
|
||||||
delete pCache.planStore[i];
|
delete pCache.planStore[i];
|
||||||
}
|
|
||||||
pCache.planStore.clear();
|
pCache.planStore.clear();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
openCLSafeCall( clAmdFftTeardown( ) );
|
openCLSafeCall( clAmdFftTeardown( ) );
|
||||||
|
}
|
||||||
|
catch (const std::bad_alloc &)
|
||||||
|
{ }
|
||||||
|
|
||||||
delete pCache.setupData; pCache.setupData = NULL;
|
delete pCache.setupData; pCache.setupData = NULL;
|
||||||
pCache.started = false;
|
pCache.started = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user