Commit 75442b28 authored by Matthieu Dorier's avatar Matthieu Dorier
Browse files

update quarshan to add sum operator

parent 6dbcc316
......@@ -23,7 +23,7 @@ $darshan_mods = { "POSIX" => Darshan::POSIX,
"STDIO" => Darshan::STDIO }
# List of available reduction operations
$reduction_ops = ['min','max','avg','var','std','med']
$reduction_ops = ['min','max','avg','var','std','med', 'sum']
# Structure for option parsing
Options = Struct.new(:counters,:query,:reductions,:header,:files,:mod,:qcounters)
......@@ -263,6 +263,14 @@ class Query
x /= arr.size
return x
end
def sum(arr)
x = 0.0
for i in arr
x += i
end
return x
end
end
options = Parser.parse(ARGV)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment