Added code to allocate memory for the different references
Merge branch 'main_changes' of github.com:gamma9mu/ann-cuda into main_changes