Clang format for #pragma

Formatting OpenMP and Intel SIMD pragma extensions is always a problem on clang-format and some other formatting tools. Many minor issues on formatting can be solved easily, like adding comments at the end of a line to force formatter break the line of argument lists, adding empty lines to group the variables that are aligned to each other, etc. However, clang-format keeps the pragma extension formatting wrong, i.e. #pragma omp. This article introduces the perfect solution for any formatting tool without patching the tools.
Continue reading

GPU Virtualization

Last year, Nvidia provides GRID K1 and GRID K2 GPUs for GPU virtualization. One could run multiple VM sharing the same graphic card to render complex applications. It takes the similar solution of SR-IOV but different approach. VMWare utilizes this GPU virtualization on their products and make the GPU performance in VM almost the same performance on bare-metal machine. Even without vGPU, VMWare’s Fusion still has about 90% of bare-metal performance.

Continue reading

Build Your ARM Image for QEMU

Hello there! I’ve been using QEMU for a while. Recently, I updated my ARM image and found that it has some difficulties to make an ARM image and could be an impossible job for those who are not familiar with embedded systems. I decided to write a comprehensive post to share some knowledge and how to build you own ARM image. This post could be very useful for those who want to know how Linux works with minimum requirements (root file system, in short rootfs). I use Vexpress as the target board in the tutorial.

Continue reading