Tensara Logo

tensara

Upper Triangular Matrix Multiplication

MEDIUM

Perform matrix multiplication of two upper triangular matrices:

C=ABC = A \cdot B

Where A and B are upper triangular matrices.

The result C will also be an upper triangular matrix.

Input

  • Upper triangular matrix AA of size N×NN \times N
  • Upper triangular matrix BB of size N×NN \times N

Output

  • Upper triangular matrix CC of size N×NN \times N

Notes:

  • All matrices A\text{A}, B\text{B}, and C\text{C} are stored in row-major order.
  • A matrix LL is upper triangular if Lij=0L_{ij} = 0 for all i>ji > j.
  • This problem is adapted from KernelBench

GPU Type

Language

Data Type

Loading...

Loading editor...

CUDA C++ environment

Desktop Required for Code Submission

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