| 65 | namespace { |
| 66 | |
| 67 | void* LoadFunction(void* handle, const char* name, bool optional) { |
| 68 | if (handle == nullptr) { |
| 69 | return nullptr; |
| 70 | } |
| 71 | void* fn = dlsym(handle, name); |
| 72 | if (fn == nullptr && !optional) { |
| 73 | NNAPI_LOG("nnapi error: unable to open function %s", name); |
| 74 | } |
| 75 | return fn; |
| 76 | } |
| 77 | |
| 78 | #ifndef __ANDROID__ |
| 79 | // Add /dev/shm implementation of shared memory for non-Android platforms |
nothing calls this directly
no outgoing calls
no test coverage detected