Hi,
I want to off load the guided filter which is running on Snapdragon 845 CPU to Hexagon and i successfully created Hexagon app project and Hexagon lib project to run the Guided filter.
Build cmd for hexagon lib is: make V=hexagon_Debug_dynamic_toolv83_v65 VERBOSE=1
binaries generated : Guided_filter_skel.so & Guided_filter_q.so pushed to /vendor/lib64/
build cmd for app is : make tree V=android_Debug CDSP_FLAG=1
binaries generated: Guided_filter pushed to /vendor/bin/ succesfully able to execute Guided_filter on 845 device.
Now I would like to integrate the same in the Android Application apk
I included Guided_filter_stub.c in the android application and linked libcdsprpc.so in the cmakelists able to compile and in debug i'm getting error in getting remote_handle from libcdsprpc
int nErr = _Guided_filter_pls_ctor("Guided_filter", (void*)&tmp); below mentioned code of Guided_filter_stub.c
__QAIC_STUB_EXPORT remote_handle _Guided_filter_handle(void) {
static remote_handle handle = _const_Guided_filter_handle; if((remote_handle)-1 != handle) { return handle; } else { remote_handle tmp; int nErr = _Guided_filter_pls_ctor("Guided_filter", (void*)&tmp); if(nErr) { return (remote_handle)-1; } if(((remote_handle)-1 != handle) || ((remote_handle)-1 != (remote_handle)_Guided_filter_atomic_CompareAndExchange((uint32_t*)&handle, (uint32_t)tmp, (uint32_t)-1))) { _Guided_filter_pls_dtor(&tmp); } return handle; } }
Kindly help me if have any suggestions.
Would like to know the procedure for integrating stub.c, skel.c and hexagon binaries in android application.
Thanks,
Rajshekar