| 45 | hipFree(d_C); |
| 46 | } |
| 47 | int main(int argc,char **argv){ |
| 48 | float *A,*B,*C; |
| 49 | double start_time,end_time; |
| 50 | A=(float*)malloc(sizeof(float)*DIMS*DIMS); |
| 51 | B=(float*)malloc(sizeof(float)*DIMS*DIMS); |
| 52 | C=(float*)malloc(sizeof(float)*DIMS*DIMS); |
| 53 | Init_Matrix(A,DIMS*DIMS,2); |
| 54 | Init_Matrix(B,DIMS*DIMS,2); |
| 55 | Init_Matrix(C,DIMS*DIMS,1); |
| 56 | //start |
| 57 | start_time=(double)clock(); |
| 58 | Mul_Matrixdcu(A,B,C,DIMS,DIMS,DIMS); |
| 59 | //end |
| 60 | end_time=(double)clock(); |
| 61 | printf("进程的执行时间为:%.2lf\n",(end_time-start_time)/1e6); |
| 62 | // Verify_matrix_c(A,B,C,DIMS,DIMS,DIMS); |
| 63 | free(A); |
| 64 | free(B); |
| 65 | free(C); |
| 66 | return 0; |
| 67 | } |
nothing calls this directly
no test coverage detected