mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-31 17:10:47 +08:00
[svn-r7741] Purpose:
Fix example Description: On Solaris 64 (Sol), the output has garbage for a dataset when fill value is not set. Solution: Added setting fill value to the dataset first. Platforms: Only effected C++ API Linux 2.4 (eirene) SunOS sol 5.8 (sol)
This commit is contained in:
parent
35fe60a237
commit
d8b497ecef
@ -71,11 +71,16 @@ int main (void)
|
||||
hsize_t chunk_dims[2] ={2, 5};
|
||||
cparms.setChunk( RANK, chunk_dims );
|
||||
|
||||
/*
|
||||
* Set fill value for the dataset
|
||||
*/
|
||||
int fill_val = 0;
|
||||
cparms.setFillValue( PredType::NATIVE_INT, &fill_val);
|
||||
|
||||
/*
|
||||
* Create a new dataset within the file using cparms
|
||||
* creation properties.
|
||||
*/
|
||||
|
||||
DataSet dataset = file.createDataSet( DATASET_NAME, PredType::NATIVE_INT, mspace1, cparms);
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user