91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 8.3MB
    文件類型: .bz2
    金幣: 1
    下載: 0 次
    發布日期: 2023-10-10
  • 語言: 其他
  • 標簽: hdf5??

資源簡介

hdf5-1.10.5源碼安裝包,下載比較困難,方便大家學習。

資源截圖

代碼片段和文件信息

/*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*
?*?Copyright?by?The?HDF?Group.???????????????????????????????????????????????*
?*?Copyright?by?the?Board?of?Trustees?of?the?University?of?Illinois.?????????*
?*?All?rights?reserved.??????????????????????????????????????????????????????*
?*???????????????????????????????????????????????????????????????????????????*
?*?This?file?is?part?of?HDF5.??The?full?HDF5?copyright?notice?including?????*
?*?terms?governing?use?modification?and?redistribution?is?contained?in????*
?*?the?COPYING?file?which?can?be?found?at?the?root?of?the?source?code???????*
?*?distribution?tree?or?in?https://support.hdfgroup.org/ftp/HDF5/releases.??*
?*?If?you?do?not?have?access?to?either?file?you?may?request?a?copy?from?????*
?*?help@hdfgroup.org.????????????????????????????????????????????????????????*
?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*?*/

/*
?*???This?example?shows?how?to?read?data?from?a?chunked?dataset.
?*???We?will?read?from?the?file?created?by?extend.cpp
?*/

#ifdef?OLD_HEADER_FILENAME
#include?
#else
#include?
#endif
using?std::cout;
using?std::endl;

#include?
#include?“H5Cpp.h“
using?namespace?H5;

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?block?to?detect?exceptions?raised?by?any?of?the?calls?inside?it
????try
????{
/*
?*?Turn?off?the?auto-printing?when?failure?occurs?so?that?we?can
?*?handle?the?errors?appropriately
?*/
Exception::dontPrint();

/*
?*?Open?the?file?and?the?dataset.
?*/
H5File?file(?FILE_NAME?H5F_ACC_RDONLY?);
DataSet?dataset?=?file.openDataSet(?DATASET_NAME?);

/*
?*?Get?filespace?for?rank?and?dimension
?*/
DataSpace?filespace?=?dataset.getSpace();

/*
?*?Get?number?of?dimensions?in?the?file?dataspace
?*/
int?rank?=?filespace.getSimpleExtentNdims();

/*
?*?Get?and?print?the?dimension?sizes?of?the?file?dataspace
?*/
hsize_t?dims[2];? //?dataset?dimensions
rank?=?filespace.getSimpleExtentDims(?dims?);
cout?< ?????< ?????<
/*
?*?Define?the?memory?space?to?read?dataset.
?*/
DataSpace?mspace1(RANK?dims);

/*
?*?Read?dataset?back?and?display.
?*/
int?data_out[NX][NY];??//?buffer?for?dataset?to?be?read
dataset.read(?data_out?PredType::NATIVE_INT?mspace1?filespace?);

cout?< cout?< for?(j?=?0;?j? {
????for?(i?=?0;?i? cout?< ????cout?< }

/*
?* ????dataset?rank?2?dimensions?10?x?5
?* ????chunk?rank?2?dimensions?2?x?5

?* ????Dataset:
?* ????1?1?1?3?3
?* ????1?1?1?3?3
?* ????1?1?1?0?0
?* ????2?0?0?0?0
?* ????2?0?0?0?0
?* ????2?0?0?0?0
?* ???

評論

共有 條評論