mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-07-15 08:48:33 +00:00
Updated sum functions to be identical
This commit is contained in:
parent
93b4dc3703
commit
0965ff479d
Binary file not shown.
Binary file not shown.
|
@ -12,12 +12,12 @@
|
||||||
function sum(start, length)
|
function sum(start, length)
|
||||||
local sum =0
|
local sum =0
|
||||||
print(start)
|
print(start)
|
||||||
for x=0,10000000 do
|
for x=0,10000000 do
|
||||||
for x=start,(start+length) do
|
for x=start,(start+length-1) do
|
||||||
sum = sum + x;
|
sum = sum + x;
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
return sum
|
return sum
|
||||||
end
|
end
|
||||||
-- print(sum(1))
|
-- print(sum(1))
|
|
@ -92,8 +92,8 @@ void call_wasm_function()
|
||||||
clock_t start_t, stop_t;
|
clock_t start_t, stop_t;
|
||||||
double total_t;
|
double total_t;
|
||||||
printf("%s\n", __FUNCTION__);
|
printf("%s\n", __FUNCTION__);
|
||||||
wasm_argv[0] = 0;
|
wasm_argv[0] = 2;
|
||||||
wasm_argv[1] = THREAD_NUM * 10;
|
wasm_argv[1] = 3;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Execute the wasm function in current thread, get the expect result
|
* Execute the wasm function in current thread, get the expect result
|
||||||
|
|
Loading…
Reference in New Issue
Block a user