The AOCL-DA C API contains routines for reading data of a single type from a CSV (comma separated values) file into an array. In addition, a character array of column headings can optionally be read.
The routines take a da_datastore structure as their first argument, which must be initialized prior
to the routine call
using da_datastore_init(). This is used to store options but is not used to store the actual
CSV data, which is instead returned in an array.
By default the data is stored in column major order, so that the element in the \(i\)-th row and \(j\)-th column is stored in the [\(i + j \times\) n_rows] entry of the array.
If the storage order option is set to row-major then data is stored in row major order, so that the element in the \(i\)-th row and \(j\)-th column is stored in the [\(j + i \times\) n_cols] entry of the array.
For more details on each of the available functions, see the API documentation.
Note
If you wish to load data directly from the CSV file to the da_datastore struct, then use da_data_load_from_csv().