Vitis BLAS library uses row-major storage. The array index of a matrix element could be calculated by the following macro. # define IDX2R(i,j,ld) ( ( (i)*(ld) ) + (j) )