mariadb/fib/fiblib.c
Bradley C. Kuszmaul 866597e6d1 [t:3586] [t:3604] Merge icc onto main. Refs #3586, #3604.
git-svn-id: file:///svn/toku/tokudb@32232 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:59:40 -04:00

11 lines
182 B
C

#include "fiblib.h"
long fib (int n) {
if (n<=2) return n;
else {
long a,b;
a = _Cilk_spawn fib(n-1);
b = _Cilk_spawn fib(n-2);
_Cilk_sync;
return a+b;
}
}