Taking input from a csv file and arranging it into a 2D array using Cuda C++

Hello I have a csv file which consists of numbers separated by commas, like the following:

0.6667,0.6668,0.6669…
0.7773,0.7774,0.7775…
.
.
.
.

I need these values for my calculations in the Cuda C++ code. How do I get these values from the file and put them in an 2D array?

Your help is appreciated.

Getting them from the file to a host data structure is not CUDA specific. Use whatever method you like.

Once they are in a host data structure, the method to transfer them to the device is covered in many CUDA tutorials.