File: testIoNg.cpp

package info (click to toggle)
dmrgpp 6.06-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 113,900 kB
  • sloc: cpp: 80,986; perl: 14,772; ansic: 2,923; makefile: 83; sh: 17
file content (23 lines) | stat: -rw-r--r-- 365 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "Io/IoNg.h"

void test1()
{
	PsimagLite::IoNg::Out ioOut("hello.hdf5", PsimagLite::IoNg::ACC_TRUNC);

	std::vector<double> v(10, 42.0);
	ioOut.write(v, "MyVector");

	ioOut.close();

	sleep(1);

	PsimagLite::IoNg::In ioIn("hello.hdf5");

	std::vector<double> w;

	ioIn.read(w, "MyVector");

	std::cout << w;
}

int main(int argc, char** argv) { test1(); }