Skip to content

Commit ed85955

Browse files
mlloredaumar456
authored andcommitted
Removed unnecessary clfft.hpp dependency from opencl/platform.hpp
1 parent cb342db commit ed85955

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

src/backend/opencl/platform.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
#include <thread>
4747
#include <utility>
4848
#include <vector>
49+
#include <clfft.hpp>
4950

5051
using std::string;
5152
using std::vector;
@@ -781,7 +782,8 @@ DeviceManager::~DeviceManager()
781782
}
782783

783784
DeviceManager::DeviceManager()
784-
: mUserDeviceOffset(0)
785+
: mUserDeviceOffset(0),
786+
mFFTSetup(new clfftSetupData)
785787
{
786788
std::vector<cl::Platform> platforms;
787789
Platform::get(&platforms);
@@ -903,8 +905,8 @@ DeviceManager::DeviceManager()
903905
#endif
904906
mUserDeviceOffset = mDevices.size();
905907
//Initialize FFT setup data structure
906-
CLFFT_CHECK(clfftInitSetupData(&mFFTSetup));
907-
CLFFT_CHECK(clfftSetup(&mFFTSetup));
908+
CLFFT_CHECK(clfftInitSetupData(mFFTSetup.get()));
909+
CLFFT_CHECK(clfftSetup(mFFTSetup.get()));
908910

909911
//Initialize clBlas library
910912
initBlas();

src/backend/opencl/platform.hpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,17 @@
2929
#include <cache.hpp>
3030
#include <memory.hpp>
3131
#include <GraphicsResourceManager.hpp>
32-
#include <clfft.hpp>
3332
#include <common/types.hpp>
3433

34+
// Forward declaration from clFFT.h
35+
struct clfftSetupData_;
36+
typedef clfftSetupData_ clfftSetupData;
37+
3538
namespace opencl
3639
{
40+
// Forward declaration from clfft.hpp
41+
class PlanCache;
42+
3743
int getBackend();
3844

3945
std::string getDeviceInfo();
@@ -192,6 +198,6 @@ class DeviceManager
192198
#if defined(WITH_GRAPHICS)
193199
std::unique_ptr<GraphicsResourceManager> gfxManagers[MAX_DEVICES];
194200
#endif
195-
clfftSetupData mFFTSetup;
201+
std::unique_ptr<clfftSetupData> mFFTSetup;
196202
};
197203
}

0 commit comments

Comments
 (0)