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

Function getPlatformEnum

src/backend/oneapi/platform.cpp:125–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125af_oneapi_platform getPlatformEnum(sycl::device dev) {
126 string pname = getPlatformName(dev);
127 if (verify_present(pname, "AMD"))
128 return AF_ONEAPI_PLATFORM_AMD;
129 else if (verify_present(pname, "NVIDIA"))
130 return AF_ONEAPI_PLATFORM_NVIDIA;
131 else if (verify_present(pname, "INTEL"))
132 return AF_ONEAPI_PLATFORM_INTEL;
133 else if (verify_present(pname, "APPLE"))
134 return AF_ONEAPI_PLATFORM_APPLE;
135 else if (verify_present(pname, "BEIGNET"))
136 return AF_ONEAPI_PLATFORM_BEIGNET;
137 else if (verify_present(pname, "POCL"))
138 return AF_ONEAPI_PLATFORM_POCL;
139 return AF_ONEAPI_PLATFORM_UNKNOWN;
140}
141
142string getDeviceInfo() noexcept {
143 ostringstream info;

Callers 1

addDeviceContextFunction · 0.70

Calls 2

getPlatformNameFunction · 0.70
verify_presentFunction · 0.70

Tested by

no test coverage detected