@@ -63,7 +63,7 @@ CuqdynResult *cuqdyn_algo(const char *data_file, const char *sacess_conf_file,
6363 exit (1 );
6464 }
6565
66- const sunsunrealtype t0 = NV_Ith_S (times , 0 );
66+ const sunrealtype t0 = NV_Ith_S (times , 0 );
6767 N_Vector initial_values = copy_matrix_row (observed_data , 0 , 0 , SM_COLUMNS_D (observed_data ));
6868
6969 const long m = SM_ROWS_D (observed_data );
@@ -126,7 +126,7 @@ CuqdynResult *cuqdyn_algo(const char *data_file, const char *sacess_conf_file,
126126
127127 N_Vector init_vals = New_Serial (NV_LENGTH_S (initial_values ));
128128 memcpy (NV_DATA_S (init_vals ), NV_DATA_S (initial_values ),
129- NV_LENGTH_S (initial_values ) * sizeof (sunsunrealtype ));
129+ NV_LENGTH_S (initial_values ) * sizeof (sunrealtype ));
130130
131131 N_Vector predicted_params =
132132 execute_ess_solver (sacess_conf_file , output_file , texp , yexp , init_vals , rank , nproc );
@@ -138,8 +138,8 @@ CuqdynResult *cuqdyn_algo(const char *data_file, const char *sacess_conf_file,
138138
139139 for (int j = 0 ; j < n ; ++ j )
140140 {
141- sunsunrealtype observed = SM_ELEMENT_D (observed_data , i , j );
142- sunsunrealtype predicted = SM_ELEMENT_D (predicted_data , i , j );
141+ sunrealtype observed = SM_ELEMENT_D (observed_data , i , j );
142+ sunrealtype predicted = SM_ELEMENT_D (predicted_data , i , j );
143143
144144 NV_Ith_S (residuals , j ) = fabs (observed - predicted );
145145 }
@@ -343,13 +343,13 @@ void matrix_array_set_index(MatrixArray array, long i, SUNMatrix matrix)
343343
344344 array .data [i ] = NewDenseMatrix (rows , cols );
345345
346- memcpy (SM_DATA_D (array .data [i ]), SM_DATA_D (matrix ), rows * cols * sizeof (sunsunrealtype ));
346+ memcpy (SM_DATA_D (array .data [i ]), SM_DATA_D (matrix ), rows * cols * sizeof (sunrealtype ));
347347}
348348
349- int compare_sunsunrealtype (const void * a , const void * b )
349+ int compare_sunrealtype (const void * a , const void * b )
350350{
351- double x = * (sunsunrealtype * ) a ;
352- double y = * (sunsunrealtype * ) b ;
351+ double x = * (sunrealtype * ) a ;
352+ double y = * (sunrealtype * ) b ;
353353
354354 if (x < y )
355355 return -1 ;
@@ -367,9 +367,9 @@ SUNMatrix matrix_array_get_median(MatrixArray matrix_array)
367367 long max_z = matrix_array .len ;
368368
369369 SUNMatrix medians_matrix = NewDenseMatrix (rows , cols );
370- sunsunrealtype * medians = SM_DATA_D (medians_matrix );
370+ sunrealtype * medians = SM_DATA_D (medians_matrix );
371371
372- sunsunrealtype values [max_z ];
372+ sunrealtype values [max_z ];
373373
374374 for (int i = 0 ; i < rows ; ++ i )
375375 {
@@ -382,7 +382,7 @@ SUNMatrix matrix_array_get_median(MatrixArray matrix_array)
382382 }
383383
384384 // Sorting the vector to obtain the median easily
385- qsort (values , max_z , sizeof (values [0 ]), compare_sunsunrealtype );
385+ qsort (values , max_z , sizeof (values [0 ]), compare_sunrealtype );
386386
387387 SM_ELEMENT_D (medians_matrix , i , j ) =
388388 max_z & 0b1 ? values [(max_z - 1 ) / 2 ] : (values [max_z / 2 - 1 ] + values [max_z / 2 ]) / 2 ;
@@ -410,9 +410,9 @@ N_Vector get_matrix_cols_median(SUNMatrix matrix)
410410 long cols = SM_COLUMNS_D (matrix );
411411
412412 N_Vector medians_vector = New_Serial (cols );
413- sunsunrealtype * medians = NV_DATA_S (medians_vector );
413+ sunrealtype * medians = NV_DATA_S (medians_vector );
414414
415- sunsunrealtype copied_col [rows ];
415+ sunrealtype copied_col [rows ];
416416
417417 for (int j = 0 ; j < cols ; ++ j )
418418 {
@@ -422,7 +422,7 @@ N_Vector get_matrix_cols_median(SUNMatrix matrix)
422422 }
423423
424424 // Sorting the vector to obtain the median easily
425- qsort (copied_col , rows , sizeof (copied_col [0 ]), compare_sunsunrealtype );
425+ qsort (copied_col , rows , sizeof (copied_col [0 ]), compare_sunrealtype );
426426
427427 medians [j ] = rows & 0b1 ? copied_col [(rows - 1 ) / 2 ] : (copied_col [rows / 2 - 1 ] + copied_col [rows / 2 ]) / 2 ;
428428 }
0 commit comments