Open gadamico opened 8 years ago
See this thread: https://github.com/uwhpsc-2016/lectures/issues/5
One main difference is that (by default) you cannot allocate as much memory on the stack as on the heap.
Another main difference: it's faster to reference stack allocations than heap allocations.
So I'm a little confused, again / still, about dynamic memory allocation. I ended up using the stack to allocate my variables in HW 2, but ... well ... I'm not quite sure why that was possible!
Since N, an input to lots of our linear algebra functions, is determined at runtime (?), shouldn't that mean that the parameters depending for their size on N would have to be heap-allocated?