2022-12-06 11:49:45 +11:00
|
|
|
!-------------------------------------------------------------------
|
|
|
|
!-
|
|
|
|
|
2022-12-01 22:03:22 +11:00
|
|
|
program chkpixels
|
|
|
|
|
2022-12-06 11:49:45 +11:00
|
|
|
use spitpgm ! main module
|
|
|
|
use trials ! experiments, ymmv.
|
2022-12-01 22:03:22 +11:00
|
|
|
|
2022-12-06 11:49:45 +11:00
|
|
|
implicit none
|
2022-12-01 22:03:22 +11:00
|
|
|
|
|
|
|
write(0, *) "------ CHKPIXELS ------"
|
2022-12-06 11:49:45 +11:00
|
|
|
call test_alpha(3)
|
2022-12-01 22:03:22 +11:00
|
|
|
|
|
|
|
STOP 'BECAUSE NO CPU AVAILABLE'
|
|
|
|
|
|
|
|
contains
|
|
|
|
!-------------------------------------------------------------------
|
|
|
|
!-
|
2022-12-06 11:49:45 +11:00
|
|
|
subroutine test_alpha(increment)
|
|
|
|
integer, intent(in) :: increment
|
2022-12-01 22:03:22 +11:00
|
|
|
|
2022-12-06 11:49:45 +11:00
|
|
|
integer, parameter :: SZ = 40
|
2022-12-01 22:03:22 +11:00
|
|
|
integer, dimension(SZ, SZ) :: greymap
|
|
|
|
integer :: ix, iy, value
|
|
|
|
|
|
|
|
value = 0
|
|
|
|
do iy=1, SZ
|
|
|
|
do ix=1, SZ
|
|
|
|
greymap(ix, iy) = value
|
2022-12-06 11:49:45 +11:00
|
|
|
value = value + increment
|
2022-12-01 22:03:22 +11:00
|
|
|
enddo
|
|
|
|
enddo
|
2022-12-06 11:49:45 +11:00
|
|
|
|
2022-12-01 22:03:22 +11:00
|
|
|
call spit_as_pgm_16 (greymap, 'a.pgm')
|
|
|
|
call spit_as_pgm_eq (greymap, 'b.pgm')
|
|
|
|
call spit_as_pgm_8 (greymap, 'c.pgm')
|
2022-12-06 11:49:45 +11:00
|
|
|
call new_spit_a (greymap, 'x.pgm')
|
2022-12-01 22:03:22 +11:00
|
|
|
|
|
|
|
end subroutine
|
|
|
|
|
|
|
|
end program
|
|
|
|
|
|
|
|
!-------------------------------------------------------------------
|