Skip to content

Commit 80adf2b

Browse files
0382jvdp1
andauthored
Apply suggestions from code review
Co-authored-by: Jeremie Vandenplas <[email protected]>
1 parent 4925226 commit 80adf2b

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

example/sorting/example_radix_sort.f90

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,7 @@ program example_radix_sort
2323

2424
allocate (arrf64(10))
2525
x = 0.0 ! divide zero will arise compile error
26-
arrf64(1) = 1.0/x
27-
arrf64(2) = 0.0
28-
arrf64(3) = 0.0/x
29-
arrf64(4) = -1.0/x
30-
arrf64(5) = -0.0
31-
arrf64(6) = 1.0
32-
arrf64(7) = -1.0
33-
arrf64(8) = 3.45
34-
arrf64(9) = -3.14
35-
arrf64(10) = 3.44
26+
arrf64 = [1.0/x, 0.0, 0.0/x, -1.0/x, -0.0, 1.0, -1.0, 3.45, -3.14, 3.44]
3627
call radix_sort(arrf64)
3728
print *, arrf64
3829
! In my computer, it gives

test/sorting/test_sorting.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ subroutine test_int_radix_sort( a, a_name, ltest )
529529
end if
530530
write( lun, '("| Integer |", 1x, i7, 2x, "|", 1x, a15, " |", ' // &
531531
'a12, " |", F10.6, " |" )' ) &
532-
test_size, a_name, "Sort", tdiff/rate
532+
test_size, a_name, "Radix_sort", tdiff/rate
533533

534534
! reverse
535535
dummy = a

0 commit comments

Comments
 (0)