diff options
Diffstat (limited to 'tests/fibonacci.lua')
-rw-r--r-- | tests/fibonacci.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/fibonacci.lua b/tests/fibonacci.lua index 452a770..48cd8d7 100644 --- a/tests/fibonacci.lua +++ b/tests/fibonacci.lua | |||
@@ -4,7 +4,7 @@ | |||
4 | -- Parallel calculation of Fibonacci numbers | 4 | -- Parallel calculation of Fibonacci numbers |
5 | -- | 5 | -- |
6 | -- A sample of task splitting like Intel TBB library does. | 6 | -- A sample of task splitting like Intel TBB library does. |
7 | -- | 7 | -- |
8 | -- References: | 8 | -- References: |
9 | -- Intel Threading Building Blocks, 'test all' | 9 | -- Intel Threading Building Blocks, 'test all' |
10 | -- <http://shareit.intel.com/WikiHome/Articles/111111316> | 10 | -- <http://shareit.intel.com/WikiHome/Articles/111111316> |
@@ -41,7 +41,7 @@ local function fib( n ) | |||
41 | -- | 41 | -- |
42 | -- note that lanes is pulled in as upvalue, so we need package library to require internals properly | 42 | -- note that lanes is pulled in as upvalue, so we need package library to require internals properly |
43 | -- (because lua51-lanes is always required internally if possible, which is necessary in that case) | 43 | -- (because lua51-lanes is always required internally if possible, which is necessary in that case) |
44 | local gen_f= lanes.gen( "package,string,io,math,debug", fib ) | 44 | local gen_f= lanes.gen( "*", fib ) |
45 | 45 | ||
46 | local n1=floor(n/2) +1 | 46 | local n1=floor(n/2) +1 |
47 | local n2=floor(n/2) -1 + n%2 | 47 | local n2=floor(n/2) -1 + n%2 |
@@ -60,7 +60,7 @@ local function fib( n ) | |||
60 | end | 60 | end |
61 | 61 | ||
62 | io.stderr:write( "fib("..n..") = "..sum.."\n" ) | 62 | io.stderr:write( "fib("..n..") = "..sum.."\n" ) |
63 | 63 | ||
64 | return sum | 64 | return sum |
65 | end | 65 | end |
66 | 66 | ||