Hello. I would like to port certain matrix operations from Matlab to C++ on the GPU. I will need help optimizing these. I am attaching graphics that help to visualize the basic operations. Ideally, I would like some direction either in the form of example code, relevant tutorials, verbal advice, or the like. I will be researching the topic both on the forum and search engine in parallel to this post. The following are descriptions of each operation:

A linear function is performed on each entry of a 400 x 640 matrix. The contents of each 20x20 subregion of the result is extracted and treated as row vectors to make a 640 x 400 data matrix.

I am allowed to embed only one visual as a new user, so I will have to describe the rest of it:

A nonlinear kernel function is applied between every two row vectors.

The resulting 640x640 matrix is then made row and column stochastic (The entry in each row and each column are scaled by the same amount).

An Eigenvector Decomposition is performed on the resulting 640x640 matrix.

Thank you for your time and attention.

Jenny