The std::complex<long double> instantiation creates errors with valgrind.
Although long double does not create errors with valgrind, it is not a widely used.
};
/**
- * Reads an attribute. T can be float, double, long double,
- * std::complex<float>, std::complex<double>, std::complex<long double>,
- * int, unsigned int, bool or std::string. Note that the encoding of
- * std::string is UTF8 in order to be compatible with python3.
+ * Reads an attribute. T can be float, double, std::complex<float>,
+ * std::complex<double>, int, unsigned int, bool or std::string. Note that
+ * the encoding of std::string is UTF8 in order to be compatible with
+ * python3.
*
* Datatype conversion takes place at the time of a read or write and is
* automatic. See the <a
attr(const std::string attr_name) const;
/**
- * Reads an attribute. T can be float, double, long double,
- * std::complex<float>, std::complex<double>, std::complex<long double>,
- * int, unsigned int, bool or std::string. Note that the encoding of
- * std::string is UTF8 in order to be compatible with python3.
+ * Reads an attribute. T can be float, double, std::complex<float>,
+ * std::complex<double>, int, unsigned int, bool or std::string. Note that
+ * the encoding of std::string is UTF8 in order to be compatible with
+ * python3.
*
* Datatype conversion takes place at the time of a read or write and is
* automatic. See the <a
public:
/**
- * Reads data of the dataset. Number can be float, double, long double,
- * std::complex<float>, std::complex<double>, std::complex<long double>, int
- * or unsigned int.
+ * Reads data of the dataset. Number can be float, double,
+ * std::complex<float>, std::complex<double>, int or unsigned int.
*
* Datatype conversion takes place at the time of a read or write and is
* automatic. See the <a
read();
/**
- * Reads data of a subset of the dataset. Number can be float, double, long
- * double, std::complex<float>, std::complex<double>,
- * std::complex<long double>, int or unsigned int.
+ * Reads data of a subset of the dataset. Number can be float, double,
+ * std::complex<float>, std::complex<double>, int or unsigned int.
*
* The selected elements can be scattered and take any shape in the dataset.
* For examples, in the 4D case, we will be selecting three points and a 4D
/**
* This function does not read any data, but can contribute to a collective
- * read call. Number can be float, double, long double, std::complex<float>,
- * std::complex<double>, std::complex<long double>, int or unsigned int.
+ * read call. Number can be float, double, std::complex<float>,
+ * std::complex<double>, int or unsigned int.
*
* Datatype conversion takes place at the time of a read or write and is
* automatic. See the <a
read_none();
/**
- * Writes data in the dataset. Number can be float, double, long double,
- * std::complex<float>, std::complex<double>, std::complex<long double>, int
- * or unsigned int.
+ * Writes data in the dataset. Number can be float, double,
+ * std::complex<float>, std::complex<double>, int or unsigned int.
*
* Datatype conversion takes place at the time of a read or write and is
* automatic. See the <a
write(const Container<number> &data);
/**
- * Writes data to a subset of the dataset. Number can be float, double, long
- * double, std::complex<float>, std::complex<double>,
- * std::complex<long double>, int or unsigned int.
+ * Writes data to a subset of the dataset. Number can be float, double,
+ * std::complex<float>, std::complex<double>, int or unsigned int.
*
* The selected elements can be scattered and take any shape in the dataset.
* For examples, in the 4D case, we will be selecting three points and a 4D
/**
* This function does not write any data, but can contribute to a collective
- * write call. Number can be float, double, long double,
- * std::complex<float>, std::complex<double>, std::complex<long double>, int
- * or unsigned int.
+ * write call. Number can be float, double, std::complex<float>,
+ * std::complex<double>, int or unsigned int.
*
* Datatype conversion takes place at the time of a read or write and is
* automatic. See the <a
dataset(const std::string name);
/**
- * Creates a dataset. Number can be float, double, long
- * double, std::complex<float>, std::complex<double>,
- * std::complex<long double>, int or unsigned int.
+ * Creates a dataset. Number can be float, double, std::complex<float>,
+ * std::complex<double>, int or unsigned int.
*
* Datatype conversion takes place at the time of a read or write and is
* automatic. See the <a
const std::vector<hsize_t> dimensions) const;
/**
- * Creates and writes data to a dataset. Number can be float, double, long
- * double, std::complex<float>, std::complex<double>,
- * std::complex<long double>, int or unsigned int.
+ * Creates and writes data to a dataset. Number can be float, double,
+ * std::complex<float>, std::complex<double>, int or unsigned int.
*
* Datatype conversion takes place at the time of a read or write and is
* automatic. See the <a
t_type = std::shared_ptr<hid_t>(new hid_t);
*t_type = H5T_NATIVE_DOUBLE;
}
- else if (std::is_same<number, long double>::value)
- {
- t_type = std::shared_ptr<hid_t>(new hid_t);
- *t_type = H5T_NATIVE_LDOUBLE;
- }
else if (std::is_same<number, int>::value)
{
t_type = std::shared_ptr<hid_t>(new hid_t);
H5Tinsert(*t_type, "r", 0, H5T_NATIVE_DOUBLE);
H5Tinsert(*t_type, "i", sizeof(double), H5T_NATIVE_DOUBLE);
}
- else if (std::is_same<number, std::complex<long double>>::value)
- {
- t_type = std::shared_ptr<hid_t>(new hid_t, [](auto pointer) {
- // Relase the HDF5 resource
- H5Tclose(*pointer);
- delete pointer;
- });
- *t_type = H5Tcreate(H5T_COMPOUND, sizeof(std::complex<long double>));
- // The C++ standards committee agreed to mandate that the storage
- // format used for the std::complex type be binary-compatible with
- // the C99 type, i.e. an array T[2] with consecutive real [0] and
- // imaginary [1] parts.
- H5Tinsert(*t_type, "r", 0, H5T_NATIVE_LDOUBLE);
- H5Tinsert(*t_type, "i", sizeof(long double), H5T_NATIVE_LDOUBLE);
- }
else
{
Assert(false, ExcInternalError());
HDF5Object::attr<float>(const std::string attr_name) const;
template double
HDF5Object::attr<double>(const std::string attr_name) const;
- template long double
- HDF5Object::attr<long double>(const std::string attr_name) const;
template std::complex<float>
HDF5Object::attr<std::complex<float>>(const std::string attr_name) const;
template std::complex<double>
HDF5Object::attr<std::complex<double>>(const std::string attr_name) const;
- template std::complex<long double>
- HDF5Object::attr<std::complex<long double>>(
- const std::string attr_name) const;
template int
HDF5Object::attr<int>(const std::string attr_name) const;
template unsigned int
HDF5Object::write_attr<double>(const std::string attr_name,
double value) const;
template void
- HDF5Object::write_attr<long double>(const std::string attr_name,
- long double value) const;
- template void
HDF5Object::write_attr<std::complex<float>>(const std::string attr_name,
std::complex<float> value) const;
template void
const std::string attr_name,
std::complex<double> value) const;
template void
- HDF5Object::write_attr<std::complex<long double>>(
- const std::string attr_name,
- std::complex<long double> value) const;
- template void
HDF5Object::write_attr<int>(const std::string attr_name, int value) const;
template void
HDF5Object::write_attr<unsigned int>(const std::string attr_name,
DataSet::read<std::vector, float>();
template std::vector<double>
DataSet::read<std::vector, double>();
- template std::vector<long double>
- DataSet::read<std::vector, long double>();
template std::vector<std::complex<float>>
DataSet::read<std::vector, std::complex<float>>();
template std::vector<std::complex<double>>
DataSet::read<std::vector, std::complex<double>>();
- template std::vector<std::complex<long double>>
- DataSet::read<std::vector, std::complex<long double>>();
template std::vector<int>
DataSet::read<std::vector, int>();
template std::vector<unsigned int>
DataSet::read<FullMatrix, float>();
template FullMatrix<double>
DataSet::read<FullMatrix, double>();
- template FullMatrix<long double>
- DataSet::read<FullMatrix, long double>();
template FullMatrix<std::complex<float>>
DataSet::read<FullMatrix, std::complex<float>>();
template FullMatrix<std::complex<double>>
DataSet::read_selection<float>(const std::vector<hsize_t> coordinates);
template std::vector<double>
DataSet::read_selection<double>(const std::vector<hsize_t> coordinates);
- template std::vector<long double>
- DataSet::read_selection<long double>(const std::vector<hsize_t> coordinates);
template std::vector<std::complex<float>>
DataSet::read_selection<std::complex<float>>(
const std::vector<hsize_t> coordinates);
template std::vector<std::complex<double>>
DataSet::read_selection<std::complex<double>>(
const std::vector<hsize_t> coordinates);
- template std::vector<std::complex<long double>>
- DataSet::read_selection<std::complex<long double>>(
- const std::vector<hsize_t> coordinates);
template std::vector<int>
DataSet::read_selection<int>(const std::vector<hsize_t> coordinates);
template std::vector<unsigned int>
DataSet::read_hyperslab<std::vector, double>(
const std::vector<hsize_t> &offset,
const std::vector<hsize_t> &count);
- template std::vector<long double>
- DataSet::read_hyperslab<std::vector, long double>(
- const std::vector<hsize_t> &offset,
- const std::vector<hsize_t> &count);
template std::vector<std::complex<float>>
DataSet::read_hyperslab<std::vector, std::complex<float>>(
const std::vector<hsize_t> &offset,
DataSet::read_hyperslab<std::vector, std::complex<double>>(
const std::vector<hsize_t> &offset,
const std::vector<hsize_t> &count);
- template std::vector<std::complex<long double>>
- DataSet::read_hyperslab<std::vector, std::complex<long double>>(
- const std::vector<hsize_t> &offset,
- const std::vector<hsize_t> &count);
template std::vector<int>
DataSet::read_hyperslab<std::vector, int>(const std::vector<hsize_t> &offset,
const std::vector<hsize_t> &count);
template void
DataSet::read_none<double>();
template void
- DataSet::read_none<long double>();
- template void
DataSet::read_none<std::complex<float>>();
template void
DataSet::read_none<std::complex<double>>();
template void
- DataSet::read_none<std::complex<long double>>();
- template void
DataSet::read_none<int>();
template void
DataSet::read_none<unsigned int>();
template void
DataSet::write<std::vector, double>(const std::vector<double> &data);
template void
- DataSet::write<std::vector, long double>(
- const std::vector<long double> &data);
- template void
DataSet::write<std::vector, std::complex<float>>(
const std::vector<std::complex<float>> &data);
template void
DataSet::write<std::vector, std::complex<double>>(
const std::vector<std::complex<double>> &data);
template void
- DataSet::write<std::vector, std::complex<long double>>(
- const std::vector<std::complex<long double>> &data);
- template void
DataSet::write<std::vector, int>(const std::vector<int> &data);
template void
DataSet::write<std::vector, unsigned int>(
DataSet::write_selection<double>(const std::vector<double> &data,
const std::vector<hsize_t> coordinates);
template void
- DataSet::write_selection<long double>(const std::vector<long double> &data,
- const std::vector<hsize_t> coordinates);
- template void
DataSet::write_selection<std::complex<float>>(
const std::vector<std::complex<float>> &data,
const std::vector<hsize_t> coordinates);
const std::vector<std::complex<double>> &data,
const std::vector<hsize_t> coordinates);
template void
- DataSet::write_selection<std::complex<long double>>(
- const std::vector<std::complex<long double>> &data,
- const std::vector<hsize_t> coordinates);
- template void
DataSet::write_selection<int>(const std::vector<int> & data,
const std::vector<hsize_t> coordinates);
template void
const std::vector<hsize_t> &offset,
const std::vector<hsize_t> &count);
template void
- DataSet::write_hyperslab<std::vector, long double>(
- const std::vector<long double> &data,
- const std::vector<hsize_t> & offset,
- const std::vector<hsize_t> & count);
- template void
DataSet::write_hyperslab<std::vector, std::complex<float>>(
const std::vector<std::complex<float>> &data,
const std::vector<hsize_t> & offset,
const std::vector<hsize_t> & offset,
const std::vector<hsize_t> & count);
template void
- DataSet::write_hyperslab<std::vector, std::complex<long double>>(
- const std::vector<std::complex<long double>> &data,
- const std::vector<hsize_t> & offset,
- const std::vector<hsize_t> & count);
- template void
DataSet::write_hyperslab<std::vector, int>(const std::vector<int> & data,
const std::vector<hsize_t> &offset,
const std::vector<hsize_t> &count);
const std::vector<hsize_t> &count,
const std::vector<hsize_t> &block);
template void
- DataSet::write_hyperslab<std::vector, long double>(
- const std::vector<long double> &data,
- const std::vector<hsize_t> & data_dimensions,
- const std::vector<hsize_t> & offset,
- const std::vector<hsize_t> & stride,
- const std::vector<hsize_t> & count,
- const std::vector<hsize_t> & block);
- template void
DataSet::write_hyperslab<std::vector, std::complex<float>>(
const std::vector<std::complex<float>> &data,
const std::vector<hsize_t> & data_dimensions,
const std::vector<hsize_t> & count,
const std::vector<hsize_t> & block);
template void
- DataSet::write_hyperslab<std::vector, std::complex<long double>>(
- const std::vector<std::complex<long double>> &data,
- const std::vector<hsize_t> & data_dimensions,
- const std::vector<hsize_t> & offset,
- const std::vector<hsize_t> & stride,
- const std::vector<hsize_t> & count,
- const std::vector<hsize_t> & block);
- template void
DataSet::write_hyperslab<std::vector, int>(
const std::vector<int> & data,
const std::vector<hsize_t> &data_dimensions,
template void
DataSet::write_none<double>();
template void
- DataSet::write_none<long double>();
- template void
DataSet::write_none<std::complex<float>>();
template void
DataSet::write_none<std::complex<double>>();
template void
- DataSet::write_none<std::complex<long double>>();
- template void
DataSet::write_none<int>();
template void
DataSet::write_none<unsigned int>();
Group::create_dataset<double>(const std::string name,
const std::vector<hsize_t> dimensions) const;
template DataSet
- Group::create_dataset<long double>(
- const std::string name,
- const std::vector<hsize_t> dimensions) const;
- template DataSet
Group::create_dataset<std::complex<float>>(
const std::string name,
const std::vector<hsize_t> dimensions) const;
const std::string name,
const std::vector<hsize_t> dimensions) const;
template DataSet
- Group::create_dataset<std::complex<long double>>(
- const std::string name,
- const std::vector<hsize_t> dimensions) const;
- template DataSet
Group::create_dataset<int>(const std::string name,
const std::vector<hsize_t> dimensions) const;
template DataSet
Group::write_dataset(const std::string name,
const std::vector<double> &data) const;
template void
- Group::write_dataset(const std::string name,
- const std::vector<long double> &data) const;
- template void
Group::write_dataset(const std::string name,
const std::vector<std::complex<float>> &data) const;
template void
Group::write_dataset(const std::string name,
const std::vector<std::complex<double>> &data) const;
template void
- Group::write_dataset(
- const std::string name,
- const std::vector<std::complex<long double>> &data) const;
- template void
Group::write_dataset(const std::string name,
const std::vector<int> &data) const;
template void
// Create attributes attached to the root
const float root_float = 2.45681934e5;
const double root_double = 6.234542e3;
- const long double root_long_double = 4.321432e6;
const int root_int = -56;
const unsigned int root_unsigned_int = 22;
data_file.write_attr("root_float", root_float);
data_file.write_attr("root_double", root_double);
- data_file.write_attr("root_long_double", root_long_double);
data_file.write_attr("root_int", root_int);
data_file.write_attr("root_unsigned_int", root_unsigned_int);
data_file.write_attr("root_total",
- (root_float + root_double + root_long_double) *
- root_int * root_unsigned_int);
+ (root_float + root_double) * root_int *
+ root_unsigned_int);
// Create attributes attached to a group
auto test_group = data_file.create_group("test_group");
- const std::complex<float> group_complex_float = {2.45681934e5, 45e2};
- const std::complex<double> group_complex_double = {6.234542e3, 2};
- const std::complex<long double> group_complex_long_double = {4.321432e6,
- 23};
+ const std::complex<float> group_complex_float = {2.45681934e5, 45e2};
+ const std::complex<double> group_complex_double = {6.234542e3, 2};
test_group.write_attr("group_complex_float", group_complex_float);
test_group.write_attr("group_complex_double", group_complex_double);
- test_group.write_attr("group_complex_long_double",
- group_complex_long_double);
test_group.write_attr("group_complex_total",
- group_complex_float * group_complex_double *
- group_complex_long_double);
+ group_complex_float * group_complex_double);
test_group.write_attr("group_string", std::string("test_string_attribute"));
// Create attributes attached to a dataset
HDF5::File data_file(filename, HDF5::File::Mode::open);
auto root_float = data_file.attr<float>("root_float");
auto root_double = data_file.attr<double>("root_double");
- auto root_long_double = data_file.attr<long double>("root_long_double");
- auto root_int = data_file.attr<int>("root_int");
+ auto root_int = data_file.attr<int>("root_int");
auto root_unsigned_int = data_file.attr<unsigned int>("root_unsigned_int");
// calculated and read should be the same
deallog << "root_total calculated:"
- << (root_float + root_double + root_long_double) * root_int *
- root_unsigned_int
+ << (root_float + root_double) * root_int * root_unsigned_int
<< std::endl;
- deallog << "root_total read:" << data_file.attr<long double>("root_total")
+ deallog << "root_total read:" << data_file.attr<double>("root_total")
<< std::endl;
// Read attributes attached to a group
test_group.attr<std::complex<float>>("group_complex_float");
auto group_complex_double =
test_group.attr<std::complex<double>>("group_complex_double");
- auto group_complex_long_double =
- test_group.attr<std::complex<long double>>("group_complex_long_double");
deallog << "group_complex_total calculated:"
- << (group_complex_float * group_complex_double *
- group_complex_long_double)
- << std::endl;
+ << (group_complex_float * group_complex_double) << std::endl;
deallog << "group_complex_total read:"
- << test_group.attr<std::complex<long double>>("group_complex_total")
+ << test_group.attr<std::complex<double>>("group_complex_total")
<< std::endl;
deallog << "group_string read:"
<< test_group.attr<std::string>("group_string") << std::endl;
-DEAL::root_total calculated:-5.63437e+09
-DEAL::root_total read:-5.63437e+09
-DEAL::group_complex_total calculated:(6.61916e+15,1.23398e+14)
-DEAL::group_complex_total read:(6.61916e+15,1.23398e+14)
+DEAL::root_total calculated:-3.10361e+08
+DEAL::root_total read:-3.10361e+08
+DEAL::group_complex_total calculated:(1.53171e+09,2.85468e+07)
+DEAL::group_complex_total read:(1.53171e+09,2.85468e+07)
DEAL::group_string read:test_string_attribute
DEAL::dataset_double read:20.2000
DEAL::dataset_string read:test_dataset_attribute
// Create attributes attached to the root
const float root_float = 2.45681934e5;
const double root_double = 6.234542e3;
- const long double root_long_double = 4.321432e6;
const int root_int = -56;
const unsigned int root_unsigned_int = 22;
data_file.write_attr("root_float", root_float);
data_file.write_attr("root_double", root_double);
- data_file.write_attr("root_long_double", root_long_double);
data_file.write_attr("root_int", root_int);
data_file.write_attr("root_unsigned_int", root_unsigned_int);
data_file.write_attr("root_total",
- (root_float + root_double + root_long_double) *
- root_int * root_unsigned_int);
+ (root_float + root_double) * root_int *
+ root_unsigned_int);
// Create attributes attached to a group
auto test_group = data_file.create_group("test_group");
- const std::complex<float> group_complex_float = {2.45681934e5, 45e2};
- const std::complex<double> group_complex_double = {6.234542e3, 2};
- const std::complex<long double> group_complex_long_double = {4.321432e6,
- 23};
+ const std::complex<float> group_complex_float = {2.45681934e5, 45e2};
+ const std::complex<double> group_complex_double = {6.234542e3, 2};
test_group.write_attr("group_complex_float", group_complex_float);
test_group.write_attr("group_complex_double", group_complex_double);
- test_group.write_attr("group_complex_long_double",
- group_complex_long_double);
test_group.write_attr("group_complex_total",
- group_complex_float * group_complex_double *
- group_complex_long_double);
+ group_complex_float * group_complex_double);
test_group.write_attr("group_string", std::string("test_string_attribute"));
// Create attributes attached to a dataset
HDF5::File data_file(filename, MPI_COMM_WORLD, HDF5::File::Mode::open);
auto root_float = data_file.attr<float>("root_float");
auto root_double = data_file.attr<double>("root_double");
- auto root_long_double = data_file.attr<long double>("root_long_double");
- auto root_int = data_file.attr<int>("root_int");
+ auto root_int = data_file.attr<int>("root_int");
auto root_unsigned_int = data_file.attr<unsigned int>("root_unsigned_int");
// calculated and read should be the same
deallog << "root_total calculated:"
- << (root_float + root_double + root_long_double) * root_int *
- root_unsigned_int
+ << (root_float + root_double) * root_int * root_unsigned_int
<< std::endl;
- deallog << "root_total read:" << data_file.attr<long double>("root_total")
+ deallog << "root_total read:" << data_file.attr<double>("root_total")
<< std::endl;
// Read attributes attached to a group
test_group.attr<std::complex<float>>("group_complex_float");
auto group_complex_double =
test_group.attr<std::complex<double>>("group_complex_double");
- auto group_complex_long_double =
- test_group.attr<std::complex<long double>>("group_complex_long_double");
deallog << "group_complex_total calculated:"
- << (group_complex_float * group_complex_double *
- group_complex_long_double)
- << std::endl;
+ << (group_complex_float * group_complex_double) << std::endl;
deallog << "group_complex_total read:"
- << test_group.attr<std::complex<long double>>("group_complex_total")
+ << test_group.attr<std::complex<double>>("group_complex_total")
<< std::endl;
deallog << "group_string read:"
<< test_group.attr<std::string>("group_string") << std::endl;
-DEAL::root_total calculated:-5.63437e+09
-DEAL::root_total read:-5.63437e+09
-DEAL::group_complex_total calculated:(6.61916e+15,1.23398e+14)
-DEAL::group_complex_total read:(6.61916e+15,1.23398e+14)
+DEAL::root_total calculated:-3.10361e+08
+DEAL::root_total read:-3.10361e+08
+DEAL::group_complex_total calculated:(1.53171e+09,2.85468e+07)
+DEAL::group_complex_total read:(1.53171e+09,2.85468e+07)
DEAL::group_string read:test_string_attribute
DEAL::dataset_double read:20.2000
DEAL::dataset_string read:test_dataset_attribute
-DEAL::root_total calculated:-5.63437e+09
-DEAL::root_total read:-5.63437e+09
-DEAL::group_complex_total calculated:(6.61916e+15,1.23398e+14)
-DEAL::group_complex_total read:(6.61916e+15,1.23398e+14)
+DEAL::root_total calculated:-3.10361e+08
+DEAL::root_total read:-3.10361e+08
+DEAL::group_complex_total calculated:(1.53171e+09,2.85468e+07)
+DEAL::group_complex_total read:(1.53171e+09,2.85468e+07)
DEAL::group_string read:test_string_attribute
DEAL::dataset_double read:20.2000
DEAL::dataset_string read:test_dataset_attribute