Mercurial > hg > octave-lyh
comparison src/ov-cx-mat.cc @ 9892:ac69e6f4b33d
Add HDF5-1.8 compatibility while maintaining compatibility with HDF5-1.6 versions
author | Kacper Kowalik <xarthisius.kk@gmail.com> |
---|---|
date | Tue, 01 Dec 2009 00:49:07 +0100 |
parents | b3089dba88bf |
children | cd96d29c5efa |
comparison
equal
deleted
inserted
replaced
9891:1506a17832c9 | 9892:ac69e6f4b33d |
---|---|
581 if (type_hid < 0) | 581 if (type_hid < 0) |
582 { | 582 { |
583 H5Sclose (space_hid); | 583 H5Sclose (space_hid); |
584 return false; | 584 return false; |
585 } | 585 } |
586 | 586 #if HAVE_HDF5_18 |
587 data_hid = H5Dcreate (loc_id, name, type_hid, space_hid, | |
588 H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); | |
589 #else | |
587 data_hid = H5Dcreate (loc_id, name, type_hid, space_hid, H5P_DEFAULT); | 590 data_hid = H5Dcreate (loc_id, name, type_hid, space_hid, H5P_DEFAULT); |
591 #endif | |
588 if (data_hid < 0) | 592 if (data_hid < 0) |
589 { | 593 { |
590 H5Sclose (space_hid); | 594 H5Sclose (space_hid); |
591 H5Tclose (type_hid); | 595 H5Tclose (type_hid); |
592 return false; | 596 return false; |
624 if (empty > 0) | 628 if (empty > 0) |
625 matrix.resize(dv); | 629 matrix.resize(dv); |
626 if (empty) | 630 if (empty) |
627 return (empty > 0); | 631 return (empty > 0); |
628 | 632 |
633 #if HAVE_HDF5_18 | |
634 hid_t data_hid = H5Dopen (loc_id, name, H5P_DEFAULT); | |
635 #else | |
629 hid_t data_hid = H5Dopen (loc_id, name); | 636 hid_t data_hid = H5Dopen (loc_id, name); |
637 #endif | |
630 hid_t type_hid = H5Dget_type (data_hid); | 638 hid_t type_hid = H5Dget_type (data_hid); |
631 | 639 |
632 hid_t complex_type = hdf5_make_complex_type (H5T_NATIVE_DOUBLE); | 640 hid_t complex_type = hdf5_make_complex_type (H5T_NATIVE_DOUBLE); |
633 | 641 |
634 if (! hdf5_types_compatible (type_hid, complex_type)) | 642 if (! hdf5_types_compatible (type_hid, complex_type)) |