How to bring compute intensive C++ based apps to Android

Friday, May 9, 2014 - 14:45 to 15:30
Stage 12
Martin Siggel
German Aerospace Center

The TiGLViewer desktop application is used at the German Aerospace Center for aircraft design. It is mainly used to display 3D aircraft geometries, which are computed from a parametric description. The core components of the application are the CAD kernel OpenCASCADE for 3D geometry computation and the OpenGL based rendering engine OpenSceneGraph – both written in C++. Due to its relatively large tested code base and the use of the third party libraries, a reimplementation in Java was not reasonable. In this talk, we present the required steps in porting the program to Android by reusing the native C and C++ Code. These steps include cross-compiling the CMake based libraries for Android (arm, x86) using a standalone tool chain from the Native Development Kit (NDK), setting up the NDK build system for the native parts of the TiGLViewer app, integrating the NDK build into the Gradle build system, using the Java Native Interface (JNI) to communicate with the native code, and creating an EGL surface for OpenSceneGraph’s renderer. Further, we want to present the differences in the Android lifecycle for native code compared to Java code. Finally, we show how even CPU and GPU hungry apps can be tested efficiently with the x86 based Android emulator using Intel’s HAXM acceleration. All these steps will be executed live during presentation on a small tutorial app.

Martin Siggel's picture
Martin Siggel studied Physics at the University of Heidelberg. In 2012, he obtained his PhD in Physics on the optimization of radiotherapy at the German Cancer Research Center (DKFZ). He currently works at the German Aerospace Center (DLR) on simulation software and the optimization of future spacecraft concepts. His main interests are numerical algorithms and their efficient implementation. When he’s not on his mountainbike, he likes playing with new hardware and software technology.