Skip to content

2D and 3D Matrix Convolution and Matrix Multiplication with CUDA

License

Notifications You must be signed in to change notification settings

fbasatemur/CUDA-Matrix

Repository files navigation

CUDA-Matrix

2D Convolution

The 3x3 kernel mask do convolution on the 2D matrix.For RxC dimensional input, (R-2)x(C-2) dimensional output matrix is created.

alt text

3D Convolution

The 3x3x3 kernel mask do convolution on the 3D matrix. For RxCxD dimensional input, (R-2)x(C-2) dimensional output matrix is created.

alt text

Matrix Multiplication

Matrix x Vector or Matrix x Matrix multiplication can be performed in parallel

* NxM x MxK = NxK       // matrix x matrix = matrix
* 1xM x MxK = 1xK       // vector x matrix = vector
* NxN x NxN = NxN       // square_Matrix x square_Matrix = S_Matrix

alt text