URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 303 |
Rev 384 |
! Program to test the scalarizer
|
! Program to test the scalarizer
|
program testarray
|
program testarray
|
implicit none
|
implicit none
|
integer, dimension (:, :), allocatable :: a, b
|
integer, dimension (:, :), allocatable :: a, b
|
integer n
|
integer n
|
|
|
allocate(a(6, 5), b(6, 5))
|
allocate(a(6, 5), b(6, 5))
|
a = 0
|
a = 0
|
do n = 1, 5
|
do n = 1, 5
|
a(4, n) = n
|
a(4, n) = n
|
end do
|
end do
|
|
|
b(:, 5:1:-1) = a
|
b(:, 5:1:-1) = a
|
a(1:5, 2) = a(4, :) + 1
|
a(1:5, 2) = a(4, :) + 1
|
|
|
! The following expression should cause loop reordering
|
! The following expression should cause loop reordering
|
a(:, 2:4) = a(:, 1:3)
|
a(:, 2:4) = a(:, 1:3)
|
|
|
do n = 1, 5
|
do n = 1, 5
|
if (a(n, 3) .ne. (n + 1)) call abort
|
if (a(n, 3) .ne. (n + 1)) call abort
|
if (b(4, n) .ne. (6 - n)) call abort
|
if (b(4, n) .ne. (6 - n)) call abort
|
end do
|
end do
|
end program
|
end program
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.