Just-in-time compilation is an appealing technique for producing optimized code at run time rather than at compile time. In an earlier post I was already looking into the just-in-time compilation overhead of various OpenCL SDKs. This blog post looks into the cost of launching OpenCL kernels on the CPU and compares with the cost of calling a plain C/C++ function through a function pointer, and with the cost of calling a precompiled Lua script. Continue reading
Monthly Archives: March 2016
Multi-Threading in C/C++: Implications on Software Library Design
With the increase in parallelism in response to a stagnation of clock frequencies, software libraries are pushed towards multi-threading. However, there are several different threading approaches out there: The most popular in the C/C++ world are POSIX Threads (pthread), OpenMP, and C++11 threads. Clearly, a good software library does not enforce the use of one particular approach, but is able to deal with (almost) any multi-threading approach. In this blog post I will discuss a possible software library design to achieve this. Continue reading
Raspberry Pi: Interfacing Honeywell Humidity and Temperature Sensors
Recently I was toying with a Raspberry Pi 2 and other hardware to get a better idea about the current status of the Internet of Things. Among several sensors, I was also looking into a Honeywell HIH8131 sensor (around 25 Euros, obtained from Reichelt). Unfortunately, none of the solutions I found on the web for reading the sensor worked for me, so I finally went down into the low-level details of communicating via the I2C bus through the Linux kernel. And I enjoyed it!
Continue reading