OnQ Blog

Qualcomm MARE (Multicore Asynchronous Runtime Environment), Making Multicore Programming Easier [VIDEO]

26. Febr. 2014

Qualcomm products mentioned within this post are offered by Qualcomm Technologies, Inc. and/or its subsidiaries.

If you've bought a smartphone in the past two years, chances are it has more than one CPU core in it. The box it came in likely boasts DUAL-CORE or QUAD-CORE! In fact, 2013 was a major milestone for the industry with the number of mobile multicore devices surpassing the number of PCs and servers.

Multiple cores can help an app run incredibly fast, however the app has to be written to take advantage of more than one core—and most apps today aren’t written that way.

That’s because programming for multicores is much harder. It requires developers to refactor the algorithmic design in their applications and to think about parallelization of their algorithms. Expressing the relationships and dependencies between the different parts of a parallel algorithm is one of the most difficult aspects of multicore programming for many developers. The most commonly deployed technique for exploiting parallel programming is multithreading. Implementing and managing threads in a software project for a small number of threads can be manageable but can have a significant negative impact on the development efficiency for more complex algorithms and workloads.

Last year Qualcomm Technologies, Inc. introduced a new programming library for developers using the C++ programming language to make implementing multicore parallelization significantly easier, especially on mobile platforms like Android. Qualcomm® MARE, for Multicore Asynchronous Runtime Environment, provides an API that simplifies the programming of parallel applications, such that they can take advantage of the full computational power of modern smartphones. Two of the first Android applications to use Qualcomm MARE are Impala by Euvision Technologies and UCAM from Thundersoft.

Euvision Technologies new Impala for Android application is an on device camera solution that provides visual scene recognition and photo scene classification. It implements artificial intelligence on the device using machine learning techniques. EUvision describes it as follows:

While pointing the camera, it recognizes the scene to be captured even before the picture is actually snapped. The scene recognition is realized by artificial intelligence running on the user's phone.

Based on what the smart photo camera "sees," Instagram-like filters are applied automatically. The selected filters are optimized for popular scenes commonly photographed. For instance, when pointing the camera at people, the "Forever Young" filter is applied, which draws anti-wrinkle hydrating masks over the faces of your friends.

Furthermore, as soon as the camera detects you are about to take a picture of a handful of blueberries or a cinnamon chip scone, it automatically applies the "Now It's Tasty" filter. While taking photos of buildings or monuments, the so-called "Empire State" filter is applied. This filter is best suited for outdoor scenes since the altered lighting gives the images a more icy look.

"The scene recognition software in Euvision Technologies Impala mobile app is inherently parallel. Updating our software to exploit this parallelism using Qualcomm MARE has been a breeze. Another advantage is that MARE works on most major platforms. The realized speed-up was near-linear, enabling us to execute real-time scene recognition on Android devices” said Daniel Fontijne, Lead R&D for Impala Mobile.

Apps like Impala are continuously executing large amounts of code in order to see, think and suggest actions to you in real time. It takes a lot of computing muscle to do this without experiencing a lag time. By implementing Qualcomm MARE’s libraries and APIs, Impala was able to achieve just that!

Thundersoft was also able to take advantage of Qualcomm MARE’s API tools to build its UCAM application, which is currently available in Google Play and has over 30MM downloads to date globally. UCAM uses Qualcomm MARE to implement parallel real-time image filters that users can select to apply to their images, parallel processing used to speed up the creation of animated gifs and finally, a feature that allows users to smartly cut out faces or people from images and place them against different backgrounds.

Thundersoft was able to implement five times less code than traditional multithreading (Pthreads), for the parallel real-time filters, and achieve higher performance than if they were to manage threads themselves in the UCAM application.

“Implementing Qualcomm MARE in UCAM, our full-featured camera app, allowed us to very quickly exploit multicore CPU performance on Android devices ranging from the low end to the high end. We had to write a fraction of the code for image filtering and photo processing scenarios implementing MARE vs. pthreads in C++ and were able to get superior performance,” said Pengcheng Zhou, senior vice president of Engineering at Thundersoft.

Qualcomm MARE can be used in apps that run on any Android device with any multicore processor. The Qualcomm MARE SDK is also available for Linux, Windows or OS X, enabling programmers to develop and debug their applications in a familiar environment, before moving to a mobile platform.

Follow this link for more information and to download the SDK: https://developer.qualcomm.com/mobile-development/maximize-hardware/parallel-computing-mare.



Qualcomm MARE is a product of Qualcomm Technologies, Inc.