jsharpe / hdf5 Goto Github PK
View Code? Open in Web Editor NEWHDF5 C++ wrapper
License: Boost Software License 1.0
HDF5 C++ wrapper
License: Boost Software License 1.0
This library aims to provide an abstraction of the hdf5 file format for c++ code. It aims to reduce the number of explicit calls to the hdf5 APIs by using the c++ type system to automatically construct the appropriate datatypes. The library is a header only library so no compilation is required. Requirements: hdf5 1.6 or greater mpi-io if parallel io support is required Boost 1.37 or greater Example usage: #include <hdf5/hdffile.hpp> #include <hdf5/hdfdataset.hpp> #include <boost/shared_ptr.hpp> int main() { hdf::HDFFile<> file("test.h5", hdf::HDFFile<>::truncate); std::vector<double> data(100,1.0); std::shared_ptr<hdf::HDFDataSet<> > dataset = file.writeDataset<double>("doubledataset", data); }
This test doesn't seem to work with the current version of hdf5 and boost 1.57. Is this a known issue?
I copy and paste your Wiki example and I did a little adaptation to use it on a new Qt Console application.
#include <QCoreApplication>
#include <hdffile.hpp>
#include <hdfdataset.hpp>
#include <boost/shared_ptr.hpp>
#include <vector>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
hdf::HDFFile<> file("test.h5", hdf::HDFFile<>::truncate);
std::vector<double> data(100,1.0);
std::shared_ptr<hdf::HDFDataSet<> > dataset =
file.writeDataset<double>("doubledataset", data);
return a.exec();
}
In this line:
std::shared_ptr<hdf::HDFDataSet<> > dataset =
file.writeDataset<double>("doubledataset", data);
I got these 2 errors:
error: C++ requires a type specifier for all declarations
error: expected '(' for function-style cast or type construction
What I have to do?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.