Computer Organization and Design assignements
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

31 lines
1.1 KiB

  1. /*!
  2. \file matmul.h
  3. \brief Matrix multiplication implementation.
  4. \author Nikos Pitsianis
  5. \author Dimitris Floros
  6. \author Christos Choutouridis 8997 <cchoutou@ece.auth.gr>
  7. \date 2020-05-05
  8. */
  9. #ifndef SRC_MATMUL_H_
  10. #define SRC_MATMUL_H_
  11. #include <stdlib.h>
  12. #define MAX_ITER 10
  13. #define sub2ind(i,j,n) (j) + (i)*(n)
  14. //! Function pointer type to matrix multiplication back-end.
  15. typedef void (*mMult_ft)(float * const C, float const * const A, float const * const B, int const n);
  16. void matrixMult_ijk(float * const C, float const * const A, float const * const B, int const n);
  17. void matrixMult_ikj(float * const C, float const * const A, float const * const B, int const n);
  18. void matrixMult_jik(float * const C, float const * const A, float const * const B, int const n);
  19. void matrixMult_jki(float * const C, float const * const A, float const * const B, int const n);
  20. void matrixMult_kij(float * const C, float const * const A, float const * const B, int const n);
  21. void matrixMult_kji(float * const C, float const * const A, float const * const B, int const n);
  22. float* matrixInit(int const n);
  23. #endif /* SRC_MATMUL_H_ */