diff --git a/6.cpp b/6.cpp new file mode 100644 index 0000000..527b5c7 --- /dev/null +++ b/6.cpp @@ -0,0 +1,68 @@ +#include +#include +#include +#include +#include +#include +void sparse_matmul_coo(float **A_denseMatrix,float **B_denseMatrix,float **C_denseMatrix,int MAX){ + for(int i=0;iB_nonZeroCount)MAX=A_nonZeroCount; + else MAX=B_nonZeroCount; + + float C_values[MAX]; + int C_rowIndex[MAX]; + int C_colIndex[MAX]; + int C_nonZeroCount=0; + + int ROWS=MAX,COLS=MAX; + float **A_denseMatrix=new float*[MAX]; + float **B_denseMatrix=new float*[MAX]; + float **C_denseMatrix=new float*[MAX]; + for(int i=0;i