#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;
int main (void)
{
try
{
hsize_t dims[2] = { 3, 3};
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
H5File file( FILE_NAME, H5F_ACC_TRUNC );
hsize_t chunk_dims[2] ={2, 5};
int fill_val = 0;
hsize_t size[2];
size[0] = 3;
size[1] = 3;
hsize_t offset[2];
offset[0] = 0;
offset[1] = 0;
hsize_t dims1[2] = { 3, 3};
int data1[3][3] = { {1, 1, 1},
{1, 1, 1},
{1, 1, 1} };
hsize_t dims2[2] = { 7, 1};
dims[0] = dims1[0] + dims2[0];
size[0] = dims[0];
size[1] = dims[1];
offset[0] = 3;
offset[1] = 0;
int data2[7] = { 2, 2, 2, 2, 2, 2, 2};
hsize_t dims3[2] = { 2, 2};
dims[1] = dims1[1] + dims3[1];
size[0] = dims[0];
size[1] = dims[1];
offset[0] = 0;
offset[1] = 3;
int data3[2][2] = { {3, 3}, {3, 3} };
int i, j;
int data_out[NX][NY];
for (i = 0; i < NX; i++)
{
for (j = 0; j < NY; j++)
data_out[i][j] = 0;
}
for (i=0; i < NX; i++)
{
for(j=0; j < NY; j++)
cout << data_out[i][j] << " ";
cout << endl;
}
}
{
return -1;
}
{
return -1;
}
{
return -1;
}
{
return -1;
}
return 0;
}