Merge branch 'master' of bitbucket.org:glavaux/cosmotool
This commit is contained in:
commit
0350a22a0b
@ -189,7 +189,7 @@ void CICFilter::putParticles(CICParticles *particles, uint32_t N)
|
||||
|
||||
for (int t = 0; t < threadUsed; t++)
|
||||
{
|
||||
delete[] threadedDensity;
|
||||
delete[] threadedDensity[t];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,26 +69,36 @@ namespace CosmoTool {
|
||||
}
|
||||
};
|
||||
|
||||
//, typename boost::enable_if<boost::is_same<T, tl> >::type> \
|
||||
//
|
||||
#define HDF5_TYPE(tl, thdf5) \
|
||||
template<typename T> struct get_hdf5_data_type<T, typename boost::enable_if<boost::is_same<T, tl> >::type> \
|
||||
template<typename T> struct get_hdf5_data_type<T, typename boost::enable_if<boost::is_same<T,tl> >::type > \
|
||||
{ static H5::DataType type() { return H5::PredType::thdf5; }; }
|
||||
|
||||
#define HDF5_SAFE_TYPE(tl, othertl, thdf5) \
|
||||
template<typename T> struct get_hdf5_data_type<T, \
|
||||
typename boost::enable_if< \
|
||||
boost::integral_constant<bool, \
|
||||
boost::is_same<T, tl>::value \
|
||||
&& !boost::is_same<T,othertl>::value > \
|
||||
>::type \
|
||||
> \
|
||||
{ static H5::DataType type() { return H5::PredType::thdf5; }; }
|
||||
|
||||
|
||||
HDF5_SAFE_TYPE(long, int , NATIVE_LONG);
|
||||
HDF5_SAFE_TYPE(unsigned long, unsigned int , NATIVE_ULONG);
|
||||
HDF5_SAFE_TYPE(long long, long , NATIVE_LLONG);
|
||||
HDF5_SAFE_TYPE(unsigned long long, unsigned long, NATIVE_ULLONG);
|
||||
HDF5_TYPE(char , NATIVE_CHAR);
|
||||
HDF5_TYPE(long long , NATIVE_LLONG);
|
||||
HDF5_TYPE(unsigned long long, NATIVE_ULLONG);
|
||||
HDF5_TYPE(int8_t , NATIVE_INT8);
|
||||
HDF5_TYPE(uint8_t , NATIVE_UINT8);
|
||||
HDF5_TYPE(int16_t , NATIVE_INT16);
|
||||
HDF5_TYPE(uint16_t , NATIVE_UINT16);
|
||||
HDF5_TYPE(int32_t , NATIVE_INT32);
|
||||
HDF5_TYPE(uint32_t , NATIVE_UINT32);
|
||||
HDF5_TYPE(int64_t , NATIVE_INT64);
|
||||
HDF5_TYPE(uint64_t , NATIVE_UINT64);
|
||||
HDF5_TYPE(unsigned char , NATIVE_UCHAR);
|
||||
HDF5_TYPE(int , NATIVE_INT);
|
||||
HDF5_TYPE(unsigned int , NATIVE_UINT);
|
||||
HDF5_TYPE(float , NATIVE_FLOAT);
|
||||
HDF5_TYPE(double , NATIVE_DOUBLE);
|
||||
HDF5_TYPE(long double , NATIVE_LDOUBLE);
|
||||
|
||||
#undef HDF5_TYPE
|
||||
#undef HDF5_SAFE_TYPE
|
||||
|
||||
// Extent generator
|
||||
template<std::size_t r>
|
||||
|
Loading…
Reference in New Issue
Block a user