![]() That is, the number of rows in the resulting matrix equals the number of rows of the first matrix $A$ and the number of columns of the second matrix $B$. The result of the multiplication $A*B$ (which is different from $B*A$!) is a $n \times w$ matrix, which we call $M$. Also assume that $B$ is a $m \times w$ matrix. Assume that $A$ is a $n \times m$ matrix, which means that it has $n$ rows and $m$ columns. Let's say we have two matrices, $A$ and $B$. Matrix-Matrix Multiplicationīefore starting, it is helpful to briefly recap how a matrix-matrix multiplication is computed. Also, if you have any doubt, feel free to ask me for help in the comment section. But don't worry, at the end of the article you can find the complete code. everything not relevant to our discussion). So far you should have read my other articles about starting with CUDA, so I will not explain the "routine" part of the code (i.e. In this article we will use a matrix-matrix multiplication as our main guide. option pricing under a binomial model and using finite difference methods (FDM) for solving PDEs.Īs usual, we will learn how to deal with those subjects in CUDA by coding. In subsequent articles I will introduce multi-dimensional thread blocks and shared memory, which will be extremely helpful for several aspects of computational finance, e.g. Today, we take a step back from finance to introduce a couple of essential topics, which will help us to write more advanced (and efficient!) programs in the future. In the previous article we discussed Monte Carlo methods and their implementation in CUDA, focusing on option pricing.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |