Tensara Logo

tensara

Matrix Multiplication

MEDIUM

Perform matrix multiplication of two matrices:

C[i][j]=k=0K1A[i][k]B[k][j]C[i][j] = \sum_{k=0}^{K-1} A[i][k] \cdot B[k][j]

Input

  • Matrix AA of size M×KM \times K
  • Matrix BB of size K×NK \times N

Output

  • Matrix CC of size M×NM \times N

Notes:

  • All matrices A\text{A}, B\text{B}, and C\text{C} are stored in row-major order

GPU Type

Language

Data Type

Loading...

Loading editor...

CUDA C++ environment

Sample Run Results

Hit "Run" to test your code with sample inputs

Desktop Required for Code Submission

For the best coding experience, please switch to a desktop device to write and submit your solution.