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

Function getPlatformEnum

src/backend/opencl/platform.cpp:127–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127afcl::platform getPlatformEnum(Device dev) {
128 string pname = getPlatformName(dev);
129 if (verify_present(pname, "AMD"))
130 return AFCL_PLATFORM_AMD;
131 else if (verify_present(pname, "NVIDIA"))
132 return AFCL_PLATFORM_NVIDIA;
133 else if (verify_present(pname, "INTEL"))
134 return AFCL_PLATFORM_INTEL;
135 else if (verify_present(pname, "APPLE"))
136 return AFCL_PLATFORM_APPLE;
137 else if (verify_present(pname, "BEIGNET"))
138 return AFCL_PLATFORM_BEIGNET;
139 else if (verify_present(pname, "POCL"))
140 return AFCL_PLATFORM_POCL;
141 return AFCL_PLATFORM_UNKNOWN;
142}
143
144string getDeviceInfo() noexcept {
145 ostringstream info;

Callers 2

addDeviceContextFunction · 0.70
DeviceManagerMethod · 0.70

Calls 2

getPlatformNameFunction · 0.70
verify_presentFunction · 0.70

Tested by

no test coverage detected