Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
27
Task/Image-noise/PL-I/image-noise.pli
Normal file
27
Task/Image-noise/PL-I/image-noise.pli
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
Image_Noise: procedure options (main); /* 3 November 2013 */
|
||||
declare (start_time, end_time) float (18);
|
||||
declare (frame, m, n) fixed binary;
|
||||
|
||||
start_time = secs();
|
||||
get (m, n);
|
||||
do frame = 1 to 100; /* Generate 100 frames. */
|
||||
call display (m, n);
|
||||
put skip data (frame);
|
||||
end;
|
||||
end_time = secs();
|
||||
|
||||
put skip list ('Average FPS =' || fixed(100/(end_time-start_time), 6) );
|
||||
|
||||
display: procedure (m, n);
|
||||
declare (m, n) fixed binary;
|
||||
declare screen(0:m, 0:n) bit (1);
|
||||
declare i fixed binary;
|
||||
declare random builtin;
|
||||
|
||||
screen = '0'b; /* clear screen for this frame */
|
||||
do i = 0 to m*n*random;
|
||||
screen(random*m, random*n) = random > 0.5;
|
||||
end;
|
||||
end display;
|
||||
|
||||
end Image_Noise;
|
||||
Loading…
Add table
Add a link
Reference in a new issue