本文整理汇总了C++中DSetCreatPropList::getLayout方法的典型用法代码示例。如果您正苦于以下问题:C++ DSetCreatPropList::getLayout方法的具体用法?C++ DSetCreatPropList::getLayout怎么用?C++ DSetCreatPropList::getLayout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DSetCreatPropList
的用法示例。
在下文中一共展示了DSetCreatPropList::getLayout方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
*/
filespace.selectHyperslab( H5S_SELECT_SET, count, offset );
dataset.read( column, PredType::NATIVE_INT, mspace2, filespace );
cout << endl;
cout << "Third column: " << endl;
for (i = 0; i < 10; i++)
cout << column[i] << endl;
/*
* Third column:
* 1
* 1
* 1
* 0
* 0
* 0
* 0
* 0
* 0
* 0
*/
/*
* Get creation properties list.
*/
DSetCreatPropList cparms = dataset.getCreatePlist();
/*
* Check if dataset is chunked.
*/
hsize_t chunk_dims[2];
int rank_chunk;
if( H5D_CHUNKED == cparms.getLayout() )
{
/*
* Get chunking information: rank and dimensions
*/
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;
/*
* Define the memory space to read a chunk.
*/
DataSpace mspace3( rank_chunk, chunk_dims );
/*
* Define chunk in the file (hyperslab) to read.
*/
offset[0] = 2;
offset[1] = 0;
count[0] = chunk_dims[0];
count[1] = chunk_dims[1];
filespace.selectHyperslab( H5S_SELECT_SET, count, offset );
/*
* Read chunk back and display.
*/
int chunk_out[2][5]; // buffer for chunk to be read
dataset.read( chunk_out, PredType::NATIVE_INT, mspace3, filespace );
cout << endl;
cout << "Chunk:" << endl;
for (j = 0; j < chunk_dims[0]; j++)
{