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

Function platformMap

src/backend/opencl/platform.cpp:106–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

getPlatformNameFunction · 0.70

Calls 1

findMethod · 0.80

Tested by

no test coverage detected