Fork me on GitHub

Overview

Following the evolution of desktops, mobile architectures are currently witnessing growth of processing power and complexity with the addition of different processing units like multi-core CPUs and GPUs. To facilitate programming and coordinating resource usage in these heterogeneous architectures, we present ParallelME, a Parallel Mobile Engine designed to explore heterogeneity in mobile computing architectures. ParallelME provides a high-level library with a friendly programming language abstraction for developers, facilitating the develoment of operations that can be translated into low-level parallel tasks. Additionally, these tasks are coordinated by a proposed run-time framework, which is responsible for scheduling and controlling the execution on the low-level platform.

Programming Abstraction

ParallelME programming abstraction was inspired by ideas found on the Scala collection library, which is a library consisted of a set of different data structures with native support for parallel processing. The goal for ParallelME was to create a similar data-structure oriented library that could be used to produce parallel code with minimum effort by its user. In ParallelME, this set of data structures is called User Library..

Source-to-Source Compiler

ParallelME source-to-source compiler was developed with the incorporation of ANTLR, a powerful parser generator widely used to build languages, tools and frameworks. We used an ANTLR Java grammar to create a parser that was used to build and walk a parse tree, being the basis for ParallelME compiler. It takes as an input Java code written with ParallelME user-library and translates it into C code compatible with RenderScript and ParallelME run-time. Besides that, the compiler also integrates the translated code in the high-performance run-times with the Java original source, creating a mechanism for dinamically choosing RenderScript or the OpenCL-based ParallelME run-time, making the framework compatible with all recent Android versions.

Run-time

The run-time component of ParallelME is responsible for coordinating in an efficient way all processing units available in the mobile architecture. It organizes and manages low level tasks generated by ParallelME compiler from code expressed in ParallelME user-library. It was implemented in C++ and integrated with Android through the NDK toolkit.

License

ParallelME source code is distributed under Apache License 2.0.

The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.