Assembly Function using AT&T Syntax

In this blog post, I will provide a detailed explanation about writing a C++ program with an external Assembly function written for the X86_64 architecture. There are three types of Assembly syntax in use today: Intel syntax, AT&T syntax and GAS syntax (General Assembly). Although Intel syntax is much easily readable and is widely used…

Blocked Matrix Multiplication

Having read this article, you will be able to implement blocked matrix multiplication and also to understand the number of memory accesses encountered in blocked matrix multiplication. In my next article, I will explain how these ideas can be extended to SIMD (Single Instruction Multiple Data) vector instructions. Why is Matrix Multiplication Important? Matrix multiplication…

Branch Listing Using Intel Pin Tool

Having read this blog post, you will be able to generate a branch listing using Intel Pin Tool. If you are interested in installing pin, please look at  this article. Instead, if you are interested in the basics of writing a pin tool, I strongly suggest to refer to this article. Pin ships with many…

How to Write a Makefile with Ease

Makefiles provide a way to organize build steps involved in C / C++ project compilation. This article explains how you can set up your own makefile for your C / C++ project. Why Use a Makefile? Usual compilation with g++ will involve a command as follows. The command will compile each C++ source file and…

Roll a Dice on a Quantum Computer

When I say “Roll a Dice on a Quantum Computer”, technically there is no dice and it’s not entirely a click bait. I’m going to simulate and verify the probability of an 8 sided fair dice. Why would I want to waste resources to do such a simple task. Well, a simple answer. There is…

Dinero Trace Generator using Javascript

It’s quite surprising that around the time when this blog post was written, I couldn’t find a Dinero Trace Generator online. Dinero is a cache simulator software that had been developed around 20 years ago. To generate traces, you just have to do simple bit manipulations. Ironically, today, our modern browsers have the power to…

Branch Count using Intel Pin Tool

Pin Tool already has many inbuilt examples. Be sure to check before resorting to writing your own tool. 😉 Having read this blog post you will be able to create your own tool to count the number of branches. You will also be able to learn the  fundamentals that you would need to do any…

Intel Pin Tool; Setting up in 5 easy steps

This is the beginning of the Intel Pin Tool Series. Having read this post, you will be able to set up Intel pin tool and run a basic example to count the number of instructions in your program. Step 1 Download the pin tool from Intel (https://software.intel.com/en-us/articles/pin-a-binary-instrumentation-tool-downloads). Select the appropriate operating system and copy the…