/usr/lib/ruby/vendor_ruby/mpi/utils.rb is in ruby-mpi 0.3.0-1build9.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | module MPI
module_function
def task_divide(m, size)
dm = m.to_f/size
ary = Array.new(size)
ary[0] = dm.round
sum = ary[0]
(size-1).times do|i|
ary[i+1] = (dm*(i+2)).round - sum
sum += ary[i+1]
end
ary
end
end # module MPI
|