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…

Computer Science Diagrams in 5 Easy Steps

This article is different from usual blog posts. However, it’s an essential topic often overlooked. There are online cloud service providers who let you create diagrams using in-built templates. But for research, I have found these solutions are not sufficient to create Computer Science diagrams. So I decided to give Adobe Illustrator (AI) a try…

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…

Matplotlib Custom Hatch Patterns in 5 Steps

Matplotlib hatch is a pattern that can be used as an overlay in bar charts, shapes and are important to ensure the readability of graphs in the absence of color (when printed in a single color format). Unfortunately, there are only a few patterns available on Matplotlib. By reading this post, you will be able…

C++ Concepts: A World Without Unchecked Generics

C++ concepts is a revolutionary idea aimed at building better and safer abstractions at the code level. Generics in C++ allows to express an abstract operation (maybe an algorithm) to different types (classes). Templates allowed abstraction of operations such as sort which can be used to sort a vector, an array or any object with…

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…

C++ Logging Module Designed for Research : rlog

CHECK OUT ON GITHUB Why Should Researchers use C++ Logging? Most research and development occur in a haphazard manner and not investing time early on to adopt good development practices can increase the difficulty in extending research projects. Having a good C++ logging framework can help to reduce developing and debugging time significantly. Why Not…

Why Researchers Should Use C++ Unit Testing

In this post, I will explain how to use GTest (Google C++ Testing Framework) configured with CMake to handle C++ unit testing. Unit testing ensures you the correctness of your code especially when you modify it to incorporate optimizations / special conditions. Purpose Statement Often in academia and research, people tend to think that investing…

Hacking DNN Architectures in Cloud Environments

Deep Neural Networks (DNN) are increasingly being deployed in commercial cloud environments. However, in shared environments your intellectual property might not be safe as you once thought. In fact, you might just have allowed your competitor to reverse engineer your architecture. In this post, I will explain how an adversary can use the cache hierarchy…

Building an AM Frequency Morse Code Transmitter

This is one of the posts to which I could not assign a category on my website due to the fact that I’ve sticked to posting application layer posts and all other posts are categorized as personal. Recently, I was a teaching assistant for Fundamentals of Electronics which had around 70 students. The course covered…

How I Scored 169/170 for GRE Quantitative and 161/170 for GRE Verbal

[The article is a continuation of the series about applying for higher education (https://malithjayaweera.com/2018/12/apply-phd-usa-10-steps/) written with the intention of helping young and brilliant undergraduates to succeed in their graduate studies] An important question that I students always ask is “how much time do you need to prepare for GRE”? Honestly, I cannot answer that question…