Fix seg fault when writing profile by using array instead of vector
Adds inital implementation on GPU (not working yet)