Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexbuccheri/blas_wrapping
Test interface wrapping of BLAS using assumed-rank.
https://github.com/alexbuccheri/blas_wrapping
Last synced: about 1 month ago
JSON representation
Test interface wrapping of BLAS using assumed-rank.
- Host: GitHub
- URL: https://github.com/alexbuccheri/blas_wrapping
- Owner: AlexBuccheri
- Created: 2024-03-17T22:08:48.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-19T15:58:55.000Z (10 months ago)
- Last Synced: 2024-10-28T10:28:29.632Z (3 months ago)
- Language: Fortran
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Blas Interface Testing
* Produce F2008 interfaces for BLAS 1 and 2 routines, with consistency-checking
* Use assumed-rank arrays to reduce the number of overloads requiredWhat I would like to do is something basic like:
```fortran
subroutine copy_real64(x, y)
real(real64), intent(in), contiguous :: x(..)
real(real64), intent(out), contiguous :: y(..)
integer, allocatable :: shape_x(:), shape_y(:)
integer :: i
! Call to blas routine with assumed-rank array
call dcopy(size(x), x, 1, y, 1)end subroutine copy_real64
```however the compiler complains that I require an explicit interface. Tests show that while GCC 10 and 11 allow:
```fortran
interface
subroutine dcopy(n, dx, incx, dy, incy)
use, intrinsic :: iso_fortran_env
integer, intent(in) :: n, incx, incy
real(real64), intent(in) :: dx(*)
real(real64), intent(out) :: dy(*)
end subroutine dcopy
end interface
```GCC 12 and above, aswell as ifx, require the interface to be consistent with the declarations of what I'm passing
to the actual call:```fortran
interface
subroutine dcopy(n, dx, incx, dy, incy)
use, intrinsic :: iso_fortran_env
integer, intent(in) :: n, incx, incy
real(real64), intent(in) :: dx(..)
real(real64), intent(out) :: dy(..)
end subroutine dcopy
end interface
```