Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: extend intrinsic matmul #951

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
a bit efficient
  • Loading branch information
wassup05 committed Mar 14, 2025
commit cc77dee0106a05c5509eabfa2ad1cb5ff2418904
18 changes: 16 additions & 2 deletions src/stdlib_intrinsics_matmul.fypp
Original file line number Diff line number Diff line change
@@ -76,11 +76,25 @@ contains

select case (s(1,4))
case (1)
e = matmul(a, stdlib_matmul(b, c, d))
select case (s(2, 4))
case (2)
e = matmul(a, matmul(b, matmul(c, d)))
case (3)
e = matmul(a, matmul(matmul(b, c), d))
case default
error stop "stdlib_matmul: unexpected error unexpected s(i,j)"
end select
case (2)
e = matmul(matmul(a, b), matmul(c, d))
case (3)
e = matmul(stdlib_matmul(a, b ,c), d)
select case (s(1, 3))
case (1)
e = matmul(matmul(a, matmul(b, c)), d)
case (2)
e = matmul(matmul(matmul(a, b), c), d)
case default
error stop "stdlib_matmul: unexpected error unexpected s(i,j)"
end select
case default
error stop "stdlib_matmul: unexpected error unexpected s(i,j)"
end select
Loading
Oops, something went wrong.