Commit cdd8dbba authored by He Guanlin's avatar He Guanlin
Browse files

Update init.cc

parent 7722cd19
......@@ -46,9 +46,9 @@ FILE *fp; // File pointer
void InputDataset(void)
{
// Dynamic memory allocation for CPU arrays
data = (T_real *) malloc(NbPoints*NbDims*sizeof(T_real));
dataT = (T_real *) malloc(NbDims*NbPoints*sizeof(T_real));
label = (int *) malloc(NbPoints*sizeof(int));
data = (T_real *) malloc(sizeof(T_real)*NbPoints*NbDims);
dataT = (T_real *) malloc(sizeof(T_real)*NbDims*NbPoints);
label = (int *) malloc(sizeof(int)*NbPoints);
// Load input data from a text file
fp = fopen(INPUT_DATA, "r");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment