MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / platformMap

Function platformMap

src/backend/oneapi/platform.cpp:104–123  ·  view source on GitHub ↗

TODO: update to new platforms?

Source from the content-addressed store, hash-verified

102
103// TODO: update to new platforms?
104inline string platformMap(string& platStr) {
105 using strmap_t = map<string, string>;
106 static const strmap_t platMap = {
107 make_pair("NVIDIA CUDA", "NVIDIA"),
108 make_pair("Intel(R) OpenCL", "INTEL"),
109 make_pair("AMD Accelerated Parallel Processing", "AMD"),
110 make_pair("Intel Gen OCL Driver", "BEIGNET"),
111 make_pair("Intel(R) OpenCL HD Graphics", "INTEL"),
112 make_pair("Apple", "APPLE"),
113 make_pair("Portable Computing Language", "POCL"),
114 };
115
116 auto idx = platMap.find(platStr);
117
118 if (idx == platMap.end()) {
119 return platStr;
120 } else {
121 return idx->second;
122 }
123}
124
125af_oneapi_platform getPlatformEnum(sycl::device dev) {
126 string pname = getPlatformName(dev);

Callers

nothing calls this directly

Calls 1

findMethod · 0.80

Tested by

no test coverage detected