Use int64_t everywhere for flash id

This commit is contained in:
Guilhem Lavaux 2017-02-15 15:14:42 +01:00
parent b8ca531987
commit 6003121c64
3 changed files with 5 additions and 4 deletions

View File

@ -226,7 +226,7 @@ void h5_read_flash3_particles (H5File* file,
float *vel1,
float *vel2,
float *vel3,
long *id)
int64_t *id)
{
herr_t status;
@ -381,7 +381,7 @@ void h5_read_flash3_particles (H5File* file,
if (id) {
for(p=0; p < (pcount); p++) {
id[p+poffset] = (long) *(partBuffer+iptag-1+p*numProps);
id[p+poffset] = (int64_t) *(partBuffer+iptag-1+p*numProps);
} }
if (pos1 && pos2 && pos3) {

View File

@ -52,6 +52,7 @@ This file has been developped by P. M. Sutter.
#include <cstring>
#include "H5Cpp.h"
#include "hdf5_flash.h"
#include <stdint.h>
using namespace H5;
@ -73,7 +74,7 @@ void h5_read_flash3_particles (H5File* file,
float *vel1,
float *vel2,
float *vel3,
long *id);
int64_t *id);
void h5_read_flash3_header_info(H5File* file,
double* time, /* simulation time */

View File

@ -106,7 +106,7 @@ SimuData *CosmoTool::loadFlashMulti(const char *fname, int id, int loadflags)
} }
if (loadflags & NEED_GADGET_ID) {
data->Id = new long[data->NumPart];
data->Id = new int64_t[data->NumPart];
if (data->Id == 0) {
delete data;
return 0;