In the middle of C ++ code, eclipse, I need to calculate the multiplication of the matrices A and B with a size of 2400 * 3600 (so the sizes do not match). Matrices are stored in two-dimensional floating-point arrays. They are not sparse, without restriction.
Each multiplication takes so much time (several minutes), and I seriously need to reduce it, because I have a cycle that repeats 50 million times. and every time you need to multiply the new A and B. Any recommendations are recommended to reduce the time complexity. (even if you change the structure of data storage, if you think this can help). For example, what if I store data in one-dimensional arrays? Or using vectors instead of arrays?
In one specific case, the first column is always 1, and the values โโare 1, -1, or zero. Any idea for this case?
In other cases, the values โโcan be any. ** One of these multiplications of X is multiplied by its transposition. Are there any recommendations on this particular one?
Pegah
source share