Arrays, Part III: Vectorization

Inside a single core, most modern processors have special hardware that allows a Single Instruction to be applied in parallel to Multiple Data (SIMD). Often referred to as vector units, they have been the main components of supercomputers in the 1980s. In order to speed up applications that process image, sound and video, Intel¬†introduced them […]

Continue reading

Arrays, Part II: Bound Checking

When writing code based on arrays, one of the most common bug is accessing an array out of bounds. Wether this access is a read or a write, it is definitively a bug that should never occur in a program. Writing out of bounds might be a bug difficult to hunt as the program might […]

Continue reading

Arrays, Part I: Memory management

In this post, we’ll talk about the different kind of arrays available in Fortran, C and C++. They differ mostly in where they get their memory from to store their elements. If you don’t know what the stack and the heap are, let’s just assume for now that the stack is a part of the […]

Continue reading

Arrays in Fortran, C and C++ (Outline)

The array is one of the most used data structure. It consists of a collection of items of the same type, arranged side by side in computer memory. The number of those items is called the size of the array. An array of four items would be stored in computer memory as below. In computational […]

Continue reading