| 298 | } |
| 299 | |
| 300 | std::string SimpleJoin(const std::vector<const char*>& elements, |
| 301 | const char* separator) { |
| 302 | // Note that we avoid use of sstream to avoid binary size bloat. |
| 303 | std::string joined_elements; |
| 304 | for (auto it = elements.begin(); it != elements.end(); ++it) { |
| 305 | if (separator && it != elements.begin()) { |
| 306 | joined_elements += separator; |
| 307 | } |
| 308 | if (*it) { |
| 309 | joined_elements += *it; |
| 310 | } |
| 311 | } |
| 312 | return joined_elements; |
| 313 | } |
| 314 | |
| 315 | // Return NNAPI device handle with the provided null-terminated device name. If |
| 316 | // no matching device could be found, nullptr will be returned. |
no test coverage detected