55 #pragma clang diagnostic push
56 #pragma clang diagnostic ignored "-Wpadded"
57 #pragma clang diagnostic ignored "-Wweak-vtables"
160 #pragma clang diagnostic push
161 #pragma clang diagnostic ignored "-Wdocumentation-deprecated-sync"
165 #pragma clang diagnostic pop
170 void extent(
size_t dim,ssize_t delta_elements)
const;
190 #if (defined(_DOXYGEN_) || H5_VERSION_GE(1,10,0))
191 void refresh()
const;
269 void read_reshape(T &data,
307 void write_reshape(
const T &data,
340 void write_chunk(
const T &data,
341 std::vector<unsigned long long> offset,
342 std::uint32_t filter_mask = 0,
347 void write_chunk(
const T &data,
348 std::vector<unsigned long long> offset,
349 std::uint32_t filter_mask = 0,
368 void write_chunk(
const T &data,
371 std::vector<unsigned long long> & offset,
372 std::uint32_t filter_mask = 0,
376 #if (defined(_DOXYGEN_) || H5_VERSION_GE(1,10,2))
391 std::uint32_t read_chunk(T &data,
392 std::vector<unsigned long long> offset,
411 std::uint32_t read_chunk(T &data,
413 std::vector<unsigned long long> & offset,
427 unsigned long long chunk_storage_size(std::vector<unsigned long long> offset)
const;
483 void write_reshape(
const T &data,
528 void read_reshape(T &data,
573 static Node create_dataset(
const Group &base,
585 void write_variable_length_data(
const T &data,
594 if(H5Dwrite(
static_cast<hid_t
>(*
this),
595 static_cast<hid_t
>(mem_type),
596 static_cast<hid_t
>(mem_space),
597 static_cast<hid_t
>(file_space),
598 static_cast<hid_t
>(dtpl),
601 std::stringstream ss;
602 ss<<
"Failure to write variable length data to dataset ["<<
link().path()<<
"]!";
608 void write_contiguous_data(
const T &data,
615 if(H5Dwrite(
static_cast<hid_t
>(*
this),
616 static_cast<hid_t
>(mem_type),
617 static_cast<hid_t
>(mem_space),
618 static_cast<hid_t
>(file_space),
619 static_cast<hid_t
>(dtpl),
622 std::stringstream ss;
623 ss<<
"Failure to write contiguous data to dataset ["<<
link().path()<<
"]!";
629 void write_variable_length_string_data(
const T &data,
637 auto buffer = Trait::to_buffer(data);
639 if(H5Dwrite(
static_cast<hid_t
>(*
this),
640 static_cast<hid_t
>(mem_type),
641 static_cast<hid_t
>(mem_space),
642 static_cast<hid_t
>(file_space),
643 static_cast<hid_t
>(dtpl),
644 reinterpret_cast<void*
>(buffer.data()))<0)
646 std::stringstream ss;
647 ss<<
"Failure to write variable length string data to dataset ["<<
link().path()<<
"]!";
653 void write_fixed_length_string_data(
const T &data,
661 auto buffer = Trait::to_buffer(data,mem_type,mem_space);
663 if(H5Dwrite(
static_cast<hid_t
>(*
this),
664 static_cast<hid_t
>(mem_type),
665 static_cast<hid_t
>(mem_space),
666 static_cast<hid_t
>(file_space),
667 static_cast<hid_t
>(dtpl),
668 reinterpret_cast<void*
>(buffer.data()))<0)
670 std::stringstream ss;
671 ss<<
"Failure to write fixed length string data to dataset ["<<
link().path()<<
"]!";
682 void read_variable_length_data(T &data,
696 buffer.resize(signed2unsigned<size_t>(file_space.
size()));
699 if(H5Dread(
static_cast<hid_t
>(*
this),
700 static_cast<hid_t
>(mem_type),
701 static_cast<hid_t
>(mem_space),
702 static_cast<hid_t
>(file_space),
703 static_cast<hid_t
>(dtpl),
706 std::stringstream ss;
707 ss<<
"Failure to read variable length data from dataset ["<<
link().path()<<
"]!";
713 if(H5Dvlen_reclaim(
static_cast<hid_t
>(file_type),
714 static_cast<hid_t
>(file_space),
715 static_cast<hid_t
>(dtpl),
723 void read_contiguous_data(T &data,
730 if(H5Dread(
static_cast<hid_t
>(*
this),
731 static_cast<hid_t
>(mem_type),
732 static_cast<hid_t
>(mem_space),
733 static_cast<hid_t
>(file_space),
734 static_cast<hid_t
>(dtpl),
737 std::stringstream ss;
738 ss<<
"Failure to read contiguous data from dataset ["<<
link().path()<<
"]!";
744 void read_variable_length_string_data(T &data,
752 using size_type =
typename std::vector<T>::size_type;
754 typename Trait::BufferType buffer(
static_cast<size_type
>(mem_space.
size()));
757 if(H5Dread(
static_cast<hid_t
>(*
this),
758 static_cast<hid_t
>(mem_type),
759 static_cast<hid_t
>(mem_space),
760 static_cast<hid_t
>(file_space),
761 static_cast<hid_t
>(dtpl),
764 std::stringstream ss;
765 ss<<
"Failure to read variable length string data from dataset ["
766 <<
link().path()<<
"]!";
772 if(buffer.size() > 0)
774 if(H5Dvlen_reclaim(
static_cast<hid_t
>(mem_type),
775 static_cast<hid_t
>(mem_space),
776 static_cast<hid_t
>(dtpl),
779 std::stringstream ss;
780 ss<<
"Error reclaiming memory from variable length string data in "
781 <<
"dataset ["<<
link().path()<<
"]!";
788 void read_fixed_length_string_data(T &data,
799 if(file_space.
size() > 0)
801 if(H5Dread(
static_cast<hid_t
>(*
this),
802 static_cast<hid_t
>(mem_type),
803 static_cast<hid_t
>(mem_space),
804 static_cast<hid_t
>(file_space),
805 static_cast<hid_t
>(dtpl),
808 std::stringstream ss;
809 ss<<
"Failure to read fixed length string data to dataset ["<<
link().path()<<
"]!";
819 #pragma clang diagnostic pop
830 write_variable_length_data(data,mem_type,mem_space,file_type_,file_space,dtpl);
837 write_variable_length_string_data(data,mem_type,mem_space,file_type_,file_space,dtpl);
841 write_fixed_length_string_data(data,mem_type,mem_space,file_type_,file_space,dtpl);
846 write_contiguous_data(data,mem_type,mem_space,file_type_,file_space,dtpl);
858 file_space.selection.all();
860 write(data,mem_type,mem_space,file_space,dtpl);
866 std::vector<unsigned long long> offset,
867 std::uint32_t filter_mask,
872 write_chunk(data, mem_type_holder.
get(data), mem_space_holder.
get(data), offset, filter_mask, dtpl);
877 std::vector<unsigned long long> offset,
878 std::uint32_t filter_mask,
883 write_chunk(data, mem_type_holder.
get(data), mem_space_holder.
get(data), offset, filter_mask, dtpl);
890 std::vector<unsigned long long> & offset,
891 std::uint32_t filter_mask,
894 size_t databytesize = signed2unsigned<unsigned long long>(mem_space.
size()) * mem_type.
size();
898 #if H5_VERSION_GE(1,10,3)
899 if(H5Dwrite_chunk(
static_cast<hid_t
>(*
this),
900 static_cast<hid_t
>(dtpl),
906 std::stringstream ss;
907 ss<<
"Failure to write chunk data to dataset ["<<
link().
path()<<
"]!";
911 if(H5DOwrite_chunk(
static_cast<hid_t
>(*
this),
912 static_cast<hid_t
>(dtpl),
918 std::stringstream ss;
919 ss<<
"Failure to write chunk data to dataset ["<<
link().
path()<<
"]!";
926 std::stringstream ss;
927 ss<<
"Failure to write non-integer chunk data to dataset ["<<
link().
path()<<
"]!";
932 #if H5_VERSION_GE(1,10,2)
936 std::vector<unsigned long long> offset,
940 return read_chunk(data, mem_type_holder.
get(data), offset, dtpl);
946 std::vector<unsigned long long> & offset,
949 std::uint32_t filter_mask;
952 #if H5_VERSION_GE(1,10,3)
953 if(H5Dread_chunk(
static_cast<hid_t
>(*
this),
954 static_cast<hid_t
>(dtpl),
959 std::stringstream ss;
960 ss<<
"Failure to read chunk data from dataset ["<<
link().
path()<<
"]!";
964 if(H5DOread_chunk(
static_cast<hid_t
>(*
this),
965 static_cast<hid_t
>(dtpl),
970 std::stringstream ss;
971 ss<<
"Failure to read chunk data from dataset ["<<
link().
path()<<
"]!";
978 std::stringstream ss;
979 ss<<
"Failure to read non-integer chunk data from dataset ["<<
link().
path()<<
"]!";
1003 template<
typename T>
1010 file_space.selection.all();
1012 if (file_space.size() == mem_space.
size() &&
1017 if(file_simple_space.
rank() > 1 && mem_simple_space.
rank() == 1){
1018 return write(data,mem_type,file_space,file_space,dtpl);
1021 write(data,mem_type,mem_space,file_space,dtpl);
1025 template<
typename T>
1033 read_variable_length_data(data,mem_type,mem_space,file_type_,file_space,dtpl);
1040 read_variable_length_string_data(data,mem_type,mem_space,file_type_,file_space,dtpl);
1044 read_fixed_length_string_data(data,mem_type,mem_space,file_type_,file_space,dtpl);
1049 read_contiguous_data(data,mem_type,mem_space,file_type_,file_space,dtpl);
1054 template<
typename T>
1060 read_reshape(data, mem_type_holder.
get(data), mem_space_holder.
get(data), selection, dtpl);
1063 template<
typename T>
1069 read_reshape(data, mem_type_holder.
get(data), mem_space_holder.
get(data), selection, dtpl);
1072 template<
typename T>
1082 return read(data,mem_type,mem_space,file_space,dtpl);
1085 if(hyper.
rank() > 1) {
1087 if (selected_space.
size() == mem_space.
size()) {
1089 return read(data,mem_type,selected_space,file_space,dtpl);
1093 catch(
const std::bad_cast&) { }
1094 read(data,mem_type,mem_space,file_space,dtpl);
1097 template<
typename T>
1106 read(data,memory_type,memory_space,file_space,dtpl);
1109 template<
typename T>
1117 read(data,memory_type,memory_space,file_space,dtpl);
1120 template<
typename T>
1126 write_reshape(data, mem_type_holder.
get(data), mem_space_holder.
get(data), selection, dtpl);
1129 template<
typename T>
1135 write_reshape(data, mem_type_holder.
get(data), mem_space_holder.
get(data), selection, dtpl);
1138 template<
typename T>
1149 return write(data,mem_type,mem_space,file_space,dtpl);
1152 if(hyper.
rank() > 1) {
1155 if(selected_space.
rank() > 1 &&
1156 mem_simple_space.
rank() == 1 &&
1157 selected_space.
size() == mem_space.
size()) {
1159 return write(data,mem_type,selected_space,file_space,dtpl);
1163 catch(
const std::bad_cast&) { }
1164 write(data,mem_type,mem_space,file_space,dtpl);
1168 template<
typename T>
1182 template<
typename T>
1191 template<
typename T>
1198 file_space.selection.all();
1200 if (file_space.size() == mem_space.
size()){
1201 read(data,mem_type,file_space,file_space,dtpl);
1204 read(data,mem_type,mem_space,file_space,dtpl);