#ifdef OLD_HEADER_FILENAME
#include <iostream.h>
#else
#include <iostream>
#endif
#include <string>
#ifndef H5_NO_NAMESPACE
#ifndef H5_NO_STD
using std::cout;
using std::endl;
#endif // H5_NO_STD
#endif
#include "H5Cpp.h"
#ifndef H5_NO_NAMESPACE
using namespace H5;
#endif
const H5std_string FILE_NAME( "SDSextendible.h5" );
const H5std_string DATASET_NAME( "ExtendibleArray" );
const int NX = 10;
const int NY = 5;
const int RANK = 2;
const int RANKC = 1;
int main (void)
{
hsize_t i, j;
try
{
H5File file( FILE_NAME, H5F_ACC_RDONLY );
DataSet dataset = file.openDataSet( DATASET_NAME );
hsize_t dims[2];
cout << "dataset rank = " << rank << ", dimensions "
<< (unsigned long)(dims[0]) << " x "
<< (unsigned long)(dims[1]) << endl;
int data_out[NX][NY];
cout << "\n";
cout << "Dataset: \n";
for (j = 0; j < dims[0]; j++)
{
for (i = 0; i < dims[1]; i++)
cout << data_out[j][i] << " ";
cout << endl;
}
hsize_t col_dims[1];
col_dims[0] = 10;
hsize_t offset[2] = { 0, 2 };
hsize_t count[2] = { 10, 1 };
int column[10];
cout << endl;
cout << "Third column: " << endl;
for (i = 0; i < 10; i++)
cout << column[i] << endl;
hsize_t chunk_dims[2];
int rank_chunk;
{
rank_chunk = cparms.
getChunk( 2, chunk_dims);
cout << "chunk rank " << rank_chunk << "dimensions "
<< (unsigned long)(chunk_dims[0]) << " x "
<< (unsigned long)(chunk_dims[1]) << endl;
offset[0] = 2;
offset[1] = 0;
count[0] = chunk_dims[0];
count[1] = chunk_dims[1];
int chunk_out[2][5];
cout << endl;
cout << "Chunk:" << endl;
for (j = 0; j < chunk_dims[0]; j++)
{
for (i = 0; i < chunk_dims[1]; i++)
cout << chunk_out[j][i] << " ";
cout << endl;
}
}
}
{
return -1;
}
{
return -1;
}
{
return -1;
}
return 0;
}