Skip to main content

All Questions

Tagged with
2 votes
0 answers
73 views

Optimizing even more a C++ matrix class with expression templates using variadic templates

I looked at Bowie Owens' cppcon 2019 talk (the slides can be found here) where he shows how to implement a tridiagonal matrix classes using expression templates but without resorting to the CRTP. (It ...
11house's user avatar
  • 21
5 votes
1 answer
472 views

High Performance Matrix Multiplication is not very high speed, why?

I would appreciate a review of the following Rust implementation of high performance matrix multiplication. After reviewing available literature, including Anatomy of High Performance Matrix ...
Ana's user avatar
  • 129
2 votes
1 answer
89 views

Transpose matrix in ANSI C

Is there a way to transpose a matrix in ANSI C way much better than this ANSI C code? Can I do transpose in a different and ...
euraad's user avatar
  • 183
6 votes
1 answer
264 views

C++ Eigen/Mex function to perform two pagewise convolutions on a 3D matrix with a simple kernel

I am trying to accelerate an algorithm where I am computing a 2D variance of many complex matrices stored as pages of a 3D array in Matlab. My implementation uses a Mex function with the C++ Matlab ...
drakon101's user avatar
  • 407
2 votes
1 answer
123 views

Matrix led 7x10 with arduino

Good afternoon, a few days ago I finished a personal project of a 7x10 led matrix programmed with the ATMEGA328p microcontroller. To control the matrix I use 2 74HC595 shift registers in cascade in ...
Lucio Mazzini's user avatar
4 votes
1 answer
427 views

Need for matrix multiplication speed

I need help to make matrix multiplication in C run as fast as possible. On my AMD Phenom(tm) II X6 1090T, my program multiplies two square singe precision 4096x4096 matrices in about 6.9 seconds. ...
Gaslight Deceive Subvert's user avatar
1 vote
0 answers
80 views

S_n covariance calculation function

I am trying to understand the estimator proposed in ["Multidimensional outlier detection and robust estimation using Sn covariance"][1]. I wrote the code in a basic line-by-line form which ...
user263375's user avatar
3 votes
1 answer
423 views

Cosine similarity calculation in Rust, which is slower than NumPy

I'm running this in release mode. Currently, the following function takes around 6.7 seconds to run on my computer vs 3.7 seconds on Python. I know that Numpy is just calling to C, but I'm trying to ...
Karl Hernandez's user avatar
0 votes
1 answer
309 views

Approximation of the multiplicative matrix inverse (linalg.inv ())

I am trying to compute the multiplicative inverse of a large matrix (~ >40,000x40,000). This can be done with e.g. numpy.linalg.inv or ...
Stücke's user avatar
  • 103
3 votes
0 answers
67 views

Accelerating this stacked matrix-matrix product in OpenCL

I am trying to compute a matrix-matrix product of N stacked complex double N x N matrices. For simplicity, I assume N = 512. I have written code in C++ parallelized with OMP and using OpenBLAS for the ...
sqrt6's user avatar
  • 31
4 votes
1 answer
196 views

Minimize memory allocations while calculating the matrix representation of a Hamiltonian

I am writing a script using Julia (calling my functions from the REPL) to compute the matrix representation of certain Hamiltonian. After I run my script I see that the memory allocations count is ...
Leo Flores's user avatar
3 votes
1 answer
136 views

Python: Create submatrices from long/narrow table and save in HDF5

Hello dear StackExchange Community, I have written a small program which is doing the following. In short: it reads in a table in narrow format creates submatrices from it saves it in HDF5 format ...
dry-leaf's user avatar
4 votes
1 answer
207 views

Parallel 3D Discrete Cosine Transformation Implementation in Matlab

I am trying to implement 3D Discrete Cosine Transformation calculation in Matlab with parallel computing parfor. The formula of 3D Discrete Cosine Transformation is ...
JimmyHu's user avatar
  • 7,068
1 vote
1 answer
3k views

Lo Shu Magic Square (Python)

I wrote a python program to find if a matrix is a magic square or not. It works, but I can't help feeling like I may have overcomplicated the solution. I have seen other implementations that were a ...
am2021's user avatar
  • 315
4 votes
1 answer
185 views

Optimizing a diagonal matrix-vector multiplication (?diamv) kernel

For an (completely optional) assignment for an introductory course to programming with C++, I am trying to implement a diagonal matrix-vector multiplication (?diamv)...
user169291's user avatar

15 30 50 per page
1
2 3 4 5
12