051 - Row-Major vs. Column-Major Array, How to Create Column-Major -Like Arrays in C++

Published: 04 November 2020
on channel: IQ95 The Homo Siliconiens
261
7

In OpenGL Shaders, we use column-major arrays.
In FORTRAN, they use column-major arrays.

But in C/C++, also in most other programming language,
they use row-major arrays.

Mathematically, we not need to concern much about
row-major or column-major arrays.

But if we want to transfer C/C++ 2D or 3D arrays
to OpenGL shaders, we have to be extra-careful about row-major and column-major.

In this episode, I will explain how to declare Column-Major array in C++.

Row- and column-major order
https://en.wikipedia.org/wiki/Row-_an...

Chapter 05. Data - Page 158
OpenGL Superbible: Comprehensive Tutorial and Reference 7th Edition
https://www.amazon.com/OpenGL-Superbi...

Prerequisites:

050 - Must-Know Problem Solving Technique - Binomial / Multinomial Expansion / Theorem
   • 050 - Must-Know Problem Solving Techn...  

049 - How to Solve Integer Equations
   • 049 - How to Solve Integer Equations  

048 - The Most Common Algorithm Pattern - Enumerate Ordered Integer Partitions in C++
   • 048 -  Most Common Algorithm Pattern ...  

[Discrete Mathematics] Integer Partitions
   • [Discrete Mathematics] Integer Partit...  

Download Source Code:

Episode 051 - Row-Major vs. Column-Major Array, How to Create Column-Major Arrays in C++
http://sourcecode.talkplayfun.com/cpp...

Episode 050 - Must-Know Problem Solving Technique - Binomial / Multinomial Expansion/Theorem
http://sourcecode.talkplayfun.com/cpp...

Episode 049 - How to Solve Integer Equations
http://sourcecode.talkplayfun.com/cpp...

Episode 048 - The Most Common Algorithm Pattern - Enumerate Ordered Integer Partitions in C++
http://sourcecode.talkplayfun.com/cpp...


Watch video 051 - Row-Major vs. Column-Major Array, How to Create Column-Major -Like Arrays in C++ online without registration, duration hours minute second in high quality. This video was added by user IQ95 The Homo Siliconiens 04 November 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 261 once and liked it 7 people.