Hello
How do this function work?H5Soffset_simple ?

I would like to offset my hyperslab on one axis,but this code :

               memH5S = H5Scopy(tubeH5S);
                hsize_t blocks2[6];
                offset[0]=0;
                offset[1]=0;
                offset[2]=-7;
H5Sget_select_hyper_blocklist(memH5S,0,H5Sget_select_hyper_nblocks(memH5S),blocks2);
                int kBlock=0;
                int memRank=3;

cout<<" block2 :"<<blocks2[kBlock*memRank*2]<<" "<<blocks2[kBlock*memRank*2+1]<<" "<<blocks2[kBlock*memRank*2+2]<<" "<<blocks2[kBlock*memRank*2+3]<<" "<<blocks2[kBlock*memRank*2+4]<<" "<<blocks2[kBlock*memRank*2+5]<<endl;

                herr_t err =H5Soffset_simple(memH5S,offset);
cout<<"offset:"<<offset[0]<<" "<<offset[1]<<" "<<offset[2]<<" "<<err<<endl;

H5Sget_select_hyper_blocklist(memH5S,0,H5Sget_select_hyper_nblocks(memH5S),blocks2); cout<<" block2 :"<<blocks2[kBlock*memRank*2]<<" "<<blocks2[kBlock*memRank*2+1]<<" "<<blocks2[kBlock*memRank*2+2]<<" "<<blocks2[kBlock*memRank*2+3]<<" "<<blocks2[kBlock*memRank*2+4]<<" "<<blocks2[kBlock*memRank*2+5]<<endl;


give me that :

 block2 :0 0 7 3 3 7
offset:0 0 -7 0
 block2 :0 0 7 3 3 7

So the hyperslab doesn't look like it have been offsetted

HOWEVER the data when i read is put in the rigth offsetted place !

HOWEVER, i've not find any way to recover the current offset of the dataspace !

so :

How to check where is the current offsetted selection? using a direct method? or recover hyperslab block and offset?

Thanks for help



_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to