A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert [From A. Giersch] Fix the following compilation warnings in ISO-C99 mode:
[simgrid.git]
/
examples
/
ruby
/
Quicksort.rb
diff --git
a/examples/ruby/Quicksort.rb
b/examples/ruby/Quicksort.rb
index
4a32026
..
6c1b550
100644
(file)
--- a/
examples/ruby/Quicksort.rb
+++ b/
examples/ruby/Quicksort.rb
@@
-36,10
+36,10
@@
class Sender < MSG::Process
recv_mailbox = self.class
res_task = MSG::Task.receive(recv_mailbox.to_s)
result = res_task.data
recv_mailbox = self.class
res_task = MSG::Task.receive(recv_mailbox.to_s)
result = res_task.data
- MSG::info("Greate !! Thx
Dude , you're my Best Friend
!!")
+ MSG::info("Greate !! Thx !!")
MSG::info("Here is my table after a quicksort :)")
p result
MSG::info("Here is my table after a quicksort :)")
p result
- MSG::info("Bye
!! I finished My HomeWork !! Time to Sleep
:)")
+ MSG::info("Bye
Now
:)")
end
end
end
end
@@
-55,14
+55,14
@@
class Receiver < MSG::Process
lazy_friend = MSG::Host.getByName(args[0]).name
send_mailbox = args[1]
recv_mailbox = self.class
lazy_friend = MSG::Host.getByName(args[0]).name
send_mailbox = args[1]
recv_mailbox = self.class
- MSG::info("
Oh Not Again !! Grrr"
)
+ MSG::info("
Receiving Table from "+lazy_friend
)
task = MSG::Task.receive(recv_mailbox.to_s)
table = task.data
quicksort(table,0,table.size-1)
task.join(table)
task = MSG::Task.receive(recv_mailbox.to_s)
table = task.data
quicksort(table,0,table.size-1)
task.join(table)
- MSG::info("
Ok "+lazy_friend+ "I did it, next time try to do it yourself:)
")
+ MSG::info("
Sort Done ... Sending Back the new table
")
task.send(send_mailbox)
task.send(send_mailbox)
- MSG::info("Bye lazy
Friend
!!")
+ MSG::info("Bye lazy
Boy
!!")
end
end
@@
-87,7
+87,6
@@
def partition(list, p, r)
return i + 1
end
return i + 1
end
-
end
#################################################
end
#################################################