Forums - How to integrate stub.c, skel.c and hexagon binaries in android application

1 post / 0 new
How to integrate stub.c, skel.c and hexagon binaries in android application
rajshekarsv
Join Date: 13 Mar 14
Posts: 1
Posted: Fri, 2019-05-03 08:18

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

  • Up0
  • Down0

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.