MCPcopy Create free account
hub / github.com/blender/cycles / string_remove_gpu_from_cpu_name

Function string_remove_gpu_from_cpu_name

src/util/string.cpp:217–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217string string_remove_gpu_from_cpu_name(const string &s)
218{
219 if (s.find("AMD") == std::string::npos) {
220 return s;
221 }
222
223 size_t pos = s.find("w/");
224 if (pos == std::string::npos) {
225 pos = s.find("with");
226 }
227
228 if (pos != std::string::npos) {
229 return string_strip(s.substr(0, pos));
230 }
231
232 return s;
233}
234
235/* Wide char strings helpers for Windows. */
236

Callers 2

TESTFunction · 0.85
system_cpu_brand_stringFunction · 0.85

Calls 2

string_stripFunction · 0.85
findMethod · 0.45

Tested by 1

TESTFunction · 0.68