MCPcopy Create free account
hub / github.com/Compaile/ctrack / recursive_fibonacci

Function recursive_fibonacci

test/test_nested.cpp:23–31  ·  view source on GitHub ↗

Recursive fibonacci for testing deep recursion with branching

Source from the content-addressed store, hash-verified

21
22// Recursive fibonacci for testing deep recursion with branching
23int recursive_fibonacci(int n) {
24 CTRACK;
25 if (n <= 1) {
26 test_helpers::sleep_ms(5);
27 return n;
28 }
29 test_helpers::sleep_ms(5);
30 return recursive_fibonacci(n - 1) + recursive_fibonacci(n - 2);
31}
32
33// Diamond pattern helper functions
34void diamond_leaf_d(int sleep_ms) {

Callers 1

test_nested.cppFile · 0.85

Calls 1

sleep_msFunction · 0.85

Tested by

no test coverage detected