Skip to content

Instantly share code, notes, and snippets.

@TeMPOraL
Created August 28, 2014 02:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TeMPOraL/90d9bcfc9703afc5651e to your computer and use it in GitHub Desktop.
Save TeMPOraL/90d9bcfc9703afc5651e to your computer and use it in GitHub Desktop.
(defun m44*m44 (m1 m2)
;; Unrolled, because why the hell not?
;; TODO maybe unroll dot-product and matrix-column/matrix-row as well?
;; for now let's inline them and hope the compiler is not dumb
(make-m44 (⋅ (m44-column m1 0) (m44-row m2 0)) (⋅ (m44-column m1 1) (m44-row m2 1)) (⋅ (m44-column m1 2) (m44-row m2 2)) (⋅ (m44-column m1 3) (m44-row m2 3))
(⋅ (m44-column m1 0) (m44-row m2 0)) (⋅ (m44-column m1 1) (m44-row m2 1)) (⋅ (m44-column m1 2) (m44-row m2 2)) (⋅ (m44-column m1 3) (m44-row m2 3))
(⋅ (m44-column m1 0) (m44-row m2 0)) (⋅ (m44-column m1 1) (m44-row m2 1)) (⋅ (m44-column m1 2) (m44-row m2 2)) (⋅ (m44-column m1 3) (m44-row m2 3))
(⋅ (m44-column m1 0) (m44-row m2 0)) (⋅ (m44-column m1 1) (m44-row m2 1)) (⋅ (m44-column m1 2) (m44-row m2 2)) (⋅ (m44-column m1 3) (m44-row m2 3))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment