CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
42 lines
1.9 KiB
Fortran
42 lines
1.9 KiB
Fortran
! RUN: %python %S/test_folding.py %s %flang_fc1
|
|
! Tests folding of MATMUL()
|
|
module m
|
|
integer, parameter :: ia(2,3) = reshape([1, 2, 2, 3, 3, 4], shape(ia))
|
|
integer, parameter :: ib(3,2) = reshape([1, 2, 3, 2, 3, 4], shape(ib))
|
|
integer, parameter :: ix(*) = [1, 2]
|
|
integer, parameter :: iy(*) = [1, 2, 3]
|
|
integer, parameter :: iab(*,*) = matmul(ia, ib)
|
|
integer, parameter :: ixa(*) = matmul(ix, ia)
|
|
integer, parameter :: iay(*) = matmul(ia, iy)
|
|
logical, parameter :: test_iab = all([iab] == [14, 20, 20, 29])
|
|
logical, parameter :: test_ixa = all(ixa == [5, 8, 11])
|
|
logical, parameter :: test_iay = all(iay == [14, 20])
|
|
|
|
real, parameter :: ra(*,*) = ia
|
|
real, parameter :: rb(*,*) = ib
|
|
real, parameter :: rx(*) = ix
|
|
real, parameter :: ry(*) = iy
|
|
real, parameter :: rab(*,*) = matmul(ra, rb)
|
|
real, parameter :: rxa(*) = matmul(rx, ra)
|
|
real, parameter :: ray(*) = matmul(ra, ry)
|
|
logical, parameter :: test_rab = all(rab == iab)
|
|
logical, parameter :: test_rxa = all(rxa == ixa)
|
|
logical, parameter :: test_ray = all(ray == iay)
|
|
|
|
complex, parameter :: za(*,*) = cmplx(ra, -1.)
|
|
complex, parameter :: zb(*,*) = cmplx(rb, -1.)
|
|
complex, parameter :: zx(*) = cmplx(rx, -1.)
|
|
complex, parameter :: zy(*) = cmplx(ry, -1.)
|
|
complex, parameter :: zab(*,*) = matmul(za, zb)
|
|
complex, parameter :: zxa(*) = matmul(zx, za)
|
|
complex, parameter :: zay(*) = matmul(za, zy)
|
|
logical, parameter :: test_zab = all([zab] == [(11,-12),(17,-15),(17,-15),(26,-18)])
|
|
logical, parameter :: test_zxa = all(zxa == [(3,-6),(6,-8),(9,-10)])
|
|
logical, parameter :: test_zay = all(zay == [(11,-12),(17,-15)])
|
|
|
|
logical, parameter :: la(16, 4) = reshape([((iand(shiftr(j,k),1)/=0, j=0,15), k=0,3)], shape(la))
|
|
logical, parameter :: lb(4, 16) = transpose(la)
|
|
logical, parameter :: lab(16, 16) = matmul(la, lb)
|
|
logical, parameter :: test_lab = all([lab] .eqv. [((iand(k,j)/=0, k=0,15), j=0,15)])
|
|
end
|