diff options
Diffstat (limited to 'fortran/src/H5Df.c')
-rw-r--r-- | fortran/src/H5Df.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c index 22ce62c..70f0846 100644 --- a/fortran/src/H5Df.c +++ b/fortran/src/H5Df.c @@ -1420,11 +1420,7 @@ nh5dwrite_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spa hid_t c_file_space_id; hid_t c_xfer_prp; herr_t status; -#if defined (_UNICOS) - double *tmp; -#else - float *tmp; -#endif + real_f *tmp; size_t max_len; hvl_t *c_buf; @@ -1442,11 +1438,7 @@ nh5dwrite_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spa c_buf = (hvl_t *)malloc((size_t)num_elem * sizeof(hvl_t)); if (c_buf == NULL) return ret_value; -#if defined (_UNICOS) - tmp = (double *)buf; -#else - tmp = (float *)buf; -#endif + tmp = (real_f *)buf; for (i=0; i < num_elem; i++) { c_buf[i].len = (size_t)len[i]; c_buf[i].p = tmp; @@ -1518,11 +1510,7 @@ nh5dread_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spac if ( status <0 ) goto DONE; for (i=0; i < num_elem; i++) { len[i] = (size_t_f)c_buf[i].len; -#if defined (_UNICOS) - memcpy(&buf[i*max_len], c_buf[i].p, c_buf[i].len*sizeof(double)); -#else - memcpy(&buf[i*max_len], c_buf[i].p, c_buf[i].len*sizeof(float)); -#endif + memcpy(&buf[i*max_len], c_buf[i].p, c_buf[i].len*sizeof(real_f)); } H5Dvlen_reclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf); |