forked from hughperkins/EasyCL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDeviceInfo.h
46 lines (41 loc) · 1.03 KB
/
DeviceInfo.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#pragma once
#include <string>
#include "DeviceInfo.h"
#ifdef USE_CLEW
#include "clew.h"
#else
#if defined(__APPLE__) || defined(__MACOSX)
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif
#endif
#include "EasyCL_export.h"
#include "mystdint.h"
namespace easycl {
class EasyCL_EXPORT DeviceInfo {
#ifdef _WIN32
#pragma warning(disable: 4251)
#endif
public:
// long platformId;
std::string platformVendor;
std::string platformName;
// long deviceId;
int deviceType;
int64_t globalMemSize;
int localMemSize;
int globalMemCachelineSize;
int64_t maxMemAllocSize;
int maxComputeUnits;
int maxWorkGroupSize;
int maxWorkItemDimensions;
// int maxWorkItemSizes;
std::string deviceName;
std::string openClCVersion;
std::string deviceVersion;
int maxClockFrequency;
void populate(cl_platform_id platformId, cl_device_id deviceId);
std::string toString();
};
}