OpenCL (Open Computing Language) Overview and SDKs

OpenCL (Open Computing Language) is a multi-vendor open standard for general-purpose parallel  programming of heterogeneous systems that include CPUs, GPUs and other processors. OpenCL provides a uniform programming environment for software developers to write efficient, portable code for highperformance compute servers, desktop computer systems and handheld devices. OpenCL standard is managed and defined by the Khronos Group. The latest version (OpenCL 1.1) was ratified by the Khronos Group on the 14th of June 2010 and adds significant functionality for enhanced parallel programming flexibility, functionality and performance including: Host-thread safety, enabling OpenCL commands to be enqueued from multiple host threads. Sub-buffer objects to distribute regions of a buffer across multiple OpenCL devices. User events to enable enqueued OpenCL commands to wait on external events. Event callbacks that can be used to enqueue new OpenCL commands based on event state changes in a non-blocking manner. 3-component vector data types. Global work-offset which […]

Faster JPEG decoding on ARM with libjpeg-turbo and NEON Instructions

libjpeg-turbo is based on libjpeg, but uses SIMD instructions (MMX, SSE2, etc.) to accelerate JPEG compression and decompression on x86 targets. On such systems, libjpeg-turbo is generally 2-4x as fast as the original version of libjpeg with the same hardware. ARM does not support MMX or SSE2 instructions, but it has its own SIMD instructions processed by the NEON Engine on ARM Cortex Core A5, A8, A9 and A15. ARM claims that “NEON technology can accelerate multimedia and signal processing algorithms such as video encode/decode, 2D/3D graphics, gaming, audio and speech processing, image processing, telephony, and sound synthesis by at least 3x the performance of ARMv5 and at least 2x the performance of ARMv6 SIMD.” Linaro worked on libjpeg-turbo and added NEON support to it. The code is available on launchpad at https://code.launchpad.net/~tom-gall/linaro/libjpeg-turbo Linaro has also provide benchmark result for libjpeg-turbo with a 12 Mpixel image on TI OMAP4 (Pandaboard) using the […]

Best Practices for Writing Safer C Code

Thomas Honold wrote an article published on EETimes giving 17 steps to safer C code. Not only this article provides tips to write safer C code, but I believe those steps are simply best practices when writing C code for embedded systems as they shorten the software life cycle by making it easier for a software team to write, debug and maintain code and by improving the software QA procedure. Here’s a summary of the 17 steps to achieve safer C code: Follow the rules you’ve read a hundred times: Initialize variables before use. Do not ignore compiler warnings. Check return values. Use enums as error types. Define an ENUM_MAX value at the end, so that the code to check the range does not have to be modified each time you add a new error code. Expect to fail Always assume there will be an error and set to default […]

What Programming Language Should I Learn ?

“What programming language should I  learn ?” is a question often asked by people new to software development. The answer is always “it depends”. But for embedded systems, it seems C language is a must as you can see in the chart below (Source: “The 2011 Embedded Market Study” by Embedded.com). For the 2011 survey, 1886 respondents from across the embedded industry answered that their embedded project was mostly programmed in C language  (62%), followed by C++ (22%), assembler (5%) and Java (2%). The other languages were all under 1%.   Jean-Luc Aufranc (CNXSoft)Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011. www.cnx-software.com

200 C# Programming Video Tutorials

Last month, 200 Android Development Video Tutorials by TheNewBoston had been uploaded to ChangingTheUnknown Youtube channel. They have now prepared another playlist with 200 C# programming video tutorials for beginners in C#. To give you an idea of what you would learn, here are the titles of the first 10 tutorials: Introduction and Installing C# 2010 Changing Forms Properties Showing MessageBoxes Variables Changing Properties With Code If Statements More on If Statements If Statements pt 3 Switch Statements Mathematical Operators You can watch the first tutorial: “C# Beginners Tutorial – 1 – Introduction and Installing C# 2010” below.   Jean-Luc Aufranc (CNXSoft)Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011. www.cnx-software.com

Top 5 Most Influential Programming Books Ever

The following question was raised on StackOverflow back in 2008: What is the single most influential book every programmer should read? If you could go back in time and tell yourself to read a specific book at the beginning of your career as a developer, which book would it be. The question has become one of the most popular question on Stackoverflow and the users have voted for their favorites books. Here are the results: Code Complete: A Practical Handbook of Software Construction Widely considered one of the best practical guides to programming, Steve McConnell’s original CODE COMPLETE has been helping developers write better software for more than a decade. Now this classic book has been fully updated and revised with leading-edge practices—and hundreds of new code samples—illustrating the art and science of software construction. Capturing the body of knowledge available from research, academia, and everyday commercial practice, McConnell synthesizes […]

Drawing Charts in Android with AChartEngine Library

AChartEngine is a charting library for Android applications that currently supports the following chart types: line chart area chart scatter chart time chart bar chart pie chart bubble chart doughnut chart range (high-low) bar chart dial chart / gauge combined (any combination of line, cubic line, scatter, bar, range bar, bubble) chart cubic line chart They announced that new chart types would be added in future release (Current version is 0.7.0). You can follow the updates for the library on Google Code or Facebook at http://www.facebook.com/achartengine. You can download the aChartEngine library on Google Code. You can also download some demo code such as TemperatureChart.java which display the following chart with just 100 lines of code including comments. Here’s the code (TemperatureChart.java) to display the Chart above:

Jean-Luc Aufranc (CNXSoft)Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and […]

200 Android Development Video Tutorials

If you’ve ever wanted to learn how to develop applications for Android but reading books bores you, you now have the chance to teach yourself Android software development with 200 video tutorials (about 20 hours). The videos have been uploaded to ChangingTheUnknown Youtube channel and can be accessed via TheNewBoston – Android playlist. To give you an idea of what you’ll learn, here are the titles of the first 10 tutorials: Download and Install the Java JDK Installing Eclipse and Setting up the ADT Installing Android SDK and Set up Emulator Setting up an Android Project Overview of Project and Adding Folders Introduction to Layouts in XML Creating A Button in XML and Adding an ID Setting up Variables and Referencing XML ids Set up a Button with OnClickListener Using setText method for our button You can watch the first tutorial: “Android Application Development Tutorial – 1 – Download and […]

Memfault IoT and embedded debugging platform