Back to index

salome-kernel  6.5.0
Functions
HDFarrayCreate.c File Reference
#include "hdfi.h"

Go to the source code of this file.

Functions

hdf_idt HDFarrayCreate (hdf_type dataType, int ndim, hdf_size *dim)

Function Documentation

hdf_idt HDFarrayCreate ( hdf_type  dataType,
int  ndim,
hdf_size dim 
)

Definition at line 43 of file HDFarrayCreate.c.

{
  hdf_idt type_hdf;
  switch(dataType)
      {
      case HDF_FLOAT64 :
#if defined (PCLINUX) || defined (PCLINUX64)
       type_hdf = H5T_IEEE_F64BE;
#else 
       type_hdf = H5T_IEEE_F64LE;
#endif
       break;

      case HDF_INT32 :
#if defined (PCLINUX) || defined (PCLINUX64)
       type_hdf = H5T_STD_I32BE;  
#else
       type_hdf = H5T_NATIVE_INT;
#endif
       break;
 
      case HDF_INT64 :
       type_hdf = H5T_NATIVE_LONG;
       break;
      case HDF_CHAR :
       type_hdf = H5T_NATIVE_CHAR;
       break;
      default:
       return -1;
       break;
      }
    
    return H5Tarray_create2( type_hdf, ndim, dim );
}