Tricks and Tips: Row-wise/Column-wise operations on matrices with CUDA

Many times it is necessary to apply the same operation on all the rows or columns of a matrix with CUDA.

For example, add the same row vector to all the rows of a matrix or add the same column vector to all the columns of a matrix. This is an operation that can be easily done using CUDA Thrust.

On our GitHub page a fully worked example is reported.

Leave a Reply

Your email address will not be published. Required fields are marked *