Includ cstdlib for exit functions
Added cuda constants
Added function to allocate host memory for triangles